Skip to content

Conversation

@juan518munoz
Copy link
Collaborator

@juan518munoz juan518munoz commented Dec 3, 2025

As observed while updating the client with the latest node version, retrieval of account proof is prone to failure when the block number used for the request is different from the block where the last account update happened, as it returns a not found in those cases.

This PRs lighly refactors the logic of proof retrieval to return the account proof of an account up to the specified block.

@igamigo igamigo marked this pull request as ready for review December 3, 2025 17:25
Copy link
Collaborator

@igamigo igamigo left a comment

Choose a reason for hiding this comment

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

LGTM but I was also involved in investigating a fix for this so ideally @drahnr can take a look as well

@igamigo igamigo requested a review from drahnr December 3, 2025 17:25
@igamigo igamigo requested a review from bobbinth December 3, 2025 17:26
@juan518munoz
Copy link
Collaborator Author

This PR as well as others are failing the MSRV check, attempted to fix it, to no avail.

@Mirko-von-Leipzig
Copy link
Collaborator

This PR as well as others are failing the MSRV check, attempted to fix it, to no avail.

Yeah we have some speculation going on in #1418 but its unclear at the moment wtf is going on there :)

Copy link
Collaborator

@Mirko-von-Leipzig Mirko-von-Leipzig left a comment

Choose a reason for hiding this comment

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

I'll leave @drahnr to formally approve, but LGTM.

Some suggestions on returning to the original phrasing and removing the changelog entry.

Comment on lines 152 to 153
// If the specified block does not contain an update for the specified account,
// the latest available data will be returned.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is a bit ambiguous and could mean that asking for block N could return data after N aka latest > N.

I think phrasing the entire comment as something like

// Optional block height at which to return the proof.
//
// Defaults to current chain tip if unspecified.

@juan518munoz juan518munoz changed the title feat: make get account proof retrieve latest known state fix: make get account proof retrieve latest known state Dec 3, 2025
@drahnr
Copy link
Contributor

drahnr commented Dec 3, 2025

The change is sound, thank you!

Note that #1394 will refactor the accounts table fully and introduce is_latest and address it that way.

I'd hence ask to undo all the documentation comments, to minimize my merge + rebase pains 🫠

@juan518munoz
Copy link
Collaborator Author

@drahnr rolled back most doc change in 0472580

Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you! I think we can ignore the MSRV check for this PR. I'll merge it as is.

@bobbinth bobbinth merged commit 28973e3 into next Dec 3, 2025
17 of 18 checks passed
@bobbinth bobbinth deleted the jmunoz-update-account-proof-retrieval branch December 3, 2025 20:59
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.

6 participants