diff --git a/.github/workflows/block_replay.yml b/.github/workflows/block_replay.yml new file mode 100644 index 00000000..43b63e2f --- /dev/null +++ b/.github/workflows/block_replay.yml @@ -0,0 +1,54 @@ +name: Block replay test + +on: + push: + branches: [ master ] + workflow_dispatch: + +jobs: + replay: + runs-on: self-hosted + steps: + - uses: actions/checkout@v2 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.18 + + - name: Extract converted db + run: | + mkdir .ethereum + tar xf /home/devops/verkle-test-dependencies/preimages_small.tar --strip-components=4 -C .ethereum + + - name: Download geth from the proper repo + run: git clone https://github.com/gballet/go-ethereum -b verkle/replay-change-with-tree-group-tryupdate geth + + - name: Edit geth to use this repo + run: | + cd geth + cp /home/devops/verkle-test-dependencies/precomp . + go mod edit -replace=github.com/gballet/go-verkle=$PWD/.. + go mod edit -replace=github.com/crate-crypto/go-ipa=github.com/crate-crypto/go-ipa@`grep go-ipa ../go.mod | cut -d'-' -f 5` + go mod download github.com/crate-crypto/go-ipa + go mod tidy + go build ./cmd/geth/... + + - name: Run replay + run: | + cd geth + ./geth import --datadir=../.ethereum /home/devops/verkle-test-dependencies/next_blocks4 + + - name: Generate profile + run: | + cd geth + go tool pprof -png cpu.out + + - name: Upload profiler picture + uses: actions/upload-artifact@v3 + with: + name: profile.png + path: ./geth/profile001.png + + - name: Cleanup + if: always() + run: rm -rf geth .ethereum precomp \ No newline at end of file diff --git a/README.md b/README.md index 01db8328..46da0bb4 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![DeepSource](https://deepsource.io/gh/gballet/go-verkle.svg/?label=active+issues&show_trend=true&token=OjuF5Q2HbKzpWY8LgWuffNZp)](https://deepsource.io/gh/gballet/go-verkle/?ref=repository-badge) [![goreports](https://goreportcard.com/badge/github.com/gballet/go-verkle)](https://goreportcard.com/report/github.com/gballet/go-verkle) [![API Reference](https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667)](https://pkg.go.dev/github.com/gballet/go-verkle) +[![Block replay](https://github.com/gballet/go-verkle/actions/workflows/block_replay.yml/badge.svg)](https://github.com/gballet/go-verkle/actions/workflows/block_replay.yml) # go-verkle