-
Notifications
You must be signed in to change notification settings - Fork 129
feat(protocol): enable shasta fork #642
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
base: main
Are you sure you want to change the base?
Conversation
refactor chain specification to support multiple L1 contract addresses and enhance transaction generation for Shasta blocks,
…GX proof length for Shasta aggregation
…vent decoder for python stress
- Added `designated_prover` field to `ShastaProposal` struct. - Updated `create_shasta_requests` function to utilize `designated_prover`. - Modified `hash_transition` and `hash_transitions_array` functions to include `designated_prover` in hashing. - Adjusted related tests and script to accommodate new `designated_prover` field.
- Renamed `hash_transition` to `hash_transition_with_metadata` and updated its signature to accept `TransitionMetadata`. - Refactored `hash_transitions_array` to `hash_transitions_array_with_metadata` for consistency. - Introduced `hash_values_impl` to streamline the hashing of multiple values. - Added `hash_transitions_hash_array_with_metadata` for optimized transition hash aggregation. - Updated tests to reflect changes in transition hashing logic.
* fix(raiko): make sure the subimage id is constrainted * Update provers/risc0/guest/src/shasta_aggregation.rs Co-authored-by: Yue Zhou <[email protected]> --------- Co-authored-by: Yue Zhou <[email protected]>
… fork - Removed the `parse_l1_bond_proposal_tx_for_shasta_fork` function and its references across the codebase. - Updated the `BlockProposedFork::Shasta` handling to simplify the proposal parsing logic. - Adjusted the `ShastaEventData` structure to exclude `core_state` and `bond_instructions`. - Cleaned up related tests and documentation to reflect the removal of bond proposal handling.
…et (#645) * feat(raiko): support proof carry data to sync with latest shasta devnet * refactor: update blob transaction handling for Shasta and Pacaya forks, fix blob verification * triggered copilot review * fix(raiko): fix CI * fix(raiko): align latest devnet * update devnet config * fix(raiko): fix pcd mismatch * feat(raiko): add boundless prove type support for shasta fork (#646) * integrate boundless into shasta fork * fix boundless shasta aggregation guest program; send journal (guestoutput) to agent to skip preflight * fix(shasta): derive zk aggregation public input from proof carry data * unify boundless image upload + groth16 verify; reuse shasta commitment in sgx * change default chain specs back to "default" --------- Co-authored-by: Yue Zhou <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enables the Shasta fork in the protocol by adding comprehensive support for Shasta proposals, including new task descriptors, request handling, proof generation, and aggregation capabilities across multiple proof systems (SP1, RISC0, SGX).
Key Changes:
- Added Shasta-specific task descriptors and request types for guest input generation and proof generation
- Implemented Shasta proposal processing with new aggregation workflows
- Extended proof system support (SP1, RISC0, SGX) to handle Shasta aggregation
- Updated build and deployment scripts to support Shasta image IDs and configuration
Reviewed changes
Copilot reviewed 94 out of 104 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| taskdb/src/lib.rs | Added ShastaGuestInputTaskDescriptor and ShastaProofTaskDescriptor enums |
| script/update_imageid.sh | Added extraction and handling for Shasta aggregation image IDs |
| script/update_env.sh | Added SGX instance ID configuration for Shasta fork |
| script/test_aggregation_priority.py | Updated default test parameters for event contract and block numbers |
| script/stress_shasta_proposal.py | New comprehensive stress testing script for Shasta proposals |
| script/stress_batch.py | Updated example command with new contract address |
| script/shasta_event_decoder.py | New decoder implementation for Shasta event data structures |
| script/setup-bonsai.sh | Updated verifier addresses and added boundless agent URL |
| script/publish-image.sh | Added Cargo project root detection logic |
| script/prove-shasta.sh | New script for Shasta proof generation |
| script/build.sh | Disabled legacy SGX MRENCLAVE update logic |
| script/IInbox.json | New ABI file for Shasta inbox contract interface |
| reqpool/src/request.rs | Added Shasta request types and removed PartialOrd/Ord traits from Status |
| reqpool/src/lib.rs | Changed to wildcard export for all request types |
| reqactor/src/backend.rs | Added backend processing for Shasta guest input and proof generation |
| reqactor/src/actor.rs | Added test helpers for Shasta request validation |
| reqactor/Cargo.toml | Added env_logger dev dependency |
| provers/sp1/guest/src/shasta_aggregation.rs | New SP1 guest program for Shasta aggregation |
| provers/sp1/guest/Cargo.toml | Added shasta-aggregation binary and updated reth-primitives branch |
| provers/sp1/driver/src/lib.rs | Implemented shasta_aggregate method for SP1 prover |
| provers/sp1/builder/src/main.rs | Added sp1-shasta-aggregation to build pipeline |
| provers/sgx/prover/src/sgx_register_utils.rs | Fixed query call error handling |
| provers/sgx/prover/src/remote_prover.rs | Added shasta_aggregate support and improved error messages |
| provers/sgx/prover/src/local_prover.rs | Implemented local Shasta aggregation for SGX |
| provers/sgx/prover/src/lib.rs | Added shasta_aggregate method to SGX prover trait |
| provers/sgx/guest/src/sgx_server.rs | Added Shasta aggregation endpoint and dynamic instance ID lookup |
| provers/sgx/guest/src/one_shot.rs | Implemented shasta_aggregate verification logic |
| provers/sgx/guest/src/main.rs | Added ShastaAggregate command |
| provers/sgx/guest/src/app_args.rs | Changed instance ID to per-fork map configuration |
| provers/sgx/config/sgx-guest.local.manifest.template | Added DEV_SHASTA_HEIGHT environment variable |
| provers/risc0/guest/src/shasta_aggregation.rs | New RISC0 guest program for Shasta aggregation |
| provers/risc0/guest/src/boundless_shasta_aggregation.rs | Boundless-style Shasta aggregation implementation |
| provers/risc0/guest/src/boundless_batch.rs | New boundless batch verification program |
| provers/risc0/guest/src/boundless_agg.rs | New boundless aggregation program |
| provers/risc0/guest/Cargo.toml | Added new binary targets and dependencies |
| lib/src/manifest/mod.rs | New manifest module for types and codec |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ith latest client
* update Dockerfile.zk and config; fix boundless aggregation proof mismatch; add boundless image ID extraction * add api key to agent * align with latest devnet; add preflight raiko agent api check * align with latest block gas limit config and update devnet verifier addresses
* feat: enhance Shasta aggregation functionality - Introduced new functions for Shasta proof aggregation, including `aggregate_single_shasta_proof` and `shasta_pcd_aggregation_hash`. - Updated test cases to support the new aggregation logic and added file dumping for input/output data. - Modified existing functions to improve parameter handling and streamline proof generation processes. - Added aggregate request handling in the stress testing script to support batch processing of proposals. * Update lib/src/protocol_instance.rs Co-authored-by: Copilot <[email protected]> * Update script/stress_shasta_proposal.py Co-authored-by: Copilot <[email protected]> * fix: fix review comment * fix: fix stress script * Update core/src/lib.rs Co-authored-by: Copilot <[email protected]> * update guest to align with refinements and remove prover_address field. --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Yue <[email protected]>
taikoxyz/raiko#642 请审查这个 pull request,我们当前分支也是要实现一模一样的功能,你需要评估 raiko2 的 rust 实现和我们 go 版本的实现的差异(目前可能有部分差异),功能上请以 raiko2 当前的 pr 实现为准,为我们 gaiko 制定重构和补齐功能的计划,开始实现之前请让我 review 方案
close #628 and open a new one to merge main