-
Notifications
You must be signed in to change notification settings - Fork 19.7k
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
all: EIP-compliant verkle tree support #23630
all: EIP-compliant verkle tree support #23630
Conversation
6562bff
to
936e7f1
Compare
dd505fd
to
be9f9e9
Compare
Does this improve performance in any way? How can we run some benchmarks? |
9dd8aec
to
60b8f90
Compare
80f090f
to
afd2166
Compare
core/chain_makers.go
Outdated
} else { | ||
b.statedb.SetWitness(accesses) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simplification here: since the statedb now contains an AccessWitness
, one can remove it from the signature of ApplyTransaction
and directly merge it there.
@@ -202,6 +203,17 @@ func New(diskdb ethdb.KeyValueStore, triedb *trie.Database, cache int, root comm | |||
} | |||
if err != nil { | |||
if rebuild { | |||
if useVerkle { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check if useVerkle
is really necessary, since we have IsVerkle
handy.
ef6b8b7
to
fb221aa
Compare
verkle: Implement Trie, NodeIterator and Database ifs Fix crash in TestDump Fix TestDump Fix TrieCopy remove unnecessary traces fix: Error() returned errIteratorEnd in verkle node iterator rewrite the iterator and change the signature of OpenStorageTrie add the adapter to reuse the account trie for storage don't try to deserialize a storage leaf into an account Fix statedb unit tests (#14) * debug code * Fix more unit tests * remove traces * Go back to the full range One tree to rule them all remove updateRoot, there is no root to update store code inside the account leaf fix build save current state for Sina Update go-verkle to latest Charge WITNESS_*_COST gas on storage loads Add witness costs for SSTORE as well Charge witness gas in the case of code execution corresponding code deletion add a --verkle flag to separate verkle experiments from regular geth operations use the snapshot to get data stateless execution from block witness AccessWitness functions Add block generation test + genesis snapshot generation test stateless block execution (#18) * test stateless block execution * Force tree resolution before generating the proof increased coverage in stateless test execution (#19) * test stateless block execution * Force tree resolution before generating the proof * increase coverage in stateless test execution ensure geth compiles fix issues in tests with verkle trees deactivated Ensure stateless data is available when executing statelessly (#20) * Ensure stateless data is available when executing statelessly * Actual execution of a statless block * bugfixes in stateless block execution * code cleanup - Reduce PR footprint by reverting NewEVM to its original signature - Move the access witness to the block context - prepare for a change in AW semantics Need to store the initial values. - Use the touch helper function, DRY * revert the signature of MustCommit to its original form (#21) fix leaf proofs in stateless execution (#22) * Fixes in witness pre-state * Add the recipient's nonce to the witness * reduce PR footprint and investigate issue in root state calculation * quick build fix cleanup: Remove extra parameter in ToBlock revert ToBlock to its older signature fix import cycle in vm tests fix linter issue fix appveyor build fix nil pointers in tests Add indices, yis and Cis to the block's Verkle proof upgrade geth dependency to drop geth's common dep fix cmd/devp2p tests fix rebase issues quell an appveyor warning fix address touching in SLOAD and SSTORE fix access witness for code size touch target account data before calling make sure the proper locations get touched in (ext)codecopy touch all code pages in execution add pushdata to witness remove useless code in genesis snapshot generation testnet: fix some of the rebase/drift issues Fix verkle proof generation in block fix an issue occuring when chunking past the code size fix: ensure the code copy doesn't extend past the code size
upgrade to latest go-verkle update go-verkle to get more fixes simplify code by removing all stateless references (#25) fix verkle proof test by enforcing values alignment to 32 bytes remove unneeded KZG tag fix the stateless test Move AccessWitness into StateDB (#27) * move AccessWitness into StateDB * set Accesses in TxContext constructor * Ensures that a statedb is initialized with a witness * copy AccessWitness in StateDB.Copy. use copied state in miner worker.commit. * remove redundant line Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Fix contract creation issue
* enable verkle on cancun block: take 2 * fix typo. make unreachable line panic message more clear
d0bcc59
to
e1adb6f
Compare
e1adb6f
to
dd6425e
Compare
* fix: don't add PUSH1-data during contract deployment * remove import cycle in tests (#92)
@@ -357,6 +381,20 @@ func GenesisBlockForTesting(db ethdb.Database, addr common.Address, balance *big | |||
return g.MustCommit(db) | |||
} | |||
|
|||
func DefaultVerkleGenesisBlock() *Genesis { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: remove
* safe gas add * fix build
Co-authored-by: Tanishq Jasoria <jasoriatanishq@gmail.com>
* Remove the code analysis interface to reduce PR footprint * fix unit test
* upgrade branch to use bandersnatch * fix a couple issues * update precomp file
Replaced by #25253, closing this one. |
This PR adds a
--verkle
switch that makes geth use verkle trees instead of the MPT. It implements the following:Trie
type, namelyVerkleTree
;VerkleProof
field;go-verkle
, that will be implemented shortly).This PR doesn't include:
This is a rebase of #23563, with some extra fixes.
TODO:
gasSLoad
and other locations, the initial data isn't loaded from the database and an invalid default is used. There should be something to just mark the location as accessed, and then a later load from the db (maybe concurrent inVerkleProofGeneration
)DeserializeVerkleProof
consensys/gruby
.common
rlp
add tests for stateless contract execution--verkle
isn't set