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

ethclient: use bor_getRootHash instead of eth namespace #967

Merged
merged 1 commit into from Aug 18, 2023

Conversation

manav2401
Copy link
Contributor

Description

Bor is flexible enough to also reply to the call eth_getRootHash even though it belongs to bor namespace. Hence, the eth client used to call eth_getRootHash instead of bor_getRootHash and it's being used in heimdall for checkpoints. This works for bor and heimdall but causes issue in erigon because when heimdall asks an erigon node for the root hash, it responds with method not available error as this method lies in the bor namespace in erigon rpc. This PR fixes it by just calling the bor namespace instead of eth so that heimdall can also communicate with erigon.

Will also raise a PR in heimdall to use this version of bor.

Changes

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)
  • Changes only for a subset of nodes

Breaking changes

Please complete this section if any breaking changes have been made, otherwise delete it

Nodes audience

In case this PR includes changes that must be applied only to a subset of nodes, please specify how you handled it (e.g. by adding a flag with a default value...)

Checklist

  • I have added at least 2 reviewer or the whole pos-v1 team
  • I have added sufficient documentation in code
  • I will be resolving comments - if any - by pushing each fix in a separate commit and linking the commit hash in the comment reply
  • Created a task in Jira and informed the team for implementation in Erigon client (if applicable)
  • Includes RPC methods changes, and the Notion documentation has been updated

Cross repository changes

  • This PR requires changes to heimdall
    • In case link the PR here:
  • This PR requires changes to matic-cli
    • In case link the PR here:

Testing

  • I have added unit tests
  • I have added tests to CI
  • I have tested this code manually on local environment
  • I have tested this code manually on remote devnet using express-cli
  • I have tested this code manually on mumbai
  • I have created new e2e tests into express-cli

Manual tests

Please complete this section with the steps you performed if you ran manual tests for this functionality, otherwise delete it

Additional comments

Please post additional comments in this section if you have them, otherwise delete it

@manav2401 manav2401 requested a review from a team August 18, 2023 07:31
@codecov
Copy link

codecov bot commented Aug 18, 2023

Codecov Report

Patch coverage: 87.50% and project coverage change: +0.02% 🎉

Comparison is base (58729e5) 57.02% compared to head (c27a654) 57.04%.
Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #967      +/-   ##
===========================================
+ Coverage    57.02%   57.04%   +0.02%     
===========================================
  Files          633      633              
  Lines        77326    77333       +7     
===========================================
+ Hits         44096    44116      +20     
- Misses       29460    29461       +1     
+ Partials      3770     3756      -14     
Files Changed Coverage Δ
ethclient/bor_ethclient.go 0.00% <0.00%> (ø)
internal/cli/server/config.go 69.96% <100.00%> (+0.10%) ⬆️
internal/cli/server/flags.go 100.00% <100.00%> (ø)

... and 21 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@manav2401 manav2401 merged commit bebd296 into develop Aug 18, 2023
8 checks passed
@manav2401 manav2401 deleted the manav/fix-get-root-hash-rpc branch August 18, 2023 09:09
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.

None yet

5 participants