-
Notifications
You must be signed in to change notification settings - Fork 27
all: implement eip-7702 set code tx #29
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
Conversation
* core,trie,eth,cmd: rework preimage store * ci: trigger unittest path-base-implementing
…liary tool to capture all deleted node wwhich can't be captured by trie.Committer. The deleted nodes (#552) can be removed from the disk later. Implement traverse and rework init Trie
* cmd, core/state, light, trie, eth: add trie owner notion * all: refactor * tests: fix goimports * core/state/snapshot: fix ineffasigns Co-authored-by: rjl493456442 <[email protected]> Co-authored-by: Martin Holst Swende <[email protected]>
* core, trie: rework trie commiter changed the commit procedure, introduce new struct called nodeSet for returning including all dirty nodes of a trie. Multiple nodeset will be merged to MergedNodeSet struct. then be submitted to in-memory database from block to block * trie,core: fix comments
* core: store genesis allocation and recommit them if necessary (#24460) * core: store genesis allocation and recommit them if necessary * core: recover predefined genesis allocation if possible * all: cleanup the APIs for initializing genesis (#25473) * all: polish tests * core: apply feedback from Guillaume * core: fix comment --------- Co-authored-by: rjl493456442 <[email protected]>
core, eth, les, trie: rework snap sync Co-authored-by: rjl493456442 <[email protected]>
… ethdb, can be used independently of the chain database, reference by commit 1941c5e6c99689be2e27b3e537bd591688b717de (#571)
* cmd, core, ethdb, node: rework ancient store folder reference by ethereum/go-ethereum@e44d655
* all: move genesis initialization to blockchain * all: fix test
* core: add blockchain test for failing create/destroy-case * core,state: some refactors * core/rawdb: refactor db inspector for extending multiple ancient store
…ence commit 538a868 (#577) fix up
* core,eth,tests,trie: abstract node scheme, and contruct database interface instead of keyvalue for supporting storing diff reverse data in ancient * stacktrie,core,eth: port the changes in stacktries, track the path prefix of nodes when commits, use ethdb.Database for constructing trie.Database, it's not necessary right now, but it's required for path-based used to open reverse diff freezer * core,trie: add scheme and resolvepath logic
* trie: track deleted nodes * core: track deleted nodes
* all: prep for path-based trie storage * all: use rawdb.HasLegacyNode() to check for node existance instead of check for length
* trie: implement NodeBlob API for trie iterator This functionality is needed in new path-based storage scheme, but can be implemented in a seperate PR though. When an account is deleted, then all the storage slots should be nuked out from the disk as well. In hash-based storage scheme they are still left in the disk but in new scheme, they will be iterated and marked as deleted. But why the NodeBlob API is needed in this scenario? Because when the node is marked deleted, the previous value is also required to be recorded to construct the reverse diff. * fuzzers/stacktrie: enable test --------- Co-authored-by: Gary Rong <[email protected]>
* trie: refactor tracer * fix: add description
…27842) (#587) Co-authored-by: Péter Szilágyi <[email protected]>
* trie: add wrapper for database * trie: refactor trie node * all: fix test * rawdb, trie: fix comment trie: change name WithPrev => NodeWithPrev rawdb: add schema_test
* trie: triestate/Set to track changes * core/state: track state changes journal.go: in resetObjectChange - add account in resetObjectChange (ref ethereum/go-ethereum#27339) - add prevAccount and prevStorage (ref ethereum/go-ethereum#27376) - add prevAccountOrigin and prevStorageOrigin to track changes state_object.go: add origin for tracking the original StateAccount before change statedb.go: - add accountsOrigin and storagesOrigin, same functions as above - stateObjectsDestruct now track the previous state before destruct - add functions for handle destructing old states * all: apply changes to tests
* core/state: clean up: db already exist in stateObject * core, trie: statedb also commit the block number
* all: clean up overall structure, preparing for path-based (#594) * trie/triedb/pathdb: init pathdb components * core, trie: track state change with address instead of hash Reference: ethereum/go-ethereum@817553c * trie: refactor * rawdb: implement freezer resettable & state freezer (#596) * rawdb: implement freezer resettable * rawdb: implement state freezer * rawdb: update description * trie: path based scheme implementing (#598) * core/state: move account definition to core/types Reference: ethereum/go-ethereum#27323 * trie: add path base utils * triedb: implement history and adding some test utils * trie/triedb/pathdb: implement difflayer and disklayer * Fix some issues related to history, and add logic checking maxbyte when is zero for retrieving ancient ranges with maxbyte is zero * trie/triedb/pathdb: implement database.go * freezer: Add unit test and docs for support freezer reading with no limit size * trie/triedb/pathdb: add database and difflayer tests * triedb/pathdb: implement journal and add more comments --------- Co-authored-by: Huy Ngo <[email protected]> --------- Co-authored-by: Francesco4203 <[email protected]>
…calling ReadTrieNode underlying (#603)
… when inserting in stack trie reference by 86fe359 (#604)
* trie: enable pathdb: add path config and enable tests * core/rawdb: now also inspect the state freezer in pathdb; rename * cmd: working on cmd ronin * core: refactor; add pathbase config; fix tests - all: fix and enable tests for pathbase - blockchain: open triedb explicitly in blockchain functions and close right after use, since diskLayer inside pathdb is a skeleton - blockchain: when writeBlockWithState, pathbase will skip the explicit garbage collector, which is only needed for hashbase - genesis.go: nit: change check genesis state, ref ethereum/go-ethereum@08bf8a6 * tests: enable path tests * eth: enable path scheme - all: fix tests, enable path scheme tests - state_accessor: split function to retrieve statedb from block to hash scheme and path scheme * light, miner, les, ethclient: clean up tests * trie: refactor triereader, return err when state reader won't be created in hash and path * trie: fix failed test in iterator and sync test tie * trie,core: improve trie reader and add checking config nil when initing database * trie: statedb instance is committed, then it's not usable, a new instance must be created based on new root updated database, reference by commit 6d2aeb4 * cmd,les,eth: fixed unittest and adding flag Parrallel correctly * core, eth: fix tests * core: refactor and fix sync_test logic * tmp: disable pathbase for TestIsPeriodBlock, TestIsTrippEffective --------- Co-authored-by: Huy Ngo <[email protected]>
…me object when passing parents in cosortium v1 (#608) * cmd,eth: fix wrong compare logic when data dir is empty and moving checking error correctly * docker: passing state.scheme when initing the genesis data * rawdb: add missing freezer in collections * v1/consortium: create a copy to keep parents content In snapshot function, the list parents is popped out gradually for getting its contents, so when calling apply, the parents list is empty. Simply create a copy at the beginning to fix it. This has been fixed in consortium v2. For a full sync scenario, however, the first blocks are still processed with consortium v1, which causes our node to panic. --------- Co-authored-by: Francesco4203 <[email protected]>
* eth/downloader: prevent pivot moves after state commit (#28126) * core, eth/downloader: fix genesis state missing due to state sync (#28124) * core: fix chain repair corner case in path-based scheme * eth/downloader: disable trie database whenever state sync is launched --------- Co-authored-by: Péter Szilágyi <[email protected]> Co-authored-by: rjl493456442 <[email protected]>
commit ethereum/go-ethereum@65ed1a6. This change speeds up trie hashing and all other activities that require RLP encoding of trie nodes by approximately 20%. The speedup is achieved by avoiding reflection overhead during node encoding. The interface type trie.node now contains a method 'encode' that works with rlp.EncoderBuffer. Management of EncoderBuffers is left to calling code. trie.hasher, which is pooled to avoid allocations, now maintains an EncoderBuffer. This means memory resources related to trie node encoding are tied to the hasher pool. This also refactors some functions in rlp package. goos: linux goarch: amd64 cpu: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ DeriveSha200/std_trie-8 725.1µ ± 31% 613.8µ ± 37% ~ (p=0.481 n=10) DeriveSha200/stack_trie-8 572.3µ ± 10% 493.1µ ± 13% -13.85% (p=0.005 n=10) geomean 644.2µ 550.1µ -14.61% │ old.txt │ new.txt │ │ B/op │ B/op vs base │ DeriveSha200/std_trie-8 287.4Ki ± 0% 283.0Ki ± 0% -1.53% (p=0.000 n=10) DeriveSha200/stack_trie-8 56.34Ki ± 0% 42.43Ki ± 0% -24.69% (p=0.000 n=10) geomean 127.2Ki 109.6Ki -13.88% │ old.txt │ new.txt │ │ allocs/op │ allocs/op vs base │ DeriveSha200/std_trie-8 2.931k ± 0% 2.917k ± 0% -0.46% (p=0.000 n=10) DeriveSha200/stack_trie-8 1.462k ± 0% 1.246k ± 0% -14.77% (p=0.000 n=10) geomean 2.070k 1.907k -7.90% │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ Prove-8 664.0µ ± 21% 450.2µ ± 27% -32.20% (p=0.000 n=10) VerifyProof-8 8.643µ ± 18% 9.009µ ± 33% ~ (p=0.684 n=10) VerifyRangeProof10-8 99.18µ ± 25% 67.60µ ± 67% ~ (p=0.089 n=10) VerifyRangeProof100-8 496.3µ ± 20% 487.0µ ± 33% ~ (p=0.739 n=10) VerifyRangeProof1000-8 5.149m ± 32% 4.095m ± 49% ~ (p=0.971 n=10) VerifyRangeProof5000-8 19.79m ± 60% 19.16m ± 28% ~ (p=0.631 n=10) VerifyRangeNoProof10-8 499.0µ ± 15% 422.8µ ± 29% -15.25% (p=0.035 n=10) VerifyRangeNoProof500-8 1.747m ± 30% 1.417m ± 24% -18.91% (p=0.023 n=10) VerifyRangeNoProof1000-8 3.025m ± 29% 2.239m ± 33% -25.98% (p=0.009 n=10) geomean 750.9µ 622.6µ -17.09% │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ HashFixedSize/10-8 60.30µ ± 19% 44.84µ ± 17% -25.64% (p=0.000 n=10) HashFixedSize/100-8 205.9µ ± 32% 145.2µ ± 19% -29.48% (p=0.000 n=10) HashFixedSize/1K-8 1326.5µ ± 23% 939.2µ ± 25% -29.20% (p=0.002 n=10) HashFixedSize/10K-8 14.77m ± 25% 12.74m ± 19% ~ (p=0.075 n=10) HashFixedSize/100K-8 135.2m ± 19% 104.1m ± 18% -23.03% (p=0.003 n=10) geomean 2.011m 1.520m -24.43% │ old.txt │ new.txt │ │ B/op │ B/op vs base │ HashFixedSize/10-8 11.729Ki ± 0% 9.752Ki ± 0% -16.85% (p=0.000 n=10) HashFixedSize/100-8 58.56Ki ± 0% 49.23Ki ± 0% -15.93% (p=0.000 n=10) HashFixedSize/1K-8 578.1Ki ± 0% 481.5Ki ± 0% -16.72% (p=0.000 n=10) HashFixedSize/10K-8 6.019Mi ± 0% 4.985Mi ± 0% -17.18% (p=0.000 n=10) HashFixedSize/100K-8 59.53Mi ± 0% 49.29Mi ± 0% -17.20% (p=0.000 n=10) geomean 683.5Ki 568.8Ki -16.78% │ old.txt │ new.txt │ │ allocs/op │ allocs/op vs base │ HashFixedSize/10-8 149.0 ± 0% 142.0 ± 0% -4.70% (p=0.000 n=10) HashFixedSize/100-8 772.0 ± 0% 739.0 ± 0% -4.27% (p=0.000 n=10) HashFixedSize/1K-8 7.443k ± 0% 7.099k ± 0% -4.62% (p=0.000 n=10) HashFixedSize/10K-8 77.09k ± 0% 73.32k ± 0% -4.89% (p=0.000 n=10) HashFixedSize/100K-8 767.8k ± 0% 730.5k ± 0% -4.86% (p=0.000 n=10) geomean 8.729k 8.321k -4.67% Co-authored-by: Qian Bin <[email protected]> Co-authored-by: Felix Lange <[email protected]>
…ull sync before we apply the change for commit 73f5bcb from ethereum/go-ethereum#28171, which adding more checking state for avoiding head state missing in path mode, but seem we miss the this change line when cherry-pick to path base implementing
While investigating #22374, I noticed that the Sync operation of the freezer does not take the table lock. It also doesn't call sync for all files if there is an error with one of them. I doubt this will fix anything, but didn't want to drop the fix on the floor either.
This PR does a few things. It fixes a shutdown-order flaw in the chainfreezer. Previously, the chain-freezer would shutdown the freezer backend first, and then signal for the loop to exit. This can lead to a scenario where the freezer tries to fsync closed files, which is an error-conditon that could lead to exit via log.Crit. It also makes the printout more detailed when truncating 'dangling' items, by showing the exact number instead of approximate MB. This PR also adds calls to fsync files before closing them, and also makes the `db inspect` command slightly more robust. Remove logic try fsync related Access denined error on Windows
… (#691) * core/txpool, core/state_processor, vm/evm: Skip check for blacklisted after Venoki * core/vm, core/txpool: Skip check for contract deployer after Venoki
The new blst version fixes this build issue with go1.24. ../../go/pkg/mod/github.com/supranational/[email protected]/bindings/go/blst.go:207:11: cannot define new methods on non-local type SecretKey ../../go/pkg/mod/github.com/supranational/[email protected]/bindings/go/blst.go:310:15: cannot define new methods on non-local type SecretKey ../../go/pkg/mod/github.com/supranational/[email protected]/bindings/go/blst.go:430:11: cannot define new methods on non-local type Fp12 ../../go/pkg/mod/github.com/supranational/[email protected]/bindings/go/blst.go:434:11: cannot define new methods on non-local type Fp12 ../../go/pkg/mod/github.com/supranational/[email protected]/bindings/go/blst.go:438:11: cannot define new methods on non-local type Fp12 ../../go/pkg/mod/github.com/supranational/[email protected]/bindings/go/blst.go:442:11: cannot define new methods on non-local type Fp12 ../../go/pkg/mod/github.com/supranational/[email protected]/bindings/go/blst.go:448:12: cannot define new methods on non-local type Fp12 ../../go/pkg/mod/github.com/supranational/[email protected]/bindings/go/blst.go:460:11: cannot define new methods on non-local type P1Affine ../../go/pkg/mod/github.com/supranational/[email protected]/bindings/go/blst.go:465:11: cannot define new methods on non-local type P1Affine ../../go/pkg/mod/github.com/supranational/[email protected]/bindings/go/blst.go:474:12: cannot define new methods on non-local type P2Affine Reference: - blst commit: supranational/blst@df47c4c - go-ethereum commit: ethereum/go-ethereum@24ed0b5
…ain#17) * params/version: release Ronin v1.0.0 * genesis: Pre-config hardfork node * genesis: set testnet Venoki harkfork block * genesis: set mainnet Venoki harkfork block * params: config harkfork blocks
…n-chain#20) * core/state_transition: avoid comparing basefee and feecap for system transaction when enabling basefee * eth/tracers: change using basefee instead of gas price is 0, and add more checking after and before enabling venoki for debug_traceInternalsAndAccounts unittest * eth/tracers/tracetest: support run all tests with hash and path scheme * core/state_transition: skip full logic check gasFeecap with system txs
System transaction is not affected by basefee rule in normal flow, the tip from system transaction is always 0. This commit makes the tracing flow consistent with this behavior.
The returned reward of system transaction is negative. This is because system transaction does not follow basefee rule. This commit fixes the issue by setting the returned reward of system transaction to 0.
…onin-chain#24) As the system transaction does not follow the basefee rule, make this behavior consistent in tracing path. This commit also refactors the code the skip the whole transaction's epilogue for system transaction in tracing.
…nin-chain#28) * genesis,params: config hardfork block, treasury address * version: update ronin to v1.0.2 * params: add Treasury address mainnet
| if err != nil { | ||
| return common.Address{}, err | ||
| } | ||
| if len(pub) == 0 || pub[0] != 4 { |
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.
Just curious here, what is the check pub[0] != 4?
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.
I've found out about this. This is used to check if the public key is in uncompressed format.
|
I'm not sure if this is in scope of this PR but in the EIP So do we need to change this place? |
PRs:
ethereum/go-ethereum#30078
ethereum/go-ethereum#31089
Description
This PR implements EIP-7702: "Set EOA account code".
Specification: https://eips.ethereum.org/EIPS/eip-7702