diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 7fea7bb69..59dd36ea3 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -6,7 +6,7 @@ on: branches: [ main ] env: - SOLANA_VERSION: 1.7.12 + SOLANA_VERSION: 1.10.29 DOCKER_HUB: docker.io DOCKER_USER: ${{ secrets.DOCKER_IO_USER }} IS_RELEASE: ${{ diff --git a/program/src/oracle/upd_aggregate.h b/program/src/oracle/upd_aggregate.h index ed0b8f9ee..aaa7941b0 100644 --- a/program/src/oracle/upd_aggregate.h +++ b/program/src/oracle/upd_aggregate.h @@ -5,7 +5,6 @@ #include "model/price_model.c" /* FIXME: HACK TO DEAL WITH DOCKER LINKAGE ISSUES */ #include "pd.h" -#include #ifdef __cplusplus extern "C" { diff --git a/program/src/oracle/util/compat_stdint.h b/program/src/oracle/util/compat_stdint.h index 1842cc52c..759e1bd1b 100644 --- a/program/src/oracle/util/compat_stdint.h +++ b/program/src/oracle/util/compat_stdint.h @@ -8,14 +8,16 @@ types and that can conflicts with stdint.h) Defaults to 0 or 1 depending on if __bpf__ is set. */ + #ifndef PYTH_ORACLE_UTIL_COMPAT_STDINT_STYLE -#ifndef __bpf__ +#if !defined(__bpf__) && !defined(SOL_TEST) #define PYTH_ORACLE_UTIL_COMPAT_STDINT_STYLE 0 #else #define PYTH_ORACLE_UTIL_COMPAT_STDINT_STYLE 1 #endif #endif + #if PYTH_ORACLE_UTIL_COMPAT_STDINT_STYLE==0 #include #elif PYTH_ORACLE_UTIL_COMPAT_STDINT_STYLE==1 diff --git a/scripts/patch-solana.sh b/scripts/patch-solana.sh index 24cbfc761..054d36058 100755 --- a/scripts/patch-solana.sh +++ b/scripts/patch-solana.sh @@ -2,7 +2,7 @@ # # Patch BPF makefile and solana_sdk.h: # - Build with `-Wall -Wextra -Wconversion`. -# - Link with `-z defs` and mark `sol_invoke_signed_c` as weak. +# - Link with `-z defs`. # - Add TEST_FLAGS for criterion CLI. # diff --git a/scripts/solana.patch b/scripts/solana.patch index d3ca0bb5d..a34ec6142 100644 --- a/scripts/solana.patch +++ b/scripts/solana.patch @@ -1,5 +1,5 @@ diff --git a/sdk/bpf/c/bpf.mk b/sdk/bpf/c/bpf.mk -index 4b3039db1..018e8deb4 100644 +index 541629ad49..8c2ec94041 100644 --- a/sdk/bpf/c/bpf.mk +++ b/sdk/bpf/c/bpf.mk @@ -14,6 +14,12 @@ TEST_PREFIX ?= test_ @@ -13,9 +13,9 @@ index 4b3039db1..018e8deb4 100644 +endif + LLVM_DIR = $(LOCAL_PATH)../dependencies/bpf-tools/llvm - LLVM_SYSTEM_INC_DIRS := $(LLVM_DIR)/lib/clang/12.0.1/include + LLVM_SYSTEM_INC_DIRS := $(LLVM_DIR)/lib/clang/13.0.0/include COMPILER_RT_DIR = $(LOCAL_PATH)../dependencies/bpf-tools/rust/lib/rustlib/bpfel-unknown-unknown/lib -@@ -31,6 +37,9 @@ SYSTEM_INC_DIRS := \ +@@ -33,6 +39,9 @@ SYSTEM_INC_DIRS := \ $(LLVM_SYSTEM_INC_DIRS) \ C_FLAGS := \ @@ -25,7 +25,7 @@ index 4b3039db1..018e8deb4 100644 -Werror \ -O2 \ -fno-builtin \ -@@ -59,6 +68,7 @@ BPF_CXX_FLAGS := \ +@@ -68,6 +77,7 @@ BPF_CXX_FLAGS := \ -march=bpfel+solana BPF_LLD_FLAGS := \ @@ -33,24 +33,11 @@ index 4b3039db1..018e8deb4 100644 -z notext \ -shared \ --Bdynamic \ -@@ -195,7 +205,7 @@ endef - define TEST_EXEC_RULE +@@ -245,6 +255,7 @@ define TEST_EXEC_RULE $1: $2 LD_LIBRARY_PATH=$(TESTFRAMEWORK_RPATH) \ -- $2$(\n) + $2$(\n) + $2 $(TEST_FLAGS)$(\n) endef .PHONY: $(INSTALL_SH) -diff --git a/sdk/bpf/c/inc/solana_sdk.h b/sdk/bpf/c/inc/solana_sdk.h -index b5cad9833..b3b496123 100644 ---- a/sdk/bpf/c/inc/solana_sdk.h -+++ b/sdk/bpf/c/inc/solana_sdk.h -@@ -565,6 +565,7 @@ uint64_t sol_try_find_program_address( - /** - * Internal cross-program invocation function - */ -+__attribute__(( weak )) - uint64_t sol_invoke_signed_c( - const SolInstruction *instruction, - const SolAccountInfo *account_infos,