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

op-node: workaround alchemy eth_getProof by blockhash RPC issue #4644

Closed
wants to merge 1 commit into from

Conversation

protolambda
Copy link
Contributor

Description

Alchemy does not yet support eth_getProof calls with blockhash parameter like other RPC providers due to incomplete execution-apis spec (fixed in ethereum/execution-apis#326 )

To work-around it, we check if it's Alchemy & if it's a blockhash argument, then first fetch the block header by hash, and then the proof by number, and verify the retrieved proof against the header to make sure the data is correct.

Tests

Alchemy-only functionality, run with --l1.rpckind=alchemy to test.

Metadata

Fix ENG-3178

@protolambda protolambda requested a review from a team as a code owner January 10, 2023 00:46
@changeset-bot
Copy link

changeset-bot bot commented Jan 10, 2023

⚠️ No Changeset found

Latest commit: 12dc1b3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov
Copy link

codecov bot commented Jan 10, 2023

Codecov Report

Merging #4644 (12dc1b3) into develop (f03df0a) will decrease coverage by 5.24%.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4644      +/-   ##
===========================================
- Coverage    41.19%   35.94%   -5.25%     
===========================================
  Files          324      177     -147     
  Lines        18348    14244    -4104     
  Branches       768        0     -768     
===========================================
- Hits          7558     5120    -2438     
+ Misses       10232     8599    -1633     
+ Partials       558      525      -33     
Flag Coverage Δ
bedrock-go-tests 35.94% <0.00%> (-0.10%) ⬇️
contracts-bedrock-tests ?
contracts-periphery-tests ?
contracts-tests ?
core-utils-tests ?
dtl-tests ?
fault-detector-tests ?
sdk-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
op-node/sources/eth_client.go 33.33% <0.00%> (-3.27%) ⬇️
op-node/p2p/discovery.go 65.52% <0.00%> (-2.39%) ⬇️
packages/core-utils/src/common/misc.ts
...racts-bedrock/contracts/L2/L2ToL1MessagePasser.sol
packages/sdk/src/utils/chain-constants.ts
...ages/contracts/contracts/L2/predeploys/OVM_ETH.sol
.../contracts-bedrock/contracts/L1/OptimismPortal.sol
...ges/core-utils/src/optimism/deposit-transaction.ts
...racts/contracts/libraries/utils/Lib_MerkleTree.sol
...layer/src/services/l2-ingestion/handlers/errors.ts
... and 139 more

@protolambda
Copy link
Contributor Author

Alchemy just let us know they fixed the RPC routing to accept block hashes, this work-around is no longer necessary. Tested it with Alchemy Goerli RPC. Closing this.

@protolambda protolambda deleted the alchemy-getproof branch August 6, 2023 17:18
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.

1 participant