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
6666
6767# Build and test the oracle program.
6868RUN cd pyth-client && ./scripts/build-bpf.sh .
69+ RUN cd pyth-client && ./scripts/check-size.sh
6970# Run aggregation logic tests
7071RUN cd pyth-client && ./scripts/run-aggregation-tests.sh
7172RUN /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
3434# build Rust and link it with C
3535cd " ${PYTH_DIR} "
3636cargo clean
37- cargo test-bpf
37+ cargo- test-bpf
3838cargo clean
39- cargo build-bpf
39+ cargo- build-bpf -- -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort
4040
4141sha256sum ./target/** /* .so
4242
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