r0_proofs reference each other through risc0_images when recursing

This commit is contained in:
David Rusu 2025-02-27 19:26:24 +01:00
parent bf3331c40f
commit b89ebd4e50
6 changed files with 24 additions and 16 deletions

View File

@ -10,7 +10,7 @@ risc0-zkvm = { version = "1.0", default-features = false, features = ['std'] }
serde = { version = "1.0", features = ["derive"] }
cl = { path = "../../cl" }
ledger_proof_statements = { path = "../../ledger_proof_statements" }
nomos_mantle_tx_risc0_proof = { path = "../../tx_risc0_proof" }
risc0_images = { path = "../../risc0_images" }
[patch.crates-io]

View File

@ -6,7 +6,7 @@ fn main() {
for tx in &bundle_private.txs {
env::verify(
nomos_mantle_tx_risc0_proof::TX_ID,
risc0_images::nomos_mantle_tx_risc0_proof::TX_ID,
&serde::to_vec(&tx).unwrap(),
)
.unwrap();

View File

@ -10,7 +10,7 @@ risc0-zkvm = { version = "1.0", default-features = false, features = ['std'] }
serde = { version = "1.0", features = ["derive"] }
cl = { path = "../../cl" }
ledger_proof_statements = { path = "../../ledger_proof_statements" }
nomos_mantle_bundle_risc0_proof = { path = "../../bundle_risc0_proof" }
risc0_images = { path = "../../risc0_images" }
[patch.crates-io]
# add RISC Zero accelerator support for all downstream usages of the following crates.

View File

@ -23,7 +23,7 @@ fn main() {
} in bundles
{
env::verify(
nomos_mantle_bundle_risc0_proof::BUNDLE_ID,
risc0_images::nomos_mantle_bundle_risc0_proof::BUNDLE_ID,
&serde::to_vec(&bundle).unwrap(),
)
.unwrap();

File diff suppressed because one or more lines are too long

View File

@ -9,35 +9,43 @@ mod tests {
fn ensure_images_are_correct() {
assert_eq!(
risc0_images::nomos_mantle_risc0_proofs::STF_NOP_ID,
nomos_mantle_risc0_proofs::STF_NOP_ID
nomos_mantle_risc0_proofs::STF_NOP_ID,
"STF_NOP_ID"
);
assert_eq!(
hash(risc0_images::nomos_mantle_risc0_proofs::STF_NOP_ELF),
hash(nomos_mantle_risc0_proofs::STF_NOP_ELF)
hash(nomos_mantle_risc0_proofs::STF_NOP_ELF),
"STF_NOP_ELF"
);
assert_eq!(
risc0_images::nomos_mantle_bundle_risc0_proof::BUNDLE_ID,
nomos_mantle_bundle_risc0_proof::BUNDLE_ID
nomos_mantle_bundle_risc0_proof::BUNDLE_ID,
"BUNDLE_ID"
);
assert_eq!(
hash(risc0_images::nomos_mantle_bundle_risc0_proof::BUNDLE_ELF),
hash(nomos_mantle_bundle_risc0_proof::BUNDLE_ELF)
hash(nomos_mantle_bundle_risc0_proof::BUNDLE_ELF),
"BUNDLE_ELF"
);
assert_eq!(
risc0_images::nomos_mantle_tx_risc0_proof::TX_ID,
nomos_mantle_tx_risc0_proof::TX_ID
nomos_mantle_tx_risc0_proof::TX_ID,
"TX_ID"
);
assert_eq!(
hash(risc0_images::nomos_mantle_tx_risc0_proof::TX_ELF),
hash(nomos_mantle_tx_risc0_proof::TX_ELF)
hash(nomos_mantle_tx_risc0_proof::TX_ELF),
"TX_ELF"
);
assert_eq!(
risc0_images::ledger_validity_proof::LEDGER_ID,
ledger_validity_proof::LEDGER_ID
ledger_validity_proof::LEDGER_ID,
"LEDGER_ID"
);
assert_eq!(
hash(risc0_images::ledger_validity_proof::LEDGER_ELF),
hash(ledger_validity_proof::LEDGER_ELF)
hash(ledger_validity_proof::LEDGER_ELF),
"LEDGER_ELF"
);
}
}