Add state and storage proof rest APIs #645
Open
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.
Summary
protocol-units
In order for Movement to support IBC and light clients, it should expose some API's for getting transaction, storage and state proofs. This PR adds the necessary API's for supporting IBC. Please see
Changelog
for more details.Changelog
The following API's have been added:
/movement/v1/table-item-with-proof/:table_handle/:key/:blockheight
: Returns a table item and it's storage proof at a specific height. This is being used to verify whether some dataN
is really committed. The proof is verified against the state_checkpoint_hash of the transaction which is the final transaction at the block atblockheight
./movement/v1/state-proof/:blockheight
: Returns the state proof that is committed by Movement to L1 and also the transaction proof and info which contains thestate_checkpoint_hash
. The transaction proof is verified against the executed_state_id which is a part of theStateProof
. Note that in order to verify the validity of the givenStateProof
, the light clients would have to check it against the hash that is committed to Ethereum L1.Testing
Outstanding issues