diff --git a/rust/sealevel/libraries/multisig-ism/src/test_data.rs b/rust/sealevel/libraries/multisig-ism/src/test_data.rs index 78ca51b35e..ed3c86fb24 100644 --- a/rust/sealevel/libraries/multisig-ism/src/test_data.rs +++ b/rust/sealevel/libraries/multisig-ism/src/test_data.rs @@ -17,7 +17,7 @@ const DESTINATION_DOMAIN: u32 = 4321u32; pub fn get_multisig_ism_test_data() -> MultisigIsmTestData { let message = HyperlaneMessage { - version: 0, + version: 3, nonce: 69, origin: ORIGIN_DOMAIN, sender: H256::from_str( diff --git a/rust/sealevel/programs/hyperlane-sealevel-token-collateral/tests/functional.rs b/rust/sealevel/programs/hyperlane-sealevel-token-collateral/tests/functional.rs index 7ac4bd8e20..4a1b2b57f2 100644 --- a/rust/sealevel/programs/hyperlane-sealevel-token-collateral/tests/functional.rs +++ b/rust/sealevel/programs/hyperlane-sealevel-token-collateral/tests/functional.rs @@ -725,7 +725,7 @@ async fn test_transfer_remote(spl_token_program_id: Pubkey) { .unwrap(); let message = HyperlaneMessage { - version: 0, + version: 3, nonce: 0, origin: LOCAL_DOMAIN, sender: program_id.to_bytes().into(), @@ -869,7 +869,7 @@ async fn transfer_from_remote( ); let message = HyperlaneMessage { - version: 0, + version: 3, nonce: 0, origin: origin_override.unwrap_or(REMOTE_DOMAIN), // Default to the remote router as the sender diff --git a/rust/sealevel/programs/hyperlane-sealevel-token-native/tests/functional.rs b/rust/sealevel/programs/hyperlane-sealevel-token-native/tests/functional.rs index ec5f6e438d..5014dcae5b 100644 --- a/rust/sealevel/programs/hyperlane-sealevel-token-native/tests/functional.rs +++ b/rust/sealevel/programs/hyperlane-sealevel-token-native/tests/functional.rs @@ -510,7 +510,7 @@ async fn test_transfer_remote() { .unwrap(); let message = HyperlaneMessage { - version: 0, + version: 3, nonce: 0, origin: LOCAL_DOMAIN, sender: program_id.to_bytes().into(), @@ -616,7 +616,7 @@ async fn transfer_from_remote( let recipient: H256 = recipient_pubkey.to_bytes().into(); let message = HyperlaneMessage { - version: 0, + version: 3, nonce: 0, origin: origin_override.unwrap_or(REMOTE_DOMAIN), // Default to the remote router as the sender diff --git a/rust/sealevel/programs/hyperlane-sealevel-token/tests/functional.rs b/rust/sealevel/programs/hyperlane-sealevel-token/tests/functional.rs index 7cac39aee5..adac2a05fd 100644 --- a/rust/sealevel/programs/hyperlane-sealevel-token/tests/functional.rs +++ b/rust/sealevel/programs/hyperlane-sealevel-token/tests/functional.rs @@ -451,7 +451,7 @@ async fn transfer_from_remote( ); let message = HyperlaneMessage { - version: 0, + version: 3, nonce: 0, origin: origin_override.unwrap_or(REMOTE_DOMAIN), // Default to the remote router as the sender @@ -783,7 +783,7 @@ async fn test_transfer_remote() { .unwrap(); let message = HyperlaneMessage { - version: 0, + version: 3, nonce: 0, origin: LOCAL_DOMAIN, sender: program_id.to_bytes().into(), diff --git a/rust/sealevel/programs/ism/multisig-ism-message-id/tests/functional.rs b/rust/sealevel/programs/ism/multisig-ism-message-id/tests/functional.rs index b7820649fc..efaa97928f 100644 --- a/rust/sealevel/programs/ism/multisig-ism-message-id/tests/functional.rs +++ b/rust/sealevel/programs/ism/multisig-ism-message-id/tests/functional.rs @@ -299,7 +299,7 @@ async fn test_set_validators_and_threshold_creates_pda_account() { // to fetch the account metas required for the instruction. let test_message = HyperlaneMessage { - version: 0, + version: 3, nonce: 0, origin: domain, sender: H256::random(), diff --git a/rust/sealevel/programs/mailbox-test/src/functional.rs b/rust/sealevel/programs/mailbox-test/src/functional.rs index c826b6ed0c..c551eda3c6 100644 --- a/rust/sealevel/programs/mailbox-test/src/functional.rs +++ b/rust/sealevel/programs/mailbox-test/src/functional.rs @@ -183,7 +183,7 @@ async fn test_dispatch_from_eoa() { .unwrap(); let expected_message = HyperlaneMessage { - version: 0, + version: 3, nonce: 0, origin: LOCAL_DOMAIN, sender: payer.pubkey().to_bytes().into(), @@ -238,7 +238,7 @@ async fn test_dispatch_from_eoa() { .unwrap(); let expected_message = HyperlaneMessage { - version: 0, + version: 3, nonce: 1, origin: LOCAL_DOMAIN, sender: payer.pubkey().to_bytes().into(), @@ -300,7 +300,7 @@ async fn test_dispatch_from_program() { .unwrap(); let expected_message = HyperlaneMessage { - version: 0, + version: 3, nonce: 0, origin: LOCAL_DOMAIN, // The sender should be the program ID because its dispatch authority signed @@ -389,7 +389,7 @@ async fn test_dispatch_returns_message_id() { message_body: message_body.clone(), }; let expected_message = HyperlaneMessage { - version: 0, + version: 3, nonce: 0, origin: LOCAL_DOMAIN, sender: payer.pubkey().to_bytes().into(), @@ -574,7 +574,7 @@ async fn test_process_successful_verify_and_handle() { let recipient_id = hyperlane_sealevel_test_send_receiver::id(); let message = HyperlaneMessage { - version: 0, + version: 3, nonce: 0, origin: REMOTE_DOMAIN, sender: payer.pubkey().to_bytes().into(), @@ -605,7 +605,7 @@ async fn test_process_successful_verify_and_handle() { // Send another to illustrate that the sequence is incremented let message = HyperlaneMessage { - version: 0, + version: 3, nonce: 0, origin: REMOTE_DOMAIN, sender: payer.pubkey().to_bytes().into(), @@ -647,7 +647,7 @@ async fn test_process_errors_if_message_already_processed() { let recipient_id = hyperlane_sealevel_test_send_receiver::id(); let message = HyperlaneMessage { - version: 0, + version: 3, nonce: 0, origin: REMOTE_DOMAIN, sender: payer.pubkey().to_bytes().into(), @@ -697,7 +697,7 @@ async fn test_process_errors_if_ism_verify_fails() { test_ism.set_accept(false).await.unwrap(); let message = HyperlaneMessage { - version: 0, + version: 3, nonce: 0, origin: REMOTE_DOMAIN, sender: payer.pubkey().to_bytes().into(), @@ -743,7 +743,7 @@ async fn test_process_errors_if_recipient_handle_fails() { .unwrap(); let message = HyperlaneMessage { - version: 0, + version: 3, nonce: 0, origin: REMOTE_DOMAIN, sender: payer.pubkey().to_bytes().into(), @@ -784,7 +784,7 @@ async fn test_process_errors_if_incorrect_destination_domain() { let recipient_id = hyperlane_sealevel_test_send_receiver::id(); let message = HyperlaneMessage { - version: 0, + version: 3, nonce: 0, origin: REMOTE_DOMAIN, sender: payer.pubkey().to_bytes().into(), @@ -905,7 +905,7 @@ async fn test_process_errors_if_reentrant() { let recipient_id = hyperlane_sealevel_test_send_receiver::id(); let message = HyperlaneMessage { - version: 0, + version: 3, nonce: 0, origin: REMOTE_DOMAIN, sender: payer.pubkey().to_bytes().into(), diff --git a/rust/sealevel/programs/mailbox/src/instruction.rs b/rust/sealevel/programs/mailbox/src/instruction.rs index 78a553f92d..89d4335984 100644 --- a/rust/sealevel/programs/mailbox/src/instruction.rs +++ b/rust/sealevel/programs/mailbox/src/instruction.rs @@ -11,7 +11,7 @@ use solana_program::{ use crate::{mailbox_inbox_pda_seeds, mailbox_outbox_pda_seeds}; /// The current message version. -pub const VERSION: u8 = 0; +pub const VERSION: u8 = 3; /// Maximum bytes per message = 2 KiB (somewhat arbitrarily set to begin). pub const MAX_MESSAGE_BODY_BYTES: usize = 2 * 2_usize.pow(10);