Skip to content

Commit 524e0fa

Browse files
committed
Use Mainnet and adapt to new state size
1 parent 4c49ddf commit 524e0fa

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

batcher/aligned-batcher/src/mina/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use log::{debug, warn};
33

44
const STATE_HASH_SIZE: usize = 32;
55
// TODO(gabrielbosio): check that this length is always the same for every block
6-
const PROTOCOL_STATE_SIZE: usize = 2060;
6+
const PROTOCOL_STATE_SIZE: usize = 2056;
77

88
pub fn verify_protocol_state_proof_integrity(proof: &[u8], public_input: &[u8]) -> bool {
99
debug!("Checking Mina protocol state proof");

operator/mina/lib/src/consensus_state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fn hash_last_vrf(chain: &MinaStateProtocolStateValueStableV2) -> String {
3939
hasher.update(chain.body.consensus_state.last_vrf_output.as_slice());
4040
let digest = hasher.finalize().to_vec();
4141

42-
String::from_utf8(digest).unwrap()
42+
hex::encode(&digest)
4343
}
4444

4545
fn hash_state(chain: &MinaStateProtocolStateValueStableV2) -> String {

operator/mina/lib/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const MAX_PROOF_SIZE: usize = 16 * 1024;
2626
const MAX_PUB_INPUT_SIZE: usize = 6 * 1024;
2727
const PROTOCOL_STATE_HASH_SIZE: usize = 32;
2828
// TODO(gabrielbosio): check that this length is always the same for every block
29-
const PROTOCOL_STATE_SIZE: usize = 2060;
29+
const PROTOCOL_STATE_SIZE: usize = 2056;
3030

3131
#[no_mangle]
3232
pub extern "C" fn verify_protocol_state_proof_ffi(

operator/mina/lib/src/verifier_index.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use kimchi::{
1717
};
1818
use serde::Deserialize;
1919

20-
const BLOCKCHAIN_VK_JSON: &str = include_str!("devnet_vk.json");
20+
const BLOCKCHAIN_VK_JSON: &str = include_str!("mainnet_vk.json");
2121

2222
#[derive(Deserialize)]
2323
struct BlockchainVerificationKey {

0 commit comments

Comments
 (0)