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

fix: behavior when pending block is not present in db #258

Merged
merged 3 commits into from
Sep 12, 2024
Merged

Conversation

cchudant
Copy link
Member

Pull Request type

  • Bugfix

What is the current behavior?

RPC endpoints return BlockNotFound when doing any call on Pending, when the block is in db

What is the new behavior?

Match the pathfinder and juno behavior: behave as if there is a pending block in db in that case. The new behavior makes sense to me for call, estimate, simulate etc - but I was surprised to see that they also return a fake pending block for get_block rpcs too - all the endpoints, really. We need to match their behavior even if it's questionable because that's what the clients expect.

Does this introduce a breaking change?

No

Copy link

Coverage report

The coverage rate is 74.48893003162848%

98% of new lines are covered.

Diff Coverage details (click to unfold)

crates/client/db/src/block_db.rs

98.07692307692308% of new lines are covered

crates/client/rpc/src/versions/v0_7_1/methods/read/get_block_with_receipts.rs

100.0% of new lines are covered

Copy link
Member

@antiyro antiyro left a comment

Choose a reason for hiding this comment

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

lgtm thanks this will unlock kakarot tests

@antiyro antiyro merged commit 82438e9 into main Sep 12, 2024
7 checks passed
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