-
Notifications
You must be signed in to change notification settings - Fork 159
chore(all): libevm phase 2.5 #820
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
Merged
Conversation
This file contains hidden or 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
Co-authored-by: Arran Schlosberg <[email protected]>
* refactor: params.ChainConfigExtra -> params/extras * remove type alias AvalancheConfig * remove type alias for PrecompileConfig * remove type alias UpgradeConfig * remove type alias network upgrade * seems ok to import ethparams.ChainConfig * remove type aliases * refactor: use `ChainConfig.Hooks().(*ChainConfigExtra)` * move RulesExtra (only struct, keep behavior) * refactor: return extras.RulesExtra from GetRulesExtra * rename extras.RulesExtra -> extras.Rules * rename file * refactor: rename extras.ChainConfigExtra -> extras.ChainConfig * return error if chain config type does not match * nit * comment and style improvements * nit * nit --------- Co-authored-by: Arran Schlosberg <[email protected]>
qdm12
commented
Mar 5, 2025
qdm12
commented
Mar 7, 2025
…r_ext.go (#781) - Move our code from state_processor.go to state_processor_ext.go - Slight modifications to state_processor.go to make it more alike geth master
- Define `core.BlockContext` implementing `contract.ConfigurationBlockContext` (same as subnet-evm) - Use `core.NewBlockContext` to convert `types.Block` and `types.Header` for calls to `core.ApplyUpgrades`
Co-authored-by: Quentin Mc Gaw <[email protected]> Co-authored-by: Arran Schlosberg <[email protected]>
…es (#819) - Sort alphabetically libevm imports in `imports.go` - Move `state_account.go`'s libevm imports to `imports.go` - Move extras registration from `state_account.go` to new file `libevm.go`
- Implement `HeaderExtra` RLP and JSON serialization methods - remove `BlockNonce` - remove `EncodeNonce` - new functions `GetHeaderExtra` and `SetHeaderExtra` - Migrate existing custom `Header` to `HeaderSerializable` in block_ext.go with only `Hash` method for RLP code generation - Rename files gen_header_json.go to gen_header_serializable_json.go - Rename files gen_header_rlp.go to gen_header_serializable_rlp.go Signed-off-by: Quentin McGaw <[email protected]> Co-authored-by: Quentin Mc Gaw <[email protected]> Co-authored-by: Arran Schlosberg <[email protected]> Co-authored-by: Ceyhun Onur <[email protected]>
- Implement `PostCopy` header hook - Remove `CopyHeader` and use imported one from libevm Signed-off-by: Quentin McGaw <[email protected]> Co-authored-by: Arran Schlosberg <[email protected]>
… libevm (#760) - `BlockBodyExtra` extra payload defined for both `Block` and `Body` - hook `Copy` to be used in `Block` methods `Body`, `WithSeal`, `WithBody` and `WithWithdrawals` - hooks `BlockRLPFieldsForEncoding` and `BlockRLPFieldsForDecoding` for RLP codec of `Block` - hooks `BodyRLPFieldsForEncoding` and `BodyRLPFieldsForDecoding` for RLP codec of `Body` - `SetBlockExtra` to set an extra payload `BlockBodyExtra` on a `Block` - `SetBodyExtra` to set an extra payload `BlockBodyExtra` on a `Body` - Block getter pure functions for extra fields: `BlockExtDataGasUsed`, `BlockGasCost`, `BlockExtData`, `BlockVersion`, `BlockExtDataGasUsed`, `BlockGasCost` - New import from libevm's `core/types`: `Block`, `Blocks`, `Body`, `CalcUncleHash`, `NewBlock` and `NewBlockWithHeader` - remove now unneeded `core/types/block.go` - add test dependency github.com/google/go-cmp v0.7.0 Signed-off-by: Quentin McGaw <[email protected]> Co-authored-by: Arran Schlosberg <[email protected]>
- Part of the core/rawdb migration to use libevm - Using libevm `InspectDatabase` - Define options passed to libevm `InspectDatabase`
- Move our own code to `_ext.go` files - Import symbols from libevm in imports.go - Use Block and Body hooks previously implemented Co-authored-by: Arran Schlosberg <[email protected]>
…887) - Previous avalanchego was based on top of v1.12.3, although master branch is based off v1.12.3-name-fortuna - Current avalanchego is now based on top of v1.12.3-name-fortuna.0 - Fix versions.sh to detect avalanchego commit hashes for names with more dashes
- import interfaces from github.com/ava-labs/libevm directly - import `NotFound` error from github.com/ava-labs/libevm directly - Keep our two coreth-specific interfaces at interfaces/interfaces.go
- Metrics enabled corrrectly - Remove config argument from BackendConstructor since it's no longer needed - Export newTimestampCompatError with wrapping function NewTimestampCompatErr - Export rlpHash with wrapping function RLPHash - rlpgen supports type aliases - Better logging
- changes applied from comments on the review of #820 - suggested changes from the review on #828 - add test to check PredicateBytesFromExtra is the inverse of SetPredicateBytesInExtra Signed-off-by: Quentin McGaw <[email protected]> Co-authored-by: Arran Schlosberg <[email protected]>
|
Conflits will be resolved with #898 |
qdm12
added a commit
to ava-labs/subnet-evm
that referenced
this pull request
Mar 28, 2025
Changes applied from comments on the review of ava-labs/coreth#820 See original PR ava-labs/coreth#862 Signed-off-by: Quentin McGaw <[email protected]> Co-authored-by: Arran Schlosberg <[email protected]>
alarso16
reviewed
Mar 31, 2025
qdm12
added a commit
to ava-labs/subnet-evm
that referenced
this pull request
Apr 1, 2025
Changes applied from comments on the review of ava-labs/coreth#820 See original PR ava-labs/coreth#862 Signed-off-by: Quentin McGaw <[email protected]> Co-authored-by: Arran Schlosberg <[email protected]>
alarso16
approved these changes
Apr 2, 2025
darioush
reviewed
Apr 8, 2025
darioush
reviewed
Apr 8, 2025
darioush
approved these changes
Apr 8, 2025
node-druidx56y
added a commit
to node-druidx56y/subnet-evm
that referenced
this pull request
Sep 28, 2025
Changes applied from comments on the review of ava-labs/coreth#820 See original PR ava-labs/coreth#862 Signed-off-by: Quentin McGaw <[email protected]> Co-authored-by: Arran Schlosberg <[email protected]>
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.
Why this should be merged
Libevm phase 2.5, see each commit for details
How this works
Remaining items
How this was tested
CI passing, new tests added
Need to be documented?
Good question?
Need to update RELEASES.md?