Skip to content

Commit 7fae549

Browse files
jayantkJayant Krishnamurthyali-behjatiguibescos
authored
Bump Solana Version to fix CI issue (#302)
* bump solana version * bump harder * Update image digest hash * Use solana 1.14.7 image This is because we want to use spf instead of bpf * Add a comment to explain version discrepency * Update path to oracle.so * Format * Remove unused import * Fix python Co-authored-by: Jayant Krishnamurthy <jkrishnamurthy@jumptrading.com> Co-authored-by: Ali Behjati <bahjatia@gmail.com> Co-authored-by: Guillermo Bescos Alapont <gbescos@stanford.edu>
1 parent be121f3 commit 7fae549

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

.github/workflows/docker.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ on:
66
branches: [ main ]
77

88
env:
9-
SOLANA_VERSION: 1.10.29
10-
SOLANA_DOCKER_IMAGE_HASH: 78900501ccd1ade1bf088fa0830c46bc6095c6799469ff9b335e1f02d957e53a
9+
SOLANA_VERSION: 1.14.7 # Using 1.14.x to have sbf instead of bpf. bpf does not work anymore.
10+
SOLANA_DOCKER_IMAGE_HASH: 9130b4a26ec00c4ba99c023da98c06abb0dba2904c990af7770928e0f7dfd2d5
1111
DOCKER_HUB: docker.io
1212
DOCKER_USER: ${{ secrets.DOCKER_IO_USER }}
1313
IS_RELEASE: ${{

program/rust/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ publish = false
99
bindgen = "0.60.1"
1010

1111
[dependencies]
12-
solana-program = "=1.10.29"
12+
solana-program = "=1.13.3"
1313
bytemuck = "1.11.0"
1414
thiserror = "1.0"
1515
num-derive = "0.3"
1616
num-traits = "0.2"
1717
bincode = "1.3.3"
1818

1919
[dev-dependencies]
20-
solana-program-test = "=1.10.29"
21-
solana-sdk = "=1.10.29"
20+
solana-program-test = "=1.13.3"
21+
solana-sdk = "=1.13.3"
2222
tokio = "1.14.1"
2323
hex = "0.3.1"
2424
quickcheck = "1"

program/rust/src/tests/pyth_simulator.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use std::mem::size_of;
2+
use std::path::Path;
23

34
use bytemuck::{
45
bytes_of,
@@ -22,7 +23,6 @@ use solana_program::{
2223
system_program,
2324
};
2425
use solana_program_test::{
25-
find_file,
2626
read_file,
2727
BanksClient,
2828
BanksClientError,
@@ -69,9 +69,11 @@ pub struct PythSimulator {
6969
impl PythSimulator {
7070
/// Deploys the oracle program as upgradable
7171
pub async fn new() -> PythSimulator {
72-
let mut bpf_data = read_file(find_file("pyth_oracle.so").unwrap_or_else(|| {
73-
panic!("Unable to locate {}", "pyth_oracle.so");
74-
}));
72+
let mut bpf_data = read_file(
73+
std::env::current_dir()
74+
.unwrap()
75+
.join(Path::new("../../target/deploy/pyth_oracle.so")),
76+
);
7577

7678

7779
let mut program_test = ProgramTest::default();

pyth/tests/test_publish.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ def get_account_size(acc_address):
7878
"""
7979
PublicKey(acc_address)
8080
solana_client = Client("http://localhost:8899")
81-
data = solana_client.get_account_info(PublicKey(acc_address), encoding = 'base64')['result']['value']['data'][0]
82-
data = base64.b64decode(data)
81+
data = solana_client.get_account_info(PublicKey(acc_address), encoding = 'base64').value.data
8382
return len(data)
8483

8584

0 commit comments

Comments
 (0)