Handle getProof without storage root idx #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pathfinder encounters an error when querying the
storage_root_idx
results inNone
. This PR addresses these cases by handling the error and populating contract_proof with an empty vector instead.While working with a devnet on Madara, we discovered a condition that occurs only in the initial blocks of the chain. From block 1 to block 9, the
storage_root_idx
query returnsNone
, causing Pathfinder to immediately throw an error.This error is propagated instead of being handled appropriately at the application layer, specifically in SNOS. Returning an empty vector allows us to continue with our workflow and handle this situation more gracefully.
On the other hand, the error received is not descriptive, forcing SNOS to interrupt execution. For example:
Steps to reproduce: