Skip to content
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

geth: update to v1.13.14 #10349

Closed
wants to merge 1 commit into from
Closed

Conversation

axelKingsley
Copy link
Contributor

@axelKingsley axelKingsley commented Apr 30, 2024

Updates the go.mod to use op-geth based on upstream version v1.13.14

This PR is made against v1.13.13 branch because there were are required changes to support the previous version which must be built on.

No additional changes required to support the new version beyond changes made in previous updates:

  • trie pakcage updated to triedb package
  • core types deprecated for types types

@axelKingsley axelKingsley changed the title Attempt geth v1.13.14 geth: update to v1.13.14 May 1, 2024
@axelKingsley axelKingsley marked this pull request as ready for review May 1, 2024 14:40
@axelKingsley axelKingsley requested review from a team as code owners May 1, 2024 14:40
@axelKingsley axelKingsley requested a review from tynes May 1, 2024 14:40
Copy link
Contributor

coderabbitai bot commented May 1, 2024

Walkthrough

Walkthrough

The modifications across various files primarily involve updating type references from core to types for Genesis-related structs, and shifting trie database functionality from trie to triedb. This reflects a broader refactoring to enhance modularity and adapt to updated dependencies in the Ethereum Go client.

Changes

Files Summary
op-chain-ops/genesis/..., op-e2e/e2eutils/..., op-e2e/external.go, op-e2e/setup.go, op-program/client/l2/... Updated type references 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/db_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 imports and usage from trie to triedb for trie database operations. Adjusted related configurations and method calls.
op-e2e/external.go, op-proposer/proposer/abi_test.go Import paths updated to include types from github.com/ethereum/go-ethereum/core/types replacing core.

Recent Review Details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits Files that changed from the base of the PR and between fff6563 and a541f02.
Files ignored due to path filters (4)
  • go.mod is excluded by !**/*.mod
  • go.sum is excluded by !**/*.sum
  • op-ufm/go.mod is excluded by !**/*.mod
  • op-ufm/go.sum is 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 (2)
  • op-program/client/l2/db_test.go
  • packages/contracts-bedrock/scripts/go-ffi/differential-testing.go
Additional comments not posted (33)
op-e2e/e2eutils/addresses.go (2)

8-8: Updated import from core/types to types aligns with the namespace changes described in the PR. This is a necessary update following the deprecation of core types.


14-14: The function collectAllocAddrs now correctly uses types.GenesisAlloc instead of core.GenesisAlloc. This change is consistent with the PR's objective to transition from core to types namespace.

op-chain-ops/genesis/layer_two.go (1)

73-73: The function HasAnyDevAccounts now accepts types.GenesisAlloc as its parameter, aligning with the namespace transition from core to types. This change is consistent with the PR's objectives and improves code consistency.

op-e2e/external.go (2)

17-17: Updated import from core/types to types aligns with the namespace changes described in the PR. This is a necessary update following the deprecation of core types.


79-80: The ExternalRunner struct now initializes Genesis with types.GenesisAlloc, which is consistent with the namespace transition from core to types. This change ensures that the struct is using the updated types as intended in the PR.

op-proposer/proposer/abi_test.go (2)

15-15: Updated import from core/types to types aligns with the namespace changes described in the PR. This is a necessary update following the deprecation of core types.


31-31: The simulated backend now uses types.GenesisAlloc for initializing, which is consistent with the namespace transition from core to types. This change ensures that the backend setup is using the updated types as intended in the PR.

op-program/client/mpt/trie.go (2)

12-13: Updated imports from trie to triedb and triedb/hashdb align with the package changes described in the PR. This is a necessary update following the transition from the trie package to the triedb package.


51-51: The ReadTrie function now uses triedb.NewDatabase for database initialization, which is consistent with the package transition from trie to triedb. This change ensures that the function is using the updated package as intended in the PR.

op-e2e/actions/l1_replica_test.go (2)

13-14: Updated imports from trie to triedb and triedb/hashdb align with the package changes described in the PR. This is a necessary update following the transition from the trie package to the triedb package.


63-63: The TestL1Replica_ActL1Sync function now uses triedb.NewDatabase for database initialization, which is consistent with the package transition from trie to triedb. This change ensures that the function is using the updated package as intended in the PR.

op-chain-ops/genesis/genesis.go (2)

114-114: The NewL2Genesis function now initializes Alloc with an empty map of types.Account, which is consistent with the namespace transition from core to types. This change ensures that the function is using the updated types as intended in the PR.


203-203: The NewL1Genesis function now initializes Alloc with an empty map of types.Account, which is consistent with the namespace transition from core to types. This change ensures that the function is using the updated types as intended in the PR.

packages/contracts-bedrock/scripts/go-ffi/trie.go (2)

16-16: Updated import from trie to triedb aligns with the package changes described in the PR. This is a necessary update following the transition from the trie package to the triedb package.


137-137: The genTrieTestCase function now uses trie.NewEmpty with triedb.NewDatabase for trie initialization, which is consistent with the package transition from trie to triedb. This change ensures that the function is using the updated package as intended in the PR.

op-e2e/e2eutils/setup.go (3)

90-91: Namespace update from core to types for GenesisAlloc is correctly implemented.


115-115: Correct usage of types.Account in the allocation map.


136-136: Proper implementation of types.Account in L2 genesis allocation.

op-chain-ops/state/memory_db.go (2)

50-52: Updated GetAccount method to return types.Account instead of core.GenesisAccount.


74-74: Correct implementation of types.Account in the account creation method.

op-e2e/actions/l2_engine_test.go (3)

17-18: Updated import paths from trie to triedb and hashdb correctly.


38-38: Correct instantiation of triedb.Database with the new configuration.


101-101: Proper use of triedb.NewDatabase in the block building test.

op-program/client/l2/engine_backend_test.go (3)

22-23: Updated import paths from trie to triedb and hashdb correctly.


297-297: Correct allocation of types.Account in the genesis block setup.


304-304: Proper instantiation of triedb.Database with the new configuration in the test setup.

op-e2e/setup.go (3)

34-34: The import statement for the types package from github.com/ethereum/go-ethereum/core/types is correctly added to replace the deprecated core types. This aligns with the PR's objectives to transition from core to types.


468-475: The replacement of core.GenesisAccount with types.Account in the L1 genesis allocation is correctly implemented. This change is part of the namespace transition and is consistent with the PR's objectives.


497-504: Similarly, the replacement of core.GenesisAccount with types.Account in the L2 genesis allocation is correctly implemented. This ensures consistency in the use of the types namespace across both L1 and L2 configurations.

op-chain-ops/genesis/config.go (4)

820-820: Update to types.GenesisAlloc aligns with the latest Ethereum standards.


824-824: The use of maps.Copy is efficient for copying map data, ensuring that the Copy method functions correctly with the new types.GenesisAlloc.


844-844: Initialization of types.GenesisAlloc is correct and matches the new namespace usage.


847-847: Conversion of forgeAllocAccount to types.Account is handled correctly, ensuring that all necessary fields are properly converted and assigned.


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?

Share
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 @coderabbitai in 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 @coderabbitai in 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 pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to 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.yaml file 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.

@trianglesphere trianglesphere changed the base branch from develop to axel/geth_1_13_13 May 2, 2024 00:17
Copy link
Contributor

@trianglesphere trianglesphere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once op-geth is merged

Copy link
Contributor

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.

@protolambda
Copy link
Contributor

Geth dep is at v1.13.15 / v1.101315.1-rc.2 already, closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants