Skip to content

Commit 566d351

Browse files
committed
chore: script to build programs and write the proper program ids
1 parent af3fc45 commit 566d351

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Get the program ids
2+
cargo run --release --bin write_program_image_id_vk_hash
3+
4+
# Copy the chunk aggregator program ids and put them on the root aggregator
5+
SP1_CHUNK_AGGREGATOR_VK_HASH_WORDS=`jq -r .sp1_chunk_aggregator_vk_hash_words programs_ids.json`
6+
SP1_LINE="pub const CHUNK_AGGREGATOR_PROGRAM_VK_HASH: [u32; 8] = $SP1_CHUNK_AGGREGATOR_VK_HASH_WORDS;\n"
7+
sed -i '' -e "/^pub const CHUNK_AGGREGATOR_PROGRAM_VK_HASH.*/{N;N;s|.*|$SP1_LINE|;}" aggregation_programs/sp1/src/root_aggregator_main.rs
8+
9+
RISC0_CHUNK_AGGREGATOR_IMAGE_ID_BYTES=`jq -r .risc0_chunk_aggregator_image_id_bytes programs_ids.json`
10+
RISC0_LINE="pub const CHUNK_AGGREGATOR_PROGRAM_IMAGE_ID: [u8; 32] = $RISC0_CHUNK_AGGREGATOR_IMAGE_ID_BYTES;\n"
11+
sed -i '' -e "/^pub const CHUNK_AGGREGATOR_PROGRAM_IMAGE_ID.*/{N;N;N;s|.*|$RISC0_LINE|;}" aggregation_programs/risc0/src/root_aggregator_main.rs
12+
13+
cd aggregation_programs
14+
cargo fmt --all
15+
16+
cd ..
17+
# Re compute the program ids
18+
cargo run --release --bin write_program_image_id_vk_hash

0 commit comments

Comments
 (0)