-
Notifications
You must be signed in to change notification settings - Fork 391
fix(aggregation_mode): hardcode image_id and vk_hash from solidity contract #1910
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
56122ad
feat: binary to get the programs ids
MarcosNicolau 5bb7011
feat: enforce image_id, vk_hash from solidity contract
MarcosNicolau 3d31c3b
feat: anvil deployment and config
MarcosNicolau b833a43
chore: make target for program ids
MarcosNicolau 1f80a46
chore: update risc0 agg program image id to linux build
MarcosNicolau df4dc46
chore: update anvil state json with new risc0 imageid
MarcosNicolau d84dfa1
chore: address clippy warnings
MarcosNicolau 549c0c4
Update programs_ids.json
MarcosNicolau 4567c2e
Update Makefile
MarcosNicolau af4c2f1
Merge branch 'staging' into fix/aggregation-contract-verify-elfs
MarcosNicolau cdf6342
chore: update risc0ImageId and sp1 vkHash with new deterministic build
MarcosNicolau ad36f8c
chore: update agg_mode_write_program_ids target
MarcosNicolau 84c590c
feat: update program ids on anvil_deploy_aligned_contracts
JuArce 451d400
fix: add gpu to features in install_aggregation_mode
JuArce File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| use alloy::hex::hex; | ||
| use proof_aggregator::aggregators::{ | ||
| risc0_aggregator::RISC0_AGGREGATOR_PROGRAM_ID_BYTES, sp1_aggregator, | ||
| }; | ||
| use serde_json::json; | ||
| use sp1_sdk::HashableKey; | ||
| use std::{env, fs, path::Path}; | ||
| use tracing::info; | ||
| use tracing_subscriber::FmtSubscriber; | ||
|
|
||
| const SP1_PROGRAM_ELF: &[u8] = | ||
| include_bytes!("../aggregation_programs/sp1/elf/sp1_aggregator_program"); | ||
|
|
||
| include!(concat!(env!("OUT_DIR"), "/methods.rs")); | ||
|
|
||
| fn main() { | ||
| let subscriber = FmtSubscriber::builder().finish(); | ||
| tracing::subscriber::set_global_default(subscriber).expect("setting default subscriber failed"); | ||
|
|
||
| info!("About to write sp1 programs vk hash bytes + risc0 programs image id bytes"); | ||
| let sp1_vk_hash = sp1_aggregator::vk_from_elf(SP1_PROGRAM_ELF).bytes32_raw(); | ||
| let risc0_image_id_bytes = RISC0_AGGREGATOR_PROGRAM_ID_BYTES; | ||
|
|
||
| let sp1_vk_hash_hex = hex::encode(sp1_vk_hash); | ||
| let risc0_image_id_hex = hex::encode(risc0_image_id_bytes); | ||
|
|
||
| let dest_path = Path::new("programs_ids.json"); | ||
|
|
||
| let json_data = json!({ | ||
| "sp1_vk_hash": format!("0x{}", sp1_vk_hash_hex), | ||
| "risc0_image_id": format!("0x{}", risc0_image_id_hex), | ||
| }); | ||
|
|
||
| // Write to the file | ||
| fs::write(dest_path, serde_json::to_string_pretty(&json_data).unwrap()).unwrap(); | ||
|
|
||
| info!("Program ids written to {:?}", dest_path); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "risc0_image_id": "0xa2966b3e63b5e73848dd3fb8ff1e03ac68ca10fa961ca0c0d8dbbb0a85b60acd", | ||
| "sp1_vk_hash": "0x00eb8139c8360fc371b9a6decdec55ba01aaae0f4739f68139e0b3d40397d1d6" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.