forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fix use of reflect for go 1.22 to use go 1.21 as used in the go mod
- add tests for opt mainnet and base mainnet for before and after canyon update - add cli generate-prestate tool to easily test firehose tracer
- Loading branch information
1 parent
f5fa975
commit e45ed70
Showing
14 changed files
with
2,507 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
eth/tracers/internal/tracetest/firehose/generate-prestate/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generate prestate | ||
|
||
To test out the various changes to the firehose tracer, you can run the `generate-prestate` subcommend here. Currently, only op stack blockchains are supported. | ||
|
||
```bash | ||
export ARCHIVE_ENDPOINT="rpc_archive_node_endpoint" | ||
|
||
# generate-prestate <network (optMainnet or baseMainnet)> <transaction_id> | ||
# the below example run was used to create the prestate.json file for the deposit_nonce_check_optimism_after_canyon test | ||
go run ./generate-prestate optMainnet 0xb77e56d591aab27502548d4d85aff6c1f835c1e4e820b2360751209516a63472 > testdata/TestFirehosePrestate/deposit_nonce_check_optimism_after_canyon/prestate.json | ||
``` | ||
|
||
Then modify the method `TestFirehosePrestate` in `firehose_test.go` and add the new test | ||
|
||
```bash | ||
# the below command will create a file such as block.{blockNumber}.golden.json | ||
# validation needs to be done between the created file and an RPC endpoint to make sure the files are on par | ||
GOLDEN_UPDATE=true go test ./... -run "TestFirehosePrestate/deposit_nonce_check_optimism_after_canyon" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 0 additions & 89 deletions
89
...ternal/tracetest/firehose/testdata/TestFirehosePrestate/deposit_nonce_check/prestate.json
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.