Skip to content

Commit

Permalink
fix proving for multiple commitments & release 0.4.0-rc.3 (#613)
Browse files Browse the repository at this point in the history
* fix bug for initial state root

* fork code comitment due to bug in devnet deployment

* update old image id

* bump versions

* update code commitment

* lint

* lint

* update code commitment

* update fork if
  • Loading branch information
eyusufatik authored May 22, 2024
1 parent 1aa757b commit d424b83
Show file tree
Hide file tree
Showing 15 changed files with 230 additions and 177 deletions.
96 changes: 48 additions & 48 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ members = [
]

[workspace.package]
version = "0.4.0-rc.2"
version = "0.4.0-rc.3"
edition = "2021"
license = "GPL-3.0"
authors = ["Chainway Labs <[email protected]>"]
Expand Down
2 changes: 1 addition & 1 deletion bin/citrea/provers/risc0/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "risc0"
version = "0.4.0-rc.2"
version = "0.4.0-rc.3"
edition = "2021"
resolver = "2"
license = "MIT OR Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions bin/citrea/provers/risc0/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ fn main() {
let elf = r#"
pub const BITCOIN_DA_ELF: &[u8] = &[];
pub const MOCK_DA_ELF: &[u8] = &[];
pub const BITCOIN_DA_ID: [u32; 8] = [2170772617, 2185219863, 3147817613, 3435562326, 2028413396, 832797378, 3678042619, 791033588];
pub const MOCK_DA_ID: [u32; 8] = [2202882101, 946233124, 3137625650, 569444048, 4171135506, 773422281, 1045487828, 881699474];
pub const BITCOIN_DA_ID: [u32; 8] = [0u32; 8];
pub const MOCK_DA_ID: [u32; 8] = [0u32; 8];
"#;

std::fs::write(methods_path, elf).expect("Failed to write mock rollup elf");
Expand Down
28 changes: 14 additions & 14 deletions bin/citrea/provers/risc0/guest-bitcoin/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions bin/citrea/provers/risc0/guest-mock/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion bin/citrea/src/bitcoin_rollup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ impl RollupBlueprint for BitcoinRollup {
}

fn get_code_commitment(&self) -> <Self::Vm as Zkvm>::CodeCommitment {
Digest::new(risc0::BITCOIN_DA_ID)
Digest::from([
1860130309, 3212374340, 1571693462, 196802355, 3242449784, 3924610482, 1760955211,
1058326957,
])
}

fn create_storage_manager(
Expand Down
2 changes: 2 additions & 0 deletions crates/sovereign-sdk/adapters/risc0-bonsai/src/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ impl<'a> Risc0BonsaiHost<'a> {
// handle error
let image_id = compute_image_id(elf).unwrap();

tracing::info!("Calculated image id: {:?}", image_id.as_words());

// handle error
let client = if !api_url.is_empty() && !api_key.is_empty() {
let client = BonsaiClient::from_parts(api_url, api_key, risc0_zkvm::VERSION);
Expand Down
2 changes: 1 addition & 1 deletion crates/sovereign-sdk/adapters/solana/da_client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "da_client"
version = "0.4.0-rc.2"
version = "0.4.0-rc.3"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "blockroot"
version = "0.4.0-rc.2"
version = "0.4.0-rc.3"
description = "Created with Anchor"
edition = "2021"

Expand Down
Loading

0 comments on commit d424b83

Please sign in to comment.