Tooling to directly verify and benchmark the results of go-ethereum state diffs.
Go to file
Thomas E Lackey 88759a7cbc
All checks were successful
Test / Run unit tests (push) Successful in 12m28s
Add 'test' target. (#5)
```
❯ make test
./scripts/compare-diffs.sh -d _var/ geth plugeth
DBUG[10-11|21:40:14] Registering statediff indexer metrics.
DBUG[10-11|21:40:14] Registering statediff DB metrics.
WARN [10-11|21:40:14.563] Attempting StateUpdate, but default PluginLoader has not been initialized
WARN [10-11|21:40:14.563] Attempting StateUpdate, but default PluginLoader has not been initialized
WARN [10-11|21:40:14.563] Attempting PreTrieCommit, but default PluginLoader has not been initialized
INFO [10-11|21:40:14.563] Persisted trie from memory database      nodes=1 size=147.00B time="5.248µs" gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
WARN [10-11|21:40:14.563] Attempting PostTrieCommit, but default PluginLoader has not been initialized
WARN [10-11|21:40:14.563] Attempting StateUpdate, but default PluginLoader has not been initialized
WARN [10-11|21:40:14.563] Attempting StateUpdate, but default PluginLoader has not been initialized
WARN [10-11|21:40:14.563] Attempting PreTrieCommit, but default PluginLoader has not been initialized
INFO [10-11|21:40:14.563] Persisted trie from memory database      nodes=1 size=157.00B time="10.904µs" gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
WARN [10-11|21:40:14.563] Attempting PostTrieCommit, but default PluginLoader has not been initialized
+ diff _var//A/0_diff.txt _var//B/0_diff.txt
+ diff _var//A/1_diff.txt _var//B/1_diff.txt
+ diff _var//A/2_diff.txt _var//B/2_diff.txt
+ diff _var//A/3_diff.txt _var//B/3_diff.txt
./scripts/compare-diffs.sh -d _var/ geth plugeth-parallel
DBUG[10-11|21:40:16] Registering statediff indexer metrics.
DBUG[10-11|21:40:16] Registering statediff DB metrics.
WARN [10-11|21:40:16.986] Attempting StateUpdate, but default PluginLoader has not been initialized
WARN [10-11|21:40:16.987] Attempting StateUpdate, but default PluginLoader has not been initialized
WARN [10-11|21:40:16.987] Attempting PreTrieCommit, but default PluginLoader has not been initialized
INFO [10-11|21:40:16.987] Persisted trie from memory database      nodes=1 size=147.00B time="7.87µs" gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
WARN [10-11|21:40:16.987] Attempting PostTrieCommit, but default PluginLoader has not been initialized
WARN [10-11|21:40:16.987] Attempting StateUpdate, but default PluginLoader has not been initialized
WARN [10-11|21:40:16.988] Attempting StateUpdate, but default PluginLoader has not been initialized
WARN [10-11|21:40:16.988] Attempting PreTrieCommit, but default PluginLoader has not been initialized
INFO [10-11|21:40:16.988] Persisted trie from memory database      nodes=1 size=157.00B time="17.649µs" gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
WARN [10-11|21:40:16.988] Attempting PostTrieCommit, but default PluginLoader has not been initialized
+ diff _var//A/0_diff.txt _var//B/0_diff.txt
+ diff _var//A/1_diff.txt _var//B/1_diff.txt
+ diff _var//A/2_diff.txt _var//B/2_diff.txt
+ diff _var//A/3_diff.txt _var//B/3_diff.txt
```

Reviewed-on: #5
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2023-10-12 15:03:18 +00:00
.github/workflows Add plugin using parallel iterators (#2) 2023-09-22 10:49:02 +00:00
dumpdiff-geth Add plugin using parallel iterators (#2) 2023-09-22 10:49:02 +00:00
dumpdiff-plugeth Add script for updating go.mod to use local plugeth-statediff (#3) 2023-09-27 07:48:31 +00:00
dumpdiff-plugeth-parallel Add plugin using parallel iterators (#2) 2023-09-22 10:49:02 +00:00
internal/statediff Add plugin using parallel iterators (#2) 2023-09-22 10:49:02 +00:00
pkg Add full diff objects to output (#4) 2023-09-27 16:46:13 +00:00
scripts Add full diff objects to output (#4) 2023-09-27 16:46:13 +00:00
go.mod Add plugin using parallel iterators (#2) 2023-09-22 10:49:02 +00:00
go.sum Init repo with diff-dump tools and compare-diffs script 2023-09-19 18:35:44 +08:00
Makefile Add 'test' target. (#5) 2023-10-12 15:03:18 +00:00
README.md Add full diff objects to output (#4) 2023-09-27 16:46:13 +00:00

eth-statediff-compliance

Tooling to directly verify and benchmark the results of go-ethereum state diffs.

Usage

Use scripts/compare-diffs.sh to compare outputs of go-ethereum/statediff and plugeth-statediff.

# Compare the output of geth-statediff and the statediff plugin (as of v0.1.1):
./scripts/compare-diffs.sh -d _var/ geth plugeth

# Compare geth-statediff and the plugin using parallel iterators:
./scripts/compare-diffs.sh -d _var/ geth plugeth-parallel

A zero exit code indicates identical outputs, modulo possible duplicate nodes.