File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ RUN ./pyth-client/scripts/patch-solana.sh
66
66
67
67
# Build and test the oracle program.
68
68
RUN cd pyth-client && ./scripts/build-bpf.sh .
69
+ RUN cd pyth-client && ./scripts/check-size.sh
69
70
# Run aggregation logic tests
70
71
RUN cd pyth-client && ./scripts/run-aggregation-tests.sh
71
72
RUN /bin/bash -l -c "pytest-3 --pyargs pyth"
Original file line number Diff line number Diff line change @@ -34,9 +34,9 @@ rm ./target/*-keypair.json
34
34
# build Rust and link it with C
35
35
cd " ${PYTH_DIR} "
36
36
cargo clean
37
- cargo test-bpf
37
+ cargo- test-bpf
38
38
cargo clean
39
- cargo build-bpf
39
+ cargo- build-bpf -- -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort
40
40
41
41
sha256sum ./target/** /* .so
42
42
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ #
3
+ # While Solana doesn't support resizing programs, the oracle binary needs to be smaller than 81760 bytes
4
+ ORACLE_SIZE=$( wc -c ./target/deploy/pyth_oracle.so | awk ' {print $1}' )
5
+ if [ $ORACLE_SIZE -lt 81760 ]
6
+ then
7
+ echo " Size of pyth_oracle.so is small enough to be deployed to mainnet."
8
+ echo $ORACLE_SIZE
9
+ else
10
+ echo " Size of pyth_oracle.so is too big to be deployed to mainnet."
11
+ echo $ORACLE_SIZE
12
+ exit 1
13
+ fi
You can’t perform that action at this time.
0 commit comments