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

Add state and storage proof rest APIs #645

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aeryz
Copy link

@aeryz aeryz commented Oct 1, 2024

Summary

  • RFCs: $\emptyset$.
  • Categories: 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:

  1. /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 data N is really committed. The proof is verified against the state_checkpoint_hash of the transaction which is the final transaction at the block at blockheight.
  2. /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 the state_checkpoint_hash. The transaction proof is verified against the executed_state_id which is a part of the StateProof. Note that in order to verify the validity of the given StateProof, the light clients would have to check it against the hash that is committed to Ethereum L1.

Testing

Outstanding issues

@aeryz aeryz force-pushed the feat/rest-apis-state-proofs branch from 0ab332d to 9cfdce5 Compare October 1, 2024 13:39
@aeryz aeryz changed the title Feat/rest apis state proofs Add state and storage proof rest APIs Oct 1, 2024
Comment on lines +98 to +99
# for `hostname -I`
hostname-debian
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this added just for convenience, or is there a need for this in the development shell?

Copy link
Author

Choose a reason for hiding this comment

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

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.

2 participants