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

Blocks validity api #16

Merged
merged 11 commits into from
Jan 13, 2025
Merged

Blocks validity api #16

merged 11 commits into from
Jan 13, 2025

Conversation

ametel01
Copy link
Collaborator

No description provided.

- Replace env::var with common::get_env_var for consistent error handling
- Add skip_proof_verification CLI option with default false
- Remove dotenv direct loading since it's handled by get_env_var
- Improve code formatting and error handling in main()
- Add proper error propagation with Result return type
- Clean up imports and code organization
- feat(batch-processor): persist .db file locally and to IPFS regardless of batch completion
- feat(state-proof-api): add block inclusion proof request handling
- fix: resolve misc bugs in provider implementation
- Modified blocks-validity method to extract base_fee_per_gas from each block header
- Return vector of base fees instead of boolean value
- Handle None cases with default empty string
BREAKING CHANGES:
- Merge blocks-validity and fee extraction into single RISC Zero method
- Rename blocks-validity to validate_blocks_and_extract_fees
- Replace verify_blocks.rs with extract_fees.rs binary

Changes:
- crates/methods/:
  * Remove blocks-validity crate
  * Add validate_blocks_and_extract_fees crate
  * Update Cargo.toml dependencies

- crates/publisher/:
  * Remove verify_blocks.rs binary
  * Add extract_fees.rs binary
  * Update operations.rs to use new validation method
  * Update validator.rs with combined validation logic
  * Update lib.rs exports
  * Update Cargo.toml dependencies

- crates/state-proof-api/:
  * Update main.rs to use extract_fees operation
  * Update API response handling

This change simplifies the codebase by combining block validation
and fee extraction into a single RISC Zero method, reducing
duplication and improving maintainability.
- Add binary declaration in Cargo.toml for fetch-fees-proof
- Add reqwest dependency for HTTP client functionality
- Configure binary path to bin/fetch-fees-proof.rs
Add a test binary that fetches and verifies Stark proofs from the state-proof-api
service. This binary:

- Fetches block fee proofs for a specified block range
- Deserializes the Stark proofs from bincode format
- Decodes and displays the fee values from the proof journal
- Verifies the Stark proof against the known image ID
- Uses tracing for structured logging

This is a testing utility to validate the state-proof-api service's
proof generation and verification functionality.
- fix: resolve IPFS upload issue for incomplete batches
- refactor: remove optional IPFS CID parameter from Rust and Starknet contracts
- test: verify state-proof-api handles multi-batch requests correctly
- feat: enhance fetch-fees-proof to consolidate fees from multiple Stark proofs
- Add IPFS download functionality to fee-proof API
- Implement MMR state validation with IPFS hash verification
- Add batch file handling with local fallback
- Add proper error handling for IPFS operations
- Fix unused error variable warning in validator.rs
- Refactor state-proof-api response handling
- Clean up imports and use proper Axum types
- Improve error responses with proper content types
- Add proper state management with Arc<AppState>
- Fix handler signature and response types
- Add explicit use statements for required dependencies
- Remove debug println statements from validator code
- Clean up tracing log levels and messages
- Remove redundant debug logging in MMR root verification
@ametel01 ametel01 merged commit d68ca1d into main Jan 13, 2025
2 checks passed
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.

1 participant