Skip to content

Update to flow-go with go-ethereum@v1.14.8#786

Merged
m-Peter merged 2 commits into
feature/pectra-upgradefrom
mpeter/update-go-ethereum-v1.14.8
Apr 7, 2025
Merged

Update to flow-go with go-ethereum@v1.14.8#786
m-Peter merged 2 commits into
feature/pectra-upgradefrom
mpeter/update-go-ethereum-v1.14.8

Conversation

@m-Peter
Copy link
Copy Markdown
Collaborator

@m-Peter m-Peter commented Mar 14, 2025

Work towards: onflow/flow-go#7152
Depends on: onflow/go-ethereum#8

Description

Updates to flow-go version using go-ethereum@v1.14.8 and fixes some minor breaking changes.


For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the standards mentioned here.
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

Summary by CodeRabbit

  • Refactor

    • Streamlined the processing of account data during trace operations to enhance overall reliability.
  • Chores

    • Updated multiple dependency versions for improved compatibility and maintainability.
    • Adjusted local module references for better management of dependencies.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 14, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This pull request refactors the TraceCall method in the debug API to use direct method calls for account balance, state, and state differences instead of pointer dereferencing. Additionally, the dependency versions in both the main and test go.mod files have been updated, and new replace directives have been added to point to local module paths. No changes were made to the declarations of exported or public entities.

Changes

File(s) Change Summary
api/debug.go Refactored the TraceCall method to remove pointer dereferencing for account balance, state, and state differences by calling direct methods.
go.mod, tests/go.mod Updated dependency versions (including cadence, flow-go-sdk, uint256, flow-core-contracts, flow/protobuf) and added replace directives for local paths.

Possibly related PRs

  • Support withLog tracer config key for callTracer #711: The changes in the main PR to the TraceCall method in the DebugAPI class are related to those in the retrieved PR, as both involve modifications to the same method, albeit with different focuses on data handling and logging.
  • Support block overrides parameter for eth_call & debug_traceCall #691: The changes in the main PR regarding the TraceCall method in the DebugAPI class are related to the modifications in the retrieved PR, as both involve enhancements to block data handling and the introduction of block overrides, specifically through the use of the OverridableBlocksProvider.

Suggested labels

Improvement, Compatibility, Bugfix

Suggested reviewers

  • peterargue
  • zhangchiqing
  • janezpodhostnik

Poem

I’m a rabbit in the code garden, hopping with delight,
Tracing calls with nimble steps from morning until night.
Pointers left behind, my path now so clear,
Dependencies updated, spreading good cheer.
Local paths lead the dance in a merry byte flight,
Hopping through changes with joy and insight! 🐇✨


🪧 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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration 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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 61c85d6 and b5201ae.

⛔ Files ignored due to path filters (2)
  • go.sum is excluded by !**/*.sum
  • tests/go.sum is excluded by !**/*.sum
📒 Files selected for processing (3)
  • api/debug.go (1 hunks)
  • go.mod (4 hunks)
  • tests/go.mod (4 hunks)
🔇 Additional comments (12)
api/debug.go (3)

220-220: Updated to use direct method call instead of pointer dereferencing

The code now uses account.Balance.ToInt() directly instead of dereferencing the pointer. This is a cleaner approach and likely adapts to API changes in the updated go-ethereum dependency.


227-228: Direct state object usage replaces pointer dereferencing

Updated to append account.State directly, which matches the expected API interface in the updated dependencies and improves code clarity.


231-232: Direct stateDiff object usage replaces pointer dereferencing

Updated to append account.StateDiff directly instead of dereferencing a pointer. This change aligns with the updated API interface in go-ethereum v1.14.8.

go.mod (5)

10-10: Updated Cadence dependency version

Updated github.com/onflow/cadence from v1.3.1 to v1.3.3 to maintain compatibility with the latest Flow ecosystem components.


12-12: Updated Flow SDK dependency version

Updated github.com/onflow/flow-go-sdk from v1.3.1 to v1.3.3 to maintain compatibility with the latest changes in the Flow ecosystem.


97-97: Updated uint256 dependency version

Updated github.com/holiman/uint256 from v1.3.0 to v1.3.1, which is likely required for compatibility with the updated go-ethereum version.


144-145: Updated Flow core contracts dependencies

Updated both contracts and templates packages from v1.5.1-preview to v1.6.0 stable release, which provides more reliable contract implementations.


150-150: Updated Flow protobuf dependency

Updated github.com/onflow/flow/protobuf/go/flow from v0.4.9 to v0.4.10 to maintain compatibility with the latest protocol updates.

tests/go.mod (4)

7-8: Updated Flow ecosystem dependencies in test module

Updated Cadence, Flow, and Flow SDK versions to match those in the main module, ensuring consistent behavior between main code and tests.

Also applies to: 11-12


103-103: Updated uint256 dependency version in test module

Updated github.com/holiman/uint256 from v1.3.0 to v1.3.1 to match the dependency in the main module.


154-155: Updated Flow core contracts dependencies in test module

Updated both contracts and templates packages from v1.5.1-preview to v1.6.0 stable release in the test module to match the main module.


160-160: Updated Flow protobuf dependency in test module

Updated github.com/onflow/flow/protobuf/go/flow from v0.4.9 to v0.4.10 to maintain consistency with the main module.

Comment thread go.mod Outdated
Comment thread tests/go.mod Outdated
@m-Peter m-Peter force-pushed the mpeter/update-go-ethereum-v1.14.8 branch from b5201ae to 414bcc0 Compare March 14, 2025 13:19
Comment thread api/debug.go
// Override account balance.
if account.Balance != nil {
opts = append(opts, query.WithStateOverrideBalance(addr, (*big.Int)(*account.Balance)))
opts = append(opts, query.WithStateOverrideBalance(addr, account.Balance.ToInt()))
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@m-Peter m-Peter force-pushed the mpeter/update-go-ethereum-v1.14.8 branch from 414bcc0 to 62ed404 Compare March 14, 2025 16:24
@m-Peter m-Peter changed the base branch from main to feature/pectra-upgrade April 7, 2025 09:09
@m-Peter m-Peter force-pushed the mpeter/update-go-ethereum-v1.14.8 branch from 62ed404 to e2a3d68 Compare April 7, 2025 09:27
@m-Peter m-Peter merged commit 991643c into feature/pectra-upgrade Apr 7, 2025
2 checks passed
@m-Peter m-Peter deleted the mpeter/update-go-ethereum-v1.14.8 branch April 7, 2025 09:36
@coderabbitai coderabbitai Bot mentioned this pull request Apr 18, 2025
6 tasks
@coderabbitai coderabbitai Bot mentioned this pull request Jun 19, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Sep 17, 2025
6 tasks
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.

2 participants