Skip to content

Commit

Permalink
v1.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Groxan committed Jun 24, 2022
1 parent 26897e8 commit bca1c8a
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 45 deletions.
38 changes: 19 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ init:
docker-compose exec -T db createdb -U tzkt -T template0 tzkt_db
docker-compose exec -T db apt update
docker-compose exec -T db apt install -y wget
docker-compose exec -T db wget "https://tzkt.fra1.digitaloceanspaces.com/snapshots/tzkt_v1.8_mainnet.backup" -O tzkt_db.backup
docker-compose exec -T db wget "https://tzkt.fra1.digitaloceanspaces.com/snapshots/tzkt_v1.9_mainnet.backup" -O tzkt_db.backup
docker-compose exec -T db pg_restore -U tzkt -O -x -v -d tzkt_db -e -j 4 tzkt_db.backup
docker-compose exec -T db rm tzkt_db.backup
docker-compose exec -T db apt autoremove --purge -y wget
Expand Down Expand Up @@ -45,27 +45,27 @@ api-image:
sync-image:
docker build -t bakingbad/tzkt-sync:latest -f ./Tzkt.Sync/Dockerfile .

hangzhou-init:
docker-compose -f docker-compose.hangzhou.yml up -d hangzhou-db
docker-compose -f docker-compose.hangzhou.yml exec -T hangzhou-db psql -U tzkt postgres -c '\l'
docker-compose -f docker-compose.hangzhou.yml exec -T hangzhou-db dropdb -U tzkt --if-exists tzkt_db
docker-compose -f docker-compose.hangzhou.yml exec -T hangzhou-db createdb -U tzkt -T template0 tzkt_db
docker-compose -f docker-compose.hangzhou.yml exec -T hangzhou-db apt update
docker-compose -f docker-compose.hangzhou.yml exec -T hangzhou-db apt install -y wget
docker-compose -f docker-compose.hangzhou.yml exec -T hangzhou-db wget "https://tzkt.fra1.digitaloceanspaces.com/snapshots/tzkt_v1.8_hangzhou2net.backup" -O tzkt_db.backup
docker-compose -f docker-compose.hangzhou.yml exec -T hangzhou-db pg_restore -U tzkt -O -x -v -d tzkt_db -e -j 4 tzkt_db.backup
docker-compose -f docker-compose.hangzhou.yml exec -T hangzhou-db rm tzkt_db.backup
docker-compose -f docker-compose.hangzhou.yml exec -T hangzhou-db apt autoremove --purge -y wget
jakarta-init:
docker-compose -f docker-compose.jakarta.yml up -d jakarta-db
docker-compose -f docker-compose.jakarta.yml exec -T jakarta-db psql -U tzkt postgres -c '\l'
docker-compose -f docker-compose.jakarta.yml exec -T jakarta-db dropdb -U tzkt --if-exists tzkt_db
docker-compose -f docker-compose.jakarta.yml exec -T jakarta-db createdb -U tzkt -T template0 tzkt_db
docker-compose -f docker-compose.jakarta.yml exec -T jakarta-db apt update
docker-compose -f docker-compose.jakarta.yml exec -T jakarta-db apt install -y wget
docker-compose -f docker-compose.jakarta.yml exec -T jakarta-db wget "https://tzkt.fra1.digitaloceanspaces.com/snapshots/tzkt_v1.9_jakartanet.backup" -O tzkt_db.backup
docker-compose -f docker-compose.jakarta.yml exec -T jakarta-db pg_restore -U tzkt -O -x -v -d tzkt_db -e -j 4 tzkt_db.backup
docker-compose -f docker-compose.jakarta.yml exec -T jakarta-db rm tzkt_db.backup
docker-compose -f docker-compose.jakarta.yml exec -T jakarta-db apt autoremove --purge -y wget
docker-compose pull

hangzhou-start:
docker-compose -f docker-compose.hangzhou.yml up -d
jakarta-start:
docker-compose -f docker-compose.jakarta.yml up -d

hangzhou-stop:
docker-compose -f docker-compose.hangzhou.yml down
jakarta-stop:
docker-compose -f docker-compose.jakarta.yml down

hangzhou-db-start:
docker-compose -f docker-compose.hangzhou.yml up -d hangzhou-db
jakarta-db-start:
docker-compose -f docker-compose.jakarta.yml up -d jakarta-db

ithaca-init:
docker-compose -f docker-compose.ithaca.yml up -d ithaca-db
Expand All @@ -74,7 +74,7 @@ ithaca-init:
docker-compose -f docker-compose.ithaca.yml exec -T ithaca-db createdb -U tzkt -T template0 tzkt_db
docker-compose -f docker-compose.ithaca.yml exec -T ithaca-db apt update
docker-compose -f docker-compose.ithaca.yml exec -T ithaca-db apt install -y wget
docker-compose -f docker-compose.ithaca.yml exec -T ithaca-db wget "https://tzkt.fra1.digitaloceanspaces.com/snapshots/tzkt_v1.8_ithacanet.backup" -O tzkt_db.backup
docker-compose -f docker-compose.ithaca.yml exec -T ithaca-db wget "https://tzkt.fra1.digitaloceanspaces.com/snapshots/tzkt_v1.9_ithacanet.backup" -O tzkt_db.backup
docker-compose -f docker-compose.ithaca.yml exec -T ithaca-db pg_restore -U tzkt -O -x -v -d tzkt_db -e -j 4 tzkt_db.backup
docker-compose -f docker-compose.ithaca.yml exec -T ithaca-db rm tzkt_db.backup
docker-compose -f docker-compose.ithaca.yml exec -T ithaca-db apt autoremove --purge -y wget
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ postgres=# \q
#### Download fresh snapshot

````c
wget "https://tzkt.fra1.digitaloceanspaces.com/snapshots/tzkt_v1.8_mainnet.backup" -O /tmp/tzkt_db.backup
wget "https://tzkt.fra1.digitaloceanspaces.com/snapshots/tzkt_v1.9_mainnet.backup" -O /tmp/tzkt_db.backup
````

#### Restore database from the snapshot
Expand Down Expand Up @@ -320,12 +320,12 @@ That's it. By default API is available on ports 5000 (HTTP) and 5001 (HTTPS). If
## Install Tzkt Indexer and API for testnets

In general the steps are the same as for the mainnet, you just need to use different RPC endpoint and DB snapshot. Here are some presets for testnets:
- Hangzhounet:
- Snapshot: https://tzkt.fra1.digitaloceanspaces.com/snapshots/tzkt_v1.8_hangzhou2net.backup
- RPC node: https://rpc.tzkt.io/hangzhou2net/
- Ithacanet:
- Snapshot: https://tzkt.fra1.digitaloceanspaces.com/snapshots/tzkt_v1.8_ithacanet.backup
- Snapshot: https://tzkt.fra1.digitaloceanspaces.com/snapshots/tzkt_v1.9_ithacanet.backup
- RPC node: https://rpc.tzkt.io/ithacanet/
- Jakartanet:
- Snapshot: https://tzkt.fra1.digitaloceanspaces.com/snapshots/tzkt_v1.9_jakartanet.backup
- RPC node: https://rpc.tzkt.io/jakartanet/

### Testnet installation using docker containers

Expand All @@ -335,12 +335,12 @@ First of all, install `git`, `make`, `docker`, `docker-compose`, then run the fo
git clone https://github.com/baking-bad/tzkt.git
cd tzkt/

make hangzhou-init #run this command if you want to restore the DB from the latest snapshot
make hangzhou-start
make jakarta-init #run this command if you want to restore the DB from the latest snapshot
make jakarta-start

curl http://127.0.0.1:5020/v1/head

make hangzhou-stop
make jakarta-stop
````

## Have a question?
Expand Down
2 changes: 1 addition & 1 deletion Tzkt.Api/Controllers/VotingController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public Task<VotingPeriod> GetCurrentPeriod()
/// </remarks>
/// <param name="index">Voting period index starting from zero</param>
/// <param name="status">Filters voters by status (`none`, `upvoted`, `voted_yay`, `voted_nay`, `voted_pass`)</param>
/// <param name="sort">Sorts voters by specified field. Supported fields: `id` (default), `VvtingPower`.</param>
/// <param name="sort">Sorts voters by specified field. Supported fields: `id` (default), `votingPower`.</param>
/// <param name="offset">Specifies which or how many items should be skipped</param>
/// <param name="limit">Maximum number of items to return</param>
/// <returns></returns>
Expand Down
2 changes: 1 addition & 1 deletion Tzkt.Api/Swagger/Description.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ TzKT is an open-source project, so you can easily clone and build it and use it
TzKT API is available for the following Tezos networks with the following base URLs:

- Mainnet: `https://api.tzkt.io/` or `https://api.mainnet.tzkt.io/` ([view docs](https://api.tzkt.io))
- Hangzhounet: `https://api.hangzhounet.tzkt.io/` ([view docs](https://api.hangzhounet.tzkt.io))
- Ithacanet: `https://api.ithacanet.tzkt.io/` ([view docs](https://api.ithacanet.tzkt.io))
- Jakartanet: `https://api.jakartanet.tzkt.io/` ([view docs](https://api.jakartanet.tzkt.io))

We also provide a staging environment for testing newest features and pre-updating client applications before deploying to production:

Expand Down
2 changes: 1 addition & 1 deletion Tzkt.Api/Swagger/Swagger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Tzkt.Api.Swagger
{
public static class Swagger
{
const string Version = "v1.8.4";
const string Version = "v1.9.0";
const string Path = "/v1/swagger.json";

public static void AddOpenApiDocument(this IServiceCollection services)
Expand Down
2 changes: 1 addition & 1 deletion Tzkt.Api/Tzkt.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<AssemblyVersion>1.8.4</AssemblyVersion>
<AssemblyVersion>1.9.0</AssemblyVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Tzkt.Data/Tzkt.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<AssemblyVersion>1.8.4</AssemblyVersion>
<AssemblyVersion>1.9.0</AssemblyVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ public async Task UpgradeProtocol(AppState state)
MaxEndorsingReward = prev.MaxEndorsingReward,
MaxSlashingPeriod = prev.MaxSlashingPeriod,
MinParticipationDenominator = prev.MinParticipationDenominator,
MinParticipationNumerator = prev.MinParticipationNumerator
MinParticipationNumerator = prev.MinParticipationNumerator,
TxRollupCommitmentBond = prev.TxRollupCommitmentBond,
TxRollupOriginationSize = prev.TxRollupOriginationSize
};
Db.Protocols.Add(protocol);
Cache.Protocols.Add(protocol);
Expand Down
2 changes: 1 addition & 1 deletion Tzkt.Sync/Tzkt.Sync.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<AssemblyVersion>1.8.4</AssemblyVersion>
<AssemblyVersion>1.9.0</AssemblyVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
22 changes: 11 additions & 11 deletions docker-compose.hangzhou.yml → docker-compose.jakarta.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: '3'

services:
hangzhou-db:
container_name: hangzhou-db
jakarta-db:
container_name: jakarta-db
restart: always
image: postgres:13
environment:
Expand All @@ -14,27 +14,27 @@ services:
ports:
- 127.0.0.1:5434:5432

hangzhou-api:
container_name: hangzhou-api
jakarta-api:
container_name: jakarta-api
restart: always
image: bakingbad/tzkt-api:latest
depends_on:
- hangzhou-db
- jakarta-db
environment:
ConnectionStrings__DefaultConnection: host=hangzhou-db;port=5432;database=${POSTGRES_DB:-tzkt_db};username=${POSTGRES_USER:-tzkt};password=${POSTGRES_PASSWORD:-qwerty};
ConnectionStrings__DefaultConnection: host=jakarta-db;port=5432;database=${POSTGRES_DB:-tzkt_db};username=${POSTGRES_USER:-tzkt};password=${POSTGRES_PASSWORD:-qwerty};
Kestrel__Endpoints__Http__Url: http://0.0.0.0:5000
ports:
- 0.0.0.0:5020:5000

hangzhou-sync:
container_name: hangzhou-sync
jakarta-sync:
container_name: jakarta-sync
restart: always
image: bakingbad/tzkt-sync:latest
environment:
ConnectionStrings__DefaultConnection: host=hangzhou-db;port=5432;database=${POSTGRES_DB:-tzkt_db};username=${POSTGRES_USER:-tzkt};password=${POSTGRES_PASSWORD:-qwerty};
TezosNode__Endpoint: https://rpc.tzkt.io/hangzhou2net/
ConnectionStrings__DefaultConnection: host=jakarta-db;port=5432;database=${POSTGRES_DB:-tzkt_db};username=${POSTGRES_USER:-tzkt};password=${POSTGRES_PASSWORD:-qwerty};
TezosNode__Endpoint: https://rpc.tzkt.io/jakartanet/
depends_on:
- hangzhou-db
- jakarta-db

volumes:
postgres:

0 comments on commit bca1c8a

Please sign in to comment.