Compare commits

...

10 Commits

Author SHA1 Message Date
mergify[bot]
de76df0cbb Bump spl-token to clean up magic number (bp #11726) (#11737)
* Bump spl-token to clean up magic number (#11726)

(cherry picked from commit 2fd2aceeb2)

# Conflicts:
#	account-decoder/Cargo.toml
#	core/Cargo.toml
#	transaction-status/Cargo.toml

* Fix conflicts and toml order

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2020-08-20 17:35:28 +00:00
Justin Starry
a0190b4105 Hotfix for enabling CPI (#11728) 2020-08-20 15:41:37 +08:00
carllin
5255a6ebd2 Cleanup test utilities (#11725)
Co-authored-by: Carl <carl@solana.com>
2020-08-20 00:10:18 -07:00
mergify[bot]
8575514235 Allow votes to timestamp subsequent slots with the same timestamp (#11715) (#11719)
(cherry picked from commit b1bc901a66)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-08-20 02:00:32 +00:00
Trent Nelson
2a1946436b Bump version to 1.2.26 2020-08-19 20:33:40 +00:00
Michael Vines
80649a9c3d Revert "Revert "rpc: rework binary encoding. BREAKING CHANGE (bp #11646) (#11673)""
This reverts commit fb90fb3feb.
2020-08-18 21:25:31 -07:00
Michael Vines
ad74ba0eb0 The end_slot argument to purge is now optional 2020-08-19 03:19:02 +00:00
mergify[bot]
fd41ad5d8f Remove old signatureSubscribe info (#11704) (#11705)
(cherry picked from commit 35828e8fe7)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-08-19 02:43:44 +00:00
mergify[bot]
63855d5c2a Get index (#11694) (#11696)
(cherry picked from commit 55ce2ebd53)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-08-18 19:12:49 +00:00
Michael Vines
00251f710e Bump version to v1.2.25 2020-08-18 08:40:00 -07:00
117 changed files with 993 additions and 899 deletions

305
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-account-decoder"
version = "1.2.24"
version = "1.2.26"
description = "Solana account decoder"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -15,14 +15,14 @@ bs58 = "0.3.1"
bv = "0.11.1"
Inflector = "0.11.4"
lazy_static = "1.4.0"
solana-config-program = { path = "../programs/config", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-stake-program = { path = "../programs/stake", version = "1.2.24" }
solana-vote-program = { path = "../programs/vote", version = "1.2.24" }
spl-token-v1-0 = { package = "spl-token", version = "1.0.6", features = ["skip-no-mangle"] }
serde = "1.0.112"
serde_derive = "1.0.103"
serde_json = "1.0.54"
solana-config-program = { path = "../programs/config", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-stake-program = { path = "../programs/stake", version = "1.2.26" }
solana-vote-program = { path = "../programs/vote", version = "1.2.26" }
spl-token-v1-0 = { package = "spl-token", version = "1.0.8", features = ["skip-no-mangle"] }
thiserror = "1.0"
[package.metadata.docs.rs]

View File

@@ -32,17 +32,18 @@ pub struct UiAccount {
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase", untagged)]
pub enum UiAccountData {
Binary(String),
LegacyBinary(String), // Legacy. Retained for RPC backwards compatibility
Json(ParsedAccount),
Binary64(String),
Binary(String, UiAccountEncoding),
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
#[serde(rename_all = "camelCase")]
pub enum UiAccountEncoding {
Binary, // SLOW! Avoid this encoding
Binary, // Legacy. Retained for RPC backwards compatibility
Base58,
Base64,
JsonParsed,
Binary64,
}
impl UiAccount {
@@ -54,20 +55,24 @@ impl UiAccount {
data_slice_config: Option<UiDataSliceConfig>,
) -> Self {
let data = match encoding {
UiAccountEncoding::Binary => UiAccountData::Binary(
UiAccountEncoding::Binary => UiAccountData::LegacyBinary(
bs58::encode(slice_data(&account.data, data_slice_config)).into_string(),
),
UiAccountEncoding::Binary64 => UiAccountData::Binary64(base64::encode(slice_data(
&account.data,
data_slice_config,
))),
UiAccountEncoding::Base58 => UiAccountData::Binary(
bs58::encode(slice_data(&account.data, data_slice_config)).into_string(),
encoding,
),
UiAccountEncoding::Base64 => UiAccountData::Binary(
base64::encode(slice_data(&account.data, data_slice_config)),
encoding,
),
UiAccountEncoding::JsonParsed => {
if let Ok(parsed_data) =
parse_account_data(pubkey, &account.owner, &account.data, additional_data)
{
UiAccountData::Json(parsed_data)
} else {
UiAccountData::Binary64(base64::encode(&account.data))
UiAccountData::Binary(base64::encode(&account.data), UiAccountEncoding::Base64)
}
}
};
@@ -83,8 +88,12 @@ impl UiAccount {
pub fn decode(&self) -> Option<Account> {
let data = match &self.data {
UiAccountData::Json(_) => None,
UiAccountData::Binary(blob) => bs58::decode(blob).into_vec().ok(),
UiAccountData::Binary64(blob) => base64::decode(blob).ok(),
UiAccountData::LegacyBinary(blob) => bs58::decode(blob).into_vec().ok(),
UiAccountData::Binary(blob, encoding) => match encoding {
UiAccountEncoding::Base58 => bs58::decode(blob).into_vec().ok(),
UiAccountEncoding::Base64 => base64::decode(blob).ok(),
UiAccountEncoding::Binary | UiAccountEncoding::JsonParsed => None,
},
}?;
Some(Account {
lamports: self.lamports,

View File

@@ -2,7 +2,7 @@
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-accounts-bench"
version = "1.2.24"
version = "1.2.26"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -10,10 +10,10 @@ homepage = "https://solana.com/"
[dependencies]
log = "0.4.6"
rayon = "1.3.0"
solana-logger = { path = "../logger", version = "1.2.24" }
solana-runtime = { path = "../runtime", version = "1.2.24" }
solana-measure = { path = "../measure", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.26" }
solana-runtime = { path = "../runtime", version = "1.2.26" }
solana-measure = { path = "../measure", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
rand = "0.7.0"
clap = "2.33.1"
crossbeam-channel = "0.4"

View File

@@ -2,7 +2,7 @@
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-banking-bench"
version = "1.2.24"
version = "1.2.26"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -13,16 +13,16 @@ crossbeam-channel = "0.4"
log = "0.4.6"
rand = "0.7.0"
rayon = "1.3.0"
solana-core = { path = "../core", version = "1.2.24" }
solana-clap-utils = { path = "../clap-utils", version = "1.2.24" }
solana-streamer = { path = "../streamer", version = "1.2.24" }
solana-perf = { path = "../perf", version = "1.2.24" }
solana-ledger = { path = "../ledger", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.24" }
solana-runtime = { path = "../runtime", version = "1.2.24" }
solana-measure = { path = "../measure", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-version = { path = "../version", version = "1.2.24" }
solana-core = { path = "../core", version = "1.2.26" }
solana-clap-utils = { path = "../clap-utils", version = "1.2.26" }
solana-streamer = { path = "../streamer", version = "1.2.26" }
solana-perf = { path = "../perf", version = "1.2.26" }
solana-ledger = { path = "../ledger", version = "1.2.26" }
solana-logger = { path = "../logger", version = "1.2.26" }
solana-runtime = { path = "../runtime", version = "1.2.26" }
solana-measure = { path = "../measure", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-version = { path = "../version", version = "1.2.26" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -2,7 +2,7 @@
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-bench-exchange"
version = "1.2.24"
version = "1.2.26"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -18,21 +18,21 @@ rand = "0.7.0"
rayon = "1.3.0"
serde_json = "1.0.53"
serde_yaml = "0.8.12"
solana-clap-utils = { path = "../clap-utils", version = "1.2.24" }
solana-core = { path = "../core", version = "1.2.24" }
solana-genesis = { path = "../genesis", version = "1.2.24" }
solana-client = { path = "../client", version = "1.2.24" }
solana-faucet = { path = "../faucet", version = "1.2.24" }
solana-exchange-program = { path = "../programs/exchange", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.24" }
solana-metrics = { path = "../metrics", version = "1.2.24" }
solana-net-utils = { path = "../net-utils", version = "1.2.24" }
solana-runtime = { path = "../runtime", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-version = { path = "../version", version = "1.2.24" }
solana-clap-utils = { path = "../clap-utils", version = "1.2.26" }
solana-core = { path = "../core", version = "1.2.26" }
solana-genesis = { path = "../genesis", version = "1.2.26" }
solana-client = { path = "../client", version = "1.2.26" }
solana-faucet = { path = "../faucet", version = "1.2.26" }
solana-exchange-program = { path = "../programs/exchange", version = "1.2.26" }
solana-logger = { path = "../logger", version = "1.2.26" }
solana-metrics = { path = "../metrics", version = "1.2.26" }
solana-net-utils = { path = "../net-utils", version = "1.2.26" }
solana-runtime = { path = "../runtime", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-version = { path = "../version", version = "1.2.26" }
[dev-dependencies]
solana-local-cluster = { path = "../local-cluster", version = "1.2.24" }
solana-local-cluster = { path = "../local-cluster", version = "1.2.26" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -2,18 +2,18 @@
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-bench-streamer"
version = "1.2.24"
version = "1.2.26"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
[dependencies]
clap = "2.33.1"
solana-clap-utils = { path = "../clap-utils", version = "1.2.24" }
solana-streamer = { path = "../streamer", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.24" }
solana-net-utils = { path = "../net-utils", version = "1.2.24" }
solana-version = { path = "../version", version = "1.2.24" }
solana-clap-utils = { path = "../clap-utils", version = "1.2.26" }
solana-streamer = { path = "../streamer", version = "1.2.26" }
solana-logger = { path = "../logger", version = "1.2.26" }
solana-net-utils = { path = "../net-utils", version = "1.2.26" }
solana-version = { path = "../version", version = "1.2.26" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -2,7 +2,7 @@
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-bench-tps"
version = "1.2.24"
version = "1.2.26"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -14,23 +14,23 @@ log = "0.4.8"
rayon = "1.3.0"
serde_json = "1.0.53"
serde_yaml = "0.8.12"
solana-clap-utils = { path = "../clap-utils", version = "1.2.24" }
solana-core = { path = "../core", version = "1.2.24" }
solana-genesis = { path = "../genesis", version = "1.2.24" }
solana-client = { path = "../client", version = "1.2.24" }
solana-faucet = { path = "../faucet", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.24" }
solana-metrics = { path = "../metrics", version = "1.2.24" }
solana-measure = { path = "../measure", version = "1.2.24" }
solana-net-utils = { path = "../net-utils", version = "1.2.24" }
solana-runtime = { path = "../runtime", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-version = { path = "../version", version = "1.2.24" }
solana-clap-utils = { path = "../clap-utils", version = "1.2.26" }
solana-core = { path = "../core", version = "1.2.26" }
solana-genesis = { path = "../genesis", version = "1.2.26" }
solana-client = { path = "../client", version = "1.2.26" }
solana-faucet = { path = "../faucet", version = "1.2.26" }
solana-logger = { path = "../logger", version = "1.2.26" }
solana-metrics = { path = "../metrics", version = "1.2.26" }
solana-measure = { path = "../measure", version = "1.2.26" }
solana-net-utils = { path = "../net-utils", version = "1.2.26" }
solana-runtime = { path = "../runtime", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-version = { path = "../version", version = "1.2.26" }
[dev-dependencies]
serial_test = "0.4.0"
serial_test_derive = "0.4.0"
solana-local-cluster = { path = "../local-cluster", version = "1.2.24" }
solana-local-cluster = { path = "../local-cluster", version = "1.2.26" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -27,5 +27,5 @@ Alternatively, you can source it from within a script:
local PATCH=0
local SPECIAL=""
semverParseInto "1.2.24" MAJOR MINOR PATCH SPECIAL
semverParseInto "1.2.26" MAJOR MINOR PATCH SPECIAL
semverParseInto "3.2.1" MAJOR MINOR PATCH SPECIAL

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-clap-utils"
version = "1.2.24"
version = "1.2.26"
description = "Solana utilities for the clap"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -11,8 +11,8 @@ edition = "2018"
[dependencies]
clap = "2.33.0"
rpassword = "4.0"
solana-remote-wallet = { path = "../remote-wallet", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-remote-wallet = { path = "../remote-wallet", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
thiserror = "1.0.11"
tiny-bip39 = "0.7.0"
url = "2.1.0"

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-cli-config"
description = "Blockchain, Rebuilt for Scale"
version = "1.2.24"
version = "1.2.26"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-cli"
description = "Blockchain, Rebuilt for Scale"
version = "1.2.24"
version = "1.2.26"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -27,29 +27,29 @@ reqwest = { version = "0.10.4", default-features = false, features = ["blocking"
serde = "1.0.110"
serde_derive = "1.0.103"
serde_json = "1.0.53"
solana-account-decoder = { path = "../account-decoder", version = "1.2.24" }
solana-budget-program = { path = "../programs/budget", version = "1.2.24" }
solana-clap-utils = { path = "../clap-utils", version = "1.2.24" }
solana-cli-config = { path = "../cli-config", version = "1.2.24" }
solana-client = { path = "../client", version = "1.2.24" }
solana-config-program = { path = "../programs/config", version = "1.2.24" }
solana-faucet = { path = "../faucet", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.24" }
solana-net-utils = { path = "../net-utils", version = "1.2.24" }
solana-remote-wallet = { path = "../remote-wallet", version = "1.2.24" }
solana-runtime = { path = "../runtime", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-stake-program = { path = "../programs/stake", version = "1.2.24" }
solana-transaction-status = { path = "../transaction-status", version = "1.2.24" }
solana-version = { path = "../version", version = "1.2.24" }
solana-vote-program = { path = "../programs/vote", version = "1.2.24" }
solana-vote-signer = { path = "../vote-signer", version = "1.2.24" }
solana-account-decoder = { path = "../account-decoder", version = "1.2.26" }
solana-budget-program = { path = "../programs/budget", version = "1.2.26" }
solana-clap-utils = { path = "../clap-utils", version = "1.2.26" }
solana-cli-config = { path = "../cli-config", version = "1.2.26" }
solana-client = { path = "../client", version = "1.2.26" }
solana-config-program = { path = "../programs/config", version = "1.2.26" }
solana-faucet = { path = "../faucet", version = "1.2.26" }
solana-logger = { path = "../logger", version = "1.2.26" }
solana-net-utils = { path = "../net-utils", version = "1.2.26" }
solana-remote-wallet = { path = "../remote-wallet", version = "1.2.26" }
solana-runtime = { path = "../runtime", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-stake-program = { path = "../programs/stake", version = "1.2.26" }
solana-transaction-status = { path = "../transaction-status", version = "1.2.26" }
solana-version = { path = "../version", version = "1.2.26" }
solana-vote-program = { path = "../programs/vote", version = "1.2.26" }
solana-vote-signer = { path = "../vote-signer", version = "1.2.26" }
thiserror = "1.0.19"
url = "2.1.1"
[dev-dependencies]
solana-core = { path = "../core", version = "1.2.24" }
solana-budget-program = { path = "../programs/budget", version = "1.2.24" }
solana-core = { path = "../core", version = "1.2.26" }
solana-budget-program = { path = "../programs/budget", version = "1.2.26" }
tempfile = "3.1.0"
[[bin]]

View File

@@ -11,7 +11,7 @@ use crate::{
vote::*,
};
use chrono::prelude::*;
use clap::{App, AppSettings, Arg, ArgMatches, SubCommand};
use clap::{value_t_or_exit, App, AppSettings, Arg, ArgMatches, SubCommand};
use log::*;
use num_traits::FromPrimitive;
use serde_json::{self, json, Value};
@@ -845,9 +845,14 @@ pub fn parse_command(
_ => Err(CliError::BadParameter("Invalid signature".to_string())),
},
("decode-transaction", Some(matches)) => {
let encoded_transaction = EncodedTransaction::Binary(
matches.value_of("base58_transaction").unwrap().to_string(),
);
let blob = value_t_or_exit!(matches, "transaction", String);
let encoding = match matches.value_of("encoding").unwrap() {
"base58" => UiTransactionEncoding::Binary,
"base64" => UiTransactionEncoding::Base64,
_ => unreachable!(),
};
let encoded_transaction = EncodedTransaction::Binary(blob, encoding);
if let Some(transaction) = encoded_transaction.decode() {
Ok(CliCommandInfo {
command: CliCommand::DecodeTransaction(transaction),
@@ -1178,7 +1183,7 @@ fn process_confirm(
if let Some(transaction_status) = status {
if config.verbose {
match rpc_client
.get_confirmed_transaction(signature, UiTransactionEncoding::Binary)
.get_confirmed_transaction(signature, UiTransactionEncoding::Base64)
{
Ok(confirmed_transaction) => {
println!(
@@ -1234,7 +1239,7 @@ fn process_show_account(
account: UiAccount::encode(
account_pubkey,
account,
UiAccountEncoding::Binary64,
UiAccountEncoding::Base64,
None,
None,
),
@@ -2549,12 +2554,22 @@ pub fn app<'ab, 'v>(name: &str, about: &'ab str, version: &'v str) -> App<'ab, '
SubCommand::with_name("decode-transaction")
.about("Decode a base-58 binary transaction")
.arg(
Arg::with_name("base58_transaction")
Arg::with_name("transaction")
.index(1)
.value_name("BASE58_TRANSACTION")
.value_name("TRANSACTION")
.takes_value(true)
.required(true)
.help("The transaction to decode"),
.help("transaction to decode"),
)
.arg(
Arg::with_name("encoding")
.index(2)
.value_name("ENCODING")
.possible_values(&["base58", "base64"]) // Subset of `UiTransactionEncoding` enum
.default_value("base58")
.takes_value(true)
.required(true)
.help("transaction encoding"),
),
)
.subcommand(

View File

@@ -348,7 +348,7 @@ mod tests {
let rpc_nonce_account = UiAccount::encode(
&nonce_pubkey,
nonce_account,
UiAccountEncoding::Binary64,
UiAccountEncoding::Base64,
None,
None,
);

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-client"
version = "1.2.24"
version = "1.2.26"
description = "Solana Client"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -19,11 +19,11 @@ reqwest = { version = "0.10.4", default-features = false, features = ["blocking"
serde = "1.0.110"
serde_derive = "1.0.103"
serde_json = "1.0.53"
solana-account-decoder = { path = "../account-decoder", version = "1.2.24" }
solana-net-utils = { path = "../net-utils", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-transaction-status = { path = "../transaction-status", version = "1.2.24" }
solana-vote-program = { path = "../programs/vote", version = "1.2.24" }
solana-account-decoder = { path = "../account-decoder", version = "1.2.26" }
solana-net-utils = { path = "../net-utils", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-transaction-status = { path = "../transaction-status", version = "1.2.26" }
solana-vote-program = { path = "../programs/vote", version = "1.2.26" }
thiserror = "1.0"
tungstenite = "0.10.1"
url = "2.1.1"
@@ -32,7 +32,7 @@ url = "2.1.1"
assert_matches = "1.3.0"
jsonrpc-core = "14.1.0"
jsonrpc-http-server = "14.1.0"
solana-logger = { path = "../logger", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.26" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -15,12 +15,7 @@ use bincode::serialize;
use indicatif::{ProgressBar, ProgressStyle};
use log::*;
use serde_json::{json, Value};
use solana_account_decoder::{
parse_token::UiTokenAmount,
UiAccount,
UiAccountData::{Binary, Binary64},
UiAccountEncoding,
};
use solana_account_decoder::{parse_token::UiTokenAmount, UiAccount, UiAccountEncoding};
use solana_sdk::{
account::Account,
clock::{
@@ -477,7 +472,7 @@ impl RpcClient {
commitment_config: CommitmentConfig,
) -> RpcResult<Option<Account>> {
let config = RpcAccountInfoConfig {
encoding: Some(UiAccountEncoding::Binary64),
encoding: Some(UiAccountEncoding::Base64),
commitment: Some(commitment_config),
data_slice: None,
};
@@ -495,17 +490,8 @@ impl RpcClient {
}
let Response {
context,
value: mut rpc_account,
value: rpc_account,
} = serde_json::from_value::<Response<Option<UiAccount>>>(result_json)?;
if let Some(ref mut account) = rpc_account {
if let Binary(_) = &account.data {
let tmp = Binary64(String::new());
match std::mem::replace(&mut account.data, tmp) {
Binary(new_data) => account.data = Binary64(new_data),
_ => panic!("should have gotten binary here."),
}
}
}
trace!("Response account {:?} {:?}", pubkey, rpc_account);
let account = rpc_account.and_then(|rpc_account| rpc_account.decode());
Ok(Response {

View File

@@ -1,7 +1,7 @@
[package]
name = "solana-core"
description = "Blockchain, Rebuilt for Scale"
version = "1.2.24"
version = "1.2.26"
documentation = "https://docs.rs/solana"
homepage = "https://solana.com/"
readme = "../README.md"
@@ -42,32 +42,32 @@ regex = "1.3.7"
serde = "1.0.110"
serde_derive = "1.0.103"
serde_json = "1.0.53"
solana-account-decoder = { path = "../account-decoder", version = "1.2.24" }
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "1.2.24" }
solana-budget-program = { path = "../programs/budget", version = "1.2.24" }
solana-clap-utils = { path = "../clap-utils", version = "1.2.24" }
solana-client = { path = "../client", version = "1.2.24" }
solana-faucet = { path = "../faucet", version = "1.2.24" }
solana-genesis-programs = { path = "../genesis-programs", version = "1.2.24" }
solana-ledger = { path = "../ledger", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.24" }
solana-merkle-tree = { path = "../merkle-tree", version = "1.2.24" }
solana-metrics = { path = "../metrics", version = "1.2.24" }
solana-measure = { path = "../measure", version = "1.2.24" }
solana-net-utils = { path = "../net-utils", version = "1.2.24" }
solana-perf = { path = "../perf", version = "1.2.24" }
solana-runtime = { path = "../runtime", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-stake-program = { path = "../programs/stake", version = "1.2.24" }
solana-storage-bigtable = { path = "../storage-bigtable", version = "1.2.24" }
solana-streamer = { path = "../streamer", version = "1.2.24" }
solana-sys-tuner = { path = "../sys-tuner", version = "1.2.24" }
solana-transaction-status = { path = "../transaction-status", version = "1.2.24" }
solana-version = { path = "../version", version = "1.2.24" }
solana-vote-program = { path = "../programs/vote", version = "1.2.24" }
solana-vote-signer = { path = "../vote-signer", version = "1.2.24" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "1.2.24" }
spl-token-v1-0 = { package = "spl-token", version = "1.0.6", features = ["skip-no-mangle"] }
solana-account-decoder = { path = "../account-decoder", version = "1.2.26" }
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "1.2.26" }
solana-budget-program = { path = "../programs/budget", version = "1.2.26" }
solana-clap-utils = { path = "../clap-utils", version = "1.2.26" }
solana-client = { path = "../client", version = "1.2.26" }
solana-faucet = { path = "../faucet", version = "1.2.26" }
solana-genesis-programs = { path = "../genesis-programs", version = "1.2.26" }
solana-ledger = { path = "../ledger", version = "1.2.26" }
solana-logger = { path = "../logger", version = "1.2.26" }
solana-merkle-tree = { path = "../merkle-tree", version = "1.2.26" }
solana-metrics = { path = "../metrics", version = "1.2.26" }
solana-measure = { path = "../measure", version = "1.2.26" }
solana-net-utils = { path = "../net-utils", version = "1.2.26" }
solana-perf = { path = "../perf", version = "1.2.26" }
solana-runtime = { path = "../runtime", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-stake-program = { path = "../programs/stake", version = "1.2.26" }
solana-storage-bigtable = { path = "../storage-bigtable", version = "1.2.26" }
solana-streamer = { path = "../streamer", version = "1.2.26" }
solana-sys-tuner = { path = "../sys-tuner", version = "1.2.26" }
solana-transaction-status = { path = "../transaction-status", version = "1.2.26" }
solana-version = { path = "../version", version = "1.2.26" }
solana-vote-program = { path = "../programs/vote", version = "1.2.26" }
solana-vote-signer = { path = "../vote-signer", version = "1.2.26" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "1.2.26" }
spl-token-v1-0 = { package = "spl-token", version = "1.0.8", features = ["skip-no-mangle"] }
tempfile = "3.1.0"
thiserror = "1.0"
tokio = { version = "0.2.22", features = ["full"] }

View File

@@ -1146,9 +1146,7 @@ mod tests {
// Create the set of relevant voters for the next epoch
let new_epoch = last_known_epoch + 1;
let first_slot_in_new_epoch = bank.epoch_schedule().get_first_slot_in_epoch(new_epoch);
let new_keypairs: Vec<_> = (0..10)
.map(|_| ValidatorVoteKeypairs::new(Keypair::new(), Keypair::new(), Keypair::new()))
.collect();
let new_keypairs: Vec<_> = (0..10).map(|_| ValidatorVoteKeypairs::new_rand()).collect();
let new_epoch_authorized_voters: HashMap<_, _> = new_keypairs
.iter()
.chain(validator_voting_keypairs[0..5].iter())
@@ -1187,15 +1185,14 @@ mod tests {
let ref_count_per_vote = 2;
// Create some voters at genesis
let validator_keypairs: Vec<_> = (0..2)
.map(|_| ValidatorVoteKeypairs::new(Keypair::new(), Keypair::new(), Keypair::new()))
.collect();
let validator_keypairs: Vec<_> =
(0..2).map(|_| ValidatorVoteKeypairs::new_rand()).collect();
let GenesisConfigInfo { genesis_config, .. } =
genesis_utils::create_genesis_config_with_vote_accounts(
10_000,
&validator_keypairs,
100,
vec![100; validator_keypairs.len()],
);
let bank = Bank::new(&genesis_config);
let exit = Arc::new(AtomicBool::new(false));
@@ -1336,14 +1333,13 @@ mod tests {
Vec<ValidatorVoteKeypairs>,
Arc<RpcSubscriptions>,
) {
let validator_voting_keypairs: Vec<_> = (0..10)
.map(|_| ValidatorVoteKeypairs::new(Keypair::new(), Keypair::new(), Keypair::new()))
.collect();
let validator_voting_keypairs: Vec<_> =
(0..10).map(|_| ValidatorVoteKeypairs::new_rand()).collect();
let GenesisConfigInfo { genesis_config, .. } =
genesis_utils::create_genesis_config_with_vote_accounts(
10_000,
&validator_voting_keypairs,
100,
vec![100; validator_voting_keypairs.len()],
);
let bank = Bank::new(&genesis_config);
let vote_tracker = VoteTracker::new(&bank);

View File

@@ -513,7 +513,11 @@ mod tests {
genesis_config,
mint_keypair,
voting_keypair: _,
} = create_genesis_config_with_vote_accounts(1_000_000_000, &validator_keypairs, 100);
} = create_genesis_config_with_vote_accounts(
1_000_000_000,
&validator_keypairs,
vec![100; validator_keypairs.len()],
);
let node_keypair = Keypair::from_bytes(&node_keypair).unwrap();
let vote_keypair = Keypair::from_bytes(&vote_keypair).unwrap();

View File

@@ -676,12 +676,7 @@ pub mod test {
create_genesis_config_with_vote_accounts, GenesisConfigInfo, ValidatorVoteKeypairs,
},
};
use solana_sdk::{
clock::Slot,
hash::Hash,
pubkey::Pubkey,
signature::{Keypair, Signer},
};
use solana_sdk::{clock::Slot, hash::Hash, pubkey::Pubkey, signature::Signer};
use solana_vote_program::{
vote_state::{Vote, VoteStateVersions, MAX_LOCKOUT_HISTORY},
vote_transaction,
@@ -936,14 +931,8 @@ pub mod test {
HeaviestSubtreeForkChoice,
) {
let keypairs: HashMap<_, _> = std::iter::repeat_with(|| {
let node_keypair = Keypair::new();
let vote_keypair = Keypair::new();
let stake_keypair = Keypair::new();
let node_pubkey = node_keypair.pubkey();
(
node_pubkey,
ValidatorVoteKeypairs::new(node_keypair, vote_keypair, stake_keypair),
)
let vote_keypairs = ValidatorVoteKeypairs::new_rand();
(vote_keypairs.node_keypair.pubkey(), vote_keypairs)
})
.take(num_keypairs)
.collect();
@@ -979,7 +968,11 @@ pub mod test {
genesis_config,
mint_keypair,
voting_keypair: _,
} = create_genesis_config_with_vote_accounts(1_000_000_000, &validator_keypairs, stake);
} = create_genesis_config_with_vote_accounts(
1_000_000_000,
&validator_keypairs,
vec![stake; validator_keypairs.len()],
);
let bank0 = Bank::new(&genesis_config);

View File

@@ -167,7 +167,7 @@ impl ForkProgress {
num_dropped_blocks_on_fork: u64,
) -> Self {
let validator_fork_info = {
if bank.collector_id() == my_pubkey {
if bank.collector_id() == my_pubkey && bank.slot() > 0 {
let stake = bank.epoch_vote_account_stake(voting_pubkey);
Some(ValidatorStakeInfo::new(
*voting_pubkey,

View File

@@ -1082,7 +1082,7 @@ mod test {
} = genesis_utils::create_genesis_config_with_vote_accounts(
1_000_000_000,
&[&keypairs],
10000,
vec![10000],
);
let bank0 = Arc::new(Bank::new(&genesis_config));
let bank9 = Bank::new_from_parent(&bank0, &Pubkey::default(), duplicate_slot);
@@ -1144,7 +1144,7 @@ mod test {
genesis_utils::create_genesis_config_with_vote_accounts(
1_000_000_000,
&[keypairs],
100,
vec![100],
);
let bank0 = Bank::new(&genesis_config);

View File

@@ -511,6 +511,7 @@ mod test {
use super::*;
use solana_ledger::{blockstore::Blockstore, get_tmp_ledger_path};
use solana_runtime::{bank::Bank, bank_utils};
use solana_sdk::hash::Hash;
use trees::tr;
#[test]
@@ -658,7 +659,7 @@ mod test {
assert_eq!(repair_weight.trees.get(&8).unwrap().ancestors(10), vec![8]);
// Connect orphan back to main fork
blockstore.add_tree(tr(6) / (tr(8)), true, true);
blockstore.add_tree(tr(6) / (tr(8)), true, true, 2, Hash::default());
assert_eq!(
AncestorIterator::new(8, &blockstore).collect::<Vec<_>>(),
vec![6, 5, 3, 1, 0]
@@ -742,8 +743,8 @@ mod test {
assert!(repair_weight.trees.contains_key(&20));
// Resolve orphans in blockstore
blockstore.add_tree(tr(6) / (tr(8)), true, true);
blockstore.add_tree(tr(11) / (tr(20)), true, true);
blockstore.add_tree(tr(6) / (tr(8)), true, true, 2, Hash::default());
blockstore.add_tree(tr(11) / (tr(20)), true, true, 2, Hash::default());
// Call `update_orphan_ancestors` to resolve orphan
repair_weight.update_orphan_ancestors(
&blockstore,
@@ -853,8 +854,8 @@ mod test {
// Resolve the orphans, should now return no
// orphans
repairs = vec![];
blockstore.add_tree(tr(6) / (tr(8)), true, true);
blockstore.add_tree(tr(11) / (tr(20)), true, true);
blockstore.add_tree(tr(6) / (tr(8)), true, true, 2, Hash::default());
blockstore.add_tree(tr(11) / (tr(20)), true, true, 2, Hash::default());
repair_weight.get_best_orphans(
&blockstore,
&mut repairs,
@@ -889,7 +890,7 @@ mod test {
// orphan in the `trees` map, we should search for
// exactly one more of the remaining two
let mut repairs = vec![];
blockstore.add_tree(tr(100) / (tr(101)), true, true);
blockstore.add_tree(tr(100) / (tr(101)), true, true, 2, Hash::default());
repair_weight.get_best_orphans(
&blockstore,
&mut repairs,
@@ -991,7 +992,7 @@ mod test {
// Chain orphan 8 back to the main fork, but don't
// touch orphan 20
blockstore.add_tree(tr(4) / (tr(8)), true, true);
blockstore.add_tree(tr(4) / (tr(8)), true, true, 2, Hash::default());
// Call `update_orphan_ancestors` to resolve orphan
repair_weight.update_orphan_ancestors(
@@ -1061,10 +1062,10 @@ mod test {
}
// Chain orphan 8 back to slot `old_parent`
blockstore.add_tree(tr(*old_parent) / (tr(8)), true, true);
blockstore.add_tree(tr(*old_parent) / (tr(8)), true, true, 2, Hash::default());
// Chain orphan 20 back to orphan 8
blockstore.add_tree(tr(8) / (tr(20)), true, true);
blockstore.add_tree(tr(8) / (tr(20)), true, true, 2, Hash::default());
// Call `update_orphan_ancestors` to resolve orphan
repair_weight.update_orphan_ancestors(
@@ -1089,7 +1090,13 @@ mod test {
// Add a vote that chains back to `old_parent`, should be purged
let new_vote_slot = 100;
blockstore.add_tree(tr(*old_parent) / tr(new_vote_slot), true, true);
blockstore.add_tree(
tr(*old_parent) / tr(new_vote_slot),
true,
true,
2,
Hash::default(),
);
repair_weight.add_votes(
&blockstore,
vec![(new_vote_slot, vec![Pubkey::default()])].into_iter(),
@@ -1137,7 +1144,7 @@ mod test {
);
// Ancestors of slot 31 are [30], with no existing subtree
blockstore.add_tree(tr(30) / (tr(31)), true, true);
blockstore.add_tree(tr(30) / (tr(31)), true, true, 2, Hash::default());
assert_eq!(
repair_weight.find_ancestor_subtree_of_slot(&blockstore, 31),
(vec![30].into_iter().collect::<VecDeque<_>>(), None)
@@ -1155,7 +1162,7 @@ mod test {
// Chain orphan 8 back to slot 4 on a different fork, ancestor search
// should not return ancestors earlier than the root
blockstore.add_tree(tr(4) / (tr(8)), true, true);
blockstore.add_tree(tr(4) / (tr(8)), true, true, 2, Hash::default());
assert_eq!(
repair_weight.find_ancestor_subtree_of_slot(&blockstore, 8),
(vec![4].into_iter().collect::<VecDeque<_>>(), None)
@@ -1242,8 +1249,8 @@ mod test {
*/
let blockstore = setup_forks();
blockstore.add_tree(tr(8) / (tr(10) / (tr(11))), true, true);
blockstore.add_tree(tr(20) / (tr(22) / (tr(23))), true, true);
blockstore.add_tree(tr(8) / (tr(10) / (tr(11))), true, true, 2, Hash::default());
blockstore.add_tree(tr(20) / (tr(22) / (tr(23))), true, true, 2, Hash::default());
assert!(blockstore.orphan(8).unwrap().is_some());
blockstore
}
@@ -1265,7 +1272,7 @@ mod test {
let forks = tr(0) / (tr(1) / (tr(2) / (tr(4))) / (tr(3) / (tr(5) / (tr(6)))));
let ledger_path = get_tmp_ledger_path!();
let blockstore = Blockstore::open(&ledger_path).unwrap();
blockstore.add_tree(forks, false, true);
blockstore.add_tree(forks, false, true, 2, Hash::default());
blockstore
}
}

View File

@@ -151,6 +151,7 @@ pub mod test {
use super::*;
use solana_ledger::{get_tmp_ledger_path, shred::Shred};
use solana_runtime::bank_utils;
use solana_sdk::hash::Hash;
use trees::tr;
#[test]
@@ -247,7 +248,13 @@ pub mod test {
repairs = vec![];
let best_overall_slot = heaviest_subtree_fork_choice.best_overall_slot();
assert_eq!(heaviest_subtree_fork_choice.best_overall_slot(), 4);
blockstore.add_tree(tr(best_overall_slot) / (tr(6) / tr(7)), true, false);
blockstore.add_tree(
tr(best_overall_slot) / (tr(6) / tr(7)),
true,
false,
2,
Hash::default(),
);
get_best_repair_shreds(
&heaviest_subtree_fork_choice,
&blockstore,
@@ -301,7 +308,7 @@ pub mod test {
// Adding incomplete children with higher weighted parents, even if
// the parents are complete should still be repaired
repairs = vec![];
blockstore.add_tree(tr(2) / (tr(8)), true, false);
blockstore.add_tree(tr(2) / (tr(8)), true, false, 2, Hash::default());
get_best_repair_shreds(
&heaviest_subtree_fork_choice,
&blockstore,
@@ -323,7 +330,7 @@ pub mod test {
let (blockstore, heaviest_subtree_fork_choice) = setup_forks();
// Add a branch to slot 2, make sure it doesn't repair child
// 4 again when the Unvisited(2) event happens
blockstore.add_tree(tr(2) / (tr(6) / tr(7)), true, false);
blockstore.add_tree(tr(2) / (tr(6) / tr(7)), true, false, 2, Hash::default());
let mut repairs = vec![];
get_best_repair_shreds(
&heaviest_subtree_fork_choice,
@@ -369,7 +376,7 @@ pub mod test {
// Adding slot 2 to ignore should not remove its unexplored children from
// the repair set
repairs = vec![];
blockstore.add_tree(tr(2) / (tr(6) / tr(7)), true, false);
blockstore.add_tree(tr(2) / (tr(6) / tr(7)), true, false, 2, Hash::default());
ignore_set.insert(2);
get_best_repair_shreds(
&heaviest_subtree_fork_choice,
@@ -421,7 +428,7 @@ pub mod test {
let forks = tr(0) / (tr(1) / (tr(2) / (tr(4))) / (tr(3) / (tr(5))));
let ledger_path = get_tmp_ledger_path!();
let blockstore = Blockstore::open(&ledger_path).unwrap();
blockstore.add_tree(forks.clone(), false, false);
blockstore.add_tree(forks.clone(), false, false, 2, Hash::default());
(blockstore, HeaviestSubtreeForkChoice::new_from_tree(forks))
}

View File

@@ -1976,7 +1976,7 @@ pub(crate) mod tests {
genesis_utils::create_genesis_config_with_vote_accounts(
10_000,
&validator_authorized_voter_keypairs,
100,
vec![100; validator_authorized_voter_keypairs.len()],
);
let bank0 = Bank::new(&genesis_config);
@@ -2702,15 +2702,9 @@ pub(crate) mod tests {
#[test]
fn test_compute_bank_stats_confirmed() {
let node_keypair = Keypair::new();
let vote_keypair = Keypair::new();
let stake_keypair = Keypair::new();
let node_pubkey = node_keypair.pubkey();
let mut keypairs = HashMap::new();
keypairs.insert(
node_pubkey,
ValidatorVoteKeypairs::new(node_keypair, vote_keypair, stake_keypair),
);
let vote_keypairs = ValidatorVoteKeypairs::new_rand();
let node_pubkey = vote_keypairs.node_keypair.pubkey();
let keypairs: HashMap<_, _> = vec![(node_pubkey, vote_keypairs)].into_iter().collect();
let (bank_forks, mut progress, mut heaviest_subtree_fork_choice) =
initialize_state(&keypairs, 10_000);
@@ -3029,14 +3023,8 @@ pub(crate) mod tests {
#[test]
fn test_update_slot_propagated_threshold_from_votes() {
let keypairs: HashMap<_, _> = iter::repeat_with(|| {
let node_keypair = Keypair::new();
let vote_keypair = Keypair::new();
let stake_keypair = Keypair::new();
let node_pubkey = node_keypair.pubkey();
(
node_pubkey,
ValidatorVoteKeypairs::new(node_keypair, vote_keypair, stake_keypair),
)
let vote_keypairs = ValidatorVoteKeypairs::new_rand();
(vote_keypairs.node_keypair.pubkey(), vote_keypairs)
})
.take(10)
.collect();
@@ -3209,17 +3197,10 @@ pub(crate) mod tests {
#[test]
fn test_update_propagation_status() {
// Create genesis stakers
let node_keypair = Keypair::new();
let vote_keypair = Keypair::new();
let stake_keypair = Keypair::new();
let vote_pubkey = Arc::new(vote_keypair.pubkey());
let mut keypairs = HashMap::new();
keypairs.insert(
node_keypair.pubkey(),
ValidatorVoteKeypairs::new(node_keypair, vote_keypair, stake_keypair),
);
let vote_keypairs = ValidatorVoteKeypairs::new_rand();
let node_pubkey = vote_keypairs.node_keypair.pubkey();
let vote_pubkey = Arc::new(vote_keypairs.vote_keypair.pubkey());
let keypairs: HashMap<_, _> = vec![(node_pubkey, vote_keypairs)].into_iter().collect();
let stake = 10_000;
let (mut bank_forks, mut progress_map, _) = initialize_state(&keypairs, stake);
@@ -3301,14 +3282,8 @@ pub(crate) mod tests {
#[test]
fn test_chain_update_propagation_status() {
let keypairs: HashMap<_, _> = iter::repeat_with(|| {
let node_keypair = Keypair::new();
let vote_keypair = Keypair::new();
let stake_keypair = Keypair::new();
let node_pubkey = node_keypair.pubkey();
(
node_pubkey,
ValidatorVoteKeypairs::new(node_keypair, vote_keypair, stake_keypair),
)
let vote_keypairs = ValidatorVoteKeypairs::new_rand();
(vote_keypairs.node_keypair.pubkey(), vote_keypairs)
})
.take(10)
.collect();
@@ -3384,14 +3359,8 @@ pub(crate) mod tests {
fn test_chain_update_propagation_status2() {
let num_validators = 6;
let keypairs: HashMap<_, _> = iter::repeat_with(|| {
let node_keypair = Keypair::new();
let vote_keypair = Keypair::new();
let stake_keypair = Keypair::new();
let node_pubkey = node_keypair.pubkey();
(
node_pubkey,
ValidatorVoteKeypairs::new(node_keypair, vote_keypair, stake_keypair),
)
let vote_keypairs = ValidatorVoteKeypairs::new_rand();
(vote_keypairs.node_keypair.pubkey(), vote_keypairs)
})
.take(num_validators)
.collect();

View File

@@ -195,8 +195,11 @@ impl JsonRpcRequestProcessor {
if let Some(account) = bank.get_account(pubkey) {
if account.owner == spl_token_id_v1_0() && encoding == UiAccountEncoding::JsonParsed {
response = Some(get_parsed_token_account(bank.clone(), pubkey, account));
} else if encoding == UiAccountEncoding::Binary && account.data.len() > 128 {
let message = "Encoded binary (base 58) data should be less than 128 bytes, please use Binary64 encoding.".to_string();
} else if (encoding == UiAccountEncoding::Binary
|| encoding == UiAccountEncoding::Base58)
&& account.data.len() > 128
{
let message = "Encoded binary (base 58) data should be less than 128 bytes, please use Base64 encoding.".to_string();
return Err(error::Error {
code: error::ErrorCode::InvalidRequest,
message,
@@ -1239,7 +1242,7 @@ fn check_slice_and_encoding(encoding: &UiAccountEncoding, data_slice_is_some: bo
UiAccountEncoding::JsonParsed => {
if data_slice_is_some {
let message =
"Sliced account data can only be encoded using binary (base 58) or binary64 encoding."
"Sliced account data can only be encoded using binary (base 58) or base64 encoding."
.to_string();
Err(error::Error {
code: error::ErrorCode::InvalidRequest,
@@ -1250,7 +1253,7 @@ fn check_slice_and_encoding(encoding: &UiAccountEncoding, data_slice_is_some: bo
Ok(())
}
}
UiAccountEncoding::Binary | UiAccountEncoding::Binary64 => Ok(()),
UiAccountEncoding::Binary | UiAccountEncoding::Base58 | UiAccountEncoding::Base64 => Ok(()),
}
}
@@ -1353,9 +1356,7 @@ fn get_token_program_id_and_mint(
/// program_id) and decimals
fn get_mint_owner_and_decimals(bank: &Arc<Bank>, mint: &Pubkey) -> Result<(Pubkey, u8)> {
if mint == &spl_token_v1_0_native_mint() {
// Uncomment the following once spl_token is bumped to a version that includes native_mint::DECIMALS
// Ok((spl_token_id_v1_0(), spl_token_v1_0::native_mint::DECIMALS))
Ok((spl_token_id_v1_0(), 9))
Ok((spl_token_id_v1_0(), spl_token_v1_0::native_mint::DECIMALS))
} else {
let mint_account = bank.get_account(mint).ok_or_else(|| {
Error::invalid_params("Invalid param: could not find mint".to_string())
@@ -3073,13 +3074,13 @@ pub mod tests {
"result": {
"context":{"slot":0},
"value":{
"owner": "11111111111111111111111111111111",
"lamports": 20,
"data": "",
"executable": false,
"rentEpoch": 0
},
"owner": "11111111111111111111111111111111",
"lamports": 20,
"data": "",
"executable": false,
"rentEpoch": 0
},
},
"id": 1,
});
let expected: Response =
@@ -3095,16 +3096,7 @@ pub mod tests {
bank.store_account(&address, &account);
let req = format!(
r#"{{"jsonrpc":"2.0","id":1,"method":"getAccountInfo","params":["{}", {{"encoding":"binary64"}}]}}"#,
address
);
let res = io.handle_request_sync(&req, meta.clone());
let result: Value = serde_json::from_str(&res.expect("actual response"))
.expect("actual response deserialization");
assert_eq!(result["result"]["value"]["data"], base64::encode(&data));
let req = format!(
r#"{{"jsonrpc":"2.0","id":1,"method":"getAccountInfo","params":["{}", {{"encoding":"binary64", "dataSlice": {{"length": 2, "offset": 1}}}}]}}"#,
r#"{{"jsonrpc":"2.0","id":1,"method":"getAccountInfo","params":["{}", {{"encoding":"base64"}}]}}"#,
address
);
let res = io.handle_request_sync(&req, meta.clone());
@@ -3112,7 +3104,19 @@ pub mod tests {
.expect("actual response deserialization");
assert_eq!(
result["result"]["value"]["data"],
base64::encode(&data[1..3]),
json!([base64::encode(&data), "base64"]),
);
let req = format!(
r#"{{"jsonrpc":"2.0","id":1,"method":"getAccountInfo","params":["{}", {{"encoding":"base64", "dataSlice": {{"length": 2, "offset": 1}}}}]}}"#,
address
);
let res = io.handle_request_sync(&req, meta.clone());
let result: Value = serde_json::from_str(&res.expect("actual response"))
.expect("actual response deserialization");
assert_eq!(
result["result"]["value"]["data"],
json!([base64::encode(&data[1..3]), "base64"]),
);
let req = format!(
@@ -4327,7 +4331,7 @@ pub mod tests {
for TransactionWithStatusMeta { transaction, meta } in
confirmed_block.transactions.into_iter()
{
if let EncodedTransaction::Binary(transaction) = transaction {
if let EncodedTransaction::LegacyBinary(transaction) = transaction {
let decoded_transaction: Transaction =
deserialize(&bs58::decode(&transaction).into_vec().unwrap()).unwrap();
if decoded_transaction.signatures[0] == confirmed_block_signatures[0] {

View File

@@ -986,11 +986,13 @@ mod tests {
BlockCommitmentCache::new_for_tests_with_blockstore(blockstore.clone()),
));
let validator_voting_keypairs: Vec<_> = (0..10)
.map(|_| ValidatorVoteKeypairs::new(Keypair::new(), Keypair::new(), Keypair::new()))
.collect();
let GenesisConfigInfo { genesis_config, .. } =
create_genesis_config_with_vote_accounts(10_000, &validator_voting_keypairs, 100);
let validator_voting_keypairs: Vec<_> =
(0..10).map(|_| ValidatorVoteKeypairs::new_rand()).collect();
let GenesisConfigInfo { genesis_config, .. } = create_genesis_config_with_vote_accounts(
10_000,
&validator_voting_keypairs,
vec![100; validator_voting_keypairs.len()],
);
let exit = Arc::new(AtomicBool::new(false));
let bank = Bank::new(&genesis_config);
let bank_forks = BankForks::new(bank);

View File

@@ -849,6 +849,8 @@ impl TestValidator {
} = create_genesis_config_with_leader_ex(
mint_lamports,
&contact_info.id,
&Keypair::new(),
&Pubkey::new_rand(),
42,
bootstrap_validator_lamports,
);
@@ -865,17 +867,17 @@ impl TestValidator {
let (ledger_path, blockhash) = create_new_tmp_ledger!(&genesis_config);
let leader_voting_keypair = Arc::new(voting_keypair);
let config = ValidatorConfig {
rpc_ports: Some((node.info.rpc.port(), node.info.rpc_pubsub.port())),
..ValidatorConfig::default()
};
let vote_pubkey = voting_keypair.pubkey();
let node = Validator::new(
node,
&node_keypair,
&ledger_path,
&leader_voting_keypair.pubkey(),
vec![leader_voting_keypair.clone()],
&voting_keypair.pubkey(),
vec![Arc::new(voting_keypair)],
None,
true,
&config,
@@ -887,7 +889,7 @@ impl TestValidator {
alice: mint_keypair,
ledger_path,
genesis_hash: blockhash,
vote_pubkey: leader_voting_keypair.pubkey(),
vote_pubkey,
}
}
}

View File

@@ -29,13 +29,12 @@ fn test_node(exit: &Arc<AtomicBool>) -> (Arc<ClusterInfo>, GossipService, UdpSoc
}
fn test_node_with_bank(
node_keypair: Keypair,
node_keypair: Arc<Keypair>,
exit: &Arc<AtomicBool>,
bank_forks: Arc<RwLock<BankForks>>,
) -> (Arc<ClusterInfo>, GossipService, UdpSocket) {
let keypair = Arc::new(node_keypair);
let mut test_node = Node::new_localhost_with_pubkey(&keypair.pubkey());
let cluster_info = Arc::new(ClusterInfo::new(test_node.info.clone(), keypair));
let mut test_node = Node::new_localhost_with_pubkey(&node_keypair.pubkey());
let cluster_info = Arc::new(ClusterInfo::new(test_node.info.clone(), node_keypair));
let gossip_service = GossipService::new(
&cluster_info,
Some(bank_forks),
@@ -224,13 +223,19 @@ pub fn cluster_info_scale() {
let vote_keypairs: Vec<_> = (0..num_nodes)
.map(|_| ValidatorVoteKeypairs::new_rand())
.collect();
let genesis_config_info = create_genesis_config_with_vote_accounts(10_000, &vote_keypairs, 100);
let genesis_config_info = create_genesis_config_with_vote_accounts(
10_000,
&vote_keypairs,
vec![100; vote_keypairs.len()],
);
let bank0 = Bank::new(&genesis_config_info.genesis_config);
let bank_forks = Arc::new(RwLock::new(BankForks::new(bank0)));
let nodes: Vec<_> = vote_keypairs
.into_iter()
.map(|keypairs| test_node_with_bank(keypairs.node_keypair, &exit, bank_forks.clone()))
.map(|keypairs| {
test_node_with_bank(Arc::new(keypairs.node_keypair), &exit, bank_forks.clone())
})
.collect();
let ci0 = nodes[0].0.my_contact_info();
for node in &nodes[1..] {

View File

@@ -103,7 +103,7 @@ fn test_rpc_send_tx() {
use solana_account_decoder::UiAccountEncoding;
use solana_client::rpc_config::RpcAccountInfoConfig;
let config = RpcAccountInfoConfig {
encoding: Some(UiAccountEncoding::Binary64),
encoding: Some(UiAccountEncoding::Base64),
commitment: None,
data_slice: None,
};

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-crate-features"
version = "1.2.24"
version = "1.2.26"
description = "Solana Crate Features"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"

View File

@@ -157,9 +157,9 @@ Returns all information associated with the account of provided Pubkey
- `<string>` - Pubkey of account to query, as base-58 encoded string
- `<object>` - (optional) Configuration object containing the following optional fields:
- (optional) [Commitment](jsonrpc-api.md#configuring-state-commitment)
- (optional) `encoding: <string>` - encoding for Account data, either "binary", "binary64", or jsonParsed". If parameter not provided, the default encoding is "binary". "binary" is base-58 encoded and limited to Account data of less than 128 bytes. "binary64" will return base64 encoded data for Account data of any size.
Parsed-JSON encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If parsed-JSON is requested but a parser cannot be found, the field falls back to binary encoding, detectable when the `data` field is type `<string>`. **jsonParsed encoding is UNSTABLE**
- (optional) `dataSlice: <object>` - limit the returned account data using the provided `offset: <usize>` and `length: <usize>` fields; only available for "binary" or "binary64" encoding.
- `encoding: <string>` - encoding for Account data, either "base58" (*slow*), "base64", or jsonParsed". "base58" is limited to Account data of less than 128 bytes. "base64" will return base64 encoded data for Account data of any size.
Parsed-JSON encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If parsed-JSON is requested but a parser cannot be found, the field falls back to base64 encoding, detectable when the `data` field is type `<string>`. **jsonParsed encoding is UNSTABLE**
- (optional) `dataSlice: <object>` - limit the returned account data using the provided `offset: <usize>` and `length: <usize>` fields; only available for "base58" or "base64" encoding.
#### Results:
@@ -169,7 +169,7 @@ The result will be an RpcResponse JSON object with `value` equal to:
- `<object>` - otherwise, a JSON object containing:
- `lamports: <u64>`, number of lamports assigned to this account, as a u64
- `owner: <string>`, base-58 encoded Pubkey of the program this account has been assigned to
- `data: <string|object>`, data associated with the account, either as base-58 encoded binary data or JSON format `{<program>: <state>}`, depending on encoding parameter
- `data: <[string, encoding]|object>`, data associated with the account, either as encoded binary data or JSON format `{<program>: <state>}`, depending on encoding parameter
- `executable: <bool>`, boolean indicating if the account contains a program \(and is strictly read-only\)
- `rentEpoch: <u64>`, the epoch at which this account will next owe rent, as u64
@@ -177,10 +177,10 @@ The result will be an RpcResponse JSON object with `value` equal to:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"getAccountInfo", "params":["4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA"]}' http://localhost:8899
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"getAccountInfo", "params":["vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",{"encoding": "base58"}]}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":{"context":{"slot":1},"value":{"data":"11116bv5nS2h3y12kD1yUKeMZvGcKLSjQgX6BeV7u1FrjeJcKfsHRTPuR3oZ1EioKtYGiYxpxMG5vpbZLsbcBYBEmZZcMKaSoGx9JZeAuWf","executable":false,"lamports":1000000000,"owner":"11111111111111111111111111111111","rentEpoch":2}},"id":1}
{"jsonrpc":"2.0","result":{"context":{"slot":1},"value":{"data":["11116bv5nS2h3y12kD1yUKeMZvGcKLSjQgX6BeV7u1FrjeJcKfsHRTPuR3oZ1EioKtYGiYxpxMG5vpbZLsbcBYBEmZZcMKaSoGx9JZeAuWf","base58"],"executable":false,"lamports":1000000000,"owner":"11111111111111111111111111111111","rentEpoch":2}},"id":1}
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"getAccountInfo", "params":["4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA",{"encoding":"json"}]}' http://localhost:8899
@@ -307,7 +307,7 @@ Returns identity and transaction information about a confirmed block in the ledg
#### Parameters:
- `<u64>` - slot, as u64 integer
- `<string>` - (optional) encoding for each returned Transaction, either "json", "jsonParsed", or "binary". If parameter not provided, the default encoding is JSON. **jsonParsed encoding is UNSTABLE**
- `<string>` - encoding for each returned Transaction, either "json", "jsonParsed", "base58" (*slow*), or "base64". If parameter not provided, the default encoding is JSON. **jsonParsed encoding is UNSTABLE**
Parsed-JSON encoding attempts to use program-specific instruction parsers to return more human-readable and explicit data in the `transaction.message.instructions` list. If parsed-JSON is requested but a parser cannot be found, the instruction falls back to regular JSON encoding (`accounts`, `data`, and `programIdIndex` fields).
#### Results:
@@ -320,7 +320,7 @@ The result field will be an object with the following fields:
- `previousBlockhash: <string>` - the blockhash of this block's parent, as base-58 encoded string; if the parent block is not available due to ledger cleanup, this field will return "11111111111111111111111111111111"
- `parentSlot: <u64>` - the slot index of this block's parent
- `transactions: <array>` - an array of JSON objects containing:
- `transaction: <object|string>` - [Transaction](#transaction-structure) object, either in JSON format or base-58 encoded binary data, depending on encoding parameter
- `transaction: <object|[string,encoding]>` - [Transaction](#transaction-structure) object, either in JSON format or encoded binary data, depending on encoding parameter
- `meta: <object>` - transaction status metadata object, containing `null` or:
- `err: <object | null>` - Error if transaction failed, null if transaction succeeded. [TransactionError definitions](https://github.com/solana-labs/solana/blob/master/sdk/src/transaction.rs#L14)
- `fee: <u64>` - fee this transaction was charged, as u64 integer
@@ -341,13 +341,13 @@ The result field will be an object with the following fields:
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0","id":1,"method":"getConfirmedBlock","params":[430, "json"]}' localhost:8899
// Result
{"jsonrpc":"2.0","result":{"blockhash":"Gp3t5bfDsJv1ovP8cB1SuRhXVuoTqDv7p3tymyubYg5","parentSlot":429,"previousBlockhash":"EFejToxii1L5aUF2NrK9dsbAEmZSNyN5nsipmZHQR1eA","transactions":[{"transaction":{"message":{"accountKeys":["6H94zdiaYfRfPfKjYLjyr2VFBg6JHXygy84r3qhc3NsC","39UAy8hsoYPywGPGdmun747omSr79zLSjqvPJN3zetoH","SysvarS1otHashes111111111111111111111111111","SysvarC1ock11111111111111111111111111111111","Vote111111111111111111111111111111111111111"],"header":{"numReadonlySignedAccounts":0,"numReadonlyUnsignedAccounts":3,"numRequiredSignatures":2},"instructions":[{"accounts":[1,2,3],"data":"29z5mr1JoRmJYQ6ynmk3pf31cGFRziAF1M3mT3L6sFXf5cKLdkEaMXMT8AqLpD4CpcupHmuMEmtZHpomrwfdZetSomNy3d","programIdIndex":4}],"recentBlockhash":"EFejToxii1L5aUF2NrK9dsbAEmZSNyN5nsipmZHQR1eA"},"signatures":["35YGay1Lwjwgxe9zaH6APSHbt9gYQUCtBWTNL3aVwVGn9xTFw2fgds7qK5AL29mP63A9j3rh8KpN1TgSR62XCaby","4vANMjSKiwEchGSXwVrQkwHnmsbKQmy9vdrsYxWdCup1bLsFzX8gKrFTSVDCZCae2dbxJB9mPNhqB2sD1vvr4sAD"]},"meta":{"err":null,"fee":18000,"postBalances":[499999972500,15298080,1,1,1],"preBalances":[499999990500,15298080,1,1,1],"status":{"Ok":null}}}]},"id":1}
{"jsonrpc":"2.0","result":{"blockTime":null,"blockhash":"3Eq21vXNB5s86c62bVuUfTeaMif1N2kUqRPBmGRJhyTA","parentSlot":429,"previousBlockhash":"mfcyqEXB3DnHXki6KjjmZck6YjmZLvpAByy2fj4nh6B","rewards":[],"transactions":[{"meta":{"err":null,"fee":5000,"postBalances":[499998932500,26858640,1,1,1],"preBalances":[499998937500,26858640,1,1,1],"status":{"Ok":null}},"transaction":{"message":{"accountKeys":["3UVYmECPPMZSCqWKfENfuoTv51fTDTWicX9xmBD2euKe","AjozzgE83A3x1sHNUR64hfH7zaEBWeMaFuAN9kQgujrc","SysvarS1otHashes111111111111111111111111111","SysvarC1ock11111111111111111111111111111111","Vote111111111111111111111111111111111111111"],"header":{"numReadonlySignedAccounts":0,"numReadonlyUnsignedAccounts":3,"numRequiredSignatures":1},"instructions":[{"accounts":[1,2,3,0],"data":"37u9WtQpcm6ULa3WRQHmj49EPs4if7o9f1jSRVZpm2dvihR9C8jY4NqEwXUbLwx15HBSNcP1","programIdIndex":4}],"recentBlockhash":"mfcyqEXB3DnHXki6KjjmZck6YjmZLvpAByy2fj4nh6B"},"signatures":["2nBhEBYYvfaAe16UMNqRHre4YNSskvuYgx3M6E4JP1oDYvZEJHvoPzyUidNgNX5r9sTyN1J9UxtbCXy2rqYcuyuv"]}}]},"id":1}
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0","id":1,"method":"getConfirmedBlock","params":[430, "binary"]}' localhost:8899
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0","id":1,"method":"getConfirmedBlock","params":[430, "base64"]}' localhost:8899
// Result
{"jsonrpc":"2.0","result":{"blockhash":"Gp3t5bfDsJv1ovP8cB1SuRhXVuoTqDv7p3tymyubYg5","parentSlot":429,"previousBlockhash":"EFejToxii1L5aUF2NrK9dsbAEmZSNyN5nsipmZHQR1eA","transactions":[{"transaction":"81UZJt4dh4Do66jDhrgkQudS8J2N6iG3jaVav7gJrqJSFY4Ug53iA9JFJZh2gxKWcaFdLJwhHx9mRdg9JwDAWB4ywiu5154CRwXV4FMdnPLg7bhxRLwhhYaLsVgMF5AyNRcTzjCVoBvqFgDU7P8VEKDEiMvD3qxzm1pLZVxDG1LTQpT3Dz4Uviv4KQbFQNuC22KupBoyHFB7Zh6KFdMqux4M9PvhoqcoJsJKwXjWpKu7xmEKnnrSbfLadkgjBmmjhW3fdTrFvnhQdTkhtdJxUL1xS9GMuJQer8YgSKNtUXB1eXZQwXU8bU2BjYkZE6Q5Xww8hu9Z4E4Mo4QsooVtHoP6BM3NKw8zjVbWfoCQqxTrwuSzrNCWCWt58C24LHecH67CTt2uXbYSviixvrYkK7A3t68BxTJcF1dXJitEPTFe2ceTkauLJqrJgnER4iUrsjr26T8YgWvpY9wkkWFSviQW6wV5RASTCUasVEcrDiaKj8EQMkgyDoe9HyKitSVg67vMWJFpUXpQobseWJUs5FTWWzmfHmFp8FZ","meta":{"err":null,"fee":18000,"postBalances":[499999972500,15298080,1,1,1],"preBalances":[499999990500,15298080,1,1,1],"status":{"Ok":null}}}]},"id":1}
{"jsonrpc":"2.0","result":{"blockTime":null,"blockhash":"3Eq21vXNB5s86c62bVuUfTeaMif1N2kUqRPBmGRJhyTA","parentSlot":429,"previousBlockhash":"mfcyqEXB3DnHXki6KjjmZck6YjmZLvpAByy2fj4nh6B","rewards":[],"transactions":[{"meta":{"err":null,"fee":5000,"postBalances":[499998932500,26858640,1,1,1],"preBalances":[499998937500,26858640,1,1,1],"status":{"Ok":null}},"transaction":["AVj7dxHlQ9IrvdYVIjuiRFs1jLaDMHixgrv+qtHBwz51L4/ImLZhszwiyEJDIp7xeBSpm/TX5B7mYzxa+fPOMw0BAAMFJMJVqLw+hJYheizSoYlLm53KzgT82cDVmazarqQKG2GQsLgiqktA+a+FDR4/7xnDX7rsusMwryYVUdixfz1B1Qan1RcZLwqvxvJl4/t3zHragsUp0L47E24tAFUgAAAABqfVFxjHdMkoVmOYaR1etoteuKObS21cc1VbIQAAAAAHYUgdNXR0u3xNdiTr072z2DVec9EQQ/wNo1OAAAAAAAtxOUhPBp2WSjUNJEgfvy70BbxI00fZyEPvFHNfxrtEAQQEAQIDADUCAAAAAQAAAAAAAACtAQAAAAAAAAdUE18R96XTJCe+YfRfUp6WP+YKCy/72ucOL8AoBFSpAA==","base64"]}]},"id":1}
```
#### Transaction Structure
@@ -465,14 +465,14 @@ Returns transaction details for a confirmed transaction
- `<string>` - transaction signature as base-58 encoded string
N encoding attempts to use program-specific instruction parsers to return more human-readable and explicit data in the `transaction.message.instructions` list. If parsed-JSON is requested but a parser cannot be found, the instruction falls back to regular JSON encoding (`accounts`, `data`, and `programIdIndex` fields).
- `<string>` - (optional) encoding for the returned Transaction, either "json", "jsonParsed", or "binary". **jsonParsed encoding is UNSTABLE**
- `<string>` - (optional) encoding for the returned Transaction, either "json", "jsonParsed", "base58" (*slow*), or "base64". If parameter not provided, the default encoding is JSON. **jsonParsed encoding is UNSTABLE**
#### Results:
- `<null>` - if transaction is not found or not confirmed
- `<object>` - if transaction is confirmed, an object with the following fields:
- `slot: <u64>` - the slot this transaction was processed in
- `transaction: <object|string>` - [Transaction](#transaction-structure) object, either in JSON format or base-58 encoded binary data, depending on encoding parameter
- `transaction: <object|[string,encoding]>` - [Transaction](#transaction-structure) object, either in JSON format or encoded binary data, depending on encoding parameter
- `meta: <object | null>` - transaction status metadata object:
- `err: <object | null>` - Error if transaction failed, null if transaction succeeded. [TransactionError definitions](https://github.com/solana-labs/solana/blob/master/sdk/src/transaction.rs#L14)
- `fee: <u64>` - fee this transaction was charged, as u64 integer
@@ -486,16 +486,16 @@ N encoding attempts to use program-specific instruction parsers to return more h
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0","id":1,"method":"getConfirmedTransaction","params":["35YGay1Lwjwgxe9zaH6APSHbt9gYQUCtBWTNL3aVwVGn9xTFw2fgds7qK5AL29mP63A9j3rh8KpN1TgSR62XCaby", "json"]}' localhost:8899
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0","id":1,"method":"getConfirmedTransaction","params":["2nBhEBYYvfaAe16UMNqRHre4YNSskvuYgx3M6E4JP1oDYvZEJHvoPzyUidNgNX5r9sTyN1J9UxtbCXy2rqYcuyuv", "json"]}' localhost:8899
// Result
{"jsonrpc":"2.0","result":{"slot":430,"transaction":{"message":{"accountKeys":["6H94zdiaYfRfPfKjYLjyr2VFBg6JHXygy84r3qhc3NsC","39UAy8hsoYPywGPGdmun747omSr79zLSjqvPJN3zetoH","SysvarS1otHashes111111111111111111111111111","SysvarC1ock11111111111111111111111111111111","Vote111111111111111111111111111111111111111"],"header":{"numReadonlySignedAccounts":0,"numReadonlyUnsignedAccounts":3,"numRequiredSignatures":2},"instructions":[{"accounts":[1,2,3],"data":"29z5mr1JoRmJYQ6ynmk3pf31cGFRziAF1M3mT3L6sFXf5cKLdkEaMXMT8AqLpD4CpcupHmuMEmtZHpomrwfdZetSomNy3d","programIdIndex":4}],"recentBlockhash":"EFejToxii1L5aUF2NrK9dsbAEmZSNyN5nsipmZHQR1eA"},"signatures":["35YGay1Lwjwgxe9zaH6APSHbt9gYQUCtBWTNL3aVwVGn9xTFw2fgds7qK5AL29mP63A9j3rh8KpN1TgSR62XCaby","4vANMjSKiwEchGSXwVrQkwHnmsbKQmy9vdrsYxWdCup1bLsFzX8gKrFTSVDCZCae2dbxJB9mPNhqB2sD1vvr4sAD"]},"meta":{"err":null,"fee":18000,"postBalances":[499999972500,15298080,1,1,1],"preBalances":[499999990500,15298080,1,1,1],"status":{"Ok":null}}},"id":1}
{"jsonrpc":"2.0","result":{"meta":{"err":null,"fee":5000,"postBalances":[499998932500,26858640,1,1,1],"preBalances":[499998937500,26858640,1,1,1],"status":{"Ok":null}},"slot":430,"transaction":{"message":{"accountKeys":["3UVYmECPPMZSCqWKfENfuoTv51fTDTWicX9xmBD2euKe","AjozzgE83A3x1sHNUR64hfH7zaEBWeMaFuAN9kQgujrc","SysvarS1otHashes111111111111111111111111111","SysvarC1ock11111111111111111111111111111111","Vote111111111111111111111111111111111111111"],"header":{"numReadonlySignedAccounts":0,"numReadonlyUnsignedAccounts":3,"numRequiredSignatures":1},"instructions":[{"accounts":[1,2,3,0],"data":"37u9WtQpcm6ULa3WRQHmj49EPs4if7o9f1jSRVZpm2dvihR9C8jY4NqEwXUbLwx15HBSNcP1","programIdIndex":4}],"recentBlockhash":"mfcyqEXB3DnHXki6KjjmZck6YjmZLvpAByy2fj4nh6B"},"signatures":["2nBhEBYYvfaAe16UMNqRHre4YNSskvuYgx3M6E4JP1oDYvZEJHvoPzyUidNgNX5r9sTyN1J9UxtbCXy2rqYcuyuv"]}},"id":1}
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0","id":1,"method":"getConfirmedTransaction","params":["35YGay1Lwjwgxe9zaH6APSHbt9gYQUCtBWTNL3aVwVGn9xTFw2fgds7qK5AL29mP63A9j3rh8KpN1TgSR62XCaby", "binary"]}' localhost:8899
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0","id":1,"method":"getConfirmedTransaction","params":["2nBhEBYYvfaAe16UMNqRHre4YNSskvuYgx3M6E4JP1oDYvZEJHvoPzyUidNgNX5r9sTyN1J9UxtbCXy2rqYcuyuv", "base64"]}' localhost:8899
// Result
{"jsonrpc":"2.0","result":{"slot":430,"transaction":"81UZJt4dh4Do66jDhrgkQudS8J2N6iG3jaVav7gJrqJSFY4Ug53iA9JFJZh2gxKWcaFdLJwhHx9mRdg9JwDAWB4ywiu5154CRwXV4FMdnPLg7bhxRLwhhYaLsVgMF5AyNRcTzjCVoBvqFgDU7P8VEKDEiMvD3qxzm1pLZVxDG1LTQpT3Dz4Uviv4KQbFQNuC22KupBoyHFB7Zh6KFdMqux4M9PvhoqcoJsJKwXjWpKu7xmEKnnrSbfLadkgjBmmjhW3fdTrFvnhQdTkhtdJxUL1xS9GMuJQer8YgSKNtUXB1eXZQwXU8bU2BjYkZE6Q5Xww8hu9Z4E4Mo4QsooVtHoP6BM3NKw8zjVbWfoCQqxTrwuSzrNCWCWt58C24LHecH67CTt2uXbYSviixvrYkK7A3t68BxTJcF1dXJitEPTFe2ceTkauLJqrJgnER4iUrsjr26T8YgWvpY9wkkWFSviQW6wV5RASTCUasVEcrDiaKj8EQMkgyDoe9HyKitSVg67vMWJFpUXpQobseWJUs5FTWWzmfHmFp8FZ","meta":{"err":null,"fee":18000,"postBalances":[499999972500,15298080,1,1,1],"preBalances":[499999990500,15298080,1,1,1],"status":{"Ok":null}}},"id":1}
{"jsonrpc":"2.0","result":{"meta":{"err":null,"fee":5000,"postBalances":[499998932500,26858640,1,1,1],"preBalances":[499998937500,26858640,1,1,1],"status":{"Ok":null}},"slot":430,"transaction":["AVj7dxHlQ9IrvdYVIjuiRFs1jLaDMHixgrv+qtHBwz51L4/ImLZhszwiyEJDIp7xeBSpm/TX5B7mYzxa+fPOMw0BAAMFJMJVqLw+hJYheizSoYlLm53KzgT82cDVmazarqQKG2GQsLgiqktA+a+FDR4/7xnDX7rsusMwryYVUdixfz1B1Qan1RcZLwqvxvJl4/t3zHragsUp0L47E24tAFUgAAAABqfVFxjHdMkoVmOYaR1etoteuKObS21cc1VbIQAAAAAHYUgdNXR0u3xNdiTr072z2DVec9EQQ/wNo1OAAAAAAAtxOUhPBp2WSjUNJEgfvy70BbxI00fZyEPvFHNfxrtEAQQEAQIDADUCAAAAAQAAAAAAAACtAQAAAAAAAAdUE18R96XTJCe+YfRfUp6WP+YKCy/72ucOL8AoBFSpAA==","base64"]},"id":1}
```
### getEpochInfo
@@ -845,9 +845,9 @@ Returns all accounts owned by the provided program Pubkey
- `<string>` - Pubkey of program, as base-58 encoded string
- `<object>` - (optional) Configuration object containing the following optional fields:
- (optional) [Commitment](jsonrpc-api.md#configuring-state-commitment)
- (optional) `encoding: <string>` - encoding for Account data, either "binary" or jsonParsed". If parameter not provided, the default encoding is binary.
Parsed-JSON encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If parsed-JSON is requested but a parser cannot be found, the field falls back to binary encoding, detectable when the `data` field is type `<string>`. **jsonParsed encoding is UNSTABLE**
- (optional) `dataSlice: <object>` - limit the returned account data using the provided `offset: <usize>` and `length: <usize>` fields; only available for "binary" or "binary64" encoding.
- `encoding: <string>` - encoding for Account data, either "base58" (*slow*), "base64" or jsonParsed".
Parsed-JSON encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If parsed-JSON is requested but a parser cannot be found, the field falls back to base64 encoding, detectable when the `data` field is type `<string>`. **jsonParsed encoding is UNSTABLE**
- (optional) `dataSlice: <object>` - limit the returned account data using the provided `offset: <usize>` and `length: <usize>` fields; only available for "base58" or "base64" encoding.
- (optional) `filters: <array>` - filter results using various [filter objects](jsonrpc-api.md#filters); account must meet all filter criteria to be included in results
##### Filters:
@@ -865,7 +865,7 @@ The result field will be an array of JSON objects, which will contain:
- `account: <object>` - a JSON object, with the following sub fields:
- `lamports: <u64>`, number of lamports assigned to this account, as a u64
- `owner: <string>`, base-58 encoded Pubkey of the program this account has been assigned to
`data: <string|object>`, data associated with the account, either as base-58 encoded binary data or JSON format `{<program>: <state>}`, depending on encoding parameter
`data: <[string,encoding]|object>`, data associated with the account, either as encoded binary data or JSON format `{<program>: <state>}`, depending on encoding parameter
- `executable: <bool>`, boolean indicating if the account contains a program \(and is strictly read-only\)
- `rentEpoch: <u64>`, the epoch at which this account will next owe rent, as u64
@@ -1100,9 +1100,9 @@ Returns all SPL Token accounts by approved Delegate. **UNSTABLE**
* `programId: <string>` - Pubkey of the Token program ID that owns the accounts, as base-58 encoded string
- `<object>` - (optional) Configuration object containing the following optional fields:
- (optional) [Commitment](jsonrpc-api.md#configuring-state-commitment)
- (optional) `encoding: <string>` - encoding for Account data, either "binary" or jsonParsed". If parameter not provided, the default encoding is binary.
- `encoding: <string>` - encoding for Account data, either "base58" (*slow*), "base64" or jsonParsed".
Parsed-JSON encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If parsed-JSON is requested but a parser cannot be found, the field falls back to binary encoding, detectable when the `data` field is type `<string>`. **jsonParsed encoding is UNSTABLE**
- (optional) `dataSlice: <object>` - limit the returned account data using the provided `offset: <usize>` and `length: <usize>` fields; only available for "binary" or "binary64" encoding.
- (optional) `dataSlice: <object>` - limit the returned account data using the provided `offset: <usize>` and `length: <usize>` fields; only available for "base58" or "base64" encoding.
#### Results:
@@ -1112,7 +1112,7 @@ The result will be an RpcResponse JSON object with `value` equal to an array of
- `account: <object>` - a JSON object, with the following sub fields:
- `lamports: <u64>`, number of lamports assigned to this account, as a u64
- `owner: <string>`, base-58 encoded Pubkey of the program this account has been assigned to
- `data: <object>`, Token state data associated with the account, either as base-58 encoded binary data or in JSON format `{<program>: <state>}`
- `data: <object>`, Token state data associated with the account, either as encoded binary data or in JSON format `{<program>: <state>}`
- `executable: <bool>`, boolean indicating if the account contains a program \(and is strictly read-only\)
- `rentEpoch: <u64>`, the epoch at which this account will next owe rent, as u64
@@ -1137,9 +1137,9 @@ Returns all SPL Token accounts by token owner. **UNSTABLE**
* `programId: <string>` - Pubkey of the Token program ID that owns the accounts, as base-58 encoded string
- `<object>` - (optional) Configuration object containing the following optional fields:
- (optional) [Commitment](jsonrpc-api.md#configuring-state-commitment)
- (optional) `encoding: <string>` - encoding for Account data, either "binary" or jsonParsed". If parameter not provided, the default encoding is binary.
- `encoding: <string>` - encoding for Account data, either "base58" (*slow*), "base64" or jsonParsed".
Parsed-JSON encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If parsed-JSON is requested but a parser cannot be found, the field falls back to binary encoding, detectable when the `data` field is type `<string>`. **jsonParsed encoding is UNSTABLE**
- (optional) `dataSlice: <object>` - limit the returned account data using the provided `offset: <usize>` and `length: <usize>` fields; only available for "binary" or "binary64" encoding.
- (optional) `dataSlice: <object>` - limit the returned account data using the provided `offset: <usize>` and `length: <usize>` fields; only available for "base58" or "base64" encoding.
#### Results:
@@ -1149,7 +1149,7 @@ The result will be an RpcResponse JSON object with `value` equal to an array of
- `account: <object>` - a JSON object, with the following sub fields:
- `lamports: <u64>`, number of lamports assigned to this account, as a u64
- `owner: <string>`, base-58 encoded Pubkey of the program this account has been assigned to
- `data: <object>`, Token state data associated with the account, either as base-58 encoded binary data or in JSON format `{<program>: <state>}`
- `data: <object>`, Token state data associated with the account, either as encoded binary data or in JSON format `{<program>: <state>}`
- `executable: <bool>`, boolean indicating if the account contains a program \(and is strictly read-only\)
- `rentEpoch: <u64>`, the epoch at which this account will next owe rent, as u64
@@ -1257,7 +1257,7 @@ The result field will be a JSON object with the following fields:
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getVersion"}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":{"solana-core": "1.2.24"},"id":1}
{"jsonrpc":"2.0","result":{"solana-core": "1.2.26"},"id":1}
```
### getVoteAccounts
@@ -1457,7 +1457,7 @@ Subscribe to an account to receive notifications when the lamports or data for a
- `<string>` - account Pubkey, as base-58 encoded string
- `<object>` - (optional) Configuration object containing the following optional fields:
- `<object>` - (optional) [Commitment](jsonrpc-api.md#configuring-state-commitment)
- (optional) `encoding: <string>` - encoding for Account data, either "binary" or jsonParsed". If parameter not provided, the default encoding is binary.
- `encoding: <string>` - encoding for Account data, either "base58" (*slow*), "base64" or jsonParsed".
Parsed-JSON encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If parsed-JSON is requested but a parser cannot be found, the field falls back to binary encoding, detectable when the `data` field is type `<string>`. **jsonParsed encoding is UNSTABLE**
#### Results:
@@ -1468,9 +1468,9 @@ Subscribe to an account to receive notifications when the lamports or data for a
```bash
// Request
{"jsonrpc":"2.0", "id":1, "method":"accountSubscribe", "params":["CM78CPUeXjn8o3yroDHxUtKsZZgoy4GPkPPXfouKNH12"]}
{"jsonrpc":"2.0", "id":1, "method":"accountSubscribe", "params":["CM78CPUeXjn8o3yroDHxUtKsZZgoy4GPkPPXfouKNH12", {"encoding":"base58"}]}
{"jsonrpc":"2.0", "id":1, "method":"accountSubscribe", "params":["CM78CPUeXjn8o3yroDHxUtKsZZgoy4GPkPPXfouKNH12", {"commitment": "single"}]}
{"jsonrpc":"2.0", "id":1, "method":"accountSubscribe", "params":["CM78CPUeXjn8o3yroDHxUtKsZZgoy4GPkPPXfouKNH12", {"encoding":"base64", "commitment": "single"}]}
{"jsonrpc":"2.0", "id":1, "method":"accountSubscribe", "params":["CM78CPUeXjn8o3yroDHxUtKsZZgoy4GPkPPXfouKNH12", {"encoding":"jsonParsed"}]}
@@ -1481,7 +1481,7 @@ Subscribe to an account to receive notifications when the lamports or data for a
#### Notification Format:
```bash
// Binary encoding
// Base58 encoding
{
"jsonrpc": "2.0",
"method": "accountNotification",
@@ -1491,7 +1491,7 @@ Subscribe to an account to receive notifications when the lamports or data for a
"slot": 5199307
},
"value": {
"data": "11116bv5nS2h3y12kD1yUKeMZvGcKLSjQgX6BeV7u1FrjeJcKfsHPXHRDEHrBesJhZyqnnq9qJeUuF7WHxiuLuL5twc38w2TXNLxnDbjmuR",
"data": ["11116bv5nS2h3y12kD1yUKeMZvGcKLSjQgX6BeV7u1FrjeJcKfsHPXHRDEHrBesJhZyqnnq9qJeUuF7WHxiuLuL5twc38w2TXNLxnDbjmuR", "base58"],
"executable": false,
"lamports": 33594,
"owner": "11111111111111111111111111111111",
@@ -1567,8 +1567,8 @@ Subscribe to a program to receive notifications when the lamports or data for a
- `<string>` - program_id Pubkey, as base-58 encoded string
- `<object>` - (optional) Configuration object containing the following optional fields:
- (optional) [Commitment](jsonrpc-api.md#configuring-state-commitment)
- (optional) `encoding: <string>` - encoding for Account data, either "binary" or jsonParsed". If parameter not provided, the default encoding is binary.
Parsed-JSON encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If parsed-JSON is requested but a parser cannot be found, the field falls back to binary encoding, detectable when the `data` field is type `<string>`. **jsonParsed encoding is UNSTABLE**
- `encoding: <string>` - encoding for Account data, either "base58" (*slow*), "base64" or jsonParsed".
Parsed-JSON encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If parsed-JSON is requested but a parser cannot be found, the field falls back to base64 encoding, detectable when the `data` field is type `<string>`. **jsonParsed encoding is UNSTABLE**
- (optional) `filters: <array>` - filter results using various [filter objects](jsonrpc-api.md#filters); account must meet all filter criteria to be included in results
#### Results:
@@ -1579,13 +1579,11 @@ Subscribe to a program to receive notifications when the lamports or data for a
```bash
// Request
{"jsonrpc":"2.0", "id":1, "method":"programSubscribe", "params":["11111111111111111111111111111111"]}
{"jsonrpc":"2.0", "id":1, "method":"programSubscribe", "params":["11111111111111111111111111111111", {"commitment": "single"}]}
{"jsonrpc":"2.0", "id":1, "method":"programSubscribe", "params":["11111111111111111111111111111111", {"encoding":"base64", "commitment": "single"}]}
{"jsonrpc":"2.0", "id":1, "method":"programSubscribe", "params":["11111111111111111111111111111111", {"encoding":"jsonParsed"}]}
{"jsonrpc":"2.0", "id":1, "method":"programSubscribe", "params":["11111111111111111111111111111111", {"filters":[{"dataSize":80}]}]}
{"jsonrpc":"2.0", "id":1, "method":"programSubscribe", "params":["11111111111111111111111111111111", {"encoding":"base64", "filters":[{"dataSize":80}]}]}
// Result
{"jsonrpc": "2.0","result": 24040,"id": 1}
@@ -1594,7 +1592,7 @@ Subscribe to a program to receive notifications when the lamports or data for a
#### Notification Format:
```bash
// Binary encoding
// Base58 encoding
{
"jsonrpc": "2.0",
"method": "programNotification",
@@ -1606,7 +1604,7 @@ Subscribe to a program to receive notifications when the lamports or data for a
"value": {
"pubkey": "H4vnBqifaSACnKa7acsxstsY1iV1bvJNxsCY7enrd1hq"
"account": {
"data": "11116bv5nS2h3y12kD1yUKeMZvGcKLSjQgX6BeV7u1FrjeJcKfsHPXHRDEHrBesJhZyqnnq9qJeUuF7WHxiuLuL5twc38w2TXNLxnDbjmuR",
"data": ["11116bv5nS2h3y12kD1yUKeMZvGcKLSjQgX6BeV7u1FrjeJcKfsHPXHRDEHrBesJhZyqnnq9qJeUuF7WHxiuLuL5twc38w2TXNLxnDbjmuR", "base58"],
"executable": false,
"lamports": 33594,
"owner": "11111111111111111111111111111111",
@@ -1686,8 +1684,6 @@ Subscribe to a transaction signature to receive notification when the transactio
- `<string>` - Transaction Signature, as base-58 encoded string
- `<object>` - (optional) [Commitment](jsonrpc-api.md#configuring-state-commitment)
Default: 0, Max: `MAX_LOCKOUT_HISTORY` \(greater integers rounded down\)
#### Results:
- `integer` - subscription id \(needed to unsubscribe\)

View File

@@ -2,7 +2,7 @@
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-dos"
version = "1.2.24"
version = "1.2.26"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -13,14 +13,14 @@ clap = "2.33.1"
log = "0.4.8"
rand = "0.7.0"
rayon = "1.3.0"
solana-clap-utils = { path = "../clap-utils", version = "1.2.24" }
solana-core = { path = "../core", version = "1.2.24" }
solana-ledger = { path = "../ledger", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.24" }
solana-net-utils = { path = "../net-utils", version = "1.2.24" }
solana-runtime = { path = "../runtime", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-version = { path = "../version", version = "1.2.24" }
solana-clap-utils = { path = "../clap-utils", version = "1.2.26" }
solana-core = { path = "../core", version = "1.2.26" }
solana-ledger = { path = "../ledger", version = "1.2.26" }
solana-logger = { path = "../logger", version = "1.2.26" }
solana-net-utils = { path = "../net-utils", version = "1.2.26" }
solana-runtime = { path = "../runtime", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-version = { path = "../version", version = "1.2.26" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-download-utils"
version = "1.2.24"
version = "1.2.26"
description = "Solana Download Utils"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -14,8 +14,8 @@ console = "0.10.1"
indicatif = "0.14.0"
log = "0.4.8"
reqwest = { version = "0.10.4", default-features = false, features = ["blocking", "rustls-tls", "json"] }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-ledger = { path = "../ledger", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-ledger = { path = "../ledger", version = "1.2.26" }
tar = "0.4.28"
[lib]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-faucet"
version = "1.2.24"
version = "1.2.26"
description = "Solana Faucet"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -16,11 +16,11 @@ clap = "2.33"
log = "0.4.8"
serde = "1.0.110"
serde_derive = "1.0.103"
solana-clap-utils = { path = "../clap-utils", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.24" }
solana-metrics = { path = "../metrics", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-version = { path = "../version", version = "1.2.24" }
solana-clap-utils = { path = "../clap-utils", version = "1.2.26" }
solana-logger = { path = "../logger", version = "1.2.26" }
solana-metrics = { path = "../metrics", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-version = { path = "../version", version = "1.2.26" }
tokio = "0.1"
tokio-codec = "0.1"

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-genesis-programs"
version = "1.2.24"
version = "1.2.26"
description = "Solana genesis programs"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,12 +10,12 @@ edition = "2018"
[dependencies]
log = { version = "0.4.8" }
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "1.2.24" }
solana-budget-program = { path = "../programs/budget", version = "1.2.24" }
solana-exchange-program = { path = "../programs/exchange", version = "1.2.24" }
solana-runtime = { path = "../runtime", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-vest-program = { path = "../programs/vest", version = "1.2.24" }
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "1.2.26" }
solana-budget-program = { path = "../programs/budget", version = "1.2.26" }
solana-exchange-program = { path = "../programs/exchange", version = "1.2.26" }
solana-runtime = { path = "../runtime", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-vest-program = { path = "../programs/vest", version = "1.2.26" }
[lib]
crate-type = ["lib"]

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-genesis"
description = "Blockchain, Rebuilt for Scale"
version = "1.2.24"
version = "1.2.26"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -15,14 +15,14 @@ chrono = "0.4"
serde = "1.0.110"
serde_json = "1.0.53"
serde_yaml = "0.8.12"
solana-clap-utils = { path = "../clap-utils", version = "1.2.24" }
solana-genesis-programs = { path = "../genesis-programs", version = "1.2.24" }
solana-ledger = { path = "../ledger", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-stake-program = { path = "../programs/stake", version = "1.2.24" }
solana-vote-program = { path = "../programs/vote", version = "1.2.24" }
solana-version = { path = "../version", version = "1.2.24" }
solana-clap-utils = { path = "../clap-utils", version = "1.2.26" }
solana-genesis-programs = { path = "../genesis-programs", version = "1.2.26" }
solana-ledger = { path = "../ledger", version = "1.2.26" }
solana-logger = { path = "../logger", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-stake-program = { path = "../programs/stake", version = "1.2.26" }
solana-vote-program = { path = "../programs/vote", version = "1.2.26" }
solana-version = { path = "../version", version = "1.2.26" }
tempfile = "3.1.0"
[[bin]]

View File

@@ -3,20 +3,20 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-gossip"
description = "Blockchain, Rebuilt for Scale"
version = "1.2.24"
version = "1.2.26"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
[dependencies]
clap = "2.33.1"
solana-clap-utils = { path = "../clap-utils", version = "1.2.24" }
solana-core = { path = "../core", version = "1.2.24" }
solana-client = { path = "../client", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.24" }
solana-net-utils = { path = "../net-utils", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-version = { path = "../version", version = "1.2.24" }
solana-clap-utils = { path = "../clap-utils", version = "1.2.26" }
solana-core = { path = "../core", version = "1.2.26" }
solana-client = { path = "../client", version = "1.2.26" }
solana-logger = { path = "../logger", version = "1.2.26" }
solana-net-utils = { path = "../net-utils", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-version = { path = "../version", version = "1.2.26" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-install"
description = "The solana cluster software installer"
version = "1.2.24"
version = "1.2.26"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -24,12 +24,12 @@ reqwest = { version = "0.10.4", default-features = false, features = ["blocking"
serde = "1.0.110"
serde_derive = "1.0.103"
serde_yaml = "0.8.12"
solana-clap-utils = { path = "../clap-utils", version = "1.2.24" }
solana-client = { path = "../client", version = "1.2.24" }
solana-config-program = { path = "../programs/config", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-version = { path = "../version", version = "1.2.24" }
solana-clap-utils = { path = "../clap-utils", version = "1.2.26" }
solana-client = { path = "../client", version = "1.2.26" }
solana-config-program = { path = "../programs/config", version = "1.2.26" }
solana-logger = { path = "../logger", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-version = { path = "../version", version = "1.2.26" }
semver = "0.9.0"
tar = "0.4.28"
tempdir = "0.3.7"

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-keygen"
version = "1.2.24"
version = "1.2.26"
description = "Solana key generation utility"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -13,11 +13,11 @@ bs58 = "0.3.1"
clap = "2.33"
dirs = "2.0.2"
num_cpus = "1.13.0"
solana-clap-utils = { path = "../clap-utils", version = "1.2.24" }
solana-cli-config = { path = "../cli-config", version = "1.2.24" }
solana-remote-wallet = { path = "../remote-wallet", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-version = { path = "../version", version = "1.2.24" }
solana-clap-utils = { path = "../clap-utils", version = "1.2.26" }
solana-cli-config = { path = "../cli-config", version = "1.2.26" }
solana-remote-wallet = { path = "../remote-wallet", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-version = { path = "../version", version = "1.2.26" }
tiny-bip39 = "0.7.0"
[[bin]]

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-ledger-tool"
description = "Blockchain, Rebuilt for Scale"
version = "1.2.24"
version = "1.2.26"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -19,18 +19,18 @@ log = { version = "0.4.8" }
regex = "1"
serde_json = "1.0.53"
serde_yaml = "0.8.12"
solana-clap-utils = { path = "../clap-utils", version = "1.2.24" }
solana-cli = { path = "../cli", version = "1.2.24" }
solana-ledger = { path = "../ledger", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.24" }
solana-measure = { path = "../measure", version = "1.2.24" }
solana-runtime = { path = "../runtime", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-stake-program = { path = "../programs/stake", version = "1.2.24" }
solana-storage-bigtable = { path = "../storage-bigtable", version = "1.2.24" }
solana-transaction-status = { path = "../transaction-status", version = "1.2.24" }
solana-version = { path = "../version", version = "1.2.24" }
solana-vote-program = { path = "../programs/vote", version = "1.2.24" }
solana-clap-utils = { path = "../clap-utils", version = "1.2.26" }
solana-cli = { path = "../cli", version = "1.2.26" }
solana-ledger = { path = "../ledger", version = "1.2.26" }
solana-logger = { path = "../logger", version = "1.2.26" }
solana-measure = { path = "../measure", version = "1.2.26" }
solana-runtime = { path = "../runtime", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-stake-program = { path = "../programs/stake", version = "1.2.26" }
solana-storage-bigtable = { path = "../storage-bigtable", version = "1.2.26" }
solana-transaction-status = { path = "../transaction-status", version = "1.2.26" }
solana-version = { path = "../version", version = "1.2.26" }
solana-vote-program = { path = "../programs/vote", version = "1.2.26" }
tempfile = "3.1.0"
tokio = { version = "0.2.22", features = ["full"] }

View File

@@ -134,7 +134,7 @@ async fn upload(
for (i, slot) in blocks_to_upload.iter().enumerate() {
let _ = match blockstore.get_confirmed_block(
*slot,
Some(solana_transaction_status::UiTransactionEncoding::Binary),
Some(solana_transaction_status::UiTransactionEncoding::Base64),
) {
Ok(confirmed_block) => sender.send((*slot, Some(confirmed_block))),
Err(err) => {
@@ -231,7 +231,7 @@ async fn block(slot: Slot) -> Result<(), Box<dyn std::error::Error>> {
.map_err(|err| format!("Failed to connect to storage: {:?}", err))?;
let block = bigtable
.get_confirmed_block(slot, UiTransactionEncoding::Binary)
.get_confirmed_block(slot, UiTransactionEncoding::Base64)
.await?;
println!("Slot: {}", slot);
@@ -276,7 +276,7 @@ async fn confirm(signature: &Signature, verbose: bool) -> Result<(), Box<dyn std
if verbose {
match bigtable
.get_confirmed_transaction(signature, UiTransactionEncoding::Binary)
.get_confirmed_transaction(signature, UiTransactionEncoding::Base64)
.await
{
Ok(Some(confirmed_transaction)) => {

View File

@@ -942,8 +942,7 @@ fn main() {
Arg::with_name("end_slot")
.index(2)
.value_name("SLOT")
.required(true)
.help("Ending slot to stop purging (inclusive)"),
.help("Ending slot to stop purging (inclusive) [default: the highest slot in the ledger]"),
)
)
.subcommand(
@@ -1518,9 +1517,36 @@ fn main() {
}
("purge", Some(arg_matches)) => {
let start_slot = value_t_or_exit!(arg_matches, "start_slot", Slot);
let end_slot = value_t_or_exit!(arg_matches, "end_slot", Slot);
let end_slot = value_t!(arg_matches, "end_slot", Slot).ok();
let blockstore =
open_blockstore(&ledger_path, AccessType::PrimaryOnly, wal_recovery_mode);
let end_slot = match end_slot {
Some(end_slot) => end_slot,
None => match blockstore.slot_meta_iterator(start_slot) {
Ok(metas) => {
let slots: Vec<_> = metas.map(|(slot, _)| slot).collect();
if slots.is_empty() {
eprintln!("Purge range is empty");
exit(1);
}
*slots.last().unwrap()
}
Err(err) => {
eprintln!("Unable to read the Ledger: {:?}", err);
exit(1);
}
},
};
if end_slot < start_slot {
eprintln!(
"end slot {} is less than start slot {}",
end_slot, start_slot
);
exit(1);
}
println!("Purging data from slots {} to {}", start_slot, end_slot);
blockstore.purge_and_compact_slots(start_slot, end_slot);
blockstore.purge_from_next_slots(start_slot, end_slot);
}

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-ledger"
version = "1.2.24"
version = "1.2.26"
description = "Solana ledger"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -32,19 +32,19 @@ reed-solomon-erasure = { version = "4.0.2", features = ["simd-accel"] }
regex = "1.3.7"
serde = "1.0.110"
serde_bytes = "0.11.4"
solana-transaction-status = { path = "../transaction-status", version = "1.2.24" }
solana-genesis-programs = { path = "../genesis-programs", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.24" }
solana-measure = { path = "../measure", version = "1.2.24" }
solana-merkle-tree = { path = "../merkle-tree", version = "1.2.24" }
solana-metrics = { path = "../metrics", version = "1.2.24" }
solana-perf = { path = "../perf", version = "1.2.24" }
solana-transaction-status = { path = "../transaction-status", version = "1.2.26" }
solana-genesis-programs = { path = "../genesis-programs", version = "1.2.26" }
solana-logger = { path = "../logger", version = "1.2.26" }
solana-measure = { path = "../measure", version = "1.2.26" }
solana-merkle-tree = { path = "../merkle-tree", version = "1.2.26" }
solana-metrics = { path = "../metrics", version = "1.2.26" }
solana-perf = { path = "../perf", version = "1.2.26" }
ed25519-dalek = "1.0.0-pre.3"
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "1.2.24" }
solana-runtime = { path = "../runtime", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-stake-program = { path = "../programs/stake", version = "1.2.24" }
solana-vote-program = { path = "../programs/vote", version = "1.2.24" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "1.2.26" }
solana-runtime = { path = "../runtime", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-stake-program = { path = "../programs/stake", version = "1.2.26" }
solana-vote-program = { path = "../programs/vote", version = "1.2.26" }
symlink = "0.1.0"
tar = "0.4.28"
thiserror = "1.0"
@@ -62,7 +62,7 @@ features = ["lz4"]
[dev-dependencies]
assert_matches = "1.3.0"
matches = "0.1.6"
solana-budget-program = { path = "../programs/budget", version = "1.2.24" }
solana-budget-program = { path = "../programs/budget", version = "1.2.26" }
[lib]
crate-type = ["lib"]

View File

@@ -350,18 +350,39 @@ impl Blockstore {
Ok((blockstore, signal_receiver, completed_slots_receiver))
}
pub fn add_tree(&self, forks: Tree<Slot>, is_orphan: bool, is_slot_complete: bool) {
pub fn add_tree(
&self,
forks: Tree<Slot>,
is_orphan: bool,
is_slot_complete: bool,
num_ticks: u64,
starting_hash: Hash,
) {
let mut walk = TreeWalk::from(forks);
let mut blockhashes = HashMap::new();
while let Some(visit) = walk.get() {
let slot = visit.node().data;
if self.meta(slot).unwrap().is_some() && self.orphan(slot).unwrap().is_none() {
// If slot exists and is not an orphan, then skip it
// If slot exists in blockstore and is not an orphan, then skip it
walk.forward();
continue;
}
let parent = walk.get_parent().map(|n| n.data);
if parent.is_some() || !is_orphan {
let entries = create_ticks(2, 0, Hash::default());
let parent_hash = parent
// parent won't exist for first node in a tree where
// `is_orphan == true`
.and_then(|parent| blockhashes.get(&parent))
.unwrap_or(&starting_hash);
let mut entries = create_ticks(
num_ticks * (std::cmp::max(1, slot - parent.unwrap_or(slot))),
0,
*parent_hash,
);
blockhashes.insert(slot, entries.last().unwrap().hash);
if !is_slot_complete {
entries.pop().unwrap();
}
let shreds = entries_to_test_shreds(
entries.clone(),
slot,
@@ -407,6 +428,16 @@ impl Blockstore {
self.orphans_cf.get(slot)
}
// Get max root or 0 if it doesn't exist
pub fn max_root(&self) -> Slot {
self.db
.iter::<cf::Root>(IteratorMode::End)
.expect("Couldn't get rooted iterator for max_root()")
.next()
.map(|(slot, _)| slot)
.unwrap_or(0)
}
pub fn slot_meta_iterator<'a>(
&'a self,
slot: Slot,
@@ -1959,7 +1990,7 @@ impl Blockstore {
None => return Ok(vec![]),
Some((slot, _)) => {
let confirmed_block = self
.get_confirmed_block(slot, Some(UiTransactionEncoding::Binary))
.get_confirmed_block(slot, Some(UiTransactionEncoding::Base64))
.map_err(|err| {
BlockstoreError::IO(IOError::new(
ErrorKind::Other,
@@ -2013,7 +2044,7 @@ impl Blockstore {
None => (0, HashSet::new()),
Some((slot, _)) => {
let confirmed_block = self
.get_confirmed_block(slot, Some(UiTransactionEncoding::Binary))
.get_confirmed_block(slot, Some(UiTransactionEncoding::Base64))
.map_err(|err| {
BlockstoreError::IO(IOError::new(
ErrorKind::Other,

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-local-cluster"
description = "Blockchain, Rebuilt for Scale"
version = "1.2.24"
version = "1.2.26"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -12,22 +12,22 @@ homepage = "https://solana.com/"
itertools = "0.9.0"
log = "0.4.8"
rand = "0.7.0"
solana-config-program = { path = "../programs/config", version = "1.2.24" }
solana-core = { path = "../core", version = "1.2.24" }
solana-client = { path = "../client", version = "1.2.24" }
solana-download-utils = { path = "../download-utils", version = "1.2.24" }
solana-faucet = { path = "../faucet", version = "1.2.24" }
solana-exchange-program = { path = "../programs/exchange", version = "1.2.24" }
solana-genesis-programs = { path = "../genesis-programs", version = "1.2.24" }
solana-ledger = { path = "../ledger", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.24" }
solana-runtime = { path = "../runtime", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-stake-program = { path = "../programs/stake", version = "1.2.24" }
solana-vest-program = { path = "../programs/vest", version = "1.2.24" }
solana-vote-program = { path = "../programs/vote", version = "1.2.24" }
solana-config-program = { path = "../programs/config", version = "1.2.26" }
solana-core = { path = "../core", version = "1.2.26" }
solana-client = { path = "../client", version = "1.2.26" }
solana-download-utils = { path = "../download-utils", version = "1.2.26" }
solana-faucet = { path = "../faucet", version = "1.2.26" }
solana-exchange-program = { path = "../programs/exchange", version = "1.2.26" }
solana-genesis-programs = { path = "../genesis-programs", version = "1.2.26" }
solana-ledger = { path = "../ledger", version = "1.2.26" }
solana-logger = { path = "../logger", version = "1.2.26" }
solana-runtime = { path = "../runtime", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-stake-program = { path = "../programs/stake", version = "1.2.26" }
solana-vest-program = { path = "../programs/vest", version = "1.2.26" }
solana-vote-program = { path = "../programs/vote", version = "1.2.26" }
tempfile = "3.1.0"
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "1.2.24" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "1.2.26" }
[dev-dependencies]
assert_matches = "1.3.0"

View File

@@ -16,11 +16,10 @@ use solana_ledger::{
use solana_sdk::{
client::SyncClient,
clock::{
self, Slot, DEFAULT_MS_PER_SLOT, DEFAULT_TICKS_PER_SECOND, DEFAULT_TICKS_PER_SLOT,
NUM_CONSECUTIVE_LEADER_SLOTS,
self, Slot, DEFAULT_TICKS_PER_SECOND, DEFAULT_TICKS_PER_SLOT, NUM_CONSECUTIVE_LEADER_SLOTS,
},
commitment_config::CommitmentConfig,
epoch_schedule::{EpochSchedule, MINIMUM_SLOTS_PER_EPOCH},
epoch_schedule::MINIMUM_SLOTS_PER_EPOCH,
hash::Hash,
poh_config::PohConfig,
pubkey::Pubkey,
@@ -172,11 +171,6 @@ pub fn verify_ledger_ticks(ledger_path: &Path, ticks_per_slot: usize) {
}
}
pub fn time_until_nth_epoch(epoch: u64, slots_per_epoch: u64, stakers_slot_offset: u64) -> u64 {
let epoch_schedule = EpochSchedule::custom(slots_per_epoch, stakers_slot_offset, true);
epoch_schedule.get_last_slot_in_epoch(epoch) * DEFAULT_MS_PER_SLOT
}
pub fn sleep_n_epochs(
num_epochs: f64,
config: &PohConfig,

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-log-analyzer"
description = "The solana cluster network analysis tool"
version = "1.2.24"
version = "1.2.26"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -14,9 +14,9 @@ byte-unit = "3.1.1"
clap = "2.33.1"
serde = "1.0.110"
serde_json = "1.0.53"
solana-clap-utils = { path = "../clap-utils", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.24" }
solana-version = { path = "../version", version = "1.2.24" }
solana-clap-utils = { path = "../clap-utils", version = "1.2.26" }
solana-logger = { path = "../logger", version = "1.2.26" }
solana-version = { path = "../version", version = "1.2.26" }
[[bin]]
name = "solana-log-analyzer"

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-logger"
version = "1.2.24"
version = "1.2.26"
description = "Solana Logger"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"

View File

@@ -1,7 +1,7 @@
[package]
name = "solana-measure"
description = "Blockchain, Rebuilt for Scale"
version = "1.2.24"
version = "1.2.26"
documentation = "https://docs.rs/solana"
homepage = "https://solana.com/"
readme = "../README.md"
@@ -12,8 +12,8 @@ edition = "2018"
[dependencies]
log = "0.4.8"
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-metrics = { path = "../metrics", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-metrics = { path = "../metrics", version = "1.2.26" }
[target."cfg(unix)".dependencies]
jemallocator = "0.3.2"

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-merkle-tree"
version = "1.2.24"
version = "1.2.26"
description = "Solana Merkle Tree"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -9,7 +9,7 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
fast-math = "0.1"
[dev-dependencies]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-metrics"
version = "1.2.24"
version = "1.2.26"
description = "Solana Metrics"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -14,7 +14,7 @@ gethostname = "0.2.1"
lazy_static = "1.4.0"
log = "0.4.8"
reqwest = { version = "0.10.4", default-features = false, features = ["blocking", "rustls-tls", "json"] }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
[dev-dependencies]
rand = "0.7.0"

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-net-shaper"
description = "The solana cluster network shaping tool"
version = "1.2.24"
version = "1.2.26"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -13,8 +13,8 @@ publish = false
clap = "2.33.1"
serde = "1.0.110"
serde_json = "1.0.53"
solana-clap-utils = { path = "../clap-utils", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.24" }
solana-clap-utils = { path = "../clap-utils", version = "1.2.26" }
solana-logger = { path = "../logger", version = "1.2.26" }
rand = "0.7.0"
[[bin]]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-net-utils"
version = "1.2.24"
version = "1.2.26"
description = "Solana Network Utilities"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -18,9 +18,9 @@ rand = "0.7.0"
serde = "1.0.110"
serde_derive = "1.0.103"
socket2 = "0.3.12"
solana-clap-utils = { path = "../clap-utils", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.24" }
solana-version = { path = "../version", version = "1.2.24" }
solana-clap-utils = { path = "../clap-utils", version = "1.2.26" }
solana-logger = { path = "../logger", version = "1.2.26" }
solana-version = { path = "../version", version = "1.2.26" }
tokio = "0.1"
tokio-codec = "0.1"

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-notifier"
version = "1.2.24"
version = "1.2.26"
description = "Solana Notifier"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-perf"
version = "1.2.24"
version = "1.2.26"
description = "Solana Performance APIs"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -17,11 +17,11 @@ serde = "1.0.110"
dlopen_derive = "0.1.4"
lazy_static = "1.4.0"
log = "0.4.8"
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "1.2.24" }
solana-budget-program = { path = "../programs/budget", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.24" }
solana-metrics = { path = "../metrics", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "1.2.26" }
solana-budget-program = { path = "../programs/budget", version = "1.2.26" }
solana-logger = { path = "../logger", version = "1.2.26" }
solana-metrics = { path = "../metrics", version = "1.2.26" }
curve25519-dalek = { version = "2" }
[lib]

View File

@@ -1565,7 +1565,7 @@ dependencies = [
[[package]]
name = "solana-bpf-loader-program"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"bincode",
"byteorder 1.3.4",
@@ -1582,7 +1582,7 @@ dependencies = [
[[package]]
name = "solana-bpf-programs"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"bincode",
"byteorder 1.3.4",
@@ -1597,7 +1597,7 @@ dependencies = [
[[package]]
name = "solana-bpf-rust-128bit"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"solana-bpf-rust-128bit-dep",
"solana-sdk",
@@ -1605,21 +1605,21 @@ dependencies = [
[[package]]
name = "solana-bpf-rust-128bit-dep"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"solana-sdk",
]
[[package]]
name = "solana-bpf-rust-alloc"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"solana-sdk",
]
[[package]]
name = "solana-bpf-rust-dep-crate"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"byteorder 1.3.4",
"solana-sdk",
@@ -1627,14 +1627,14 @@ dependencies = [
[[package]]
name = "solana-bpf-rust-dup-accounts"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"solana-sdk",
]
[[package]]
name = "solana-bpf-rust-error-handling"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"num-derive 0.2.5",
"num-traits",
@@ -1644,14 +1644,14 @@ dependencies = [
[[package]]
name = "solana-bpf-rust-external-spend"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"solana-sdk",
]
[[package]]
name = "solana-bpf-rust-invoke"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"solana-bpf-rust-invoked",
"solana-sdk",
@@ -1659,21 +1659,21 @@ dependencies = [
[[package]]
name = "solana-bpf-rust-invoked"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"solana-sdk",
]
[[package]]
name = "solana-bpf-rust-iter"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"solana-sdk",
]
[[package]]
name = "solana-bpf-rust-many-args"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"solana-bpf-rust-many-args-dep",
"solana-sdk",
@@ -1681,28 +1681,28 @@ dependencies = [
[[package]]
name = "solana-bpf-rust-many-args-dep"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"solana-sdk",
]
[[package]]
name = "solana-bpf-rust-noop"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"solana-sdk",
]
[[package]]
name = "solana-bpf-rust-panic"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"solana-sdk",
]
[[package]]
name = "solana-bpf-rust-param-passing"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"solana-bpf-rust-param-passing-dep",
"solana-sdk",
@@ -1710,21 +1710,21 @@ dependencies = [
[[package]]
name = "solana-bpf-rust-param-passing-dep"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"solana-sdk",
]
[[package]]
name = "solana-bpf-rust-sysval"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"solana-sdk",
]
[[package]]
name = "solana-config-program"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"bincode",
"chrono",
@@ -1736,7 +1736,7 @@ dependencies = [
[[package]]
name = "solana-crate-features"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"backtrace",
"bytes 0.4.12",
@@ -1759,7 +1759,7 @@ dependencies = [
[[package]]
name = "solana-logger"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"env_logger",
"lazy_static",
@@ -1768,7 +1768,7 @@ dependencies = [
[[package]]
name = "solana-measure"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"jemalloc-ctl",
"jemallocator",
@@ -1779,7 +1779,7 @@ dependencies = [
[[package]]
name = "solana-metrics"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"env_logger",
"gethostname",
@@ -1791,7 +1791,7 @@ dependencies = [
[[package]]
name = "solana-rayon-threadlimit"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"lazy_static",
"num_cpus",
@@ -1799,7 +1799,7 @@ dependencies = [
[[package]]
name = "solana-runtime"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"bincode",
"bv",
@@ -1833,7 +1833,7 @@ dependencies = [
[[package]]
name = "solana-sdk"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"assert_matches",
"bincode",
@@ -1869,7 +1869,7 @@ dependencies = [
[[package]]
name = "solana-sdk-macro"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"bs58",
"proc-macro2 1.0.18",
@@ -1880,7 +1880,7 @@ dependencies = [
[[package]]
name = "solana-stake-program"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"bincode",
"log",
@@ -1897,7 +1897,7 @@ dependencies = [
[[package]]
name = "solana-vote-program"
version = "1.2.24"
version = "1.2.26"
dependencies = [
"bincode",
"log",

View File

@@ -1,7 +1,7 @@
[package]
name = "solana-bpf-programs"
description = "Blockchain, Rebuilt for Scale"
version = "1.2.24"
version = "1.2.26"
documentation = "https://docs.rs/solana"
homepage = "https://solana.com/"
readme = "README.md"
@@ -22,10 +22,10 @@ walkdir = "2"
bincode = "1.1.4"
byteorder = "1.3.2"
elf = "0.0.10"
solana-bpf-loader-program = { path = "../bpf_loader", version = "1.2.24" }
solana-logger = { path = "../../logger", version = "1.2.24" }
solana-runtime = { path = "../../runtime", version = "1.2.24" }
solana-sdk = { path = "../../sdk", version = "1.2.24" }
solana-bpf-loader-program = { path = "../bpf_loader", version = "1.2.26" }
solana-logger = { path = "../../logger", version = "1.2.26" }
solana-runtime = { path = "../../runtime", version = "1.2.26" }
solana-sdk = { path = "../../sdk", version = "1.2.26" }
solana_rbpf = "=0.1.28"
[[bench]]

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-128bit"
version = "1.2.24"
version = "1.2.26"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,8 +12,8 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk = { path = "../../../../sdk/", version = "1.2.24", default-features = false }
solana-bpf-rust-128bit-dep = { path = "../128bit_dep", version = "1.2.24" }
solana-sdk = { path = "../../../../sdk/", version = "1.2.26", default-features = false }
solana-bpf-rust-128bit-dep = { path = "../128bit_dep", version = "1.2.26" }
[features]
program = ["solana-sdk/program"]

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-128bit-dep"
version = "1.2.24"
version = "1.2.26"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,7 +12,7 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk = { path = "../../../../sdk/", version = "1.2.24", default-features = false }
solana-sdk = { path = "../../../../sdk/", version = "1.2.26", default-features = false }
[features]
program = ["solana-sdk/program"]

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-alloc"
version = "1.2.24"
version = "1.2.26"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,7 +12,7 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk = { path = "../../../../sdk/", version = "1.2.24", default-features = false }
solana-sdk = { path = "../../../../sdk/", version = "1.2.26", default-features = false }
[features]
program = ["solana-sdk/program"]

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-dep-crate"
version = "1.2.24"
version = "1.2.26"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -13,7 +13,7 @@ edition = "2018"
[dependencies]
byteorder = { version = "1", default-features = false }
solana-sdk = { path = "../../../../sdk/", version = "1.2.24", default-features = false }
solana-sdk = { path = "../../../../sdk/", version = "1.2.26", default-features = false }
[features]
program = ["solana-sdk/program"]

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-dup-accounts"
version = "1.2.24"
version = "1.2.26"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,7 +12,7 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk = { path = "../../../../sdk/", version = "1.2.24", default-features = false }
solana-sdk = { path = "../../../../sdk/", version = "1.2.26", default-features = false }
[features]
program = ["solana-sdk/program"]

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-error-handling"
version = "1.2.24"
version = "1.2.26"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -14,7 +14,7 @@ edition = "2018"
[dependencies]
num-derive = "0.2"
num-traits = "0.2"
solana-sdk = { path = "../../../../sdk/", version = "1.2.24", default-features = false }
solana-sdk = { path = "../../../../sdk/", version = "1.2.26", default-features = false }
thiserror = "1.0"
[features]

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-external-spend"
version = "1.2.24"
version = "1.2.26"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,7 +12,7 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk = { path = "../../../../sdk/", version = "1.2.24", default-features = false }
solana-sdk = { path = "../../../../sdk/", version = "1.2.26", default-features = false }
[features]
program = ["solana-sdk/program"]

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-invoke"
version = "1.2.24"
version = "1.2.26"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -13,7 +13,7 @@ edition = "2018"
[dependencies]
solana-bpf-rust-invoked = { path = "../invoked"}
solana-sdk = { path = "../../../../sdk/", version = "1.2.24", default-features = false }
solana-sdk = { path = "../../../../sdk/", version = "1.2.26", default-features = false }
[features]
program = ["solana-sdk/program"]

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-invoked"
version = "1.2.24"
version = "1.2.26"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,7 +12,7 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk = { path = "../../../../sdk/", version = "1.2.24", default-features = false }
solana-sdk = { path = "../../../../sdk/", version = "1.2.26", default-features = false }
[features]
program = ["solana-sdk/program"]

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-iter"
version = "1.2.24"
version = "1.2.26"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,7 +12,7 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk = { path = "../../../../sdk/", version = "1.2.24", default-features = false }
solana-sdk = { path = "../../../../sdk/", version = "1.2.26", default-features = false }
[features]
program = ["solana-sdk/program"]

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-many-args"
version = "1.2.24"
version = "1.2.26"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,8 +12,8 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk = { path = "../../../../sdk/", version = "1.2.24", default-features = false }
solana-bpf-rust-many-args-dep = { path = "../many_args_dep", version = "1.2.24" }
solana-sdk = { path = "../../../../sdk/", version = "1.2.26", default-features = false }
solana-bpf-rust-many-args-dep = { path = "../many_args_dep", version = "1.2.26" }
[features]
program = ["solana-sdk/program"]

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-many-args-dep"
version = "1.2.24"
version = "1.2.26"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,7 +12,7 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk = { path = "../../../../sdk/", version = "1.2.24", default-features = false }
solana-sdk = { path = "../../../../sdk/", version = "1.2.26", default-features = false }
[features]
program = ["solana-sdk/program"]

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-noop"
version = "1.2.24"
version = "1.2.26"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,7 +12,7 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk = { path = "../../../../sdk/", version = "1.2.24", default-features = false }
solana-sdk = { path = "../../../../sdk/", version = "1.2.26", default-features = false }
[features]
program = ["solana-sdk/program"]

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-panic"
version = "1.2.24"
version = "1.2.26"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,7 +12,7 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk = { path = "../../../../sdk/", version = "1.2.24", default-features = false }
solana-sdk = { path = "../../../../sdk/", version = "1.2.26", default-features = false }
[features]
program = ["solana-sdk/program"]

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-param-passing"
version = "1.2.24"
version = "1.2.26"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,8 +12,8 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk = { path = "../../../../sdk/", version = "1.2.24", default-features = false }
solana-bpf-rust-param-passing-dep = { path = "../param_passing_dep", version = "1.2.24" }
solana-sdk = { path = "../../../../sdk/", version = "1.2.26", default-features = false }
solana-bpf-rust-param-passing-dep = { path = "../param_passing_dep", version = "1.2.26" }
[features]
program = ["solana-sdk/program"]

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-param-passing-dep"
version = "1.2.24"
version = "1.2.26"
description = "Solana BPF program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,7 +12,7 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk = { path = "../../../../sdk/", version = "1.2.24", default-features = false }
solana-sdk = { path = "../../../../sdk/", version = "1.2.26", default-features = false }
[features]
program = ["solana-sdk/program"]

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-sysval"
version = "1.2.24"
version = "1.2.26"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,7 +12,7 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk = { path = "../../../../sdk/", version = "1.2.24", default-features = false }
solana-sdk = { path = "../../../../sdk/", version = "1.2.26", default-features = false }
[features]
program = ["solana-sdk/program"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-loader-program"
version = "1.2.24"
version = "1.2.26"
description = "Solana BPF loader"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -15,9 +15,9 @@ jemalloc-sys = { version = "0.3.2", features = ["disable_initial_exec_tls"] }
log = "0.4.8"
num-derive = { version = "0.3" }
num-traits = { version = "0.2" }
solana-logger = { path = "../../logger", version = "1.2.24" }
solana-runtime = { path = "../../runtime", version = "1.2.24" }
solana-sdk = { path = "../../sdk", version = "1.2.24" }
solana-logger = { path = "../../logger", version = "1.2.26" }
solana-runtime = { path = "../../runtime", version = "1.2.26" }
solana-sdk = { path = "../../sdk", version = "1.2.26" }
solana_rbpf = "=0.1.28"
thiserror = "1.0"

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-btc-spv-program"
version = "1.2.24"
version = "1.2.26"
description = "Solana Bitcoin spv parsing program"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -15,7 +15,7 @@ num-derive = "0.3"
num-traits = "0.2"
serde = "1.0.110"
serde_derive = "1.0.103"
solana-sdk = { path = "../../sdk", version = "1.2.24"}
solana-sdk = { path = "../../sdk", version = "1.2.26"}
hex = "0.4.2"
[lib]

View File

@@ -1,6 +1,6 @@
[package]
name = "btc_spv_bin"
version = "1.2.24"
version = "1.2.26"
description = "Solana Bitcoin spv parsing program"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-budget-program"
version = "1.2.24"
version = "1.2.26"
description = "Solana Budget program"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -16,11 +16,11 @@ num-derive = "0.3"
num-traits = "0.2"
serde = "1.0.110"
serde_derive = "1.0.103"
solana-sdk = { path = "../../sdk", version = "1.2.24" }
solana-sdk = { path = "../../sdk", version = "1.2.26" }
thiserror = "1.0"
[dev-dependencies]
solana-runtime = { path = "../../runtime", version = "1.2.24" }
solana-runtime = { path = "../../runtime", version = "1.2.26" }
[lib]
crate-type = ["lib", "cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-config-program"
version = "1.2.24"
version = "1.2.26"
description = "Solana Config program"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -14,10 +14,10 @@ chrono = { version = "0.4.11", features = ["serde"] }
log = "0.4.8"
serde = "1.0.110"
serde_derive = "1.0.103"
solana-sdk = { path = "../../sdk", version = "1.2.24" }
solana-sdk = { path = "../../sdk", version = "1.2.26" }
[dev-dependencies]
solana-logger = { path = "../../logger", version = "1.2.24" }
solana-logger = { path = "../../logger", version = "1.2.26" }
[lib]
crate-type = ["lib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-exchange-program"
version = "1.2.24"
version = "1.2.26"
description = "Solana Exchange program"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -15,13 +15,13 @@ num-derive = { version = "0.3" }
num-traits = { version = "0.2" }
serde = "1.0.110"
serde_derive = "1.0.103"
solana-logger = { path = "../../logger", version = "1.2.24" }
solana-metrics = { path = "../../metrics", version = "1.2.24" }
solana-sdk = { path = "../../sdk", version = "1.2.24" }
solana-logger = { path = "../../logger", version = "1.2.26" }
solana-metrics = { path = "../../metrics", version = "1.2.26" }
solana-sdk = { path = "../../sdk", version = "1.2.26" }
thiserror = "1.0"
[dev-dependencies]
solana-runtime = { path = "../../runtime", version = "1.2.24" }
solana-runtime = { path = "../../runtime", version = "1.2.26" }
[lib]
crate-type = ["lib", "cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-failure-program"
version = "1.2.24"
version = "1.2.26"
description = "Solana failure program"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -9,10 +9,10 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk = { path = "../../sdk", version = "1.2.24" }
solana-sdk = { path = "../../sdk", version = "1.2.26" }
[dev-dependencies]
solana-runtime = { path = "../../runtime", version = "1.2.24" }
solana-runtime = { path = "../../runtime", version = "1.2.26" }
[lib]
crate-type = ["lib", "cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-noop-program"
version = "1.2.24"
version = "1.2.26"
description = "Solana Noop program"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,8 +10,8 @@ edition = "2018"
[dependencies]
log = "0.4.8"
solana-logger = { path = "../../logger", version = "1.2.24" }
solana-sdk = { path = "../../sdk", version = "1.2.24" }
solana-logger = { path = "../../logger", version = "1.2.26" }
solana-sdk = { path = "../../sdk", version = "1.2.26" }
[lib]
crate-type = ["lib", "cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-ownable"
version = "1.2.24"
version = "1.2.26"
description = "ownable program"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,13 +10,13 @@ edition = "2018"
[dependencies]
bincode = "1.2.1"
solana-sdk = { path = "../../sdk", version = "1.2.24" }
solana-sdk = { path = "../../sdk", version = "1.2.26" }
num-derive = "0.3"
num-traits = "0.2"
thiserror = "1.0"
[dev-dependencies]
solana-runtime = { path = "../../runtime", version = "1.2.24" }
solana-runtime = { path = "../../runtime", version = "1.2.26" }
[lib]
crate-type = ["lib", "cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-stake-program"
version = "1.2.24"
version = "1.2.26"
description = "Solana Stake program"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -15,14 +15,14 @@ num-derive = "0.3"
num-traits = "0.2"
serde = "1.0.110"
serde_derive = "1.0.103"
solana-metrics = { path = "../../metrics", version = "1.2.24" }
solana-sdk = { path = "../../sdk", version = "1.2.24" }
solana-vote-program = { path = "../vote", version = "1.2.24" }
solana-config-program = { path = "../config", version = "1.2.24" }
solana-metrics = { path = "../../metrics", version = "1.2.26" }
solana-sdk = { path = "../../sdk", version = "1.2.26" }
solana-vote-program = { path = "../vote", version = "1.2.26" }
solana-config-program = { path = "../config", version = "1.2.26" }
thiserror = "1.0"
[dev-dependencies]
solana-logger = { path = "../../logger", version = "1.2.24" }
solana-logger = { path = "../../logger", version = "1.2.26" }
[lib]
crate-type = ["lib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-vest-program"
version = "1.2.24"
version = "1.2.26"
description = "Solana Vest program"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -15,12 +15,12 @@ num-derive = "0.2"
num-traits = "0.2"
serde = "1.0.110"
serde_derive = "1.0.103"
solana-sdk = { path = "../../sdk", version = "1.2.24" }
solana-config-program = { path = "../config", version = "1.2.24" }
solana-sdk = { path = "../../sdk", version = "1.2.26" }
solana-config-program = { path = "../config", version = "1.2.26" }
thiserror = "1.0"
[dev-dependencies]
solana-runtime = { path = "../../runtime", version = "1.2.24" }
solana-runtime = { path = "../../runtime", version = "1.2.26" }
[lib]
crate-type = ["lib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-vote-program"
version = "1.2.24"
version = "1.2.26"
description = "Solana Vote program"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -15,8 +15,8 @@ num-derive = "0.3"
num-traits = "0.2"
serde = "1.0.110"
serde_derive = "1.0.103"
solana-metrics = { path = "../../metrics", version = "1.2.24" }
solana-sdk = { path = "../../sdk", version = "1.2.24" }
solana-metrics = { path = "../../metrics", version = "1.2.26" }
solana-sdk = { path = "../../sdk", version = "1.2.26" }
thiserror = "1.0"
[lib]

View File

@@ -544,7 +544,7 @@ impl VoteState {
timestamp: UnixTimestamp,
) -> Result<(), VoteError> {
if (slot < self.last_timestamp.slot || timestamp < self.last_timestamp.timestamp)
|| ((slot == self.last_timestamp.slot || timestamp == self.last_timestamp.timestamp)
|| (slot == self.last_timestamp.slot
&& BlockTimestamp { slot, timestamp } != self.last_timestamp
&& self.last_timestamp.slot != 0)
{
@@ -1729,10 +1729,6 @@ mod tests {
vote_state.process_timestamp(slot + 1, timestamp - 1),
Err(VoteError::TimestampTooOld)
);
assert_eq!(
vote_state.process_timestamp(slot + 1, timestamp),
Err(VoteError::TimestampTooOld)
);
assert_eq!(
vote_state.process_timestamp(slot, timestamp + 1),
Err(VoteError::TimestampTooOld)
@@ -1742,14 +1738,22 @@ mod tests {
vote_state.last_timestamp,
BlockTimestamp { slot, timestamp }
);
assert_eq!(vote_state.process_timestamp(slot + 1, timestamp), Ok(()));
assert_eq!(
vote_state.process_timestamp(slot + 1, timestamp + 1),
vote_state.last_timestamp,
BlockTimestamp {
slot: slot + 1,
timestamp
}
);
assert_eq!(
vote_state.process_timestamp(slot + 2, timestamp + 1),
Ok(())
);
assert_eq!(
vote_state.last_timestamp,
BlockTimestamp {
slot: slot + 1,
slot: slot + 2,
timestamp: timestamp + 1
}
);

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-ramp-tps"
description = "Solana Tour de SOL - TPS ramp up"
version = "1.2.24"
version = "1.2.26"
repository = "https://github.com/solana-labs/tour-de-sol"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -16,12 +16,12 @@ reqwest = { version = "0.10.4", default-features = false }
serde = "1.0.110"
serde_json = "1.0.53"
serde_yaml = "0.8.12"
solana-core = { path = "../core", version = "1.2.24" }
solana-client = { path = "../client", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.24" }
solana-metrics = { path = "../metrics", version = "1.2.24" }
solana-net-utils = { path = "../net-utils", version = "1.2.24" }
solana-notifier = { path = "../notifier", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-stake-program = { path = "../programs/stake", version = "1.2.24" }
solana-core = { path = "../core", version = "1.2.26" }
solana-client = { path = "../client", version = "1.2.26" }
solana-logger = { path = "../logger", version = "1.2.26" }
solana-metrics = { path = "../metrics", version = "1.2.26" }
solana-net-utils = { path = "../net-utils", version = "1.2.26" }
solana-notifier = { path = "../notifier", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-stake-program = { path = "../programs/stake", version = "1.2.26" }
tar = "0.4.28"

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-rayon-threadlimit"
version = "1.2.24"
version = "1.2.26"
description = "solana-rayon-threadlimit"
homepage = "https://solana.com/"
readme = "../README.md"

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-remote-wallet"
description = "Blockchain, Rebuilt for Scale"
version = "1.2.24"
version = "1.2.26"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -18,7 +18,7 @@ num-derive = { version = "0.3" }
num-traits = { version = "0.2" }
parking_lot = "0.10"
semver = "0.9"
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
thiserror = "1.0"
url = "2.1.1"

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-runtime"
version = "1.2.24"
version = "1.2.26"
description = "Solana runtime"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -27,14 +27,14 @@ rand = "0.7.0"
rayon = "1.3.0"
serde = { version = "1.0.110", features = ["rc"] }
serde_derive = "1.0.103"
solana-config-program = { path = "../programs/config", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.24" }
solana-measure = { path = "../measure", version = "1.2.24" }
solana-metrics = { path = "../metrics", version = "1.2.24" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-stake-program = { path = "../programs/stake", version = "1.2.24" }
solana-vote-program = { path = "../programs/vote", version = "1.2.24" }
solana-config-program = { path = "../programs/config", version = "1.2.26" }
solana-logger = { path = "../logger", version = "1.2.26" }
solana-measure = { path = "../measure", version = "1.2.26" }
solana-metrics = { path = "../metrics", version = "1.2.26" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-stake-program = { path = "../programs/stake", version = "1.2.26" }
solana-vote-program = { path = "../programs/vote", version = "1.2.26" }
tempfile = "3.1.0"
thiserror = "1.0"
@@ -44,7 +44,7 @@ name = "solana_runtime"
[dev-dependencies]
assert_matches = "1.3.0"
solana-noop-program = { path = "../programs/noop", version = "1.2.24" }
solana-noop-program = { path = "../programs/noop", version = "1.2.26" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -472,6 +472,11 @@ impl Bank {
}
}
// HOTFIX
if new.epoch() >= 63 {
new.set_cross_program_support(true)
}
new.update_epoch_stakes(leader_schedule_epoch);
new.ancestors.insert(new.slot(), 0);
new.parents().iter().enumerate().for_each(|(i, p)| {

View File

@@ -2,15 +2,12 @@ use crate::{
bank::Bank,
genesis_utils::{self, GenesisConfigInfo, ValidatorVoteKeypairs},
};
use solana_sdk::{
pubkey::Pubkey,
signature::{Keypair, Signer},
};
use solana_sdk::{pubkey::Pubkey, signature::Signer};
pub fn setup_bank_and_vote_pubkeys(num_vote_accounts: usize, stake: u64) -> (Bank, Vec<Pubkey>) {
// Create some voters at genesis
let validator_voting_keypairs: Vec<_> = (0..num_vote_accounts)
.map(|_| ValidatorVoteKeypairs::new(Keypair::new(), Keypair::new(), Keypair::new()))
.map(|_| ValidatorVoteKeypairs::new_rand())
.collect();
let vote_pubkeys: Vec<_> = validator_voting_keypairs
@@ -21,7 +18,7 @@ pub fn setup_bank_and_vote_pubkeys(num_vote_accounts: usize, stake: u64) -> (Ban
genesis_utils::create_genesis_config_with_vote_accounts(
10_000,
&validator_voting_keypairs,
stake,
vec![stake; validator_voting_keypairs.len()],
);
let bank = Bank::new(&genesis_config);
(bank, vote_pubkeys)

View File

@@ -51,27 +51,40 @@ pub fn create_genesis_config(mint_lamports: u64) -> GenesisConfigInfo {
pub fn create_genesis_config_with_vote_accounts(
mint_lamports: u64,
voting_keypairs: &[impl Borrow<ValidatorVoteKeypairs>],
stake: u64,
stakes: Vec<u64>,
) -> GenesisConfigInfo {
let mut genesis_config_info = create_genesis_config(mint_lamports);
for validator_voting_keypairs in voting_keypairs {
assert!(!voting_keypairs.is_empty());
assert_eq!(voting_keypairs.len(), stakes.len());
let mut genesis_config_info = create_genesis_config_with_leader_ex(
mint_lamports,
&voting_keypairs[0].borrow().node_keypair.pubkey(),
&voting_keypairs[0].borrow().vote_keypair,
&voting_keypairs[0].borrow().stake_keypair.pubkey(),
stakes[0],
BOOTSTRAP_VALIDATOR_LAMPORTS,
);
for (validator_voting_keypairs, stake) in voting_keypairs[1..].iter().zip(&stakes[1..]) {
let node_pubkey = validator_voting_keypairs.borrow().node_keypair.pubkey();
let vote_pubkey = validator_voting_keypairs.borrow().vote_keypair.pubkey();
let stake_pubkey = validator_voting_keypairs.borrow().stake_keypair.pubkey();
// Create accounts
let vote_account = vote_state::create_account(&vote_pubkey, &node_pubkey, 0, stake);
let node_account = Account::new(BOOTSTRAP_VALIDATOR_LAMPORTS, 0, &system_program::id());
let vote_account = vote_state::create_account(&vote_pubkey, &node_pubkey, 0, *stake);
let stake_account = stake_state::create_account(
&stake_pubkey,
&vote_pubkey,
&vote_account,
&genesis_config_info.genesis_config.rent,
stake,
*stake,
);
// Put newly created accounts into genesis
genesis_config_info.genesis_config.accounts.extend(vec![
(vote_pubkey, vote_account.clone()),
(node_pubkey, node_account),
(vote_pubkey, vote_account),
(stake_pubkey, stake_account),
]);
}
@@ -87,6 +100,8 @@ pub fn create_genesis_config_with_leader(
create_genesis_config_with_leader_ex(
mint_lamports,
bootstrap_validator_pubkey,
&Keypair::new(),
&Pubkey::new_rand(),
bootstrap_validator_stake_lamports,
BOOTSTRAP_VALIDATOR_LAMPORTS,
)
@@ -95,13 +110,12 @@ pub fn create_genesis_config_with_leader(
pub fn create_genesis_config_with_leader_ex(
mint_lamports: u64,
bootstrap_validator_pubkey: &Pubkey,
bootstrap_validator_voting_keypair: &Keypair,
bootstrap_validator_staking_pubkey: &Pubkey,
bootstrap_validator_stake_lamports: u64,
bootstrap_validator_lamports: u64,
) -> GenesisConfigInfo {
let mint_keypair = Keypair::new();
let bootstrap_validator_voting_keypair = Keypair::new();
let bootstrap_validator_staking_keypair = Keypair::new();
let bootstrap_validator_vote_account = vote_state::create_account(
&bootstrap_validator_voting_keypair.pubkey(),
&bootstrap_validator_pubkey,
@@ -112,7 +126,7 @@ pub fn create_genesis_config_with_leader_ex(
let rent = Rent::free();
let bootstrap_validator_stake_account = stake_state::create_account(
&bootstrap_validator_staking_keypair.pubkey(),
bootstrap_validator_staking_pubkey,
&bootstrap_validator_voting_keypair.pubkey(),
&bootstrap_validator_vote_account,
&rent,
@@ -133,7 +147,7 @@ pub fn create_genesis_config_with_leader_ex(
bootstrap_validator_vote_account,
),
(
bootstrap_validator_staking_keypair.pubkey(),
*bootstrap_validator_staking_pubkey,
bootstrap_validator_stake_account,
),
]
@@ -154,6 +168,7 @@ pub fn create_genesis_config_with_leader_ex(
GenesisConfigInfo {
genesis_config,
mint_keypair,
voting_keypair: bootstrap_validator_voting_keypair,
voting_keypair: Keypair::from_bytes(&bootstrap_validator_voting_keypair.to_bytes())
.unwrap(),
}
}

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-scripts"
description = "Blockchain, Rebuilt for Scale"
version = "1.2.24"
version = "1.2.26"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-sdk"
version = "1.2.24"
version = "1.2.26"
description = "Solana SDK"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -55,9 +55,9 @@ serde_json = { version = "1.0.53", optional = true }
sha2 = "0.8.2"
thiserror = "1.0"
ed25519-dalek = { version = "=1.0.0-pre.4", optional = true }
solana-crate-features = { path = "../crate-features", version = "1.2.24", optional = true }
solana-logger = { path = "../logger", version = "1.2.24", optional = true }
solana-sdk-macro = { path = "macro", version = "1.2.24" }
solana-crate-features = { path = "../crate-features", version = "1.2.26", optional = true }
solana-logger = { path = "../logger", version = "1.2.26", optional = true }
solana-sdk-macro = { path = "macro", version = "1.2.26" }
rustversion = "1.0.3"
[dev-dependencies]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-sdk-macro"
version = "1.2.24"
version = "1.2.26"
description = "Solana SDK Macro"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"

View File

@@ -3,22 +3,22 @@ name = "solana-stake-accounts"
description = "Blockchain, Rebuilt for Scale"
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
version = "1.2.24"
version = "1.2.26"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
[dependencies]
clap = "2.33.1"
solana-clap-utils = { path = "../clap-utils", version = "1.2.24" }
solana-cli-config = { path = "../cli-config", version = "1.2.24" }
solana-client = { path = "../client", version = "1.2.24" }
solana-remote-wallet = { path = "../remote-wallet", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-stake-program = { path = "../programs/stake", version = "1.2.24" }
solana-clap-utils = { path = "../clap-utils", version = "1.2.26" }
solana-cli-config = { path = "../cli-config", version = "1.2.26" }
solana-client = { path = "../client", version = "1.2.26" }
solana-remote-wallet = { path = "../remote-wallet", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-stake-program = { path = "../programs/stake", version = "1.2.26" }
[dev-dependencies]
solana-runtime = { path = "../runtime", version = "1.2.24" }
solana-runtime = { path = "../runtime", version = "1.2.26" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-stake-monitor"
description = "Blockchain, Rebuilt for Scale"
version = "1.2.24"
version = "1.2.26"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -14,21 +14,21 @@ console = "0.10.1"
log = "0.4.8"
serde = "1.0.110"
serde_yaml = "0.8.12"
solana-clap-utils = { path = "../clap-utils", version = "1.2.24" }
solana-cli-config = { path = "../cli-config", version = "1.2.24" }
solana-client = { path = "../client", version = "1.2.24" }
solana-logger = { path = "../logger", version = "1.2.24" }
solana-metrics = { path = "../metrics", version = "1.2.24" }
solana-sdk = { path = "../sdk", version = "1.2.24" }
solana-stake-program = { path = "../programs/stake", version = "1.2.24" }
solana-transaction-status = { path = "../transaction-status", version = "1.2.24" }
solana-version = { path = "../version", version = "1.2.24" }
solana-clap-utils = { path = "../clap-utils", version = "1.2.26" }
solana-cli-config = { path = "../cli-config", version = "1.2.26" }
solana-client = { path = "../client", version = "1.2.26" }
solana-logger = { path = "../logger", version = "1.2.26" }
solana-metrics = { path = "../metrics", version = "1.2.26" }
solana-sdk = { path = "../sdk", version = "1.2.26" }
solana-stake-program = { path = "../programs/stake", version = "1.2.26" }
solana-transaction-status = { path = "../transaction-status", version = "1.2.26" }
solana-version = { path = "../version", version = "1.2.26" }
[dev-dependencies]
serial_test = "0.4.0"
serial_test_derive = "0.4.0"
solana-local-cluster = { path = "../local-cluster", version = "1.2.24" }
solana-core = { path = "../core", version = "1.2.24" }
solana-local-cluster = { path = "../local-cluster", version = "1.2.26" }
solana-core = { path = "../core", version = "1.2.26" }
tempfile = "3.1.0"
[[bin]]

Some files were not shown because too many files have changed in this diff Show More