Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
fix 0 prover issue
Browse files Browse the repository at this point in the history
  • Loading branch information
smtmfft committed Dec 12, 2023
1 parent ce83f77 commit 5cd7149
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bus-mapping/src/circuit_input_builder/protocol_instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ impl ProtocolInstance {
}

pub fn prover(&self) -> Vec<u8> {
self.prover.as_fixed_bytes().abi_encode()
let sol_addr = alloy_sol_types::private::Address::from(self.prover.as_fixed_bytes());
sol_addr.abi_encode()
}

pub fn meta_hash(&self) -> Vec<u8> {
Expand Down
21 changes: 20 additions & 1 deletion integration-tests/src/integration_public_data_circuits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,16 @@ mod public_data_test {
.unwrap()
.as_fixed_bytes()
.into(),
gasLimit: 80000000,
txListByteOffset: 0,
txListByteSize: 0,
blobUsed: false,
parentMetaHash: parse_hash(
"569e75fc77c1a856f6daaf9e69d8a9566ca34aa47f9133711ce065a571af0cfd",
)
.unwrap()
.as_fixed_bytes()
.into(),
..Default::default()
};

Expand All @@ -376,13 +386,22 @@ mod public_data_test {
.unwrap()
.as_fixed_bytes()
.into(),
graffiti: parse_hash(
"6162630000000000000000000000000000000000000000000000000000000000",
)
.unwrap()
.as_fixed_bytes()
.into(),
..Default::default()
};

let protocol_instance = ProtocolInstance {
transition,
block_metadata,
..Default::default()
prover: parse_address("0000000000000000000000000000000000000001")
.unwrap()
.as_fixed_bytes()
.into(),
};
vec![protocol_instance]
}
Expand Down

0 comments on commit 5cd7149

Please sign in to comment.