-
Notifications
You must be signed in to change notification settings - Fork 35
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
Prepare codebase for merging hooking tracers from upstream #53
Draft
ziogaschr
wants to merge
23
commits into
branch_v1.0.16
Choose a base branch
from
hooks/pre_tracer
base: branch_v1.0.16
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…ion (#29563) This change removes an unnecessary preallocation and fixes a flaw with no-op copies of some parts of the statedb # Conflicts: # core/state/statedb.go
* core/state, tests: remove account reset operation * core/state, core/vm: implement createcontract journal event * core/state: make createcontract not emit dirtied account, unskip tests * core/state: add createcontract to journal fuzzing * core/state: fix journal * core/state: address comments * core/state: remove useless code --------- Co-authored-by: Gary Rong <[email protected]> # Conflicts: # core/state/state_object.go # core/state/state_test.go # core/state/statedb.go # core/state/statedb_test.go # core/vm/evm.go
…519) * core/state: trie prefetcher change: calling trie() doesn't stop the associated subfetcher Co-authored-by: Martin HS <[email protected]> Co-authored-by: Péter Szilágyi <[email protected]> * core/state: improve prefetcher * core/state: restore async prefetcher stask scheduling * core/state: finish prefetching async and process storage updates async * core/state: don't use the prefetcher for missing snapshot items * core/state: remove update concurrency for Verkle tries * core/state: add some termination checks to prefetcher async shutdowns * core/state: differentiate db tries and prefetched tries * core/state: teh teh teh --------- Co-authored-by: Jared Wasinger <[email protected]> Co-authored-by: Martin HS <[email protected]> Co-authored-by: Gary Rong <[email protected]> # Conflicts: # core/blockchain.go # core/state/state_object.go # core/state/statedb.go # core/state/trie_prefetcher.go # core/state/trie_prefetcher_test.go # Conflicts: # core/state/statedb.go
…29731) * core/state: remove slot dirtiness if it's set back to origin value * core/state: suggestion from martin # Conflicts: # core/state/journal.go # core/state/state_object.go
This is a follow-up to #29520, and a preparatory PR to a more thorough change in the journalling system. ### API methods instead of `append` operations This PR hides the journal-implementation details away, so that the statedb invokes methods like `JournalCreate`, instead of explicitly appending journal-events in a list. This means that it's up to the journal whether to implement it as a sequence of events or aggregate/merge events. ### Snapshot-management inside the journal This PR also makes it so that management of valid snapshots is moved inside the journal, exposed via the methods `Snapshot() int` and `RevertToSnapshot(revid int, s *StateDB)`. ### SetCode JournalSetCode journals the setting of code: it is implicit that the previous values were "no code" and emptyCodeHash. Therefore, we can simplify the setCode journal. ### Selfdestruct The self-destruct journalling is a bit strange: we allow the selfdestruct operation to be journalled several times. This makes it so that we also are forced to store whether the account was already destructed. What we can do instead, is to only journal the first destruction, and after that only journal balance-changes, but not journal the selfdestruct itself. This simplifies the journalling, so that internals about state management does not leak into the journal-API. ### Preimages Preimages were, for some reason, integrated into the journal management, despite not being a consensus-critical data structure. This PR undoes that. --------- Co-authored-by: Gary Rong <[email protected]> # Conflicts: # core/state/state_object.go # core/state/statedb.go
As SELF-DESTRUCT opcode is disabled in the cancun fork(unless the account is created within the same transaction, nothing to delete in this case). The account will only be deleted in the following cases: - The account is created within the same transaction. In this case the original storage was empty. - The account is empty(zero nonce, zero balance, zero code) and is touched within the transaction. Fortunately this kind of accounts are not-existent on ethereum-mainnet. All in all, after cancun, we are pretty sure there is no large contract deletion and we don't need this mechanism for oom protection. # Conflicts: # core/state/statedb.go # triedb/pathdb/database.go # triedb/pathdb/journal.go
* core/state: introduce stateUpate structure * core/state: remove outdated function description * core/state: address comments # Conflicts: # core/state/state_object.go # core/state/statedb.go # core/state/statedb_fuzz_test.go
# Conflicts: # core/blockchain.go # core/state/statedb.go # miner/worker.go
# Conflicts: # core/blockchain.go
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR, brings in upstream changes mostly in StateDb and Trie in order we can bring in the live hooking tracers from upstream.
This PR will not be merged at its own, but a followup PR will follow, though it's being created in order to help the team review the changes happening.