Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use hivechain to generate test chain #27

Merged
merged 39 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
ce8871d
add blob txs
lightclient Oct 14, 2023
a285b45
add tests for retrieving and sending blob tx
lightclient Oct 14, 2023
d516fe3
WIP use hivechain
fjl Jan 9, 2024
f7f47b9
chain: update test chain
fjl Jan 16, 2024
4d6f0a2
add explicit geth dependency
fjl Jan 16, 2024
2239fa9
go.sum: go mod tidy
fjl Jan 16, 2024
34fef59
gofmt
fjl Jan 16, 2024
f59a7d5
chain: update chain
fjl Jan 16, 2024
dc57e4a
testgen: load txinfo.json
fjl Jan 16, 2024
23d08d8
.gitignore: add geth
fjl Jan 16, 2024
ceb06aa
chain: update chain
fjl Jan 16, 2024
da8d561
go.mod: add golang.org/x/exp
fjl Jan 16, 2024
2762191
testgen: WIP most tests work
fjl Jan 16, 2024
1f46888
remove unused function readBlocks
fjl Jan 16, 2024
1d1433a
.github: fix fill step
fjl Jan 16, 2024
052fd68
exit with error if any tests failed to fill
fjl Jan 16, 2024
81b5137
.github: remove geth install step
fjl Jan 16, 2024
3f1c8b6
testgen: fix remaining tests
fjl Jan 17, 2024
76a8e83
testgen: add a test for createAccessList with maxFeePerGas
fjl Jan 17, 2024
16ad6df
go.mod: add github.com/cespeare/cp
fjl Jan 17, 2024
8a59637
copy chain files to output directory
fjl Jan 17, 2024
73eb2e8
testgen: remove unused variable
fjl Jan 17, 2024
a0cb54f
testgen: disable gasPrice tests
fjl Jan 17, 2024
39a6aea
testgen: add generators for invalid getStorage tests
fjl Jan 17, 2024
378db09
Merge remote-tracking branch 'origin/impl-cancun-tests' into hivechain
fjl Jan 17, 2024
edb25d2
overwrite chain if exists
fjl Jan 17, 2024
67c7d09
mkchain.sh: enable cancun
fjl Jan 17, 2024
3506417
chain: update test chain
fjl Jan 17, 2024
9dd2805
testgen: fix blob tx tests
fjl Jan 17, 2024
417099c
testgen: add some tests for non-existent accounts
fjl Jan 18, 2024
c4e366d
testgen: fix method name eth_getStorageAt
fjl Jan 18, 2024
a2775f5
chain: update chain
fjl Jan 18, 2024
cd9e96b
testgen: add tests for eth_getLogs
fjl Jan 18, 2024
a5b1898
Update testgen/generators.go
fjl Jan 24, 2024
7dc8535
Update testgen/chain.go
fjl Jan 24, 2024
ab12c75
testgen: add some documentation
fjl Jan 24, 2024
c895bef
testgen: disable header requests
fjl Jan 28, 2024
c045879
testgen: fix "gas" parameter for createAccessList
fjl Jan 28, 2024
1518d67
cmd/speccheck: disable error check
fjl Jan 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,12 @@ jobs:
go-version: ^1.19
id: go

- name: Install geth
run: |
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install ethereum

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Build binary
run: make all

- name: Fill tests
run: ./rpctestgen
run: make fill

lint:
name: Lint
runs-on: ubuntu-latest
Expand Down
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
tests/
ethash/
rpctestgen
openrpc.json
/rpctestgen
/geth
/openrpc.json

11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
.PHONY: all clean build buildgeth test lint fill

all: clean build

build:
go build .
go build .

buildgeth:
go build github.com/ethereum/go-ethereum/cmd/geth

clean:
rm -rf rpctestgen tests
Expand All @@ -14,5 +19,5 @@ lint:
go vet ./...
staticcheck ./...

fill: build
./rpctestgen
fill: build buildgeth
./rpctestgen --bin ./geth -chain ./chain
145 changes: 0 additions & 145 deletions blockgen.go

This file was deleted.

62 changes: 62 additions & 0 deletions chain/accounts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"0x0c2c51a0990aee1d73c1228de158688341557508": {
"key": "0xbfcd0e032489319f4e5ca03e643b2025db624be6cf99cbfed90c4502e3754850"
},
"0x14e46043e63d0e3cdcf2530519f4cfaf35058cb2": {
"key": "0x457075f6822ac29481154792f65c5f1ec335b4fea9ca20f3fea8fa1d78a12c68"
},
"0x16c57edf7fa9d9525378b0b81bf8a3ced0620c1c": {
"key": "0x865898edcf43206d138c93f1bbd86311f4657b057658558888aa5ac4309626a6"
},
"0x1f4924b14f34e24159387c0a4cdbaa32f3ddb0cf": {
"key": "0xee7f7875d826d7443ccc5c174e38b2c436095018774248a8074ee92d8914dcdb"
},
"0x1f5bde34b4afc686f136c7a3cb6ec376f7357759": {
"key": "0x25e6ce8611cefb5cd338aeaa9292ed2139714668d123a4fb156cabb42051b5b7"
},
"0x2d389075be5be9f2246ad654ce152cf05990b209": {
"key": "0x19168cd7767604b3d19b99dc3da1302b9ccb6ee9ad61660859e07acd4a2625dd"
},
"0x3ae75c08b4c907eb63a8960c45b86e1e9ab6123c": {
"key": "0x71aa7d299c7607dabfc3d0e5213d612b5e4a97455b596c2f642daac43fa5eeaa"
},
"0x4340ee1b812acb40a1eb561c019c327b243b92df": {
"key": "0x47f666f20e2175606355acec0ea1b37870c15e5797e962340da7ad7972a537e8"
},
"0x4a0f1452281bcec5bd90c3dce6162a5995bfe9df": {
"key": "0xa88293fefc623644969e2ce6919fb0dbd0fd64f640293b4bf7e1a81c97e7fc7f"
},
"0x4dde844b71bcdf95512fb4dc94e84fb67b512ed8": {
"key": "0x6e1e16a9c15641c73bf6e237f9293ab1d4e7c12b9adf83cfc94bcf969670f72d"
},
"0x5f552da00dfb4d3749d9e62dcee3c918855a86a0": {
"key": "0x41be4e00aac79f7ffbb3455053ec05e971645440d594c047cdcc56a3c7458bd6"
},
"0x654aa64f5fbefb84c270ec74211b81ca8c44a72e": {
"key": "0xc825f31cd8792851e33a290b3d749e553983111fc1f36dfbbdb45f101973f6a9"
},
"0x717f8aa2b982bee0e29f573d31df288663e1ce16": {
"key": "0x8d0faa04ae0f9bc3cd4c890aa025d5f40916f4729538b19471c0beefe11d9e19"
},
"0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f": {
"key": "0x4552dbe6ca4699322b5d923d0c9bcdd24644f5db8bf89a085b67c6c49b8a1b91"
},
"0x83c7e323d189f18725ac510004fdc2941f8c4a78": {
"key": "0x34391cbbf06956bb506f45ec179cdd84df526aa364e27bbde65db9c15d866d00"
},
"0x84e75c28348fb86acea1a93a39426d7d60f4cc46": {
"key": "0xf6a8f1603b8368f3ca373292b7310c53bec7b508aecacd442554ebc1c5d0c856"
},
"0xc7b99a164efd027a93f147376cc7da7c67c6bbe0": {
"key": "0x8d56bcbcf2c1b7109e1396a28d7a0234e33544ade74ea32c460ce4a443b239b1"
},
"0xd803681e487e6ac18053afc5a6cd813c86ec3e4d": {
"key": "0xfc39d1c9ddbba176d806ebb42d7460189fe56ca163ad3eb6143bfc6beb6f6f72"
},
"0xe7d13f7aa2a838d24c59b40186a0aca1e21cffcc": {
"key": "0x9ee3fd550664b246ad7cdba07162dd25530a3b1d51476dd1d85bbc29f0592684"
},
"0xeda8645ba6948855e3b3cd596bbb07596d59c603": {
"key": "0x14cdde09d1640eb8c3cda063891b0453073f57719583381ff78811efa6d4199f"
}
}
Binary file added chain/chain.rlp
Binary file not shown.
20 changes: 20 additions & 0 deletions chain/forkenv.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"HIVE_CANCUN_TIMESTAMP": "0",
"HIVE_CHAIN_ID": "3503995874084926",
"HIVE_FORK_ARROW_GLACIER": "0",
"HIVE_FORK_BERLIN": "0",
"HIVE_FORK_BYZANTIUM": "0",
"HIVE_FORK_CONSTANTINOPLE": "0",
"HIVE_FORK_GRAY_GLACIER": "0",
"HIVE_FORK_HOMESTEAD": "0",
"HIVE_FORK_ISTANBUL": "0",
"HIVE_FORK_LONDON": "0",
"HIVE_FORK_MUIR_GLACIER": "0",
"HIVE_FORK_PETERSBURG": "0",
"HIVE_FORK_SPURIOUS": "0",
"HIVE_FORK_TANGERINE": "0",
"HIVE_MERGE_BLOCK_ID": "0",
"HIVE_NETWORK_ID": "3503995874084926",
"HIVE_SHANGHAI_TIMESTAMP": "0",
"HIVE_TERMINAL_TOTAL_DIFFICULTY": "131072"
}
Loading
Loading