chore: regenerate artifacts and the prebuilt sequencer fixture

Every guest moved, not only the ones whose source changed: adding real
dependencies (borsh to two cores, cross_zone_inbox_core to two targets) changes
the build graph, and with it the metadata hash of every crate in the guest build.
Piece A moved only three because it added a dev-dependency, which the guest build
never sees.
This commit is contained in:
moudyellaz
2026-08-10 15:01:26 +02:00
parent f26193eedc
commit 869a130eec
21 changed files with 152 additions and 15 deletions
@@ -260,10 +260,13 @@ pub fn inbox_seen_shard_seed(src_zone: &ZoneId, src_block_id: u64) -> PdaSeed {
/// The account naming who sent a delivery, which the inbox passes at position 0
/// of the chained call so the target can authenticate its own sources.
///
/// It is never written and never claimed, so it stays `Account::default()` for
/// ever and the state machine's uninitialized-account rule skips it. The address
/// is the whole message: only the inbox can derive it, and it commits to the pair
/// the target cares about.
/// Nothing writes or claims it, so the state machine's uninitialized-account rule
/// skips it for being unchanged rather than for being default: anyone may send it
/// balance, and the inbox and the targets all round-trip it untouched.
///
/// The address is derivable by anyone, so it is not a secret and not a
/// capability. What makes it mean something is that a target checks it only after
/// pinning its caller to the inbox, and only the inbox can be that caller.
#[must_use]
pub fn inbox_source_marker_account_id(
inbox_id: ProgramId,
+24 -3
View File
@@ -36,9 +36,7 @@ pub enum ReceiverInstruction {
/// about the record meaning something: without it any program on any configured
/// peer can overwrite the record, and a delivery proves only that some peer sent
/// it.
#[derive(
Clone, Debug, Default, PartialEq, Eq, BorshSerialize, BorshDeserialize, Serialize, Deserialize,
)]
#[derive(Clone, Debug, PartialEq, Eq, BorshSerialize, BorshDeserialize, Serialize, Deserialize)]
pub struct ReceiverConfig {
/// The program allowed to call `Record`: the cross-zone inbox.
pub deliverer: ProgramId,
@@ -161,6 +159,29 @@ mod tests {
assert_eq!(words[0], 0);
}
/// `Record` is serialized by the source zone into the emission payload and
/// decoded by the destination, so its tag word is wire format.
#[test]
fn record_is_the_first_variant() {
let record = ReceiverInstruction::Record { payload: vec![] };
let words = risc0_zkvm::serde::to_vec(&record).expect("Record serializes");
assert_eq!(words[0], 0);
}
#[test]
fn an_empty_receiver_config_does_not_decode() {
assert_eq!(ReceiverConfig::from_bytes(&[]), None);
}
#[test]
fn receiver_config_round_trips() {
let config = ReceiverConfig {
deliverer: [1; 8],
sources: vec![([7; 32], [9; 8])],
};
assert_eq!(ReceiverConfig::from_bytes(&config.to_bytes()), Some(config));
}
#[test]
fn outbox_id_round_trips() {
let outbox: ProgramId = [9; 8];
+13 -3
View File
@@ -47,9 +47,7 @@ pub enum Instruction {
/// The source list is what makes this token authorize its own inbound value
/// rather than trusting a central route table to have done it. Borsh because the
/// list is variable length.
#[derive(
Clone, Debug, Default, PartialEq, Eq, BorshSerialize, BorshDeserialize, Serialize, Deserialize,
)]
#[derive(Clone, Debug, PartialEq, Eq, BorshSerialize, BorshDeserialize, Serialize, Deserialize)]
pub struct WrappedTokenConfig {
/// The program allowed to call `Mint`: the cross-zone inbox.
pub minter: ProgramId,
@@ -139,6 +137,18 @@ mod tests {
assert_eq!(WrappedTokenConfig::from_bytes(&[]), None);
}
/// The peer's `bridge_lock` serializes `Mint` into the emission payload, so
/// its tag word is wire format.
#[test]
fn mint_is_the_first_variant() {
let mint = Instruction::Mint {
recipient: [3; 32],
amount: 1,
};
let words = risc0_zkvm::serde::to_vec(&mint).expect("Mint serializes");
assert_eq!(words[0], 0);
}
#[test]
fn balance_round_trips() {
assert_eq!(read_balance(&balance_bytes(42)), 42);