Update solana to version 1.13.3 (#2239)

* upgrade solana version to 1.13.3

* get everything to compile correctly

* update to using struct constructor to avoid deprecated field usage

* update deprecated functions

* more fixes to pass tests

* update auction-house submodule commit

* update the swap submodule

Co-authored-by: henrye <henry@notanemail>
This commit is contained in:
Henry-E 2022-10-29 15:23:13 +01:00 committed by GitHub
parent 5532a0f087
commit 7a0a37e0f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 1012 additions and 1014 deletions

View File

@ -5,7 +5,7 @@ on:
branches:
- master
env:
SOLANA_CLI_VERSION: 1.10.29
SOLANA_CLI_VERSION: 1.13.3
NODE_VERSION: 17.0.1
jobs:

View File

@ -8,7 +8,7 @@ on:
branches:
- master
env:
SOLANA_CLI_VERSION: 1.10.29
SOLANA_CLI_VERSION: 1.13.3
NODE_VERSION: 17.0.1
CARGO_PROFILE: debug

1971
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -28,11 +28,11 @@ shellexpand = "2.1.0"
toml = "0.5.8"
semver = "1.0.4"
serde = { version = "1.0.122", features = ["derive"] }
solana-sdk = "~1.10.29"
solana-program = "~1.10.29"
solana-client = "~1.10.29"
solana-cli-config = "~1.10.29"
solana-faucet = "~1.10.29"
solana-sdk = "1.13.3"
solana-program = "1.13.3"
solana-client = "1.13.3"
solana-cli-config = "1.13.3"
solana-faucet = "1.13.3"
dirs = "3.0"
heck = "0.3.1"
flate2 = "1.0.19"

View File

@ -1385,7 +1385,7 @@ pub fn verify_bin(program_id: Pubkey, bin_path: &Path, cluster: &str) -> Result<
.value
.map_or(Err(anyhow!("Program data account not found")), Ok)?;
let bin = account.data
[UpgradeableLoaderState::programdata_data_offset().unwrap_or(0)..]
[UpgradeableLoaderState::size_of_programdata_metadata()..]
.to_vec();
if let UpgradeableLoaderState::ProgramData {
@ -1403,7 +1403,7 @@ pub fn verify_bin(program_id: Pubkey, bin_path: &Path, cluster: &str) -> Result<
}
}
UpgradeableLoaderState::Buffer { .. } => {
let offset = UpgradeableLoaderState::buffer_data_offset().unwrap_or(0);
let offset = UpgradeableLoaderState::size_of_buffer_metadata();
(
account.data[offset..].to_vec(),
BinVerificationState::Buffer,

View File

@ -15,8 +15,8 @@ anchor-lang = { path = "../lang", version = "0.25.0" }
anyhow = "1.0.32"
regex = "1.4.5"
serde = { version = "1.0.122", features = ["derive"] }
solana-client = "~1.10.29"
solana-sdk = "~1.10.29"
solana-account-decoder = "~1.10.29"
solana-client = "1.13.3"
solana-sdk = "1.13.3"
solana-account-decoder = "1.13.3"
thiserror = "1.0.20"
url = "2.2.2"

View File

@ -17,4 +17,4 @@ shellexpand = "2.1.0"
anyhow = "1.0.32"
rand = "0.7.3"
clap = { version = "3.0.0-rc.0", features = ["derive"] }
solana-sdk = "~1.10.29"
solana-sdk = "1.13.3"

View File

@ -16,10 +16,9 @@ use solana_client::rpc_config::{
RpcAccountInfoConfig, RpcProgramAccountsConfig, RpcSendTransactionConfig,
RpcTransactionLogsConfig, RpcTransactionLogsFilter,
};
use solana_client::rpc_filter::{Memcmp, MemcmpEncodedBytes, RpcFilterType};
use solana_client::rpc_filter::{Memcmp, RpcFilterType};
use solana_client::rpc_response::{Response as RpcResponse, RpcLogsResponse};
use solana_sdk::account::Account;
use solana_sdk::bs58;
use solana_sdk::commitment_config::CommitmentConfig;
use solana_sdk::signature::{Signature, Signer};
use solana_sdk::transaction::Transaction;
@ -156,11 +155,8 @@ impl Program {
&self,
filters: Vec<RpcFilterType>,
) -> Result<ProgramAccountsIterator<T>, ClientError> {
let account_type_filter = RpcFilterType::Memcmp(Memcmp {
offset: 0,
bytes: MemcmpEncodedBytes::Base58(bs58::encode(T::discriminator()).into_string()),
encoding: None,
});
let account_type_filter =
RpcFilterType::Memcmp(Memcmp::new_base58_encoded(0, &T::discriminator()));
let config = RpcProgramAccountsConfig {
filters: Some([vec![account_type_filter], filters].concat()),
account_config: RpcAccountInfoConfig {

View File

@ -6,7 +6,7 @@ ANCHOR_CLI=v$(shell awk -F ' = ' '$$1 ~ /version/ { gsub(/[\"]/, "", $$2); print
#
# Solana toolchain.
#
SOLANA_CLI=v1.10.29
SOLANA_CLI=v1.13.3
#
# Build version should match the Anchor cli version.
#

View File

@ -39,6 +39,6 @@ arrayref = "0.3.6"
base64 = "0.13.0"
borsh = "0.9"
bytemuck = "1.4.0"
solana-program = "~1.10.29"
solana-program = "1.13.3"
thiserror = "1.0.20"
bincode = "1.3.3"

View File

@ -23,7 +23,7 @@ dex = ["serum_dex"]
anchor-lang = { path = "../lang", version = "0.25.0", features = ["derive"] }
borsh = { version = "^0.9", optional = true }
serum_dex = { git = "https://github.com/project-serum/serum-dex", rev = "1be91f2", version = "0.4.0", features = ["no-entrypoint"], optional = true }
solana-program = "~1.10.29"
spl-token = { version = "~3.3.0", features = ["no-entrypoint"], optional = true }
spl-associated-token-account = { version = "~1.0.5", features = ["no-entrypoint"], optional = true }
solana-program = "1.13.3"
spl-token = { version = "3.5.0", features = ["no-entrypoint"], optional = true }
spl-associated-token-account = { version = "1.1.1", features = ["no-entrypoint"], optional = true }
mpl-token-metadata = { version = "1.3.4", optional = true, features = ["no-entrypoint"] }

View File

@ -10,6 +10,7 @@ pub fn create<'info>(ctx: CpiContext<'_, '_, '_, 'info, Create<'info>>) -> Resul
ctx.accounts.payer.key,
ctx.accounts.authority.key,
ctx.accounts.mint.key,
ctx.accounts.token_program.key,
);
solana_program::program::invoke_signed(
&ix,

@ -1 +1 @@
Subproject commit 45518c16f00c68509e06432925403046f2b64463
Subproject commit b73b60e55a87bda1d2770c7c10db920db9cdb06b

@ -1 +1 @@
Subproject commit 9c6bd407eb96ac77f4aef0d4387ca5b122f1c20c
Subproject commit 24c6e5c9845f5f4cbfd51bd239fcbe6eaa2e5337

View File

@ -19,7 +19,7 @@ test = []
[dependencies]
anchor-lang = { path = "../../../../lang" }
anchor-spl = { path = "../../../../spl" }
spl-token = { version = "~3.3.0", features = ["no-entrypoint"] }
spl-token = { version = "3.5.0", features = ["no-entrypoint"] }
swap = { path = "../../deps/swap/programs/swap", features = ["cpi"] }
serum_dex = { path = "../../deps/serum-dex/dex", features = ["no-entrypoint"] }
registry = { path = "../../deps/stake/programs/registry", features = ["cpi"] }

View File

@ -19,4 +19,4 @@ default = []
anchor-lang = { path = "../../../../lang", features = ["init-if-needed"] }
anchor-spl = { path = "../../../../spl" }
misc2 = { path = "../misc2", features = ["cpi"] }
spl-associated-token-account = "~1.0.3"
spl-associated-token-account = "1.1.1"