Skip to content

Commit a6970ed

Browse files
committed
Block replay in github actions (#311)
* 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
1 parent f2d2a77 commit a6970ed

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

.github/workflows/block_replay.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Block replay test
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
replay:
10+
runs-on: self-hosted
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Go
14+
uses: actions/setup-go@v2
15+
with:
16+
go-version: 1.18
17+
18+
- name: Extract converted db
19+
run: |
20+
mkdir .ethereum
21+
tar xf /home/devops/verkle-test-dependencies/preimages_small.tar --strip-components=4 -C .ethereum
22+
23+
- name: Download geth from the proper repo
24+
run: git clone https://github.com/gballet/go-ethereum -b verkle/replay-change-with-tree-group-tryupdate geth
25+
26+
- name: Edit geth to use this repo
27+
run: |
28+
cd geth
29+
cp /home/devops/verkle-test-dependencies/precomp .
30+
go mod edit -replace=github.com/gballet/go-verkle=$PWD/..
31+
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`
32+
go mod download github.com/crate-crypto/go-ipa
33+
go mod tidy
34+
go build ./cmd/geth/...
35+
36+
- name: Run replay
37+
run: |
38+
cd geth
39+
./geth import --datadir=../.ethereum /home/devops/verkle-test-dependencies/next_blocks4
40+
41+
- name: Upload profiler file
42+
uses: actions/upload-artifact@v3
43+
with:
44+
name: cpu.out
45+
path: ./geth/cpu.out
46+
47+
- name: Generate profile diagram
48+
run: |
49+
cd geth
50+
go tool pprof -png cpu.out > profile001.png
51+
52+
- name: Upload profiler picture
53+
uses: actions/upload-artifact@v3
54+
with:
55+
name: profile.png
56+
path: ./geth/profile001.png
57+
58+
- name: Cleanup
59+
if: always()
60+
run: rm -rf geth .ethereum precomp

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
[![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)
33
[![goreports](https://goreportcard.com/badge/github.com/gballet/go-verkle)](https://goreportcard.com/report/github.com/gballet/go-verkle)
44
[![API Reference](https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667)](https://pkg.go.dev/github.com/gballet/go-verkle)
5+
[![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)
56

67
# go-verkle
78

0 commit comments

Comments
 (0)