geth: update to v1.13.13
Updates the go.mod to use op-geth based on upstream version v1.13.13
This PR is made against develop because there were no required changes to support the previous version v1.13.12
Changes required to support the new version:
triepakcage updated totriedbpackagecoretypes deprecated fortypestypes
Semgrep found 13 sol-style-notice-over-dev-natspec findings:
- packages/contracts-bedrock/scripts/L2Genesis.s.sol
Prefer @notice over @dev in natspec comments
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 43.47%. Comparing base (
acd8cf8) to head (2f9772c). Report is 130 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #10271 +/- ##
===========================================
+ Coverage 42.33% 43.47% +1.14%
===========================================
Files 73 41 -32
Lines 4845 3986 -859
Branches 766 614 -152
===========================================
- Hits 2051 1733 -318
+ Misses 2684 2143 -541
Partials 110 110
| Flag | Coverage Δ | |
|---|---|---|
| cannon-go-tests | 81.43% <ø> (ø) |
|
| chain-mon-tests | 27.14% <ø> (ø) |
|
| common-ts-tests | ? |
|
| contracts-ts-tests | 12.25% <ø> (ø) |
|
| core-utils-tests | ? |
|
| sdk-tests | 40.27% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
Semgrep found 6 golang_fmt_errorf_no_params findings:
- op-plasma/cmd/daserver/flags.go
- op-chain-ops/state/encoding.go
- op-bindings/bindgen/remote_handlers.go
No fmt.Errorf invocations without fmt arguments allowed
Semgrep found 2 import-text-template findings:
- op-bindings/bindgen/remote_handlers.go
- op-bindings/bindgen/generator_local.go
When working with web applications that involve rendering user-generated content, it's important to properly escape any HTML content to prevent Cross-Site Scripting (XSS) attacks. In Go, the text/template package does not automatically escape HTML content, which can leave your application vulnerable to these types of attacks. To mitigate this risk, it's recommended to use the html/template package instead, which provides built-in functionality for HTML escaping. By using html/template to render your HTML content, you can help to ensure that your web application is more secure and less susceptible to XSS vulnerabilities.
Walkthrough
Walkthrough
The modifications primarily involve updating types and import paths related to the Ethereum Go client code across various files. The changes focus on transitioning from core.GenesisAlloc and core.GenesisAccount to types.GenesisAlloc and types.Account, respectively. Additionally, there's a shift from using the trie package to the triedb package for trie database functionalities, reflecting an overall reorganization and type standardization within the library.
Changes
| Files | Summary |
|---|---|
op-chain-ops/genesis/config.go, op-chain-ops/genesis/genesis.go, op-chain-ops/genesis/layer_two.go, op-chain-ops/state/memory_db.go, op-e2e/e2eutils/addresses.go, op-e2e/e2eutils/setup.go, op-e2e/external.go, op-e2e/setup.go, op-program/client/l2/db_test.go, op-proposer/proposer/abi_test.go |
Updated from core.GenesisAlloc and core.GenesisAccount to types.GenesisAlloc and types.Account. |
op-e2e/actions/l1_replica_test.go, op-e2e/actions/l2_engine_test.go, op-program/client/l2/engine_backend_test.go, op-program/client/mpt/trie.go, packages/contracts-bedrock/scripts/go-ffi/differential-testing.go, packages/contracts-bedrock/scripts/go-ffi/trie.go |
Changed import paths and initialization from trie to triedb for trie database operations. |
Recent Review Details
Configuration used: .coderabbit.yml Review profile: CHILL
Commits
Files that changed from the base of the PR and between acd8cf8aa16d0e59508ee402458a97945f03e1c6 and 2f9772cb7c81a3b4796427c7b0b536b71d319032.Files ignored due to path filters (4)
go.modis excluded by!**/*.modgo.sumis excluded by!**/*.sumop-ufm/go.modis excluded by!**/*.modop-ufm/go.sumis excluded by!**/*.sum
Files selected for processing (16)
- op-chain-ops/genesis/config.go (3 hunks)
- op-chain-ops/genesis/genesis.go (2 hunks)
- op-chain-ops/genesis/layer_two.go (1 hunks)
- op-chain-ops/state/memory_db.go (2 hunks)
- op-e2e/actions/l1_replica_test.go (2 hunks)
- op-e2e/actions/l2_engine_test.go (3 hunks)
- op-e2e/e2eutils/addresses.go (1 hunks)
- op-e2e/e2eutils/setup.go (4 hunks)
- op-e2e/external.go (2 hunks)
- op-e2e/setup.go (3 hunks)
- op-program/client/l2/db_test.go (4 hunks)
- op-program/client/l2/engine_backend_test.go (2 hunks)
- op-program/client/mpt/trie.go (2 hunks)
- op-proposer/proposer/abi_test.go (2 hunks)
- packages/contracts-bedrock/scripts/go-ffi/differential-testing.go (3 hunks)
- packages/contracts-bedrock/scripts/go-ffi/trie.go (2 hunks)
Files skipped from review due to trivial changes (1)
- packages/contracts-bedrock/scripts/go-ffi/differential-testing.go
Additional comments not posted (35)
op-e2e/e2eutils/addresses.go (2)
8-8: Updated import to usetypesinstead ofcorealigns with the PR objectives.
14-14: The functioncollectAllocAddrscorrectly usestypes.GenesisAllocas per the PR's transition plan.op-chain-ops/genesis/layer_two.go (1)
73-73: The functionHasAnyDevAccountshas been correctly updated to usetypes.GenesisAlloc, aligning with the PR's transition plan.op-e2e/external.go (2)
17-17: Updated import to usetypesinstead ofcorealigns with the PR objectives.
79-80: TheGenesisfield inExternalRunnerstruct correctly usestypes.GenesisAllocfor the allocation map, aligning with the PR's transition plan.op-proposer/proposer/abi_test.go (2)
15-15: Updated import to usetypesinstead ofcorealigns with the PR objectives.
31-31: ThesimulatedBackendfunction correctly usestypes.GenesisAllocfor the allocation map, aligning with the PR's transition plan.op-program/client/mpt/trie.go (2)
12-13: Updated imports to usetriedbandhashdbinstead oftriealign with the PR objectives.
51-51: TheReadTriefunction correctly usestriedb.NewDatabaseandtrie.New, aligning with the PR's transition plan.op-e2e/actions/l1_replica_test.go (2)
13-14: Updated imports to usetriedbandhashdbinstead oftriealign with the PR objectives.
63-63: TheTestL1Replica_ActL1Syncfunction correctly usestriedb.NewDatabase, aligning with the PR's transition plan.op-program/client/l2/db_test.go (3)
18-19: Updated imports to usetriedbandhashdbinstead oftriealign with the PR objectives.
115-115: TheTestSupportsStateDBOperationsfunction correctly usestriedb.NewDatabase, aligning with the PR's transition plan.
127-127: TheTestUpdateStatefunction correctly usestriedb.NewDatabase, aligning with the PR's transition plan.op-chain-ops/genesis/genesis.go (2)
114-114: TheNewL2Genesisfunction correctly initializes an emptytypes.Accountmap, aligning with the PR's transition plan.
203-203: TheNewL1Genesisfunction correctly initializes an emptytypes.Accountmap, aligning with the PR's transition plan.packages/contracts-bedrock/scripts/go-ffi/trie.go (2)
16-16: Import oftriedbpackage added.This change aligns with the PR's objective to transition from the
triepackage to thetriedbpackage.
137-137: Replacement oftrie.NewEmptywithtriedb.NewDatabase.This change correctly implements the transition from using the
triepackage to thetriedbpackage for initializing a new trie database. Ensure that all functionalities provided by the oldtrie.NewEmptyare compatible or appropriately handled bytriedb.NewDatabase.op-e2e/e2eutils/setup.go (4)
12-12: Import oftypesfromgithub.com/ethereum/go-ethereum/core/types.This change is necessary for the transition from
coretypes totypestypes, aligning with the PR's objectives.
90-91: UpdatedAllocParamsstruct to usetypes.GenesisAlloc.This change correctly updates the type definitions from
core.GenesisAlloctotypes.GenesisAlloc, ensuring compatibility with the newtypespackage.
115-115: Updated account creation to usetypes.Account.This change is part of the transition from
core.GenesisAccounttotypes.Account, aligning with the PR's objectives.
136-136: Updated account creation to usetypes.Account.This change is consistent with the updates made in other parts of the codebase, transitioning from
core.GenesisAccounttotypes.Account.op-chain-ops/state/memory_db.go (2)
50-52: UpdatedGetAccountmethod to returntypes.Account.This change correctly updates the method to return
types.Accountinstead ofcore.GenesisAccount, aligning with the PR's objectives.
74-74: Updated account creation increateAccountmethod to usetypes.Account.This change is consistent with the updates made in other parts of the codebase, transitioning from
core.GenesisAccounttotypes.Account.op-e2e/actions/l2_engine_test.go (3)
17-18: Import oftriedbandtriedb/hashdbpackages added.This change aligns with the PR's objective to transition from the
triepackage to thetriedbpackage.
38-38: Replacement oftrie.NewEmptywithtriedb.NewDatabasein test setup.This change correctly implements the transition from using the
triepackage to thetriedbpackage for initializing a new trie database in the test environment. Ensure that all functionalities provided by the oldtrie.NewEmptyare compatible or appropriately handled bytriedb.NewDatabase.
101-101: Repeated change fortriedb.NewDatabasein another test setup.This change is consistent with the updates made in other parts of the codebase, transitioning from
trie.NewEmptytotriedb.NewDatabase.op-program/client/l2/engine_backend_test.go (3)
22-23: Import oftriedbandtriedb/hashdbpackages added.This change aligns with the PR's objective to transition from the
triepackage to thetriedbpackage.
297-297: Updated account allocation to usetypes.Account.This change correctly updates the account allocation to use
types.Accountinstead ofcore.GenesisAccount, aligning with the PR's objectives.
304-304: Replacement oftrie.NewEmptywithtriedb.NewDatabasein test setup.This change correctly implements the transition from using the
triepackage to thetriedbpackage for initializing a new trie database in the test environment. Ensure that all functionalities provided by the oldtrie.NewEmptyare compatible or appropriately handled bytriedb.NewDatabase.op-e2e/setup.go (2)
468-475: Update to usetypes.Accountaligns with the PR's objective to transition fromcoretypes.
497-504: Correct implementation of the newtypes.Accountin the genesis allocation setup.op-chain-ops/genesis/config.go (3)
820-820: Update to usetypes.GenesisAllocaligns with the latest Ethereum standards.
824-824: TheCopymethod correctly duplicates theForgeAllocsstructure using the updatedtypes.GenesisAlloc.
844-847: TheUnmarshalJSONmethod has been updated to handle the newtypes.GenesisAllocformat. Ensure that all fields are correctly mapped and that there are no data type mismatches or missing fields.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai generate interesting stats about this repository and render them as a table.@coderabbitai show all the console.log statements in this repository.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (invoked as PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger a review. This is useful when automatic reviews are disabled for the repository.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai helpto get help.
Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
CodeRabbit Configration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Geth dep is at v1.13.15 / v1.101315.1-rc.2 already, closing this.
op-chain-ops diff is partially applied, partially outdated (due to removal of packages). Op-program diff was applied to develop.