From 8113530c0b00eea11e042febce041cecc8b12e07 Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Mon, 15 Jan 2024 17:20:23 +0000 Subject: [PATCH 1/2] Do it --- target_chains/solana/Cargo.lock | 4 ++-- target_chains/solana/Cargo.toml | 3 +++ target_chains/solana/cli/Cargo.toml | 2 +- target_chains/solana/cli/src/main.rs | 8 ++++---- .../solana/programs/pyth-solana-receiver/Cargo.toml | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/target_chains/solana/Cargo.lock b/target_chains/solana/Cargo.lock index 8d3fe05459..b6ebc75b19 100644 --- a/target_chains/solana/Cargo.lock +++ b/target_chains/solana/Cargo.lock @@ -6155,8 +6155,8 @@ dependencies = [ [[package]] name = "wormhole-core-bridge-solana" -version = "0.0.1-alpha.3" -source = "git+https://github.com/guibescos/wormhole?branch=variable-sigs#a9b970c1bc09b9678777949bcfcac8d498f7c1fc" +version = "0.0.1-alpha.5" +source = "git+https://github.com/wormhole-foundation/wormhole?branch=wen/solana-rewrite#7bd40b595e22c5512dfaa2ed8e6d7441df743a69" dependencies = [ "anchor-lang", "cfg-if", diff --git a/target_chains/solana/Cargo.toml b/target_chains/solana/Cargo.toml index e7c0936996..1508b815cf 100644 --- a/target_chains/solana/Cargo.toml +++ b/target_chains/solana/Cargo.toml @@ -15,3 +15,6 @@ codegen-units = 1 [patch.crates-io] serde_wormhole = { git = "https://github.com/wormhole-foundation/wormhole", tag = "v2.17.1" } + +[workspace.dependencies] +wormhole-core-bridge-solana = {git = "https://github.com/wormhole-foundation/wormhole", branch = "wen/solana-rewrite"} diff --git a/target_chains/solana/cli/Cargo.toml b/target_chains/solana/cli/Cargo.toml index 17e7419722..5968a4cc45 100644 --- a/target_chains/solana/cli/Cargo.toml +++ b/target_chains/solana/cli/Cargo.toml @@ -18,4 +18,4 @@ wormhole-sdk = { git = "https://github.com/wormhole-foundation/wormhole", tag = serde_wormhole = { git = "https://github.com/wormhole-foundation/wormhole", tag = "v2.17.1"} # Used to deserialize VAAs hex = "0.4.3" borsh = "0.9.3" # Old version of borsh needed for wormhole-solana -wormhole-core-bridge-solana = {git = "https://github.com/guibescos/wormhole", branch = "variable-sigs"} # Used to post VAAs to the wormhole receiver +wormhole-core-bridge-solana = {workspace = true} diff --git a/target_chains/solana/cli/src/main.rs b/target_chains/solana/cli/src/main.rs index a6c6a27d18..dde94d1b30 100644 --- a/target_chains/solana/cli/src/main.rs +++ b/target_chains/solana/cli/src/main.rs @@ -43,9 +43,9 @@ use { system_instruction, transaction::Transaction, }, - wormhole_core_bridge_solana::{ - processor::WriteEncodedVaaArgs, - state::EncodedVaa, + wormhole_core_bridge_solana::sdk::{ + WriteEncodedVaaArgs, + VAA_START, }, wormhole_sdk::{ vaa::{ @@ -385,7 +385,7 @@ pub fn process_write_encoded_vaa_and_post_price_update( merkle_price_update: &MerklePriceUpdate, ) -> Result { let encoded_vaa_keypair = Keypair::new(); - let encoded_vaa_size: usize = vaa.len() + EncodedVaa::VAA_START; + let encoded_vaa_size: usize = vaa.len() + VAA_START; let create_encoded_vaa = system_instruction::create_account( &payer.pubkey(), diff --git a/target_chains/solana/programs/pyth-solana-receiver/Cargo.toml b/target_chains/solana/programs/pyth-solana-receiver/Cargo.toml index 5af4a5de18..2037c94793 100644 --- a/target_chains/solana/programs/pyth-solana-receiver/Cargo.toml +++ b/target_chains/solana/programs/pyth-solana-receiver/Cargo.toml @@ -20,7 +20,7 @@ anchor-lang = "0.28.0" pythnet-sdk = { path = "../../../../pythnet/pythnet_sdk", version = "2.0.0" } solana-program = "1.16.20" byteorder = "1.4.3" -wormhole-core-bridge-solana = {git = "https://github.com/wormhole-foundation/wormhole", branch = "wen/solana-rewrite", features = ["cpi"]} +wormhole-core-bridge-solana = {workspace = true} wormhole-raw-vaas = {version = "0.0.1-alpha.1", features = ["ruint", "on-chain"], default-features = false } [dev-dependencies] From 977082069c21361a22912080a49c2302001f3696 Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Wed, 17 Jan 2024 15:56:24 +0000 Subject: [PATCH 2/2] Do it --- target_chains/solana/Cargo.lock | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/target_chains/solana/Cargo.lock b/target_chains/solana/Cargo.lock index b6ebc75b19..aaf587de04 100644 --- a/target_chains/solana/Cargo.lock +++ b/target_chains/solana/Cargo.lock @@ -3039,7 +3039,7 @@ dependencies = [ "solana-program-test", "solana-sdk", "tokio", - "wormhole-core-bridge-solana 0.0.1-alpha.5", + "wormhole-core-bridge-solana", "wormhole-raw-vaas 0.0.1-alpha.2", "wormhole-sdk", ] @@ -3060,7 +3060,7 @@ dependencies = [ "shellexpand", "solana-client", "solana-sdk", - "wormhole-core-bridge-solana 0.0.1-alpha.3", + "wormhole-core-bridge-solana", "wormhole-sdk", "wormhole-solana", ] @@ -6157,20 +6157,6 @@ dependencies = [ name = "wormhole-core-bridge-solana" version = "0.0.1-alpha.5" source = "git+https://github.com/wormhole-foundation/wormhole?branch=wen/solana-rewrite#7bd40b595e22c5512dfaa2ed8e6d7441df743a69" -dependencies = [ - "anchor-lang", - "cfg-if", - "hex", - "ruint", - "solana-program", - "wormhole-io", - "wormhole-raw-vaas 0.0.1-alpha.2", -] - -[[package]] -name = "wormhole-core-bridge-solana" -version = "0.0.1-alpha.5" -source = "git+https://github.com/wormhole-foundation/wormhole?branch=wen/solana-rewrite#076ae39ea5227f2e7e454cdf3287c8db9dda197d" dependencies = [ "anchor-lang", "cfg-if",