forked from tendermint/tm-db
-
Notifications
You must be signed in to change notification settings - Fork 8
58 lines (48 loc) · 2.54 KB
/
gaia.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# This workflow builds and pushes a new version of the build container image
# when the tools directory changes on master. Edit tools/Dockerfile.
#
# This workflow does not push a new image until it is merged, so tests that
# depend on changes in this image will not pass until this workflow succeeds.
# For that reason, changes here should be done in a separate PR in advance of
# work that depends on them.
name: State Sync Gaia
on:
pull_request:
push:
jobs:
build:
runs-on: ubuntu-latest
container: ghcr.io/faddat/gaia
continue-on-error: true
env:
INTERVAL: 1000
GAIAD_STATESYNC_ENABLE: true
GAIAD_P2P_MAX_NUM_OUTBOUND_PEERS: 200
GAIAD_P2P_SEEDS: "bf8328b66dceb4987e5cd94430af66045e59899f@public-seed.cosmos.vitwit.com:26656,cfd785a4224c7940e9a10f6c1ab24c343e923bec@164.68.107.188:26656,d72b3011ed46d783e369fdf8ae2055b99a1e5074@173.249.50.25:26656,ba3bacc714817218562f743178228f23678b2873@public-seed-node.cosmoshub.certus.one:26656,3c7cad4154967a294b3ba1cc752e40e8779640ad@84.201.128.115:26656,366ac852255c3ac8de17e11ae9ec814b8c68bddb@51.15.94.196:26656"
GAIAD_STATESYNC_RPC_SERVERS: "https://cosmoshub.validator.network:443,https://cosmoshub.validator.network:443"
GOPATH: /go
strategy:
matrix:
database: [rocksdb, pebbledb, boltdb, badgerdb, goleveldb, cleveldb]
steps:
- run: git config --global --add safe.directory /__w/tendermint/tm-db
- uses: actions/checkout@v3
- name: state sync gaia with ${{ matrix.database }}
run: |
cd ..
git clone https://github.com/cosmos/gaia
cd gaia
go mod edit -replace github.com/tendermint/tm-db=../tm-db
go mod tidy
go install -ldflags '-w -s -X github.com/cosmos/cosmos-sdk/types.DBBackend=${{ matrix.database }}' -tags ${{ matrix.database }} ./...
export LATEST_HEIGHT=$(curl -s https://cosmoshub.validator.network/block | jq -r .result.block.header.height);
export BLOCK_HEIGHT=$(($LATEST_HEIGHT-$INTERVAL))
export TRUST_HASH=$(curl -s "https://cosmoshub.validator.network/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
export GAIAD_STATESYNC_TRUST_HEIGHT=$BLOCK_HEIGHT
export GAIAD_STATESYNC_TRUST_HASH=$TRUST_HASH
export PATH=$PATH:/go/bin
echo "TRUST HEIGHT: $BLOCK_HEIGHT"
echo "TRUST HASH: $TRUST_HASH"
gaiad init gaia-matrix
cp /genesis.json ~/.gaia/config/genesis.json
gaiad start --x-crisis-skip-assert-invariants --db_backend ${{ matrix.database }}