Ignacio Hagopian
448b405d83
Truncate BALANCE opcode parameter for witness recording
...
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
2024-05-08 13:25:15 +02:00
Guillaume Ballet
c997469bbd
fix: missing MAIN_STORAGE_OFFSET when reading a block hash from the history contract ( #390 )
...
Co-authored-by: Ignacio Hagopian <jsign.uy@gmail.com>
2024-05-08 13:25:15 +02:00
Ignacio Hagopian
f667365a5d
witness: fix contract creation init gas charging ( #393 )
...
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
2024-05-08 13:25:15 +02:00
Ignacio Hagopian
4dc4b398bb
core/vm: fix contract creation witness gas charging logic ( #389 )
...
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
2024-05-08 13:25:15 +02:00
Ignacio Hagopian
c2da1985bc
Fix SELFDESTRUCT incorrect account zeroing & missing beneficiary balance in witness ( #378 )
...
* fix SELFDESTRUCT witness recording
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
* add selfdestruct tests
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
* solve lint nit
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
---------
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
2024-05-08 13:25:15 +02:00
Ignacio Hagopian
f72f7820dd
fix addr alignement ( #366 )
...
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
2024-05-08 13:25:15 +02:00
Ignacio Hagopian
72211cd5d5
Record witness access in BALANCE opcode ( #369 )
...
* record access witness balance in BALANCE opcode
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
* add tests for BALANCE opcode
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
* add version touching
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
* do not touch version
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
---------
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
2024-05-08 13:25:15 +02:00
Ignacio Hagopian
8ac057090e
fix integer underflow ( #374 )
...
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
2024-05-08 13:25:15 +02:00
Ignacio Hagopian
077ad8728f
Record witness access in EXTCODEHASH ( #370 )
...
* instructions: add access witness recording for EXTCODEHASH
* add test for EXTCODEHASH witness recording
* add test for access witness EXTCODEHASH
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
* do not touch version
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
---------
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
2024-05-08 13:25:15 +02:00
Guillaume Ballet
2e671ea446
eip2935 redesign: insert all 256 ancestors upon transition ( #362 )
...
* eip2935 redesign: only read target block hash
* review fixes
* fix: t8n tool
2024-05-08 13:25:15 +02:00
Guillaume Ballet
61ffef7961
fix: CREATE-time PUSHn adds non-existent entries to witness ( #361 )
...
* fix: CREATE-time PUSHn adds non-existent entries to witness
* this also affects CODECOPY
* fix: add code returned by CREATE* to the witness
* fix gas costs
2024-05-08 13:25:15 +02:00
Guillaume Ballet
7a0eb0b93b
test: check current and new values in state processor witness
2024-05-08 13:25:15 +02:00
Ignacio Hagopian
953338b22b
state: avoid EIP-158 for history storage address ( #359 )
...
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
2024-05-08 13:25:15 +02:00
Guillaume Ballet
afcfa5af07
Add eip2935 256th ancestor stem to witness ( #355 )
2024-05-08 13:25:15 +02:00
Guillaume Ballet
cc48d57e15
refactor: move trieDB creation outside of block-making loop ( #354 )
2024-05-08 13:25:15 +02:00
Guillaume Ballet
9be95a24f4
another workaround to force verkle at creation
2024-05-08 13:25:15 +02:00
Guillaume Ballet
c3b9b375cc
fix: nil pointer when deactivating verkle-incompatible genesis code ( #353 )
2024-05-08 13:25:15 +02:00
Ignacio Hagopian
b7a19b4a4d
trie/utils: bound point cache size ( #352 )
...
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
2024-05-08 13:25:15 +02:00
Guillaume Ballet
4c4de3102a
fix: eip2935 block hash storage in chain makers ( #351 )
2024-05-08 13:25:15 +02:00
Guillaume Ballet
c1e0ff10ec
fix: only disable HasLegacyNode call for verkle-at-genesis testnets ( #350 )
2024-05-08 13:25:15 +02:00
Ignacio Hagopian
eb31ae3f9e
accesswitness: touch for origin and to ( #348 )
...
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
2024-05-08 13:25:15 +02:00
Guillaume Ballet
b7bd9e33ad
fix: test for ExtStatus count when two missing stems collide ( #347 )
2024-05-08 13:25:15 +02:00
Guillaume Ballet
95d7f39db5
set verkle mode from genesis with override ( #308 )
...
* set verkle mode from genesis with override
* make linter happy
* fix more linter snafu
2024-05-08 13:25:15 +02:00
Guillaume Ballet
bea12cc674
fix: decide if genesis is verkle using genesis timestamp ( #290 )
...
* fix: decide if genesis is verkle using genesis timestamp
* fix linter message
2024-05-08 13:25:15 +02:00
Guillaume Ballet
7d02a604d7
fix: support a verkle pre-tree at the conversion block ( #313 )
...
* fix: support a verkle pre-tree at the conversion block
* make linter happy
2024-05-08 13:25:15 +02:00
Guillaume Ballet
ac3f26947d
implement eip 2935 ( #342 )
...
* implement eip 2935
* add touched historical contract slot to the witness
2024-05-08 13:25:15 +02:00
Guillaume Ballet
85a7198c2d
test: check witness when contract creation fails ( #333 )
2024-05-08 13:25:15 +02:00
Guillaume Ballet
14d5a01775
change timeout to 20 minutes
2024-05-08 13:25:15 +02:00
Guillaume Ballet
8f2ffed7bb
only add the coinbase to the witness if the block reward > 0 ( #332 )
2024-05-08 13:25:15 +02:00
Guillaume Ballet
a5d74825aa
fix: return error if witness costs OOG in instructions ( #319 )
2024-05-08 13:25:15 +02:00
Guillaume Ballet
7757a53d47
force activation of EIP-6780 ( #338 )
...
* force activation of EIP-6780
* rework the PR in a more manageable way
2024-05-08 13:25:15 +02:00
Ignacio Hagopian
f46632148c
accesswitness: avoid charging cost for origin and target ( #334 )
...
* accesswitness: avoid charging cost for origin and target
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
* make the linter happy
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
---------
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
2024-05-08 13:25:15 +02:00
Ignacio Hagopian
d6477cdc7d
mod: move from gballet/go-verkle to ethereum/go-verkle ( #335 )
...
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
2024-05-08 13:25:15 +02:00
Ignacio Hagopian
6843ed14e2
vm: fix access witness recording ( #337 )
...
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
2024-05-08 13:25:15 +02:00
Guillaume Ballet
f95255839a
fix: main storage offset value ( #329 )
2024-05-08 13:25:15 +02:00
Ignacio Hagopian
afc6067590
mod: update go-verkle ( #312 )
...
* update go-verkle
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
* fix breaking apis
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
* fix apis
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
* avoid test failing due to timeouts
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
---------
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
2024-05-08 13:25:14 +02:00
Guillaume Ballet
4815fe2686
remove unused EndVerkleTransition in blockchain.go ( #301 )
2024-05-08 13:25:14 +02:00
Ignacio Hagopian
4f9beb0526
proofs: remove post-values in Multiproof ( #297 )
...
* update proof generation
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
* simplification and comment
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
* update go-verkle
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
---------
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
2024-05-08 13:25:14 +02:00
Ignacio Hagopian
e1dd462e1b
Update go-verkle ( #296 )
...
* update go-verkle
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
* ci: fix golangci-linter version
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
---------
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
2024-05-08 13:25:14 +02:00
Ignacio Hagopian
e437264a8c
remove pre-state tree warmup ( #293 )
...
* remove pre-state tree warmup
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
* update go-verkle
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
---------
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
2024-05-08 13:25:14 +02:00
Guillaume Ballet
a29f5d60c2
Shanghai time workaround ( #294 )
...
* add workaround to use --override.prague
* fix typo in comments
* fix: enable overrides at genesis time
2024-05-08 13:25:14 +02:00
Guillaume Ballet
0d5126776f
add workaround to use --override.prague ( #292 )
2024-05-08 13:25:14 +02:00
Guillaume Ballet
faee2f9587
fix: return serialized root in state root, not its mapping to a scalar field ( #289 )
2024-05-08 13:25:14 +02:00
Guillaume Ballet
189a4770dd
fix: incorrect access copy ( #288 )
2024-05-08 13:25:14 +02:00
Guillaume Ballet
49fdfff681
fix: make sure AccessWitness isn't nil when calling RPC methods ( #287 )
2024-05-08 13:25:14 +02:00
Guillaume Ballet
328e180429
upgrade deps to get proof generation absence/presence bugfix
2024-05-08 13:25:14 +02:00
Guillaume Ballet
c82ff997d3
fix: ensure read-only values are resolved in post trie ( #285 )
2024-05-08 13:25:14 +02:00
Guillaume Ballet
acb4a30555
fix: activate verkle at genesis ( #284 )
2024-05-08 13:25:14 +02:00
Guillaume Ballet
990395c688
workaround: disable check for root presence ( #283 )
2024-05-08 13:25:14 +02:00
Guillaume Ballet
5032dd480b
achieving perfection
2024-05-08 13:25:14 +02:00