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

feat: proof validation implemented in experimental-api #673

Merged
merged 12 commits into from
Jun 14, 2024

Conversation

ICavlek
Copy link
Contributor

@ICavlek ICavlek commented Jun 11, 2024

Proof validation exists in crates::core::storage_proofs. Due to new requirements, it has been also implemented for the new experimental-api. Branch workflow is as follows:

  • Creation of unit tests in the crates::core::storage_proofs to check the original implementation
  • Migration of implementation to crates::core::experimental_api::gen
  • Migration of unit tests to validate that it has the same functionality
  • Code cleanup

Things to be checked with more details:

  • Unit tests that have been created - does something need to be added or changed
  • jsonrpc::error - code value for the errors is it correctly done (possible feature impl From<FromStrError> to kick out boilerplate map_err()? or different implementation with the current scope)
  • usage of starknet::FieldElement due to pedersen and poseidon hash - inside parse_proof() conversion from gen::Felt to starknet::FieldElement so that pedersen and poseidon hash functions could be called (additional usage of felt_to_bits() and felt_from_bits() from crates::core::utils)
  • Beerus Client added to experimental-api bin - necessary to extract L1 block_num and state_root from node

(Closes #619)

@ICavlek ICavlek requested a review from a team June 11, 2024 13:06
@ICavlek ICavlek enabled auto-merge (squash) June 12, 2024 13:19
@ICavlek ICavlek disabled auto-merge June 12, 2024 13:21
@ICavlek ICavlek enabled auto-merge (squash) June 12, 2024 13:21
crates/experimental-api/src/gen.rs Outdated Show resolved Hide resolved
crates/experimental-api/src/gen.rs Outdated Show resolved Hide resolved
crates/experimental-api/src/gen.rs Outdated Show resolved Hide resolved
crates/experimental-api/src/gen.rs Outdated Show resolved Hide resolved
crates/experimental-api/src/gen.rs Outdated Show resolved Hide resolved
crates/experimental-api/src/gen.rs Outdated Show resolved Hide resolved
crates/experimental-api/src/gen.rs Outdated Show resolved Hide resolved
crates/experimental-api/src/gen.rs Outdated Show resolved Hide resolved
crates/experimental-api/src/rpc.rs Outdated Show resolved Hide resolved
@LKozlowski LKozlowski self-requested a review June 13, 2024 09:58
@ICavlek ICavlek merged commit dfae444 into main Jun 14, 2024
6 checks passed
@ICavlek ICavlek deleted the ic/proof_validation branch June 14, 2024 09:04
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.

feature(experimental): add proof validation
2 participants