Skip to content

Commit

Permalink
Update docs and packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Groxan committed Feb 5, 2024
1 parent bfe9c75 commit 9df11c5
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 77 deletions.
22 changes: 0 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,28 +67,6 @@ ghost-stop:
ghost-db-start:
docker-compose -f docker-compose.ghost.yml up -d ghost-db

nairobi-init:
docker-compose -f docker-compose.nairobi.yml up -d nairobi-db
docker-compose -f docker-compose.nairobi.yml exec -T nairobi-db psql -U tzkt postgres -c '\l'
docker-compose -f docker-compose.nairobi.yml exec -T nairobi-db dropdb -U tzkt --if-exists tzkt_db
docker-compose -f docker-compose.nairobi.yml exec -T nairobi-db createdb -U tzkt -T template0 tzkt_db
docker-compose -f docker-compose.nairobi.yml exec -T nairobi-db apt update
docker-compose -f docker-compose.nairobi.yml exec -T nairobi-db apt install -y wget
docker-compose -f docker-compose.nairobi.yml exec -T nairobi-db wget "https://snapshots.tzkt.io/tzkt_v1.12_nairobinet.backup" -O tzkt_db.backup
docker-compose -f docker-compose.nairobi.yml exec -T nairobi-db pg_restore -U tzkt -O -x -v -d tzkt_db -e -j 4 tzkt_db.backup
docker-compose -f docker-compose.nairobi.yml exec -T nairobi-db rm tzkt_db.backup
docker-compose -f docker-compose.nairobi.yml exec -T nairobi-db apt autoremove --purge -y wget
docker-compose pull

nairobi-start:
docker-compose -f docker-compose.nairobi.yml up -d

nairobi-stop:
docker-compose -f docker-compose.nairobi.yml down

nairobi-db-start:
docker-compose -f docker-compose.nairobi.yml up -d nairobi-db

oxford-init:
docker-compose -f docker-compose.oxford.yml up -d oxford-db
docker-compose -f docker-compose.oxford.yml exec -T oxford-db psql -U tzkt postgres -c '\l'
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ sudo apt install -y dotnet-sdk-7.0
sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt update
sudo apt -y install postgresql-16 postgresql-contrib
sudo apt -y install postgresql-16 postgresql-contrib-16
````

---
Expand Down Expand Up @@ -262,9 +262,6 @@ In general the steps are the same as for the mainnet, you will just need to use
- Oxfordnet:
- Snapshot: https://snapshots.tzkt.io/tzkt_v1.13_oxfordnet.backup
- RPC node: https://rpc.tzkt.io/oxfordnet/
- Nairobinet:
- Snapshot: https://snapshots.tzkt.io/tzkt_v1.12_nairobinet.backup
- RPC node: https://rpc.tzkt.io/nairobinet/

### Testnets & docker

Expand Down
2 changes: 1 addition & 1 deletion Tzkt.Api/Services/Home/HomeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ SELECT COUNT(*)
AND "StakingBalance" >= {protocol.MinimalStake}
""");

// TODO: use current cycle rewards
// TODO: use current cycle rewards after Oxford2 activation
var lbSubsidy = 80_000_000 * protocol.TimeBetweenBlocks / 60 / 16;
var blocksPerYear = 365 * 24 * 60 * 60 / protocol.TimeBetweenBlocks;
var maxBlockReward = protocol.MaxBakingReward + protocol.MaxEndorsingReward; //microtez
Expand Down
6 changes: 3 additions & 3 deletions Tzkt.Api/Websocket/Processors/EventsProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void Add(HashSet<string> subs, ContractEvent e)
#endregion

#region tag subs
if (TagSubs.TryGetValue(e.Tag, out var tagSubs))
if (e.Tag != null && TagSubs.TryGetValue(e.Tag, out var tagSubs))
Add(tagSubs, e);
#endregion

Expand All @@ -135,7 +135,7 @@ void Add(HashSet<string> subs, ContractEvent e)
Add(contractSubs.All, e);

if (contractSubs.Tags != null)
if (contractSubs.Tags.TryGetValue(e.Tag, out var contractTagSubs))
if (e.Tag != null && contractSubs.Tags.TryGetValue(e.Tag, out var contractTagSubs))
Add(contractTagSubs, e);
}
#endregion
Expand All @@ -147,7 +147,7 @@ void Add(HashSet<string> subs, ContractEvent e)
Add(codeHashSubs.All, e);

if (codeHashSubs.Tags != null)
if (codeHashSubs.Tags.TryGetValue(e.Tag, out var codeHashTagSubs))
if (e.Tag != null && codeHashSubs.Tags.TryGetValue(e.Tag, out var codeHashTagSubs))
Add(codeHashTagSubs, e);
}
#endregion
Expand Down
4 changes: 2 additions & 2 deletions Tzkt.Data/Tzkt.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<AssemblyVersion>1.12.4</AssemblyVersion>
<AssemblyVersion>1.12.4</AssemblyVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Netezos" Version="2.8.0" />
<PackageReference Include="Netezos" Version="2.9.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.4" />
</ItemGroup>

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 @@ -19,7 +19,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Netezos" Version="2.8.0" />
<PackageReference Include="Netezos" Version="2.9.0" />
<PackageReference Include="Newtonsoft.Json.Bson" Version="1.0.2" />
<PackageReference Include="SauceControl.Blake2Fast" Version="2.0.0" />
</ItemGroup>
Expand Down
44 changes: 0 additions & 44 deletions docker-compose.nairobi.yml

This file was deleted.

0 comments on commit 9df11c5

Please sign in to comment.