Skip to content

Commit

Permalink
Block replay in github actions (#311)
Browse files Browse the repository at this point in the history
* save current state

* add the missing commands

* cleanup extra files

* Fix upload path

* add a cleanup fonction + fix geth build

* fix typo in cleanup command
  • Loading branch information
gballet committed Dec 13, 2022
1 parent f2d2a77 commit a91cff8
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/block_replay.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a91cff8

Please sign in to comment.