Compare commits

...

33 Commits

Author SHA1 Message Date
Michael Vines
899f57962a Add --slots-per-epoch argument
(cherry picked from commit 04c99cf7ea)
2021-03-17 17:25:51 -07:00
Michael Vines
3176b00e57 Add --slots-per-epoch validator
(cherry picked from commit c06ff47a90)
2021-03-17 17:25:51 -07:00
Jeff Washington (jwash)
08b9da8397 drop poh lock after record (#15930)
(cherry picked from commit 5460fb10a2)
2021-03-17 17:24:53 -07:00
mergify[bot]
2bc21ecba2 Allow unbounded wallclock processing time in tests (#15961) (#15966)
(cherry picked from commit f548a04fae)

Co-authored-by: carllin <carl@solana.com>
2021-03-18 00:22:06 +00:00
Jeff Washington (jwash)
5b2a65fab3 add metrics for tick producer and poh_recorder (#15931)
(cherry picked from commit 40997d0aef)
2021-03-17 16:36:50 -07:00
mergify[bot]
f5d56eabf3 Build full SPL in CI (bp #15886) (#15964)
* Build full SPL in CI

(cherry picked from commit 82269f1351)

* Avoid changing signature of ProgramTest::add_account

(cherry picked from commit 03180b502d)

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-03-17 22:46:55 +00:00
Michael Vines
af45efb62c Notice the user when the --mint, --bpf-program, or --clone arguments are ignored
(cherry picked from commit 59c19d9fbf)
2021-03-17 14:10:14 -07:00
mergify[bot]
f528cda832 Ignore flaky test_banking_stage_entries_only and test_banking_stage_entryfication (#15959)
(cherry picked from commit 8a9b51952e)

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-03-17 20:34:30 +00:00
mergify[bot]
eeef9f4e59 Separate snapshot location (bp #15840) (#15956)
* Add option for separate snapshot location

(cherry picked from commit 6126878f509c69e23480a5ec22b3271e2b16e072)
(cherry picked from commit 0209d334bd)

* Apply suggestions from code review

Co-authored-by: Michael Vines <mvines@gmail.com>
(cherry picked from commit cfb01e26dd)

* add missed suggestion

(cherry picked from commit a43b3674c7)

* Revert to snapshots

Co-authored-by: Michael Vines <mvines@gmail.com>
(cherry picked from commit 0b42379ed7)

* Revert to snapshots 2

(cherry picked from commit 20b53eb4b4)

* Revert to removing only tmp-

(cherry picked from commit a5d144b00f)

Co-authored-by: DimAn <diman@diman.io>
Co-authored-by: DimAn <andiman7000@gmail.com>
2021-03-17 20:25:18 +00:00
Michael Vines
32124b59e9 Download snapshot files with a tmp- prefix so they'll automatically be cleaned up if interrupted
(cherry picked from commit 58b980f9cd)
2021-03-17 10:18:18 -07:00
Michael Vines
aa9772f9c0 Replace solana-program-test when building example-helloworld 2021-03-17 09:08:41 -07:00
mergify[bot]
5f183bd773 Add helper for paring down signers to those requried by a tx message (bp #15899) (#15938)
* sdk: Add accessor for signer pubkeys of a tx message

(cherry picked from commit bf33ce8906)

* clap-utils: Add helper to `CliSignerInfo` for getting signers for a message

(cherry picked from commit 4e99f1e634)

Co-authored-by: Trent Nelson <trent@solana.com>
2021-03-17 07:48:47 +00:00
mergify[bot]
2238e5001b solana-install init can now select a pre-release from Github (#15936)
(cherry picked from commit d9176c1903)

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-03-17 04:31:55 +00:00
mergify[bot]
79fa7ef55c CLI: Support dumping the TX message in sign-only mode (#15933)
(cherry picked from commit 672e9c640f)

Co-authored-by: Trent Nelson <trent@solana.com>
2021-03-17 04:13:21 +00:00
mergify[bot]
07df827411 Bump tokio to 1.1 (#15926) (#15928)
(cherry picked from commit 654449ce91)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-03-16 23:29:55 +00:00
mergify[bot]
a259ff0e72 Wallclock BankingStage Throttle (#15731) (#15890)
(cherry picked from commit c1ba265dd9)

Co-authored-by: carllin <carl@solana.com>
2021-03-16 21:12:59 +00:00
mergify[bot]
d7d3e767e7 fix: compute pre/post token balances on all accounts if token program present (#15900) (#15923)
* fix: compute pre/post token balances on all accounts if token program present

* fix: skip token program in balance query

* fix: prevent program ids from being collected

(cherry picked from commit 61112d4826)

Co-authored-by: Josh <josh.hundley@gmail.com>
2021-03-16 18:23:29 +00:00
mergify[bot]
6e8aa9af17 nit: fix spelling (#15908) (#15911)
(cherry picked from commit 5760cf0f41)

# Conflicts:
#	sdk/src/feature_set.rs

Co-authored-by: Jack May <jack@solana.com>
2021-03-16 10:58:39 -07:00
mergify[bot]
0236de7bc8 Encourage use of the default --ledger location (#15921)
(cherry picked from commit 1c261d293f)

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-03-16 16:58:14 +00:00
mergify[bot]
899bd1572a Show flags for accounts in tx by solana confirm (#15804) (#15906)
* Show flags for accounts in tx by solana confirm

* Address review comments

* Improve comment a bit

* Apply suggestions from code review

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* Further apply review suggestions

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
(cherry picked from commit 74aa32175b)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2021-03-16 10:43:06 +00:00
mergify[bot]
97ec4cd44e Cli: better estimate of epoch time elapsed/remaining (#15893) (#15918)
* Add rpc_client api for getRecentPerformanceSamples

* Prep fn for variable avg slot time

* Use recent-perf-samples to more-accurately estimate epoch completed times

* Spell out average

(cherry picked from commit 3726358f51)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-03-16 09:58:51 +00:00
mergify[bot]
5500970a7e Add cargo-bpf-test --no-run flag, matching cargo-test (#15916)
(cherry picked from commit eb19e11688)

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-03-16 09:45:35 +00:00
Michael Vines
caea04d8d5 Pin solana crate versions to prevent downstream users from accidentally mixing crate versions 2021-03-16 08:41:28 +00:00
Michael Vines
b1a90c3580 =1.6.1 2021-03-16 08:41:28 +00:00
mergify[bot]
5bd4e38345 Charge compute budget for bytes passed via cpi (#15874) (#15905)
(cherry picked from commit ad9901d7c6)

Co-authored-by: Jack May <jack@solana.com>
2021-03-16 07:57:32 +00:00
mergify[bot]
fddba08571 Improve Instruction::new deprecation warning (#15896)
(cherry picked from commit 8567b41d5f)

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-03-16 05:18:31 +00:00
Michael Vines
87963764fa Export tokio for program-test clients
(cherry picked from commit 430ed6d774)
2021-03-15 22:14:17 -07:00
mergify[bot]
b691a159dd increment_cargo_version.sh tune ups (bp #15880) (#15892)
* Disallow version bump with dirty working tree

(cherry picked from commit 853e735edf)

* Ignore `not_paths` for `*.md` files when bumping version

(cherry picked from commit 510760d81b)

* Also ignore `*/node_modules/*` paths when bumping version

(cherry picked from commit 2bf46b789f)

Co-authored-by: Trent Nelson <trent@solana.com>
2021-03-16 02:07:46 +00:00
mergify[bot]
5af1d48be8 Display actual account length (#15875) (#15884)
(cherry picked from commit 60e5fd11c9)

Co-authored-by: Jack May <jack@solana.com>
2021-03-16 01:01:25 +00:00
mergify[bot]
3b3ec3313f Fix real_number_string_trimmed zero-decimal behavior (#15873) (#15877)
* Add failing test

* Don't strip zeroes from zero-decimal amounts

* Add zero-case test

(cherry picked from commit c40bd5f394)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-03-15 21:33:01 +00:00
Michael Vines
be00246fb5 Bump version to v1.6.1 2021-03-15 14:47:58 -06:00
Michael Vines
1d80ba9edf Update cargo lock files on version bump 2021-03-15 14:47:58 -06:00
mergify[bot]
4bcf976ecd Fix delinquent stake display (#15839)
(cherry picked from commit eab182188a)

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-03-13 20:27:25 +00:00
162 changed files with 1816 additions and 1095 deletions

327
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.6.0"
version = "1.6.1"
description = "Solana account decoder"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -19,10 +19,10 @@ lazy_static = "1.4.0"
serde = "1.0.122"
serde_derive = "1.0.103"
serde_json = "1.0.56"
solana-config-program = { path = "../programs/config", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-stake-program = { path = "../programs/stake", version = "1.6.0" }
solana-vote-program = { path = "../programs/vote", version = "1.6.0" }
solana-config-program = { path = "../programs/config", version = "=1.6.1" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
solana-stake-program = { path = "../programs/stake", version = "=1.6.1" }
solana-vote-program = { path = "../programs/vote", version = "=1.6.1" }
spl-token-v2-0 = { package = "spl-token", version = "=3.1.0", features = ["no-entrypoint"] }
thiserror = "1.0"
zstd = "0.5.1"

View File

@@ -172,10 +172,12 @@ pub fn real_number_string(amount: u64, decimals: u8) -> StringDecimals {
}
pub fn real_number_string_trimmed(amount: u64, decimals: u8) -> StringDecimals {
let s = real_number_string(amount, decimals);
let zeros_trimmed = s.trim_end_matches('0');
let decimal_trimmed = zeros_trimmed.trim_end_matches('.');
decimal_trimmed.to_string()
let mut s = real_number_string(amount, decimals);
if decimals > 0 {
let zeros_trimmed = s.trim_end_matches('0');
s = zeros_trimmed.trim_end_matches('.').to_string();
}
s
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
@@ -363,6 +365,14 @@ mod test {
real_number_string_trimmed(1, 0)
);
assert_eq!(token_amount.ui_amount, Some(1.0));
assert_eq!(&real_number_string(10, 0), "10");
assert_eq!(&real_number_string_trimmed(10, 0), "10");
let token_amount = token_amount_to_ui_amount(10, 0);
assert_eq!(
token_amount.ui_amount_string,
real_number_string_trimmed(10, 0)
);
assert_eq!(token_amount.ui_amount, Some(10.0));
assert_eq!(&real_number_string(1, 9), "0.000000001");
assert_eq!(&real_number_string_trimmed(1, 9), "0.000000001");
let token_amount = token_amount_to_ui_amount(1, 9);
@@ -402,4 +412,32 @@ mod test {
);
assert_eq!(token_amount.ui_amount, None);
}
#[test]
fn test_ui_token_amount_real_string_zero() {
assert_eq!(&real_number_string(0, 0), "0");
assert_eq!(&real_number_string_trimmed(0, 0), "0");
let token_amount = token_amount_to_ui_amount(0, 0);
assert_eq!(
token_amount.ui_amount_string,
real_number_string_trimmed(0, 0)
);
assert_eq!(token_amount.ui_amount, Some(0.0));
assert_eq!(&real_number_string(0, 9), "0.000000000");
assert_eq!(&real_number_string_trimmed(0, 9), "0");
let token_amount = token_amount_to_ui_amount(0, 9);
assert_eq!(
token_amount.ui_amount_string,
real_number_string_trimmed(0, 9)
);
assert_eq!(token_amount.ui_amount, Some(0.0));
assert_eq!(&real_number_string(0, 25), "0.0000000000000000000000000");
assert_eq!(&real_number_string_trimmed(0, 25), "0");
let token_amount = token_amount_to_ui_amount(0, 20);
assert_eq!(
token_amount.ui_amount_string,
real_number_string_trimmed(0, 20)
);
assert_eq!(token_amount.ui_amount, None);
}
}

View File

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

View File

@@ -2,7 +2,7 @@
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2018"
name = "solana-accounts-cluster-bench"
version = "1.6.0"
version = "1.6.1"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -13,22 +13,22 @@ clap = "2.33.1"
log = "0.4.11"
rand = "0.7.0"
rayon = "1.4.1"
solana-account-decoder = { path = "../account-decoder", version = "1.6.0" }
solana-clap-utils = { path = "../clap-utils", version = "1.6.0" }
solana-client = { path = "../client", version = "1.6.0" }
solana-core = { path = "../core", version = "1.6.0" }
solana-measure = { path = "../measure", version = "1.6.0" }
solana-logger = { path = "../logger", version = "1.6.0" }
solana-net-utils = { path = "../net-utils", version = "1.6.0" }
solana-faucet = { path = "../faucet", version = "1.6.0" }
solana-runtime = { path = "../runtime", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-transaction-status = { path = "../transaction-status", version = "1.6.0" }
solana-version = { path = "../version", version = "1.6.0" }
solana-account-decoder = { path = "../account-decoder", version = "=1.6.1" }
solana-clap-utils = { path = "../clap-utils", version = "=1.6.1" }
solana-client = { path = "../client", version = "=1.6.1" }
solana-core = { path = "../core", version = "=1.6.1" }
solana-measure = { path = "../measure", version = "=1.6.1" }
solana-logger = { path = "../logger", version = "=1.6.1" }
solana-net-utils = { path = "../net-utils", version = "=1.6.1" }
solana-faucet = { path = "../faucet", version = "=1.6.1" }
solana-runtime = { path = "../runtime", version = "=1.6.1" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
solana-transaction-status = { path = "../transaction-status", version = "=1.6.1" }
solana-version = { path = "../version", version = "=1.6.1" }
spl-token-v2-0 = { package = "spl-token", version = "=3.1.0", features = ["no-entrypoint"] }
[dev-dependencies]
solana-local-cluster = { path = "../local-cluster", version = "1.6.0" }
solana-local-cluster = { path = "../local-cluster", version = "=1.6.1" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

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

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-banks-client"
version = "1.6.0"
version = "1.6.1"
description = "Solana banks client"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -15,16 +15,16 @@ borsh = "0.8.1"
borsh-derive = "0.8.1"
futures = "0.3"
mio = "0.7.6"
solana-banks-interface = { path = "../banks-interface", version = "1.6.0" }
solana-program = { path = "../sdk/program", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-banks-interface = { path = "../banks-interface", version = "=1.6.1" }
solana-program = { path = "../sdk/program", version = "=1.6.1" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
tarpc = { version = "0.24.1", features = ["full"] }
tokio = { version = "1.1", features = ["full"] }
tokio-serde = { version = "0.8", features = ["bincode"] }
[dev-dependencies]
solana-runtime = { path = "../runtime", version = "1.6.0" }
solana-banks-server = { path = "../banks-server", version = "1.6.0" }
solana-runtime = { path = "../runtime", version = "=1.6.1" }
solana-banks-server = { path = "../banks-server", version = "=1.6.1" }
[lib]
crate-type = ["lib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-banks-interface"
version = "1.6.0"
version = "1.6.1"
description = "Solana banks RPC interface"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,7 +12,7 @@ edition = "2018"
[dependencies]
mio = "0.7.6"
serde = { version = "1.0.122", features = ["derive"] }
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
tarpc = { version = "0.24.1", features = ["full"] }
[dev-dependencies]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-banks-server"
version = "1.6.0"
version = "1.6.1"
description = "Solana banks server"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -14,10 +14,10 @@ bincode = "1.3.1"
futures = "0.3"
log = "0.4.11"
mio = "0.7.6"
solana-banks-interface = { path = "../banks-interface", version = "1.6.0" }
solana-runtime = { path = "../runtime", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-metrics = { path = "../metrics", version = "1.6.0" }
solana-banks-interface = { path = "../banks-interface", version = "=1.6.1" }
solana-runtime = { path = "../runtime", version = "=1.6.1" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
solana-metrics = { path = "../metrics", version = "=1.6.1" }
tarpc = { version = "0.24.1", features = ["full"] }
tokio = { version = "1.1", features = ["full"] }
tokio-serde = { version = "0.8", features = ["bincode"] }

View File

@@ -2,7 +2,7 @@
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2018"
name = "solana-bench-exchange"
version = "1.6.0"
version = "1.6.1"
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.5.0"
serde_json = "1.0.56"
serde_yaml = "0.8.13"
solana-clap-utils = { path = "../clap-utils", version = "1.6.0" }
solana-core = { path = "../core", version = "1.6.0" }
solana-genesis = { path = "../genesis", version = "1.6.0" }
solana-client = { path = "../client", version = "1.6.0" }
solana-faucet = { path = "../faucet", version = "1.6.0" }
solana-exchange-program = { path = "../programs/exchange", version = "1.6.0" }
solana-logger = { path = "../logger", version = "1.6.0" }
solana-metrics = { path = "../metrics", version = "1.6.0" }
solana-net-utils = { path = "../net-utils", version = "1.6.0" }
solana-runtime = { path = "../runtime", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-version = { path = "../version", version = "1.6.0" }
solana-clap-utils = { path = "../clap-utils", version = "=1.6.1" }
solana-core = { path = "../core", version = "=1.6.1" }
solana-genesis = { path = "../genesis", version = "=1.6.1" }
solana-client = { path = "../client", version = "=1.6.1" }
solana-faucet = { path = "../faucet", version = "=1.6.1" }
solana-exchange-program = { path = "../programs/exchange", version = "=1.6.1" }
solana-logger = { path = "../logger", version = "=1.6.1" }
solana-metrics = { path = "../metrics", version = "=1.6.1" }
solana-net-utils = { path = "../net-utils", version = "=1.6.1" }
solana-runtime = { path = "../runtime", version = "=1.6.1" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
solana-version = { path = "../version", version = "=1.6.1" }
[dev-dependencies]
solana-local-cluster = { path = "../local-cluster", version = "1.6.0" }
solana-local-cluster = { path = "../local-cluster", version = "=1.6.1" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

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

View File

@@ -2,7 +2,7 @@
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2018"
name = "solana-bench-tps"
version = "1.6.0"
version = "1.6.1"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -15,22 +15,22 @@ log = "0.4.11"
rayon = "1.5.0"
serde_json = "1.0.56"
serde_yaml = "0.8.13"
solana-clap-utils = { path = "../clap-utils", version = "1.6.0" }
solana-core = { path = "../core", version = "1.6.0" }
solana-genesis = { path = "../genesis", version = "1.6.0" }
solana-client = { path = "../client", version = "1.6.0" }
solana-faucet = { path = "../faucet", version = "1.6.0" }
solana-logger = { path = "../logger", version = "1.6.0" }
solana-metrics = { path = "../metrics", version = "1.6.0" }
solana-measure = { path = "../measure", version = "1.6.0" }
solana-net-utils = { path = "../net-utils", version = "1.6.0" }
solana-runtime = { path = "../runtime", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-version = { path = "../version", version = "1.6.0" }
solana-clap-utils = { path = "../clap-utils", version = "=1.6.1" }
solana-core = { path = "../core", version = "=1.6.1" }
solana-genesis = { path = "../genesis", version = "=1.6.1" }
solana-client = { path = "../client", version = "=1.6.1" }
solana-faucet = { path = "../faucet", version = "=1.6.1" }
solana-logger = { path = "../logger", version = "=1.6.1" }
solana-metrics = { path = "../metrics", version = "=1.6.1" }
solana-measure = { path = "../measure", version = "=1.6.1" }
solana-net-utils = { path = "../net-utils", version = "=1.6.1" }
solana-runtime = { path = "../runtime", version = "=1.6.1" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
solana-version = { path = "../version", version = "=1.6.1" }
[dev-dependencies]
serial_test = "0.4.0"
solana-local-cluster = { path = "../local-cluster", version = "1.6.0" }
solana-local-cluster = { path = "../local-cluster", version = "=1.6.1" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

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

View File

@@ -12,6 +12,7 @@ use solana_remote_wallet::{
};
use solana_sdk::{
hash::Hash,
message::Message,
pubkey::Pubkey,
signature::{
keypair_from_seed, keypair_from_seed_phrase_and_passphrase, read_keypair,
@@ -28,6 +29,7 @@ use std::{
pub struct SignOnly {
pub blockhash: Hash,
pub message: Option<String>,
pub present_signers: Vec<(Pubkey, Signature)>,
pub absent_signers: Vec<Pubkey>,
pub bad_signers: Vec<Pubkey>,
@@ -67,6 +69,18 @@ impl CliSignerInfo {
None
}
}
pub fn signers_for_message(&self, message: &Message) -> Vec<&dyn Signer> {
self.signers
.iter()
.filter_map(|k| {
if message.signer_keys().contains(&&k.pubkey()) {
Some(k.as_ref())
} else {
None
}
})
.collect()
}
}
pub struct DefaultSigner {
@@ -355,6 +369,7 @@ fn sanitize_seed_phrase(seed_phrase: &str) -> String {
#[cfg(test)]
mod tests {
use super::*;
use solana_sdk::system_instruction;
#[test]
fn test_sanitize_seed_phrase() {
@@ -364,4 +379,35 @@ mod tests {
sanitize_seed_phrase(seed_phrase)
);
}
#[test]
fn test_signer_info_signers_for_message() {
let source = Keypair::new();
let fee_payer = Keypair::new();
let nonsigner1 = Keypair::new();
let nonsigner2 = Keypair::new();
let recipient = Pubkey::new_unique();
let message = Message::new(
&[system_instruction::transfer(
&source.pubkey(),
&recipient,
42,
)],
Some(&fee_payer.pubkey()),
);
let signers = vec![
Box::new(fee_payer) as Box<dyn Signer>,
Box::new(source) as Box<dyn Signer>,
Box::new(nonsigner1) as Box<dyn Signer>,
Box::new(nonsigner2) as Box<dyn Signer>,
];
let signer_info = CliSignerInfo { signers };
let msg_signers = signer_info.signers_for_message(&message);
let signer_pubkeys = msg_signers.iter().map(|s| s.pubkey()).collect::<Vec<_>>();
let expect = vec![
signer_info.signers[0].pubkey(),
signer_info.signers[1].pubkey(),
];
assert_eq!(signer_pubkeys, expect);
}
}

View File

@@ -19,6 +19,12 @@ pub const SIGNER_ARG: ArgConstant<'static> = ArgConstant {
help: "Provide a public-key/signature pair for the transaction",
};
pub const DUMP_TRANSACTION_MESSAGE: ArgConstant<'static> = ArgConstant {
name: "dump_transaction_message",
long: "dump-transaction-message",
help: "Display the base64 encoded binary transaction message in sign-only mode",
};
pub fn blockhash_arg<'a, 'b>() -> Arg<'a, 'b> {
Arg::with_name(BLOCKHASH_ARG.name)
.long(BLOCKHASH_ARG.long)
@@ -47,6 +53,14 @@ fn signer_arg<'a, 'b>() -> Arg<'a, 'b> {
.help(SIGNER_ARG.help)
}
pub fn dump_transaction_message<'a, 'b>() -> Arg<'a, 'b> {
Arg::with_name(DUMP_TRANSACTION_MESSAGE.name)
.long(DUMP_TRANSACTION_MESSAGE.long)
.takes_value(false)
.requires(SIGN_ONLY_ARG.name)
.help(DUMP_TRANSACTION_MESSAGE.help)
}
pub trait ArgsConfig {
fn blockhash_arg<'a, 'b>(&self, arg: Arg<'a, 'b>) -> Arg<'a, 'b> {
arg
@@ -57,6 +71,9 @@ pub trait ArgsConfig {
fn signer_arg<'a, 'b>(&self, arg: Arg<'a, 'b>) -> Arg<'a, 'b> {
arg
}
fn dump_transaction_message_arg<'a, 'b>(&self, arg: Arg<'a, 'b>) -> Arg<'a, 'b> {
arg
}
}
pub trait OfflineArgs {
@@ -69,6 +86,7 @@ impl OfflineArgs for App<'_, '_> {
self.arg(config.blockhash_arg(blockhash_arg()))
.arg(config.sign_only_arg(sign_only_arg()))
.arg(config.signer_arg(signer_arg()))
.arg(config.dump_transaction_message_arg(dump_transaction_message()))
}
fn offline_args(self) -> Self {
struct NullArgsConfig {}

View File

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

View File

@@ -3,13 +3,14 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2018"
name = "solana-cli-output"
description = "Blockchain, Rebuilt for Scale"
version = "1.6.0"
version = "1.6.1"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-cli-output"
[dependencies]
base64 = "0.13.0"
chrono = { version = "0.4.11", features = ["serde"] }
console = "0.11.3"
humantime = "2.0.1"
@@ -18,13 +19,13 @@ indicatif = "0.15.0"
serde = "1.0.122"
serde_derive = "1.0.103"
serde_json = "1.0.56"
solana-account-decoder = { path = "../account-decoder", version = "1.6.0" }
solana-clap-utils = { path = "../clap-utils", version = "1.6.0" }
solana-client = { path = "../client", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-stake-program = { path = "../programs/stake", version = "1.6.0" }
solana-transaction-status = { path = "../transaction-status", version = "1.6.0" }
solana-vote-program = { path = "../programs/vote", version = "1.6.0" }
solana-account-decoder = { path = "../account-decoder", version = "=1.6.1" }
solana-clap-utils = { path = "../clap-utils", version = "=1.6.1" }
solana-client = { path = "../client", version = "=1.6.1" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
solana-stake-program = { path = "../programs/stake", version = "=1.6.1" }
solana-transaction-status = { path = "../transaction-status", version = "=1.6.1" }
solana-vote-program = { path = "../programs/vote", version = "=1.6.1" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -19,7 +19,7 @@ use {
RpcVoteAccountInfo,
},
solana_sdk::{
clock::{self, Epoch, Slot, UnixTimestamp},
clock::{Epoch, Slot, UnixTimestamp},
epoch_info::EpochInfo,
hash::Hash,
native_token::lamports_to_sol,
@@ -231,12 +231,8 @@ pub struct CliSlotStatus {
pub struct CliEpochInfo {
#[serde(flatten)]
pub epoch_info: EpochInfo,
}
impl From<EpochInfo> for CliEpochInfo {
fn from(epoch_info: EpochInfo) -> Self {
Self { epoch_info }
}
#[serde(skip)]
pub average_slot_time_ms: u64,
}
impl QuietDisplay for CliEpochInfo {}
@@ -286,16 +282,16 @@ impl fmt::Display for CliEpochInfo {
"Epoch Completed Time:",
&format!(
"{}/{} ({} remaining)",
slot_to_human_time(self.epoch_info.slot_index),
slot_to_human_time(self.epoch_info.slots_in_epoch),
slot_to_human_time(remaining_slots_in_epoch)
slot_to_human_time(self.epoch_info.slot_index, self.average_slot_time_ms),
slot_to_human_time(self.epoch_info.slots_in_epoch, self.average_slot_time_ms),
slot_to_human_time(remaining_slots_in_epoch, self.average_slot_time_ms)
),
)
}
}
fn slot_to_human_time(slot: Slot) -> String {
humantime::format_duration(Duration::from_millis(slot * clock::DEFAULT_MS_PER_SLOT)).to_string()
fn slot_to_human_time(slot: Slot, slot_time_ms: u64) -> String {
humantime::format_duration(Duration::from_secs((slot * slot_time_ms) / 1000)).to_string()
}
#[derive(Serialize, Deserialize, Default)]
@@ -1323,6 +1319,8 @@ impl fmt::Display for CliInflation {
#[serde(rename_all = "camelCase")]
pub struct CliSignOnlyData {
pub blockhash: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[serde(skip_serializing_if = "Vec::is_empty", default)]
pub signers: Vec<String>,
#[serde(skip_serializing_if = "Vec::is_empty", default)]
@@ -1338,6 +1336,9 @@ impl fmt::Display for CliSignOnlyData {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
writeln!(f)?;
writeln_name_value(f, "Blockhash:", &self.blockhash)?;
if let Some(message) = self.message.as_ref() {
writeln_name_value(f, "Transaction Message:", message)?;
}
if !self.signers.is_empty() {
writeln!(f, "{}", style("Signers (Pubkey=Signature):").bold())?;
for signer in self.signers.iter() {
@@ -1700,9 +1701,22 @@ impl fmt::Display for CliUpgradeableBuffer {
}
}
#[derive(Debug, Default)]
pub struct ReturnSignersConfig {
pub dump_transaction_message: bool,
}
pub fn return_signers(
tx: &Transaction,
output_format: &OutputFormat,
) -> Result<String, Box<dyn std::error::Error>> {
return_signers_with_config(tx, output_format, &ReturnSignersConfig::default())
}
pub fn return_signers_with_config(
tx: &Transaction,
output_format: &OutputFormat,
config: &ReturnSignersConfig,
) -> Result<String, Box<dyn std::error::Error>> {
let verify_results = tx.verify_with_results();
let mut signers = Vec::new();
@@ -1721,9 +1735,16 @@ pub fn return_signers(
bad_sig.push(key.to_string());
}
});
let message = if config.dump_transaction_message {
let message_data = tx.message_data();
Some(base64::encode(&message_data))
} else {
None
};
let cli_command = CliSignOnlyData {
blockhash: tx.message.recent_blockhash.to_string(),
message,
signers,
absent,
bad_sig,
@@ -1778,8 +1799,14 @@ pub fn parse_sign_only_reply_string(reply: &str) -> SignOnly {
.collect();
}
let message = object
.get("message")
.and_then(|o| o.as_str())
.map(|m| m.to_string());
SignOnly {
blockhash,
message,
present_signers,
absent_signers,
bad_signers,
@@ -2058,6 +2085,25 @@ mod tests {
let res = return_signers(&tx, &OutputFormat::JsonCompact).unwrap();
let sign_only = parse_sign_only_reply_string(&res);
assert_eq!(sign_only.blockhash, blockhash);
assert_eq!(sign_only.message, None);
assert_eq!(sign_only.present_signers[0].0, present.pubkey());
assert_eq!(sign_only.absent_signers[0], absent.pubkey());
assert_eq!(sign_only.bad_signers[0], bad.pubkey());
let expected_msg = "AwECBwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDgTl3Dqh9\
F19Wo1Rmw0x+zMuNipG07jeiXfYPW4/Js5QEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE\
BAQEBAYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBQUFBQUFBQUFBQUFBQUFBQUF\
BQUFBQUFBQUFBQUFBQUGp9UXGSxWjuCKhF9z0peIzwNcMUWyGrNE2AYuqUAAAAAAAAAAAAAA\
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcH\
BwcCBgMDBQIEBAAAAAYCAQQMAgAAACoAAAAAAAAA"
.to_string();
let config = ReturnSignersConfig {
dump_transaction_message: true,
};
let res = return_signers_with_config(&tx, &OutputFormat::JsonCompact, &config).unwrap();
let sign_only = parse_sign_only_reply_string(&res);
assert_eq!(sign_only.blockhash, blockhash);
assert_eq!(sign_only.message, Some(expected_msg));
assert_eq!(sign_only.present_signers[0].0, present.pubkey());
assert_eq!(sign_only.absent_signers[0], absent.pubkey());
assert_eq!(sign_only.bad_signers[0], bad.pubkey());

View File

@@ -4,7 +4,7 @@ use {
console::style,
indicatif::{ProgressBar, ProgressStyle},
solana_sdk::{
clock::UnixTimestamp, hash::Hash, native_token::lamports_to_sol,
clock::UnixTimestamp, hash::Hash, message::Message, native_token::lamports_to_sol,
program_utils::limited_deserialize, transaction::Transaction,
},
solana_transaction_status::UiTransactionStatusMeta,
@@ -125,6 +125,31 @@ pub fn println_signers(
println!();
}
fn format_account_mode(message: &Message, index: usize) -> String {
format!(
"{}r{}{}", // accounts are always readable...
if message.is_signer(index) {
"s" // stands for signer
} else {
"-"
},
if message.is_writable(index) {
"w" // comment for consistent rust fmt (no joking; lol)
} else {
"-"
},
// account may be executable on-chain while not being
// designated as a program-id in the message
if message.maybe_executable(index) {
"x"
} else {
// programs to be executed via CPI cannot be identified as
// executable from the message
"-"
},
)
}
pub fn write_transaction<W: io::Write>(
w: &mut W,
transaction: &Transaction,
@@ -167,16 +192,31 @@ pub fn write_transaction<W: io::Write>(
prefix, signature_index, signature, sigverify_status,
)?;
}
writeln!(w, "{}{:?}", prefix, message.header)?;
let mut fee_payer_index = None;
for (account_index, account) in message.account_keys.iter().enumerate() {
writeln!(w, "{}Account {}: {:?}", prefix, account_index, account)?;
if fee_payer_index.is_none() && message.is_non_loader_key(account, account_index) {
fee_payer_index = Some(account_index)
}
writeln!(
w,
"{}Account {}: {} {}{}",
prefix,
account_index,
format_account_mode(message, account_index),
account,
if Some(account_index) == fee_payer_index {
" (fee payer)"
} else {
""
},
)?;
}
for (instruction_index, instruction) in message.instructions.iter().enumerate() {
let program_pubkey = message.account_keys[instruction.program_id_index as usize];
writeln!(w, "{}Instruction {}", prefix, instruction_index)?;
writeln!(
w,
"{} Program: {} ({})",
"{} Program: {} ({})",
prefix, program_pubkey, instruction.program_id_index
)?;
for (account_index, account) in instruction.accounts.iter().enumerate() {

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2018"
name = "solana-cli"
description = "Blockchain, Rebuilt for Scale"
version = "1.6.0"
version = "1.6.1"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -28,29 +28,29 @@ reqwest = { version = "0.10.8", default-features = false, features = ["blocking"
serde = "1.0.122"
serde_derive = "1.0.103"
serde_json = "1.0.56"
solana-account-decoder = { path = "../account-decoder", version = "1.6.0" }
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "1.6.0" }
solana-clap-utils = { path = "../clap-utils", version = "1.6.0" }
solana-cli-config = { path = "../cli-config", version = "1.6.0" }
solana-cli-output = { path = "../cli-output", version = "1.6.0" }
solana-client = { path = "../client", version = "1.6.0" }
solana-config-program = { path = "../programs/config", version = "1.6.0" }
solana-faucet = { path = "../faucet", version = "1.6.0" }
solana-logger = { path = "../logger", version = "1.6.0" }
solana-net-utils = { path = "../net-utils", version = "1.6.0" }
solana-account-decoder = { path = "../account-decoder", version = "=1.6.1" }
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "=1.6.1" }
solana-clap-utils = { path = "../clap-utils", version = "=1.6.1" }
solana-cli-config = { path = "../cli-config", version = "=1.6.1" }
solana-cli-output = { path = "../cli-output", version = "=1.6.1" }
solana-client = { path = "../client", version = "=1.6.1" }
solana-config-program = { path = "../programs/config", version = "=1.6.1" }
solana-faucet = { path = "../faucet", version = "=1.6.1" }
solana-logger = { path = "../logger", version = "=1.6.1" }
solana-net-utils = { path = "../net-utils", version = "=1.6.1" }
solana_rbpf = "=0.2.5"
solana-remote-wallet = { path = "../remote-wallet", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-stake-program = { path = "../programs/stake", version = "1.6.0" }
solana-transaction-status = { path = "../transaction-status", version = "1.6.0" }
solana-version = { path = "../version", version = "1.6.0" }
solana-vote-program = { path = "../programs/vote", version = "1.6.0" }
solana-remote-wallet = { path = "../remote-wallet", version = "=1.6.1" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
solana-stake-program = { path = "../programs/stake", version = "=1.6.1" }
solana-transaction-status = { path = "../transaction-status", version = "=1.6.1" }
solana-version = { path = "../version", version = "=1.6.1" }
solana-vote-program = { path = "../programs/vote", version = "=1.6.1" }
thiserror = "1.0.21"
tiny-bip39 = "0.7.0"
url = "2.1.1"
[dev-dependencies]
solana-core = { path = "../core", version = "1.6.0" }
solana-core = { path = "../core", version = "=1.6.1" }
tempfile = "3.1.0"
[[bin]]

View File

@@ -18,8 +18,8 @@ use solana_clap_utils::{
};
use solana_cli_output::{
display::{build_balance_message, println_name_value},
return_signers, CliAccount, CliSignature, CliSignatureVerificationStatus, CliTransaction,
CliTransactionConfirmation, OutputFormat,
return_signers_with_config, CliAccount, CliSignature, CliSignatureVerificationStatus,
CliTransaction, CliTransactionConfirmation, OutputFormat, ReturnSignersConfig,
};
use solana_client::{
blockhash_query::BlockhashQuery,
@@ -198,6 +198,7 @@ pub enum CliCommand {
lockup: Lockup,
amount: SpendAmount,
sign_only: bool,
dump_transaction_message: bool,
blockhash_query: BlockhashQuery,
nonce_account: Option<Pubkey>,
nonce_authority: SignerIndex,
@@ -208,6 +209,7 @@ pub enum CliCommand {
stake_account_pubkey: Pubkey,
stake_authority: SignerIndex,
sign_only: bool,
dump_transaction_message: bool,
blockhash_query: BlockhashQuery,
nonce_account: Option<Pubkey>,
nonce_authority: SignerIndex,
@@ -219,6 +221,7 @@ pub enum CliCommand {
stake_authority: SignerIndex,
force: bool,
sign_only: bool,
dump_transaction_message: bool,
blockhash_query: BlockhashQuery,
nonce_account: Option<Pubkey>,
nonce_authority: SignerIndex,
@@ -228,6 +231,7 @@ pub enum CliCommand {
stake_account_pubkey: Pubkey,
stake_authority: SignerIndex,
sign_only: bool,
dump_transaction_message: bool,
blockhash_query: BlockhashQuery,
nonce_account: Option<Pubkey>,
nonce_authority: SignerIndex,
@@ -241,6 +245,7 @@ pub enum CliCommand {
source_stake_account_pubkey: Pubkey,
stake_authority: SignerIndex,
sign_only: bool,
dump_transaction_message: bool,
blockhash_query: BlockhashQuery,
nonce_account: Option<Pubkey>,
nonce_authority: SignerIndex,
@@ -257,6 +262,7 @@ pub enum CliCommand {
stake_account_pubkey: Pubkey,
new_authorizations: Vec<(StakeAuthorize, Pubkey, SignerIndex)>,
sign_only: bool,
dump_transaction_message: bool,
blockhash_query: BlockhashQuery,
nonce_account: Option<Pubkey>,
nonce_authority: SignerIndex,
@@ -268,6 +274,7 @@ pub enum CliCommand {
lockup: LockupArgs,
custodian: SignerIndex,
sign_only: bool,
dump_transaction_message: bool,
blockhash_query: BlockhashQuery,
nonce_account: Option<Pubkey>,
nonce_authority: SignerIndex,
@@ -280,6 +287,7 @@ pub enum CliCommand {
withdraw_authority: SignerIndex,
custodian: Option<SignerIndex>,
sign_only: bool,
dump_transaction_message: bool,
blockhash_query: BlockhashQuery,
nonce_account: Option<Pubkey>,
nonce_authority: SignerIndex,
@@ -351,6 +359,7 @@ pub enum CliCommand {
to: Pubkey,
from: SignerIndex,
sign_only: bool,
dump_transaction_message: bool,
no_wait: bool,
blockhash_query: BlockhashQuery,
nonce_account: Option<Pubkey>,
@@ -847,6 +856,7 @@ pub fn parse_command(
let amount = SpendAmount::new_from_matches(matches, "amount");
let to = pubkey_of_signer(matches, "to", wallet_manager)?.unwrap();
let sign_only = matches.is_present(SIGN_ONLY_ARG.name);
let dump_transaction_message = matches.is_present(DUMP_TRANSACTION_MESSAGE.name);
let no_wait = matches.is_present("no_wait");
let blockhash_query = BlockhashQuery::new_from_matches(matches);
let nonce_account = pubkey_of_signer(matches, NONCE_ARG.name, wallet_manager)?;
@@ -875,6 +885,7 @@ pub fn parse_command(
amount,
to,
sign_only,
dump_transaction_message,
no_wait,
blockhash_query,
nonce_account,
@@ -1127,6 +1138,7 @@ fn process_transfer(
to: &Pubkey,
from: SignerIndex,
sign_only: bool,
dump_transaction_message: bool,
no_wait: bool,
blockhash_query: &BlockhashQuery,
nonce_account: Option<&Pubkey>,
@@ -1193,7 +1205,13 @@ fn process_transfer(
if sign_only {
tx.try_partial_sign(&config.signers, recent_blockhash)?;
return_signers(&tx, &config.output_format)
return_signers_with_config(
&tx,
&config.output_format,
&ReturnSignersConfig {
dump_transaction_message,
},
)
} else {
if let Some(nonce_account) = &nonce_account {
let nonce_account = nonce_utils::get_account_with_commitment(
@@ -1445,6 +1463,7 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
lockup,
amount,
sign_only,
dump_transaction_message,
blockhash_query,
ref nonce_account,
nonce_authority,
@@ -1460,6 +1479,7 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
lockup,
*amount,
*sign_only,
*dump_transaction_message,
blockhash_query,
nonce_account.as_ref(),
*nonce_authority,
@@ -1470,6 +1490,7 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
stake_account_pubkey,
stake_authority,
sign_only,
dump_transaction_message,
blockhash_query,
nonce_account,
nonce_authority,
@@ -1480,6 +1501,7 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
&stake_account_pubkey,
*stake_authority,
*sign_only,
*dump_transaction_message,
blockhash_query,
*nonce_account,
*nonce_authority,
@@ -1491,6 +1513,7 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
stake_authority,
force,
sign_only,
dump_transaction_message,
blockhash_query,
nonce_account,
nonce_authority,
@@ -1503,6 +1526,7 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
*stake_authority,
*force,
*sign_only,
*dump_transaction_message,
blockhash_query,
*nonce_account,
*nonce_authority,
@@ -1512,6 +1536,7 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
stake_account_pubkey,
stake_authority,
sign_only,
dump_transaction_message,
blockhash_query,
nonce_account,
nonce_authority,
@@ -1525,6 +1550,7 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
&stake_account_pubkey,
*stake_authority,
*sign_only,
*dump_transaction_message,
blockhash_query,
*nonce_account,
*nonce_authority,
@@ -1538,6 +1564,7 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
source_stake_account_pubkey,
stake_authority,
sign_only,
dump_transaction_message,
blockhash_query,
nonce_account,
nonce_authority,
@@ -1549,6 +1576,7 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
&source_stake_account_pubkey,
*stake_authority,
*sign_only,
*dump_transaction_message,
blockhash_query,
*nonce_account,
*nonce_authority,
@@ -1570,6 +1598,7 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
stake_account_pubkey,
ref new_authorizations,
sign_only,
dump_transaction_message,
blockhash_query,
nonce_account,
nonce_authority,
@@ -1582,6 +1611,7 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
new_authorizations,
*custodian,
*sign_only,
*dump_transaction_message,
blockhash_query,
*nonce_account,
*nonce_authority,
@@ -1592,6 +1622,7 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
mut lockup,
custodian,
sign_only,
dump_transaction_message,
blockhash_query,
nonce_account,
nonce_authority,
@@ -1603,6 +1634,7 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
&mut lockup,
*custodian,
*sign_only,
*dump_transaction_message,
blockhash_query,
*nonce_account,
*nonce_authority,
@@ -1615,6 +1647,7 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
withdraw_authority,
custodian,
sign_only,
dump_transaction_message,
blockhash_query,
ref nonce_account,
nonce_authority,
@@ -1628,6 +1661,7 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
*withdraw_authority,
*custodian,
*sign_only,
*dump_transaction_message,
blockhash_query,
nonce_account.as_ref(),
*nonce_authority,
@@ -1787,6 +1821,7 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
to,
from,
sign_only,
dump_transaction_message,
no_wait,
ref blockhash_query,
ref nonce_account,
@@ -1801,6 +1836,7 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
to,
*from,
*sign_only,
*dump_transaction_message,
*no_wait,
blockhash_query,
nonce_account.as_ref(),
@@ -1987,6 +2023,17 @@ pub fn app<'ab, 'v>(name: &str, about: &'ab str, version: &'v str) -> App<'ab, '
.takes_value(true)
.required(true)
.help("The transaction signature to confirm"),
)
.after_help(// Formatted specifically for the manually-indented heredoc string
"Note: This will show more detailed information for finalized transactions with verbose mode (-v/--verbose).\
\n\
\nAccount modes:\
\n |srwx|\
\n s: signed\
\n r: readable (always true)\
\n w: writable\
\n x: program account (inner instructions excluded)\
"
),
)
.subcommand(
@@ -2601,6 +2648,7 @@ mod tests {
},
amount: SpendAmount::Some(30),
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -2620,6 +2668,7 @@ mod tests {
withdraw_authority: 0,
custodian: None,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -2634,6 +2683,7 @@ mod tests {
stake_account_pubkey,
stake_authority: 0,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -2648,6 +2698,7 @@ mod tests {
stake_account_pubkey,
stake_authority: 0,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -2668,6 +2719,7 @@ mod tests {
source_stake_account_pubkey,
stake_authority: 1,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -2855,6 +2907,7 @@ mod tests {
to: to_pubkey,
from: 0,
sign_only: false,
dump_transaction_message: false,
no_wait: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
@@ -2879,6 +2932,7 @@ mod tests {
to: to_pubkey,
from: 0,
sign_only: false,
dump_transaction_message: false,
no_wait: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
@@ -2907,6 +2961,7 @@ mod tests {
to: to_pubkey,
from: 0,
sign_only: false,
dump_transaction_message: false,
no_wait: true,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
@@ -2939,6 +2994,7 @@ mod tests {
to: to_pubkey,
from: 0,
sign_only: true,
dump_transaction_message: false,
no_wait: false,
blockhash_query: BlockhashQuery::None(blockhash),
nonce_account: None,
@@ -2976,6 +3032,7 @@ mod tests {
to: to_pubkey,
from: 0,
sign_only: false,
dump_transaction_message: false,
no_wait: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::Cluster,
@@ -3017,6 +3074,7 @@ mod tests {
to: to_pubkey,
from: 0,
sign_only: false,
dump_transaction_message: false,
no_wait: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::NonceAccount(nonce_address),
@@ -3056,6 +3114,7 @@ mod tests {
to: to_pubkey,
from: 0,
sign_only: false,
dump_transaction_message: false,
no_wait: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,

View File

@@ -993,7 +993,20 @@ pub fn process_get_epoch(rpc_client: &RpcClient, _config: &CliConfig) -> Process
}
pub fn process_get_epoch_info(rpc_client: &RpcClient, config: &CliConfig) -> ProcessResult {
let epoch_info: CliEpochInfo = rpc_client.get_epoch_info()?.into();
let epoch_info = rpc_client.get_epoch_info()?;
let average_slot_time_ms = rpc_client
.get_recent_performance_samples(Some(60))
.map(|samples| {
let (slots, secs) = samples.iter().fold((0, 0), |(slots, secs), sample| {
(slots + sample.num_slots, secs + sample.sample_period_secs)
});
(secs as u64 * 1000) / slots
})
.unwrap_or(clock::DEFAULT_MS_PER_SLOT);
let epoch_info = CliEpochInfo {
epoch_info,
average_slot_time_ms,
};
Ok(config.output_format.formatted_string(&epoch_info))
}
@@ -1008,8 +1021,8 @@ pub fn process_get_slot(rpc_client: &RpcClient, _config: &CliConfig) -> ProcessR
}
pub fn process_get_block_height(rpc_client: &RpcClient, _config: &CliConfig) -> ProcessResult {
let epoch_info: CliEpochInfo = rpc_client.get_epoch_info()?.into();
Ok(epoch_info.epoch_info.block_height.to_string())
let epoch_info = rpc_client.get_epoch_info()?;
Ok(epoch_info.block_height.to_string())
}
pub fn parse_show_block_production(matches: &ArgMatches<'_>) -> Result<CliCommandInfo, CliError> {

View File

@@ -19,8 +19,8 @@ use solana_clap_utils::{
ArgConstant,
};
use solana_cli_output::{
return_signers, CliEpochReward, CliStakeHistory, CliStakeHistoryEntry, CliStakeState,
CliStakeType,
return_signers_with_config, CliEpochReward, CliStakeHistory, CliStakeHistoryEntry,
CliStakeState, CliStakeType, ReturnSignersConfig,
};
use solana_client::{
blockhash_query::BlockhashQuery,
@@ -441,6 +441,7 @@ pub fn parse_stake_create_account(
let withdrawer = pubkey_of_signer(matches, WITHDRAW_AUTHORITY_ARG.name, wallet_manager)?;
let amount = SpendAmount::new_from_matches(matches, "amount");
let sign_only = matches.is_present(SIGN_ONLY_ARG.name);
let dump_transaction_message = matches.is_present(DUMP_TRANSACTION_MESSAGE.name);
let blockhash_query = BlockhashQuery::new_from_matches(matches);
let nonce_account = pubkey_of_signer(matches, NONCE_ARG.name, wallet_manager)?;
let (nonce_authority, nonce_authority_pubkey) =
@@ -470,6 +471,7 @@ pub fn parse_stake_create_account(
},
amount,
sign_only,
dump_transaction_message,
blockhash_query,
nonce_account,
nonce_authority: signer_info.index_of(nonce_authority_pubkey).unwrap(),
@@ -491,6 +493,7 @@ pub fn parse_stake_delegate_stake(
pubkey_of_signer(matches, "vote_account_pubkey", wallet_manager)?.unwrap();
let force = matches.is_present("force");
let sign_only = matches.is_present(SIGN_ONLY_ARG.name);
let dump_transaction_message = matches.is_present(DUMP_TRANSACTION_MESSAGE.name);
let blockhash_query = BlockhashQuery::new_from_matches(matches);
let nonce_account = pubkey_of(matches, NONCE_ARG.name);
let (stake_authority, stake_authority_pubkey) =
@@ -513,6 +516,7 @@ pub fn parse_stake_delegate_stake(
stake_authority: signer_info.index_of(stake_authority_pubkey).unwrap(),
force,
sign_only,
dump_transaction_message,
blockhash_query,
nonce_account,
nonce_authority: signer_info.index_of(nonce_authority_pubkey).unwrap(),
@@ -565,6 +569,7 @@ pub fn parse_stake_authorize(
bulk_signers.push(authority);
};
let sign_only = matches.is_present(SIGN_ONLY_ARG.name);
let dump_transaction_message = matches.is_present(DUMP_TRANSACTION_MESSAGE.name);
let blockhash_query = BlockhashQuery::new_from_matches(matches);
let nonce_account = pubkey_of(matches, NONCE_ARG.name);
let (nonce_authority, nonce_authority_pubkey) =
@@ -600,6 +605,7 @@ pub fn parse_stake_authorize(
stake_account_pubkey,
new_authorizations,
sign_only,
dump_transaction_message,
blockhash_query,
nonce_account,
nonce_authority: signer_info.index_of(nonce_authority_pubkey).unwrap(),
@@ -623,6 +629,7 @@ pub fn parse_split_stake(
let seed = matches.value_of("seed").map(|s| s.to_string());
let sign_only = matches.is_present(SIGN_ONLY_ARG.name);
let dump_transaction_message = matches.is_present(DUMP_TRANSACTION_MESSAGE.name);
let blockhash_query = BlockhashQuery::new_from_matches(matches);
let nonce_account = pubkey_of(matches, NONCE_ARG.name);
let (stake_authority, stake_authority_pubkey) =
@@ -643,6 +650,7 @@ pub fn parse_split_stake(
stake_account_pubkey,
stake_authority: signer_info.index_of(stake_authority_pubkey).unwrap(),
sign_only,
dump_transaction_message,
blockhash_query,
nonce_account,
nonce_authority: signer_info.index_of(nonce_authority_pubkey).unwrap(),
@@ -666,6 +674,7 @@ pub fn parse_merge_stake(
let source_stake_account_pubkey = pubkey_of(matches, "source_stake_account_pubkey").unwrap();
let sign_only = matches.is_present(SIGN_ONLY_ARG.name);
let dump_transaction_message = matches.is_present(DUMP_TRANSACTION_MESSAGE.name);
let blockhash_query = BlockhashQuery::new_from_matches(matches);
let nonce_account = pubkey_of(matches, NONCE_ARG.name);
let (stake_authority, stake_authority_pubkey) =
@@ -687,6 +696,7 @@ pub fn parse_merge_stake(
source_stake_account_pubkey,
stake_authority: signer_info.index_of(stake_authority_pubkey).unwrap(),
sign_only,
dump_transaction_message,
blockhash_query,
nonce_account,
nonce_authority: signer_info.index_of(nonce_authority_pubkey).unwrap(),
@@ -704,6 +714,7 @@ pub fn parse_stake_deactivate_stake(
let stake_account_pubkey =
pubkey_of_signer(matches, "stake_account_pubkey", wallet_manager)?.unwrap();
let sign_only = matches.is_present(SIGN_ONLY_ARG.name);
let dump_transaction_message = matches.is_present(DUMP_TRANSACTION_MESSAGE.name);
let blockhash_query = BlockhashQuery::new_from_matches(matches);
let nonce_account = pubkey_of(matches, NONCE_ARG.name);
let (stake_authority, stake_authority_pubkey) =
@@ -724,6 +735,7 @@ pub fn parse_stake_deactivate_stake(
stake_account_pubkey,
stake_authority: signer_info.index_of(stake_authority_pubkey).unwrap(),
sign_only,
dump_transaction_message,
blockhash_query,
nonce_account,
nonce_authority: signer_info.index_of(nonce_authority_pubkey).unwrap(),
@@ -744,6 +756,7 @@ pub fn parse_stake_withdraw_stake(
pubkey_of_signer(matches, "destination_account_pubkey", wallet_manager)?.unwrap();
let lamports = lamports_of_sol(matches, "amount").unwrap();
let sign_only = matches.is_present(SIGN_ONLY_ARG.name);
let dump_transaction_message = matches.is_present(DUMP_TRANSACTION_MESSAGE.name);
let blockhash_query = BlockhashQuery::new_from_matches(matches);
let nonce_account = pubkey_of(matches, NONCE_ARG.name);
let (withdraw_authority, withdraw_authority_pubkey) =
@@ -770,6 +783,7 @@ pub fn parse_stake_withdraw_stake(
lamports,
withdraw_authority: signer_info.index_of(withdraw_authority_pubkey).unwrap(),
sign_only,
dump_transaction_message,
blockhash_query,
nonce_account,
nonce_authority: signer_info.index_of(nonce_authority_pubkey).unwrap(),
@@ -792,6 +806,7 @@ pub fn parse_stake_set_lockup(
let new_custodian = pubkey_of_signer(matches, "new_custodian", wallet_manager)?;
let sign_only = matches.is_present(SIGN_ONLY_ARG.name);
let dump_transaction_message = matches.is_present(DUMP_TRANSACTION_MESSAGE.name);
let blockhash_query = BlockhashQuery::new_from_matches(matches);
let nonce_account = pubkey_of(matches, NONCE_ARG.name);
@@ -817,6 +832,7 @@ pub fn parse_stake_set_lockup(
},
custodian: signer_info.index_of(custodian_pubkey).unwrap(),
sign_only,
dump_transaction_message,
blockhash_query,
nonce_account,
nonce_authority: signer_info.index_of(nonce_authority_pubkey).unwrap(),
@@ -861,6 +877,7 @@ pub fn process_create_stake_account(
lockup: &Lockup,
amount: SpendAmount,
sign_only: bool,
dump_transaction_message: bool,
blockhash_query: &BlockhashQuery,
nonce_account: Option<&Pubkey>,
nonce_authority: SignerIndex,
@@ -970,7 +987,13 @@ pub fn process_create_stake_account(
let mut tx = Transaction::new_unsigned(message);
if sign_only {
tx.try_partial_sign(&config.signers, recent_blockhash)?;
return_signers(&tx, &config.output_format)
return_signers_with_config(
&tx,
&config.output_format,
&ReturnSignersConfig {
dump_transaction_message,
},
)
} else {
tx.try_sign(&config.signers, recent_blockhash)?;
let result = rpc_client.send_and_confirm_transaction_with_spinner(&tx);
@@ -986,6 +1009,7 @@ pub fn process_stake_authorize(
new_authorizations: &[(StakeAuthorize, Pubkey, SignerIndex)],
custodian: Option<SignerIndex>,
sign_only: bool,
dump_transaction_message: bool,
blockhash_query: &BlockhashQuery,
nonce_account: Option<Pubkey>,
nonce_authority: SignerIndex,
@@ -1028,7 +1052,13 @@ pub fn process_stake_authorize(
if sign_only {
tx.try_partial_sign(&config.signers, recent_blockhash)?;
return_signers(&tx, &config.output_format)
return_signers_with_config(
&tx,
&config.output_format,
&ReturnSignersConfig {
dump_transaction_message,
},
)
} else {
tx.try_sign(&config.signers, recent_blockhash)?;
if let Some(nonce_account) = &nonce_account {
@@ -1058,6 +1088,7 @@ pub fn process_deactivate_stake_account(
stake_account_pubkey: &Pubkey,
stake_authority: SignerIndex,
sign_only: bool,
dump_transaction_message: bool,
blockhash_query: &BlockhashQuery,
nonce_account: Option<Pubkey>,
nonce_authority: SignerIndex,
@@ -1087,7 +1118,13 @@ pub fn process_deactivate_stake_account(
if sign_only {
tx.try_partial_sign(&config.signers, recent_blockhash)?;
return_signers(&tx, &config.output_format)
return_signers_with_config(
&tx,
&config.output_format,
&ReturnSignersConfig {
dump_transaction_message,
},
)
} else {
tx.try_sign(&config.signers, recent_blockhash)?;
if let Some(nonce_account) = &nonce_account {
@@ -1120,6 +1157,7 @@ pub fn process_withdraw_stake(
withdraw_authority: SignerIndex,
custodian: Option<SignerIndex>,
sign_only: bool,
dump_transaction_message: bool,
blockhash_query: &BlockhashQuery,
nonce_account: Option<&Pubkey>,
nonce_authority: SignerIndex,
@@ -1155,7 +1193,13 @@ pub fn process_withdraw_stake(
if sign_only {
tx.try_partial_sign(&config.signers, recent_blockhash)?;
return_signers(&tx, &config.output_format)
return_signers_with_config(
&tx,
&config.output_format,
&ReturnSignersConfig {
dump_transaction_message,
},
)
} else {
tx.try_sign(&config.signers, recent_blockhash)?;
if let Some(nonce_account) = &nonce_account {
@@ -1185,6 +1229,7 @@ pub fn process_split_stake(
stake_account_pubkey: &Pubkey,
stake_authority: SignerIndex,
sign_only: bool,
dump_transaction_message: bool,
blockhash_query: &BlockhashQuery,
nonce_account: Option<Pubkey>,
nonce_authority: SignerIndex,
@@ -1294,7 +1339,13 @@ pub fn process_split_stake(
if sign_only {
tx.try_partial_sign(&config.signers, recent_blockhash)?;
return_signers(&tx, &config.output_format)
return_signers_with_config(
&tx,
&config.output_format,
&ReturnSignersConfig {
dump_transaction_message,
},
)
} else {
tx.try_sign(&config.signers, recent_blockhash)?;
if let Some(nonce_account) = &nonce_account {
@@ -1325,6 +1376,7 @@ pub fn process_merge_stake(
source_stake_account_pubkey: &Pubkey,
stake_authority: SignerIndex,
sign_only: bool,
dump_transaction_message: bool,
blockhash_query: &BlockhashQuery,
nonce_account: Option<Pubkey>,
nonce_authority: SignerIndex,
@@ -1392,7 +1444,13 @@ pub fn process_merge_stake(
if sign_only {
tx.try_partial_sign(&config.signers, recent_blockhash)?;
return_signers(&tx, &config.output_format)
return_signers_with_config(
&tx,
&config.output_format,
&ReturnSignersConfig {
dump_transaction_message,
},
)
} else {
tx.try_sign(&config.signers, recent_blockhash)?;
if let Some(nonce_account) = &nonce_account {
@@ -1427,6 +1485,7 @@ pub fn process_stake_set_lockup(
lockup: &mut LockupArgs,
custodian: SignerIndex,
sign_only: bool,
dump_transaction_message: bool,
blockhash_query: &BlockhashQuery,
nonce_account: Option<Pubkey>,
nonce_authority: SignerIndex,
@@ -1458,7 +1517,13 @@ pub fn process_stake_set_lockup(
if sign_only {
tx.try_partial_sign(&config.signers, recent_blockhash)?;
return_signers(&tx, &config.output_format)
return_signers_with_config(
&tx,
&config.output_format,
&ReturnSignersConfig {
dump_transaction_message,
},
)
} else {
tx.try_sign(&config.signers, recent_blockhash)?;
if let Some(nonce_account) = &nonce_account {
@@ -1772,6 +1837,7 @@ pub fn process_delegate_stake(
stake_authority: SignerIndex,
force: bool,
sign_only: bool,
dump_transaction_message: bool,
blockhash_query: &BlockhashQuery,
nonce_account: Option<Pubkey>,
nonce_authority: SignerIndex,
@@ -1856,7 +1922,13 @@ pub fn process_delegate_stake(
if sign_only {
tx.try_partial_sign(&config.signers, recent_blockhash)?;
return_signers(&tx, &config.output_format)
return_signers_with_config(
&tx,
&config.output_format,
&ReturnSignersConfig {
dump_transaction_message,
},
)
} else {
tx.try_sign(&config.signers, recent_blockhash)?;
if let Some(nonce_account) = &nonce_account {
@@ -1953,6 +2025,7 @@ mod tests {
(StakeAuthorize::Withdrawer, new_withdraw_authority, 0,),
],
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -1988,6 +2061,7 @@ mod tests {
(StakeAuthorize::Withdrawer, new_withdraw_authority, 2,),
],
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -2027,6 +2101,7 @@ mod tests {
(StakeAuthorize::Withdrawer, new_withdraw_authority, 1,),
],
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -2055,6 +2130,7 @@ mod tests {
stake_account_pubkey,
new_authorizations: vec![(StakeAuthorize::Staker, new_stake_authority, 0,),],
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -2080,6 +2156,7 @@ mod tests {
stake_account_pubkey,
new_authorizations: vec![(StakeAuthorize::Staker, new_stake_authority, 1,),],
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -2111,6 +2188,7 @@ mod tests {
stake_account_pubkey,
new_authorizations: vec![(StakeAuthorize::Staker, new_stake_authority, 1,),],
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -2143,6 +2221,7 @@ mod tests {
0,
),],
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -2172,6 +2251,7 @@ mod tests {
1,
),],
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -2207,6 +2287,7 @@ mod tests {
stake_account_pubkey,
new_authorizations: vec![(StakeAuthorize::Staker, stake_account_pubkey, 0)],
sign_only: true,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::None(blockhash),
nonce_account: None,
nonce_authority: 0,
@@ -2241,6 +2322,7 @@ mod tests {
stake_account_pubkey,
new_authorizations: vec![(StakeAuthorize::Staker, stake_account_pubkey, 0)],
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::Cluster,
blockhash
@@ -2288,6 +2370,7 @@ mod tests {
stake_account_pubkey,
new_authorizations: vec![(StakeAuthorize::Staker, stake_account_pubkey, 0)],
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::NonceAccount(nonce_account),
blockhash
@@ -2321,6 +2404,7 @@ mod tests {
stake_account_pubkey,
new_authorizations: vec![(StakeAuthorize::Staker, stake_account_pubkey, 0)],
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::Cluster,
blockhash
@@ -2359,6 +2443,7 @@ mod tests {
stake_account_pubkey,
new_authorizations: vec![(StakeAuthorize::Staker, stake_account_pubkey, 0)],
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::NonceAccount(nonce_account_pubkey),
blockhash
@@ -2396,6 +2481,7 @@ mod tests {
stake_account_pubkey,
new_authorizations: vec![(StakeAuthorize::Staker, stake_account_pubkey, 0)],
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -2431,6 +2517,7 @@ mod tests {
stake_account_pubkey,
new_authorizations: vec![(StakeAuthorize::Staker, stake_account_pubkey, 0)],
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::Cluster,
blockhash
@@ -2481,6 +2568,7 @@ mod tests {
},
amount: SpendAmount::Some(50_000_000_000),
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -2518,6 +2606,7 @@ mod tests {
lockup: Lockup::default(),
amount: SpendAmount::Some(50_000_000_000),
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -2571,6 +2660,7 @@ mod tests {
lockup: Lockup::default(),
amount: SpendAmount::Some(50_000_000_000),
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::NonceAccount(nonce_account),
nonce_hash
@@ -2605,6 +2695,7 @@ mod tests {
stake_authority: 0,
force: false,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -2634,6 +2725,7 @@ mod tests {
stake_authority: 1,
force: false,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -2665,6 +2757,7 @@ mod tests {
stake_authority: 0,
force: true,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -2694,6 +2787,7 @@ mod tests {
stake_authority: 0,
force: false,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::Cluster,
blockhash
@@ -2724,6 +2818,7 @@ mod tests {
stake_authority: 0,
force: false,
sign_only: true,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::None(blockhash),
nonce_account: None,
nonce_authority: 0,
@@ -2758,6 +2853,7 @@ mod tests {
stake_authority: 0,
force: false,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::Cluster,
blockhash
@@ -2804,6 +2900,7 @@ mod tests {
stake_authority: 0,
force: false,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::NonceAccount(nonce_account),
blockhash
@@ -2841,6 +2938,7 @@ mod tests {
stake_authority: 0,
force: false,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -2872,6 +2970,7 @@ mod tests {
withdraw_authority: 0,
custodian: None,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -2902,6 +3001,7 @@ mod tests {
withdraw_authority: 1,
custodian: None,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -2937,6 +3037,7 @@ mod tests {
withdraw_authority: 0,
custodian: Some(1),
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -2980,6 +3081,7 @@ mod tests {
withdraw_authority: 0,
custodian: None,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::NonceAccount(nonce_account),
nonce_hash
@@ -3010,6 +3112,7 @@ mod tests {
stake_account_pubkey,
stake_authority: 0,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -3034,6 +3137,7 @@ mod tests {
stake_account_pubkey,
stake_authority: 1,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -3065,6 +3169,7 @@ mod tests {
stake_account_pubkey,
stake_authority: 0,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::Cluster,
blockhash
@@ -3092,6 +3197,7 @@ mod tests {
stake_account_pubkey,
stake_authority: 0,
sign_only: true,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::None(blockhash),
nonce_account: None,
nonce_authority: 0,
@@ -3123,6 +3229,7 @@ mod tests {
stake_account_pubkey,
stake_authority: 0,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::Cluster,
blockhash
@@ -3166,6 +3273,7 @@ mod tests {
stake_account_pubkey,
stake_authority: 0,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::NonceAccount(nonce_account),
blockhash
@@ -3197,6 +3305,7 @@ mod tests {
stake_account_pubkey,
stake_authority: 0,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -3231,6 +3340,7 @@ mod tests {
stake_account_pubkey: stake_account_keypair.pubkey(),
stake_authority: 0,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -3292,6 +3402,7 @@ mod tests {
stake_account_pubkey: stake_account_keypair.pubkey(),
stake_authority: 0,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::NonceAccount(nonce_account),
nonce_hash
@@ -3333,6 +3444,7 @@ mod tests {
source_stake_account_pubkey,
stake_authority: 0,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,

View File

@@ -293,6 +293,7 @@ fn test_create_account_with_seed() {
to: to_address,
from: 0,
sign_only: true,
dump_transaction_message: true,
no_wait: false,
blockhash_query: BlockhashQuery::None(nonce_hash),
nonce_account: Some(nonce_address),
@@ -316,6 +317,7 @@ fn test_create_account_with_seed() {
to: to_address,
from: 0,
sign_only: false,
dump_transaction_message: true,
no_wait: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::NonceAccount(nonce_address),

View File

@@ -70,6 +70,7 @@ fn test_stake_delegation_force() {
lockup: Lockup::default(),
amount: SpendAmount::Some(50_000),
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -86,6 +87,7 @@ fn test_stake_delegation_force() {
stake_authority: 0,
force: false,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -100,6 +102,7 @@ fn test_stake_delegation_force() {
stake_authority: 0,
force: true,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -151,6 +154,7 @@ fn test_seed_stake_delegation_and_deactivation() {
lockup: Lockup::default(),
amount: SpendAmount::Some(50_000),
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -166,6 +170,7 @@ fn test_seed_stake_delegation_and_deactivation() {
stake_authority: 0,
force: true,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -178,6 +183,7 @@ fn test_seed_stake_delegation_and_deactivation() {
stake_account_pubkey: stake_address,
stake_authority: 0,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -224,6 +230,7 @@ fn test_stake_delegation_and_deactivation() {
lockup: Lockup::default(),
amount: SpendAmount::Some(50_000),
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -240,6 +247,7 @@ fn test_stake_delegation_and_deactivation() {
stake_authority: 0,
force: true,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -252,6 +260,7 @@ fn test_stake_delegation_and_deactivation() {
stake_account_pubkey: stake_keypair.pubkey(),
stake_authority: 0,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -319,6 +328,7 @@ fn test_offline_stake_delegation_and_deactivation() {
lockup: Lockup::default(),
amount: SpendAmount::Some(50_000),
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -335,6 +345,7 @@ fn test_offline_stake_delegation_and_deactivation() {
stake_authority: 0,
force: true,
sign_only: true,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::None(blockhash),
nonce_account: None,
nonce_authority: 0,
@@ -354,6 +365,7 @@ fn test_offline_stake_delegation_and_deactivation() {
stake_authority: 0,
force: true,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(blockhash_query::Source::Cluster, blockhash),
nonce_account: None,
nonce_authority: 0,
@@ -367,6 +379,7 @@ fn test_offline_stake_delegation_and_deactivation() {
stake_account_pubkey: stake_keypair.pubkey(),
stake_authority: 0,
sign_only: true,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::None(blockhash),
nonce_account: None,
nonce_authority: 0,
@@ -383,6 +396,7 @@ fn test_offline_stake_delegation_and_deactivation() {
stake_account_pubkey: stake_keypair.pubkey(),
stake_authority: 0,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(blockhash_query::Source::Cluster, blockhash),
nonce_account: None,
nonce_authority: 0,
@@ -431,6 +445,7 @@ fn test_nonced_stake_delegation_and_deactivation() {
lockup: Lockup::default(),
amount: SpendAmount::Some(50_000),
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -468,6 +483,7 @@ fn test_nonced_stake_delegation_and_deactivation() {
stake_authority: 0,
force: true,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::NonceAccount(nonce_account.pubkey()),
nonce_hash,
@@ -493,6 +509,7 @@ fn test_nonced_stake_delegation_and_deactivation() {
stake_account_pubkey: stake_keypair.pubkey(),
stake_authority: 0,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::NonceAccount(nonce_account.pubkey()),
nonce_hash,
@@ -559,6 +576,7 @@ fn test_stake_authorize() {
lockup: Lockup::default(),
amount: SpendAmount::Some(50_000),
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -575,6 +593,7 @@ fn test_stake_authorize() {
stake_account_pubkey,
new_authorizations: vec![(StakeAuthorize::Staker, online_authority_pubkey, 0)],
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -603,6 +622,7 @@ fn test_stake_authorize() {
(StakeAuthorize::Withdrawer, withdraw_authority_pubkey, 0),
],
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -626,6 +646,7 @@ fn test_stake_authorize() {
stake_account_pubkey,
new_authorizations: vec![(StakeAuthorize::Staker, offline_authority_pubkey, 1)],
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -649,6 +670,7 @@ fn test_stake_authorize() {
stake_account_pubkey,
new_authorizations: vec![(StakeAuthorize::Staker, nonced_authority_pubkey, 0)],
sign_only: true,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::None(blockhash),
nonce_account: None,
nonce_authority: 0,
@@ -665,6 +687,7 @@ fn test_stake_authorize() {
stake_account_pubkey,
new_authorizations: vec![(StakeAuthorize::Staker, nonced_authority_pubkey, 0)],
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(blockhash_query::Source::Cluster, blockhash),
nonce_account: None,
nonce_authority: 0,
@@ -712,6 +735,7 @@ fn test_stake_authorize() {
stake_account_pubkey,
new_authorizations: vec![(StakeAuthorize::Staker, online_authority_pubkey, 1)],
sign_only: true,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::None(nonce_hash),
nonce_account: Some(nonce_account.pubkey()),
nonce_authority: 0,
@@ -729,6 +753,7 @@ fn test_stake_authorize() {
stake_account_pubkey,
new_authorizations: vec![(StakeAuthorize::Staker, online_authority_pubkey, 1)],
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::NonceAccount(nonce_account.pubkey()),
sign_only.blockhash,
@@ -817,6 +842,7 @@ fn test_stake_authorize_with_fee_payer() {
lockup: Lockup::default(),
amount: SpendAmount::Some(50_000),
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -833,6 +859,7 @@ fn test_stake_authorize_with_fee_payer() {
stake_account_pubkey,
new_authorizations: vec![(StakeAuthorize::Staker, offline_pubkey, 0)],
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -852,6 +879,7 @@ fn test_stake_authorize_with_fee_payer() {
stake_account_pubkey,
new_authorizations: vec![(StakeAuthorize::Staker, payer_pubkey, 0)],
sign_only: true,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::None(blockhash),
nonce_account: None,
nonce_authority: 0,
@@ -868,6 +896,7 @@ fn test_stake_authorize_with_fee_payer() {
stake_account_pubkey,
new_authorizations: vec![(StakeAuthorize::Staker, payer_pubkey, 0)],
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(blockhash_query::Source::Cluster, blockhash),
nonce_account: None,
nonce_authority: 0,
@@ -936,6 +965,7 @@ fn test_stake_split() {
lockup: Lockup::default(),
amount: SpendAmount::Some(10 * minimum_stake_balance),
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -982,6 +1012,7 @@ fn test_stake_split() {
stake_account_pubkey,
stake_authority: 0,
sign_only: true,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::None(nonce_hash),
nonce_account: Some(nonce_account.pubkey()),
nonce_authority: 0,
@@ -1000,6 +1031,7 @@ fn test_stake_split() {
stake_account_pubkey,
stake_authority: 0,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::NonceAccount(nonce_account.pubkey()),
sign_only.blockhash,
@@ -1085,6 +1117,7 @@ fn test_stake_set_lockup() {
lockup,
amount: SpendAmount::Some(10 * minimum_stake_balance),
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
@@ -1110,6 +1143,7 @@ fn test_stake_set_lockup() {
lockup,
custodian: 0,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -1143,6 +1177,7 @@ fn test_stake_set_lockup() {
lockup,
custodian: 0,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -1161,6 +1196,7 @@ fn test_stake_set_lockup() {
lockup,
custodian: 1,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -1191,6 +1227,7 @@ fn test_stake_set_lockup() {
lockup,
custodian: 1,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::default(),
nonce_account: None,
nonce_authority: 0,
@@ -1235,6 +1272,7 @@ fn test_stake_set_lockup() {
lockup,
custodian: 0,
sign_only: true,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::None(nonce_hash),
nonce_account: Some(nonce_account_pubkey),
nonce_authority: 0,
@@ -1251,6 +1289,7 @@ fn test_stake_set_lockup() {
lockup,
custodian: 0,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::NonceAccount(nonce_account_pubkey),
sign_only.blockhash,
@@ -1349,6 +1388,7 @@ fn test_offline_nonced_create_stake_account_and_withdraw() {
lockup: Lockup::default(),
amount: SpendAmount::Some(50_000),
sign_only: true,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::None(nonce_hash),
nonce_account: Some(nonce_pubkey),
nonce_authority: 0,
@@ -1370,6 +1410,7 @@ fn test_offline_nonced_create_stake_account_and_withdraw() {
lockup: Lockup::default(),
amount: SpendAmount::Some(50_000),
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::NonceAccount(nonce_pubkey),
sign_only.blockhash,
@@ -1403,6 +1444,7 @@ fn test_offline_nonced_create_stake_account_and_withdraw() {
withdraw_authority: 0,
custodian: None,
sign_only: true,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::None(nonce_hash),
nonce_account: Some(nonce_pubkey),
nonce_authority: 0,
@@ -1419,6 +1461,7 @@ fn test_offline_nonced_create_stake_account_and_withdraw() {
withdraw_authority: 0,
custodian: None,
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::NonceAccount(nonce_pubkey),
sign_only.blockhash,
@@ -1451,6 +1494,7 @@ fn test_offline_nonced_create_stake_account_and_withdraw() {
lockup: Lockup::default(),
amount: SpendAmount::Some(50_000),
sign_only: true,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::None(nonce_hash),
nonce_account: Some(nonce_pubkey),
nonce_authority: 0,
@@ -1470,6 +1514,7 @@ fn test_offline_nonced_create_stake_account_and_withdraw() {
lockup: Lockup::default(),
amount: SpendAmount::Some(50_000),
sign_only: false,
dump_transaction_message: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::NonceAccount(nonce_pubkey),
sign_only.blockhash,

View File

@@ -51,6 +51,7 @@ fn test_transfer() {
to: recipient_pubkey,
from: 0,
sign_only: false,
dump_transaction_message: false,
no_wait: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
@@ -69,6 +70,7 @@ fn test_transfer() {
to: recipient_pubkey,
from: 0,
sign_only: false,
dump_transaction_message: false,
no_wait: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
@@ -99,6 +101,7 @@ fn test_transfer() {
to: recipient_pubkey,
from: 0,
sign_only: true,
dump_transaction_message: false,
no_wait: false,
blockhash_query: BlockhashQuery::None(blockhash),
nonce_account: None,
@@ -118,6 +121,7 @@ fn test_transfer() {
to: recipient_pubkey,
from: 0,
sign_only: false,
dump_transaction_message: false,
no_wait: false,
blockhash_query: BlockhashQuery::FeeCalculator(blockhash_query::Source::Cluster, blockhash),
nonce_account: None,
@@ -162,6 +166,7 @@ fn test_transfer() {
to: recipient_pubkey,
from: 0,
sign_only: false,
dump_transaction_message: false,
no_wait: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::NonceAccount(nonce_account.pubkey()),
@@ -213,6 +218,7 @@ fn test_transfer() {
to: recipient_pubkey,
from: 0,
sign_only: true,
dump_transaction_message: false,
no_wait: false,
blockhash_query: BlockhashQuery::None(nonce_hash),
nonce_account: Some(nonce_account.pubkey()),
@@ -231,6 +237,7 @@ fn test_transfer() {
to: recipient_pubkey,
from: 0,
sign_only: false,
dump_transaction_message: false,
no_wait: false,
blockhash_query: BlockhashQuery::FeeCalculator(
blockhash_query::Source::NonceAccount(nonce_account.pubkey()),
@@ -299,6 +306,7 @@ fn test_transfer_multisession_signing() {
to: to_pubkey,
from: 1,
sign_only: true,
dump_transaction_message: false,
no_wait: false,
blockhash_query: BlockhashQuery::None(blockhash),
nonce_account: None,
@@ -327,6 +335,7 @@ fn test_transfer_multisession_signing() {
to: to_pubkey,
from: 1,
sign_only: true,
dump_transaction_message: false,
no_wait: false,
blockhash_query: BlockhashQuery::None(blockhash),
nonce_account: None,
@@ -352,6 +361,7 @@ fn test_transfer_multisession_signing() {
to: to_pubkey,
from: 1,
sign_only: false,
dump_transaction_message: false,
no_wait: false,
blockhash_query: BlockhashQuery::FeeCalculator(blockhash_query::Source::Cluster, blockhash),
nonce_account: None,
@@ -399,6 +409,7 @@ fn test_transfer_all() {
to: recipient_pubkey,
from: 0,
sign_only: false,
dump_transaction_message: false,
no_wait: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
@@ -454,6 +465,7 @@ fn test_transfer_with_seed() {
to: recipient_pubkey,
from: 0,
sign_only: false,
dump_transaction_message: false,
no_wait: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,

View File

@@ -71,6 +71,7 @@ fn test_vote_authorize_and_withdraw() {
to: vote_account_pubkey,
from: 0,
sign_only: false,
dump_transaction_message: false,
no_wait: false,
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-client"
version = "1.6.0"
version = "1.6.1"
description = "Solana Client"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -24,13 +24,13 @@ semver = "0.11.0"
serde = "1.0.122"
serde_derive = "1.0.103"
serde_json = "1.0.56"
solana-account-decoder = { path = "../account-decoder", version = "1.6.0" }
solana-clap-utils = { path = "../clap-utils", version = "1.6.0" }
solana-net-utils = { path = "../net-utils", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-transaction-status = { path = "../transaction-status", version = "1.6.0" }
solana-version = { path = "../version", version = "1.6.0" }
solana-vote-program = { path = "../programs/vote", version = "1.6.0" }
solana-account-decoder = { path = "../account-decoder", version = "=1.6.1" }
solana-clap-utils = { path = "../clap-utils", version = "=1.6.1" }
solana-net-utils = { path = "../net-utils", version = "=1.6.1" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
solana-transaction-status = { path = "../transaction-status", version = "=1.6.1" }
solana-version = { path = "../version", version = "=1.6.1" }
solana-vote-program = { path = "../programs/vote", version = "=1.6.1" }
thiserror = "1.0"
tungstenite = "0.10.1"
url = "2.1.1"
@@ -38,7 +38,7 @@ url = "2.1.1"
[dev-dependencies]
assert_matches = "1.3.0"
jsonrpc-http-server = "17.0.0"
solana-logger = { path = "../logger", version = "1.6.0" }
solana-logger = { path = "../logger", version = "=1.6.1" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -644,6 +644,13 @@ impl RpcClient {
self.send(RpcRequest::GetEpochSchedule, Value::Null)
}
pub fn get_recent_performance_samples(
&self,
limit: Option<usize>,
) -> ClientResult<Vec<RpcPerfSample>> {
self.send(RpcRequest::GetRecentPerformanceSamples, json!([limit]))
}
pub fn get_identity(&self) -> ClientResult<Pubkey> {
let rpc_identity: RpcIdentity = self.send(RpcRequest::GetIdentity, Value::Null)?;

View File

@@ -34,6 +34,7 @@ pub enum RpcRequest {
GetMultipleAccounts,
GetProgramAccounts,
GetRecentBlockhash,
GetRecentPerformanceSamples,
GetSnapshotSlot,
GetSignatureStatuses,
GetSlot,
@@ -90,6 +91,7 @@ impl fmt::Display for RpcRequest {
RpcRequest::GetMultipleAccounts => "getMultipleAccounts",
RpcRequest::GetProgramAccounts => "getProgramAccounts",
RpcRequest::GetRecentBlockhash => "getRecentBlockhash",
RpcRequest::GetRecentPerformanceSamples => "getRecentPerformanceSamples",
RpcRequest::GetSnapshotSlot => "getSnapshotSlot",
RpcRequest::GetSignatureStatuses => "getSignatureStatuses",
RpcRequest::GetSlot => "getSlot",

View File

@@ -1,7 +1,7 @@
[package]
name = "solana-core"
description = "Blockchain, Rebuilt for Scale"
version = "1.6.0"
version = "1.6.1"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-core"
readme = "../README.md"
@@ -52,37 +52,37 @@ serde = "1.0.122"
serde_bytes = "0.11"
serde_derive = "1.0.103"
serde_json = "1.0.56"
solana-account-decoder = { path = "../account-decoder", version = "1.6.0" }
solana-banks-server = { path = "../banks-server", version = "1.6.0" }
solana-clap-utils = { path = "../clap-utils", version = "1.6.0" }
solana-client = { path = "../client", version = "1.6.0" }
solana-faucet = { path = "../faucet", version = "1.6.0" }
solana-ledger = { path = "../ledger", version = "1.6.0" }
solana-logger = { path = "../logger", version = "1.6.0" }
solana-merkle-tree = { path = "../merkle-tree", version = "1.6.0" }
solana-metrics = { path = "../metrics", version = "1.6.0" }
solana-measure = { path = "../measure", version = "1.6.0" }
solana-net-utils = { path = "../net-utils", version = "1.6.0" }
solana-perf = { path = "../perf", version = "1.6.0" }
solana-program-test = { path = "../program-test", version = "1.6.0" }
solana-runtime = { path = "../runtime", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-frozen-abi = { path = "../frozen-abi", version = "1.6.0" }
solana-frozen-abi-macro = { path = "../frozen-abi/macro", version = "1.6.0" }
solana-stake-program = { path = "../programs/stake", version = "1.6.0" }
solana-storage-bigtable = { path = "../storage-bigtable", version = "1.6.0" }
solana-streamer = { path = "../streamer", version = "1.6.0" }
solana-sys-tuner = { path = "../sys-tuner", version = "1.6.0" }
solana-transaction-status = { path = "../transaction-status", version = "1.6.0" }
solana-version = { path = "../version", version = "1.6.0" }
solana-vote-program = { path = "../programs/vote", version = "1.6.0" }
solana-account-decoder = { path = "../account-decoder", version = "=1.6.1" }
solana-banks-server = { path = "../banks-server", version = "=1.6.1" }
solana-clap-utils = { path = "../clap-utils", version = "=1.6.1" }
solana-client = { path = "../client", version = "=1.6.1" }
solana-faucet = { path = "../faucet", version = "=1.6.1" }
solana-ledger = { path = "../ledger", version = "=1.6.1" }
solana-logger = { path = "../logger", version = "=1.6.1" }
solana-merkle-tree = { path = "../merkle-tree", version = "=1.6.1" }
solana-metrics = { path = "../metrics", version = "=1.6.1" }
solana-measure = { path = "../measure", version = "=1.6.1" }
solana-net-utils = { path = "../net-utils", version = "=1.6.1" }
solana-perf = { path = "../perf", version = "=1.6.1" }
solana-program-test = { path = "../program-test", version = "=1.6.1" }
solana-runtime = { path = "../runtime", version = "=1.6.1" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
solana-frozen-abi = { path = "../frozen-abi", version = "=1.6.1" }
solana-frozen-abi-macro = { path = "../frozen-abi/macro", version = "=1.6.1" }
solana-stake-program = { path = "../programs/stake", version = "=1.6.1" }
solana-storage-bigtable = { path = "../storage-bigtable", version = "=1.6.1" }
solana-streamer = { path = "../streamer", version = "=1.6.1" }
solana-sys-tuner = { path = "../sys-tuner", version = "=1.6.1" }
solana-transaction-status = { path = "../transaction-status", version = "=1.6.1" }
solana-version = { path = "../version", version = "=1.6.1" }
solana-vote-program = { path = "../programs/vote", version = "=1.6.1" }
spl-token-v2-0 = { package = "spl-token", version = "=3.1.0", features = ["no-entrypoint"] }
tempfile = "3.1.0"
thiserror = "1.0"
tokio = { version = "1.1", features = ["full"] }
tokio_02 = { version = "0.2", package = "tokio", features = ["full"] }
tokio-util = { version = "0.3", features = ["codec"] } # This crate needs to stay in sync with tokio_02, until that dependency can be removed
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "1.6.0" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "=1.6.1" }
trees = "0.2.1"
[dev-dependencies]

View File

@@ -81,6 +81,7 @@ fn bench_consume_buffered(bencher: &mut Bencher) {
bencher.iter(move || {
let _ignored = BankingStage::consume_buffered_packets(
&my_pubkey,
std::u128::MAX,
&poh_recorder,
&mut packets,
None,
@@ -154,6 +155,9 @@ fn bench_banking(bencher: &mut Bencher, tx_type: TransactionType) {
let (verified_sender, verified_receiver) = unbounded();
let (vote_sender, vote_receiver) = unbounded();
let mut bank = Bank::new(&genesis_config);
// Allow arbitrary transaction processing time for the purposes of this bench
bank.ns_per_slot = std::u128::MAX;
let bank = Arc::new(Bank::new(&genesis_config));
debug!("threads: {} txs: {}", num_threads, txes);

View File

@@ -159,9 +159,9 @@ pub struct BankingStage {
bank_thread_hdls: Vec<JoinHandle<()>>,
}
#[derive(Debug, PartialEq, Eq, Clone)]
#[derive(Debug, Clone)]
pub enum BufferedPacketsDecision {
Consume,
Consume(u128),
Forward,
ForwardAndHold,
Hold,
@@ -288,6 +288,7 @@ impl BankingStage {
pub fn consume_buffered_packets(
my_pubkey: &Pubkey,
max_tx_ingestion_ns: u128,
poh_recorder: &Arc<Mutex<PohRecorder>>,
buffered_packets: &mut UnprocessedPackets,
transaction_status_sender: Option<TransactionStatusSender>,
@@ -316,18 +317,24 @@ impl BankingStage {
new_unprocessed_indexes,
)
} else {
let bank = poh_recorder.lock().unwrap().bank();
if let Some(bank) = bank {
let bank_start = poh_recorder.lock().unwrap().bank_start();
if let Some((bank, bank_creation_time)) = bank_start {
let (processed, verified_txs_len, new_unprocessed_indexes) =
Self::process_received_packets(
Self::process_packets_transactions(
&bank,
&bank_creation_time,
&poh_recorder,
&msgs,
original_unprocessed_indexes.to_owned(),
transaction_status_sender.clone(),
gossip_vote_sender,
);
if processed < verified_txs_len {
if processed < verified_txs_len
|| !Bank::should_bank_still_be_processing_txs(
&bank_creation_time,
max_tx_ingestion_ns,
)
{
reached_end_of_slot =
Some((poh_recorder.lock().unwrap().next_slot_leader(), bank));
}
@@ -380,7 +387,7 @@ impl BankingStage {
fn consume_or_forward_packets(
my_pubkey: &Pubkey,
leader_pubkey: Option<Pubkey>,
bank_is_available: bool,
bank_still_processing_txs: Option<&Arc<Bank>>,
would_be_leader: bool,
would_be_leader_shortly: bool,
) -> BufferedPacketsDecision {
@@ -389,9 +396,9 @@ impl BankingStage {
BufferedPacketsDecision::Hold,
// else process the packets
|x| {
if bank_is_available {
if let Some(bank) = bank_still_processing_txs {
// If the bank is available, this node is the leader
BufferedPacketsDecision::Consume
BufferedPacketsDecision::Consume(bank.ns_per_slot)
} else if would_be_leader_shortly {
// If the node will be the leader soon, hold the packets for now
BufferedPacketsDecision::Hold
@@ -422,11 +429,18 @@ impl BankingStage {
gossip_vote_sender: &ReplayVoteSender,
banking_stage_stats: &BankingStageStats,
) -> BufferedPacketsDecision {
let (leader_at_slot_offset, poh_has_bank, would_be_leader, would_be_leader_shortly) = {
let bank_start;
let (
leader_at_slot_offset,
bank_still_processing_txs,
would_be_leader,
would_be_leader_shortly,
) = {
let poh = poh_recorder.lock().unwrap();
bank_start = poh.bank_start();
(
poh.leader_after_n_slots(FORWARD_TRANSACTIONS_TO_LEADER_AT_SLOT_OFFSET),
poh.has_bank(),
PohRecorder::get_bank_still_processing_txs(&bank_start),
poh.would_be_leader(HOLD_TRANSACTIONS_SLOT_OFFSET * DEFAULT_TICKS_PER_SLOT),
poh.would_be_leader(
(FORWARD_TRANSACTIONS_TO_LEADER_AT_SLOT_OFFSET - 1) * DEFAULT_TICKS_PER_SLOT,
@@ -437,15 +451,16 @@ impl BankingStage {
let decision = Self::consume_or_forward_packets(
my_pubkey,
leader_at_slot_offset,
poh_has_bank,
bank_still_processing_txs,
would_be_leader,
would_be_leader_shortly,
);
match decision {
BufferedPacketsDecision::Consume => {
BufferedPacketsDecision::Consume(max_tx_ingestion_ns) => {
Self::consume_buffered_packets(
my_pubkey,
max_tx_ingestion_ns,
poh_recorder,
buffered_packets,
transaction_status_sender,
@@ -545,8 +560,8 @@ impl BankingStage {
&gossip_vote_sender,
&banking_stage_stats,
);
if decision == BufferedPacketsDecision::Hold
|| decision == BufferedPacketsDecision::ForwardAndHold
if matches!(decision, BufferedPacketsDecision::Hold)
|| matches!(decision, BufferedPacketsDecision::ForwardAndHold)
{
// If we are waiting on a new bank,
// check the receiver for more transactions/for exiting
@@ -829,6 +844,7 @@ impl BankingStage {
/// than the total number if max PoH height was reached and the bank halted
fn process_transactions(
bank: &Arc<Bank>,
bank_creation_time: &Instant,
transactions: &[Transaction],
poh: &Arc<Mutex<PohRecorder>>,
transaction_status_sender: Option<TransactionStatusSender>,
@@ -855,17 +871,25 @@ impl BankingStage {
// Add the retryable txs (transactions that errored in a way that warrants a retry)
// to the list of unprocessed txs.
unprocessed_txs.extend_from_slice(&retryable_txs_in_chunk);
if let Err(PohRecorderError::MaxHeightReached) = result {
info!(
"process transactions: max height reached slot: {} height: {}",
bank.slot(),
bank.tick_height()
);
// process_and_record_transactions has returned all retryable errors in
// transactions[chunk_start..chunk_end], so we just need to push the remaining
// transactions into the unprocessed queue.
unprocessed_txs.extend(chunk_end..transactions.len());
break;
// If `bank_creation_time` is None, it's a test so ignore the option so
// allow processing
let should_bank_still_be_processing_txs =
Bank::should_bank_still_be_processing_txs(bank_creation_time, bank.ns_per_slot);
match (result, should_bank_still_be_processing_txs) {
(Err(PohRecorderError::MaxHeightReached), _) | (_, false) => {
info!(
"process transactions: max height reached slot: {} height: {}",
bank.slot(),
bank.tick_height()
);
// process_and_record_transactions has returned all retryable errors in
// transactions[chunk_start..chunk_end], so we just need to push the remaining
// transactions into the unprocessed queue.
unprocessed_txs.extend(chunk_end..transactions.len());
break;
}
_ => (),
}
// Don't exit early on any other type of error, continue processing...
chunk_start = chunk_end;
@@ -990,8 +1014,9 @@ impl BankingStage {
Self::filter_valid_transaction_indexes(&result, transaction_to_packet_indexes)
}
fn process_received_packets(
fn process_packets_transactions(
bank: &Arc<Bank>,
bank_creation_time: &Instant,
poh: &Arc<Mutex<PohRecorder>>,
msgs: &Packets,
packet_indexes: Vec<usize>,
@@ -1013,6 +1038,7 @@ impl BankingStage {
let (processed, unprocessed_tx_indexes) = Self::process_transactions(
bank,
bank_creation_time,
&transactions,
poh,
transaction_status_sender,
@@ -1120,7 +1146,7 @@ impl BankingStage {
id,
);
inc_new_counter_debug!("banking_stage-transactions_received", count);
let mut proc_start = Measure::start("process_received_packets_process");
let mut proc_start = Measure::start("process_packets_transactions_process");
let mut new_tx_count = 0;
let mut mms_iter = mms.into_iter();
@@ -1128,8 +1154,8 @@ impl BankingStage {
let mut newly_buffered_packets_count = 0;
while let Some(msgs) = mms_iter.next() {
let packet_indexes = Self::generate_packet_indexes(&msgs.packets);
let bank = poh.lock().unwrap().bank();
if bank.is_none() {
let bank_start = poh.lock().unwrap().bank_start();
if PohRecorder::get_bank_still_processing_txs(&bank_start).is_none() {
Self::push_unprocessed(
buffered_packets,
msgs,
@@ -1141,16 +1167,18 @@ impl BankingStage {
);
continue;
}
let bank = bank.unwrap();
let (bank, bank_creation_time) = bank_start.unwrap();
let (processed, verified_txs_len, unprocessed_indexes) = Self::process_received_packets(
&bank,
&poh,
&msgs,
packet_indexes,
transaction_status_sender.clone(),
gossip_vote_sender,
);
let (processed, verified_txs_len, unprocessed_indexes) =
Self::process_packets_transactions(
&bank,
&bank_creation_time,
&poh,
&msgs,
packet_indexes,
transaction_status_sender.clone(),
gossip_vote_sender,
);
new_tx_count += processed;
@@ -1165,6 +1193,7 @@ impl BankingStage {
duplicates,
);
// If there were retryable transactions, add the unexpired ones to the buffered queue
if processed < verified_txs_len {
let next_leader = poh.lock().unwrap().next_slot_leader();
// Walk thru rest of the transactions and filter out the invalid (e.g. too old) ones
@@ -1441,7 +1470,7 @@ mod tests {
mint_keypair,
..
} = create_genesis_config(10);
let bank = Arc::new(Bank::new(&genesis_config));
let bank = Arc::new(Bank::new_no_wallclock_throttle(&genesis_config));
let start_hash = bank.last_blockhash();
let (verified_sender, verified_receiver) = unbounded();
let (vote_sender, vote_receiver) = unbounded();
@@ -1516,7 +1545,7 @@ mod tests {
drop(poh_recorder);
let mut blockhash = start_hash;
let bank = Bank::new(&genesis_config);
let bank = Arc::new(Bank::new_no_wallclock_throttle(&genesis_config));
bank.process_transaction(&fund_tx).unwrap();
//receive entries + ticks
loop {
@@ -1594,7 +1623,7 @@ mod tests {
let entry_receiver = {
// start a banking_stage to eat verified receiver
let bank = Arc::new(Bank::new(&genesis_config));
let bank = Arc::new(Bank::new_no_wallclock_throttle(&genesis_config));
let blockstore = Arc::new(
Blockstore::open(&ledger_path)
.expect("Expected to be able to open database ledger"),
@@ -1638,7 +1667,7 @@ mod tests {
.map(|(_bank, (entry, _tick_height))| entry)
.collect();
let bank = Bank::new(&genesis_config);
let bank = Bank::new_no_wallclock_throttle(&genesis_config);
for entry in &entries {
bank.process_transactions(&entry.transactions)
.iter()
@@ -1661,8 +1690,10 @@ mod tests {
..
} = create_genesis_config(10_000);
let bank = Arc::new(Bank::new(&genesis_config));
let start = Arc::new(Instant::now());
let working_bank = WorkingBank {
bank: bank.clone(),
start,
min_tick_height: bank.tick_height(),
max_tick_height: std::u64::MAX,
};
@@ -1915,80 +1946,80 @@ mod tests {
fn test_should_process_or_forward_packets() {
let my_pubkey = solana_sdk::pubkey::new_rand();
let my_pubkey1 = solana_sdk::pubkey::new_rand();
assert_eq!(
BankingStage::consume_or_forward_packets(&my_pubkey, None, true, false, false),
let bank = Arc::new(Bank::default());
assert_matches!(
BankingStage::consume_or_forward_packets(&my_pubkey, None, Some(&bank), false, false),
BufferedPacketsDecision::Hold
);
assert_eq!(
BankingStage::consume_or_forward_packets(&my_pubkey, None, false, false, false),
assert_matches!(
BankingStage::consume_or_forward_packets(&my_pubkey, None, None, false, false),
BufferedPacketsDecision::Hold
);
assert_eq!(
BankingStage::consume_or_forward_packets(&my_pubkey1, None, false, false, false),
assert_matches!(
BankingStage::consume_or_forward_packets(&my_pubkey1, None, None, false, false),
BufferedPacketsDecision::Hold
);
assert_eq!(
assert_matches!(
BankingStage::consume_or_forward_packets(
&my_pubkey,
Some(my_pubkey1),
false,
None,
false,
false
),
BufferedPacketsDecision::Forward
);
assert_eq!(
assert_matches!(
BankingStage::consume_or_forward_packets(
&my_pubkey,
Some(my_pubkey1),
false,
None,
true,
true
),
BufferedPacketsDecision::Hold
);
assert_eq!(
assert_matches!(
BankingStage::consume_or_forward_packets(
&my_pubkey,
Some(my_pubkey1),
false,
None,
true,
false
),
BufferedPacketsDecision::ForwardAndHold
);
assert_eq!(
assert_matches!(
BankingStage::consume_or_forward_packets(
&my_pubkey,
Some(my_pubkey1),
true,
Some(&bank),
false,
false
),
BufferedPacketsDecision::Consume
BufferedPacketsDecision::Consume(_)
);
assert_eq!(
assert_matches!(
BankingStage::consume_or_forward_packets(
&my_pubkey1,
Some(my_pubkey1),
false,
None,
false,
false
),
BufferedPacketsDecision::Hold
);
assert_eq!(
assert_matches!(
BankingStage::consume_or_forward_packets(
&my_pubkey1,
Some(my_pubkey1),
true,
Some(&bank),
false,
false
),
BufferedPacketsDecision::Consume
BufferedPacketsDecision::Consume(_)
);
}
@@ -2010,8 +2041,10 @@ mod tests {
genesis_config.hash(),
)];
let start = Arc::new(Instant::now());
let working_bank = WorkingBank {
bank: bank.clone(),
start,
min_tick_height: bank.tick_height(),
max_tick_height: bank.tick_height() + 1,
};
@@ -2106,8 +2139,10 @@ mod tests {
system_transaction::transfer(&mint_keypair, &pubkey1, 1, genesis_config.hash()),
];
let start = Arc::new(Instant::now());
let working_bank = WorkingBank {
bank: bank.clone(),
start,
min_tick_height: bank.tick_height(),
max_tick_height: bank.tick_height() + 1,
};
@@ -2196,7 +2231,7 @@ mod tests {
mint_keypair,
..
} = create_genesis_config(10_000);
let bank = Arc::new(Bank::new(&genesis_config));
let bank = Arc::new(Bank::new_no_wallclock_throttle(&genesis_config));
let pubkey = solana_sdk::pubkey::new_rand();
@@ -2231,6 +2266,7 @@ mod tests {
let (processed_transactions_count, mut retryable_txs) =
BankingStage::process_transactions(
&bank,
&Instant::now(),
&transactions,
&poh_recorder,
None,
@@ -2276,8 +2312,10 @@ mod tests {
let transactions = vec![success_tx, ix_error_tx, fail_tx];
bank.transfer(4, &mint_keypair, &keypair1.pubkey()).unwrap();
let start = Arc::new(Instant::now());
let working_bank = WorkingBank {
bank: bank.clone(),
start,
min_tick_height: bank.tick_height(),
max_tick_height: bank.tick_height() + 1,
};
@@ -2420,8 +2458,10 @@ mod tests {
// When the working bank in poh_recorder is None, no packets should be processed
assert!(!poh_recorder.lock().unwrap().has_bank());
let max_tx_processing_ns = std::u128::MAX;
BankingStage::consume_buffered_packets(
&Pubkey::default(),
max_tx_processing_ns,
&poh_recorder,
&mut buffered_packets,
None,
@@ -2436,6 +2476,7 @@ mod tests {
poh_recorder.lock().unwrap().set_bank(&bank);
BankingStage::consume_buffered_packets(
&Pubkey::default(),
max_tx_processing_ns,
&poh_recorder,
&mut buffered_packets,
None,
@@ -2492,6 +2533,7 @@ mod tests {
.spawn(move || {
BankingStage::consume_buffered_packets(
&Pubkey::default(),
std::u128::MAX,
&poh_recorder_,
&mut buffered_packets,
None,

View File

@@ -49,10 +49,12 @@ pub enum PohRecorderError {
type Result<T> = std::result::Result<T, PohRecorderError>;
pub type WorkingBankEntry = (Arc<Bank>, (Entry, u64));
pub type BankStart = (Arc<Bank>, Arc<Instant>);
#[derive(Clone)]
pub struct WorkingBank {
pub bank: Arc<Bank>,
pub start: Arc<Instant>,
pub min_tick_height: u64,
pub max_tick_height: u64,
}
@@ -78,6 +80,7 @@ pub struct PohRecorder {
tick_lock_contention_us: u64,
tick_overhead_us: u64,
record_us: u64,
last_metric: Instant,
}
impl PohRecorder {
@@ -97,7 +100,14 @@ impl PohRecorder {
self.grace_ticks = grace_ticks;
self.leader_first_tick_height = leader_first_tick_height;
self.leader_last_tick_height = leader_last_tick_height;
datapoint_info!(
"leader-slot-start-to-cleared-elapsed-ms",
("slot", bank.slot(), i64),
("elapsed", working_bank.start.elapsed().as_millis(), i64),
);
}
if let Some(ref signal) = self.clear_bank_signal {
let _ = signal.try_send(true);
}
@@ -126,7 +136,13 @@ impl PohRecorder {
}
pub fn bank(&self) -> Option<Arc<Bank>> {
self.working_bank.clone().map(|w| w.bank)
self.working_bank.as_ref().map(|w| w.bank.clone())
}
pub fn bank_start(&self) -> Option<BankStart> {
self.working_bank
.as_ref()
.map(|w| (w.bank.clone(), w.start.clone()))
}
pub fn has_bank(&self) -> bool {
@@ -247,14 +263,15 @@ impl PohRecorder {
) {
self.clear_bank();
let mut cache = vec![];
{
let poh_hash = {
let mut poh = self.poh.lock().unwrap();
info!(
"reset poh from: {},{},{} to: {},{}",
poh.hash, self.tick_height, self.start_slot, blockhash, start_slot
);
poh.reset(blockhash, self.poh_config.hashes_per_tick);
}
poh.hash
};
info!(
"reset poh from: {},{},{} to: {},{}",
poh_hash, self.tick_height, self.start_slot, blockhash, start_slot
);
std::mem::swap(&mut cache, &mut self.tick_cache);
@@ -273,11 +290,15 @@ impl PohRecorder {
trace!("new working bank");
assert_eq!(working_bank.bank.ticks_per_slot(), self.ticks_per_slot());
self.working_bank = Some(working_bank);
// TODO: adjust the working_bank.start time based on number of ticks
// that have already elapsed based on current tick height.
let _ = self.flush_cache(false);
}
pub fn set_bank(&mut self, bank: &Arc<Bank>) {
let working_bank = WorkingBank {
bank: bank.clone(),
start: Arc::new(Instant::now()),
min_tick_height: bank.tick_height(),
max_tick_height: bank.max_tick_height(),
};
@@ -377,23 +398,26 @@ impl PohRecorder {
}
fn report_metrics(&mut self, bank_slot: Slot) {
datapoint_info!(
"poh_recorder",
("slot", bank_slot, i64),
("tick_lock_contention", self.tick_lock_contention_us, i64),
("record_us", self.record_us, i64),
("tick_overhead", self.tick_overhead_us, i64),
(
"record_lock_contention",
self.record_lock_contention_us,
i64
),
);
if self.last_metric.elapsed().as_millis() > 1000 {
datapoint_info!(
"poh_recorder",
("slot", bank_slot, i64),
("tick_lock_contention", self.tick_lock_contention_us, i64),
("record_us", self.record_us, i64),
("tick_overhead", self.tick_overhead_us, i64),
(
"record_lock_contention",
self.record_lock_contention_us,
i64
),
);
self.tick_lock_contention_us = 0;
self.record_us = 0;
self.tick_overhead_us = 0;
self.record_lock_contention_us = 0;
self.tick_lock_contention_us = 0;
self.record_us = 0;
self.tick_overhead_us = 0;
self.record_lock_contention_us = 0;
self.last_metric = Instant::now();
}
}
pub fn record(
@@ -405,6 +429,7 @@ impl PohRecorder {
// Entries without transactions are used to track real-time passing in the ledger and
// cannot be generated by `record()`
assert!(!transactions.is_empty(), "No transactions provided");
self.report_metrics(bank_slot);
loop {
self.flush_cache(false)?;
@@ -413,7 +438,6 @@ impl PohRecorder {
.as_ref()
.ok_or(PohRecorderError::MaxHeightReached)?;
if bank_slot != working_bank.bank.slot() {
self.report_metrics(bank_slot);
return Err(PohRecorderError::MaxHeightReached);
}
@@ -424,6 +448,7 @@ impl PohRecorder {
self.record_lock_contention_us += timing::duration_as_us(&now.elapsed());
let now = Instant::now();
let res = poh_lock.record(mixin);
drop(poh_lock);
self.record_us += timing::duration_as_us(&now.elapsed());
if let Some(poh_entry) = res {
let entry = Entry {
@@ -484,6 +509,7 @@ impl PohRecorder {
tick_lock_contention_us: 0,
record_us: 0,
tick_overhead_us: 0,
last_metric: Instant::now(),
},
receiver,
)
@@ -517,6 +543,18 @@ impl PohRecorder {
)
}
// Filters the return result of PohRecorder::bank_start(), returns the bank
// if it's still processing transactions
pub fn get_bank_still_processing_txs(bank_start: &Option<BankStart>) -> Option<&Arc<Bank>> {
bank_start.as_ref().and_then(|(bank, bank_creation_time)| {
if Bank::should_bank_still_be_processing_txs(bank_creation_time, bank.ns_per_slot) {
Some(bank)
} else {
None
}
})
}
#[cfg(test)]
pub fn schedule_dummy_max_height_reached_failure(&mut self) {
self.reset(Hash::default(), 1, None);
@@ -635,8 +673,10 @@ mod tests {
&Arc::new(PohConfig::default()),
);
let start = Arc::new(Instant::now());
let working_bank = WorkingBank {
bank,
start,
min_tick_height: 2,
max_tick_height: 3,
};
@@ -669,8 +709,10 @@ mod tests {
&Arc::new(PohConfig::default()),
);
let start = Arc::new(Instant::now());
let working_bank = WorkingBank {
bank: bank.clone(),
start,
min_tick_height: 2,
max_tick_height: 3,
};
@@ -725,8 +767,10 @@ mod tests {
assert_eq!(poh_recorder.tick_cache.last().unwrap().1, 4);
assert_eq!(poh_recorder.tick_height, 4);
let start = Arc::new(Instant::now());
let working_bank = WorkingBank {
bank,
start,
min_tick_height: 2,
max_tick_height: 3,
};
@@ -765,8 +809,10 @@ mod tests {
&Arc::new(PohConfig::default()),
);
let start = Arc::new(Instant::now());
let working_bank = WorkingBank {
bank: bank.clone(),
start,
min_tick_height: 2,
max_tick_height: 3,
};
@@ -801,8 +847,10 @@ mod tests {
&Arc::new(PohConfig::default()),
);
let start = Arc::new(Instant::now());
let working_bank = WorkingBank {
bank: bank.clone(),
start,
min_tick_height: 1,
max_tick_height: 2,
};
@@ -841,8 +889,10 @@ mod tests {
&Arc::new(PohConfig::default()),
);
let start = Arc::new(Instant::now());
let working_bank = WorkingBank {
bank: bank.clone(),
start,
min_tick_height: 1,
max_tick_height: 2,
};
@@ -885,8 +935,10 @@ mod tests {
&Arc::new(PohConfig::default()),
);
let start = Arc::new(Instant::now());
let working_bank = WorkingBank {
bank: bank.clone(),
start,
min_tick_height: 1,
max_tick_height: 2,
};
@@ -927,8 +979,10 @@ mod tests {
&Arc::new(PohConfig::default()),
);
let start = Arc::new(Instant::now());
let working_bank = WorkingBank {
bank,
start,
min_tick_height: 2,
max_tick_height: 3,
};
@@ -1049,8 +1103,10 @@ mod tests {
&Arc::new(LeaderScheduleCache::new_from_bank(&bank)),
&Arc::new(PohConfig::default()),
);
let start = Arc::new(Instant::now());
let working_bank = WorkingBank {
bank,
start,
min_tick_height: 2,
max_tick_height: 3,
};
@@ -1118,8 +1174,10 @@ mod tests {
let end_slot = 3;
let max_tick_height = (end_slot + 1) * ticks_per_slot;
let start = Arc::new(Instant::now());
let working_bank = WorkingBank {
bank: bank.clone(),
start,
min_tick_height: 1,
max_tick_height,
};

View File

@@ -1,6 +1,7 @@
//! The `poh_service` module implements a service that records the passing of
//! "ticks", a measure of time in the PoH stream
use crate::poh_recorder::PohRecorder;
use solana_measure::measure::Measure;
use solana_sdk::poh_config::PohConfig;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::{Arc, Mutex};
@@ -117,11 +118,34 @@ impl PohService {
let mut num_ticks = 0;
let mut num_hashes = 0;
let mut total_sleep_us = 0;
let mut total_lock_time_ns = 0;
let mut total_hash_time_ns = 0;
let mut total_tick_time_ns = 0;
loop {
num_hashes += hashes_per_batch;
if poh.lock().unwrap().hash(hashes_per_batch) {
let should_tick = {
let mut lock_time = Measure::start("lock");
let mut poh_l = poh.lock().unwrap();
lock_time.stop();
total_lock_time_ns += lock_time.as_ns();
let mut hash_time = Measure::start("hash");
let r = poh_l.hash(hashes_per_batch);
hash_time.stop();
total_hash_time_ns += hash_time.as_ns();
r
};
if should_tick {
// Lock PohRecorder only for the final hash...
poh_recorder.lock().unwrap().tick();
{
let mut lock_time = Measure::start("lock");
let mut poh_recorder_l = poh_recorder.lock().unwrap();
lock_time.stop();
total_lock_time_ns += lock_time.as_ns();
let mut tick_time = Measure::start("tick");
poh_recorder_l.tick();
tick_time.stop();
total_tick_time_ns += tick_time.as_ns();
}
num_ticks += 1;
let elapsed_ns = now.elapsed().as_nanos() as u64;
// sleep is not accurate enough to get a predictable time.
@@ -133,18 +157,24 @@ impl PohService {
now = Instant::now();
if last_metric.elapsed().as_millis() > 1000 {
let elapsed_ms = last_metric.elapsed().as_millis() as u64;
let ms_per_slot = (elapsed_ms * ticks_per_slot) / num_ticks;
let elapsed_us = last_metric.elapsed().as_micros() as u64;
let us_per_slot = (elapsed_us * ticks_per_slot) / num_ticks;
datapoint_info!(
"poh-service",
("ticks", num_ticks as i64, i64),
("hashes", num_hashes as i64, i64),
("elapsed_ms", ms_per_slot, i64),
("total_sleep_ms", total_sleep_us / 1000, i64),
("elapsed_us", us_per_slot, i64),
("total_sleep_us", total_sleep_us, i64),
("total_tick_time_us", total_tick_time_ns / 1000, i64),
("total_lock_time_us", total_lock_time_ns / 1000, i64),
("total_hash_time_us", total_hash_time_ns / 1000, i64),
);
total_sleep_us = 0;
num_ticks = 0;
num_hashes = 0;
total_tick_time_ns = 0;
total_lock_time_ns = 0;
total_hash_time_ns = 0;
last_metric = Instant::now();
}
if poh_exit.load(Ordering::Relaxed) {
@@ -208,8 +238,10 @@ mod tests {
);
let poh_recorder = Arc::new(Mutex::new(poh_recorder));
let exit = Arc::new(AtomicBool::new(false));
let start = Arc::new(Instant::now());
let working_bank = WorkingBank {
bank: bank.clone(),
start,
min_tick_height: bank.tick_height(),
max_tick_height: std::u64::MAX,
};

View File

@@ -16,6 +16,7 @@ use {
account::{Account, AccountSharedData},
clock::{Slot, DEFAULT_MS_PER_SLOT},
commitment_config::CommitmentConfig,
epoch_schedule::EpochSchedule,
fee_calculator::{FeeCalculator, FeeRateGovernor},
hash::Hash,
native_token::sol_to_lamports,
@@ -27,7 +28,7 @@ use {
collections::HashMap,
fs::remove_dir_all,
net::{IpAddr, Ipv4Addr, SocketAddr},
path::PathBuf,
path::{Path, PathBuf},
sync::{Arc, RwLock},
thread::sleep,
time::Duration,
@@ -52,6 +53,7 @@ pub struct TestValidatorGenesis {
no_bpf_jit: bool,
accounts: HashMap<Pubkey, AccountSharedData>,
programs: Vec<ProgramInfo>,
epoch_schedule: Option<EpochSchedule>,
pub validator_exit: Arc<RwLock<ValidatorExit>>,
pub start_progress: Arc<RwLock<ValidatorStartProgress>>,
}
@@ -62,11 +64,21 @@ impl TestValidatorGenesis {
self
}
/// Check if a given TestValidator ledger has already been initialized
pub fn ledger_exists(ledger_path: &Path) -> bool {
ledger_path.join("vote-account-keypair.json").exists()
}
pub fn fee_rate_governor(&mut self, fee_rate_governor: FeeRateGovernor) -> &mut Self {
self.fee_rate_governor = fee_rate_governor;
self
}
pub fn epoch_schedule(&mut self, epoch_schedule: EpochSchedule) -> &mut Self {
self.epoch_schedule = Some(epoch_schedule);
self
}
pub fn rent(&mut self, rent: Rent) -> &mut Self {
self.rent = rent;
self
@@ -308,12 +320,14 @@ impl TestValidator {
solana_sdk::genesis_config::ClusterType::Development,
accounts.into_iter().collect(),
);
genesis_config.epoch_schedule = solana_sdk::epoch_schedule::EpochSchedule::without_warmup();
genesis_config.epoch_schedule = config
.epoch_schedule
.unwrap_or_else(EpochSchedule::without_warmup);
let ledger_path = match &config.ledger_path {
None => create_new_tmp_ledger!(&genesis_config).0,
Some(ledger_path) => {
if ledger_path.join("validator-keypair.json").exists() {
if TestValidatorGenesis::ledger_exists(ledger_path) {
return Ok(ledger_path.to_path_buf());
}
@@ -338,6 +352,10 @@ impl TestValidator {
&validator_identity,
ledger_path.join("validator-keypair.json").to_str().unwrap(),
)?;
// `ledger_exists` should fail until the vote account keypair is written
assert!(!TestValidatorGenesis::ledger_exists(&ledger_path));
write_keypair_file(
&validator_vote_account,
ledger_path

View File

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

View File

@@ -40,11 +40,11 @@ solana config set --url https://devnet.solana.com
```bash
$ solana-validator \
--identity ~/validator-keypair.json \
--vote-account ~/vote-account-keypair.json \
--identity validator-keypair.json \
--vote-account vote-account-keypair.json \
--trusted-validator dv1LfzJvDF7S1fBKpFgKoKXK5yoSosmkAdfbxBo1GqJ \
--no-untrusted-rpc \
--ledger ~/validator-ledger \
--ledger ledger \
--rpc-port 8899 \
--dynamic-port-range 8000-8010 \
--entrypoint entrypoint.devnet.solana.com:8001 \
@@ -85,14 +85,14 @@ solana config set --url https://testnet.solana.com
```bash
$ solana-validator \
--identity ~/validator-keypair.json \
--vote-account ~/vote-account-keypair.json \
--identity validator-keypair.json \
--vote-account vote-account-keypair.json \
--trusted-validator 5D1fNXzvv5NjV1ysLjirC4WY92RNsVH18vjmcszZd8on \
--trusted-validator 7XSY3MrYnK8vq693Rju17bbPkCN3Z7KvvfvJx4kdrsSY \
--trusted-validator Ft5fbkqNa76vnsjYNwjDZUXoTWpP7VYm3mtsaQckQADN \
--trusted-validator 9QxCLckBiJc783jnMvXZubK4wH86Eqqvashtrwvcsgkv \
--no-untrusted-rpc \
--ledger ~/validator-ledger \
--ledger ledger \
--rpc-port 8899 \
--dynamic-port-range 8000-8010 \
--entrypoint entrypoint.testnet.solana.com:8001 \
@@ -143,7 +143,7 @@ $ solana-validator \
--trusted-validator DE1bawNcRJB9rVm3buyMVfr8mBEoyyu73NBovf2oXJsJ \
--trusted-validator CakcnaRDHka2gXyfbEd2d3xsvkJkqsLw2akB3zsN1D2S \
--no-untrusted-rpc \
--ledger ~/validator-ledger \
--ledger ledger \
--rpc-port 8899 \
--private-rpc \
--dynamic-port-range 8000-8010 \

View File

@@ -2742,7 +2742,7 @@ curl http://localhost:8899 -X POST -H "Content-Type: application/json" -d '
Result:
```json
{"jsonrpc":"2.0","result":{"solana-core": "1.6.0"},"id":1}
{"jsonrpc":"2.0","result":{"solana-core": "1.6.1"},"id":1}
```
### getVoteAccounts

View File

@@ -254,7 +254,6 @@ Connect to the cluster by running:
solana-validator \
--identity ~/validator-keypair.json \
--vote-account ~/vote-account-keypair.json \
--ledger ~/validator-ledger \
--rpc-port 8899 \
--entrypoint devnet.solana.com:8001 \
--limit-ledger-size \
@@ -264,6 +263,9 @@ solana-validator \
To force validator logging to the console add a `--log -` argument, otherwise
the validator will automatically log to a file.
The ledger will be placed in the `ledger/` directory by default, use the
`--ledger` argument to specify a different location.
> Note: You can use a
> [paper wallet seed phrase](../wallet-guide/paper-wallet.md)
> for your `--identity` and/or

View File

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

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-download-utils"
version = "1.6.0"
version = "1.6.1"
description = "Solana Download Utils"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -15,8 +15,8 @@ console = "0.11.3"
indicatif = "0.15.0"
log = "0.4.11"
reqwest = { version = "0.10.8", default-features = false, features = ["blocking", "rustls-tls", "json"] }
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-runtime = { path = "../runtime", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
solana-runtime = { path = "../runtime", version = "=1.6.1" }
tar = "0.4.28"
[lib]

View File

@@ -34,9 +34,18 @@ pub fn download_file(
}
let download_start = Instant::now();
fs::create_dir_all(destination_file.parent().unwrap()).map_err(|err| err.to_string())?;
fs::create_dir_all(destination_file.parent().expect("parent"))
.map_err(|err| err.to_string())?;
let temp_destination_file = destination_file.with_extension("tmp");
let mut temp_destination_file = destination_file.to_path_buf();
temp_destination_file.set_file_name(format!(
"tmp-{}",
destination_file
.file_name()
.expect("file_name")
.to_str()
.expect("to_str")
));
let progress_bar = new_spinner_progress_bar();
if use_progress_bar {
@@ -169,11 +178,11 @@ pub fn download_genesis_if_missing(
pub fn download_snapshot(
rpc_addr: &SocketAddr,
ledger_path: &Path,
snapshot_output_dir: &Path,
desired_snapshot_hash: (Slot, Hash),
use_progress_bar: bool,
) -> Result<(), String> {
snapshot_utils::purge_old_snapshot_archives(ledger_path);
snapshot_utils::purge_old_snapshot_archives(snapshot_output_dir);
for compression in &[
ArchiveFormat::TarZstd,
@@ -181,7 +190,7 @@ pub fn download_snapshot(
ArchiveFormat::TarBzip2,
] {
let desired_snapshot_package = snapshot_utils::get_snapshot_archive_path(
ledger_path.to_path_buf(),
snapshot_output_dir.to_path_buf(),
&desired_snapshot_hash,
*compression,
);

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-faucet"
version = "1.6.0"
version = "1.6.1"
description = "Solana Faucet"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -16,12 +16,12 @@ clap = "2.33"
log = "0.4.11"
serde = "1.0.122"
serde_derive = "1.0.103"
solana-clap-utils = { path = "../clap-utils", version = "1.6.0" }
solana-cli-config = { path = "../cli-config", version = "1.6.0" }
solana-logger = { path = "../logger", version = "1.6.0" }
solana-metrics = { path = "../metrics", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-version = { path = "../version", version = "1.6.0" }
solana-clap-utils = { path = "../clap-utils", version = "=1.6.1" }
solana-cli-config = { path = "../cli-config", version = "=1.6.1" }
solana-logger = { path = "../logger", version = "=1.6.1" }
solana-metrics = { path = "../metrics", version = "=1.6.1" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
solana-version = { path = "../version", version = "=1.6.1" }
tokio = { version = "1.1", features = ["full"] }
[lib]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-frozen-abi"
version = "1.6.0"
version = "1.6.1"
description = "Solana Frozen ABI"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -16,11 +16,11 @@ log = "0.4.11"
serde = "1.0.122"
serde_derive = "1.0.103"
sha2 = "0.9.2"
solana-frozen-abi-macro = { path = "macro", version = "1.6.0" }
solana-frozen-abi-macro = { path = "macro", version = "=1.6.1" }
thiserror = "1.0"
[target.'cfg(not(target_arch = "bpf"))'.dependencies]
solana-logger = { path = "../logger", version = "1.6.0" }
solana-logger = { path = "../logger", version = "=1.6.1" }
generic-array = { version = "0.14.3", default-features = false, features = ["serde", "more_lengths"]}
memmap2 = "0.1.0"

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-frozen-abi-macro"
version = "1.6.0"
version = "1.6.1"
description = "Solana Frozen ABI Macro"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2018"
name = "solana-genesis"
description = "Blockchain, Rebuilt for Scale"
version = "1.6.0"
version = "1.6.1"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -16,18 +16,18 @@ chrono = "0.4"
serde = "1.0.122"
serde_json = "1.0.56"
serde_yaml = "0.8.13"
solana-budget-program = { path = "../programs/budget", version = "1.6.0" }
solana-clap-utils = { path = "../clap-utils", version = "1.6.0" }
solana-cli-config = { path = "../cli-config", version = "1.6.0" }
solana-exchange-program = { path = "../programs/exchange", version = "1.6.0" }
solana-ledger = { path = "../ledger", version = "1.6.0" }
solana-logger = { path = "../logger", version = "1.6.0" }
solana-runtime = { path = "../runtime", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-stake-program = { path = "../programs/stake", version = "1.6.0" }
solana-version = { path = "../version", version = "1.6.0" }
solana-vest-program = { path = "../programs/vest", version = "1.6.0" }
solana-vote-program = { path = "../programs/vote", version = "1.6.0" }
solana-budget-program = { path = "../programs/budget", version = "=1.6.1" }
solana-clap-utils = { path = "../clap-utils", version = "=1.6.1" }
solana-cli-config = { path = "../cli-config", version = "=1.6.1" }
solana-exchange-program = { path = "../programs/exchange", version = "=1.6.1" }
solana-ledger = { path = "../ledger", version = "=1.6.1" }
solana-logger = { path = "../logger", version = "=1.6.1" }
solana-runtime = { path = "../runtime", version = "=1.6.1" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
solana-stake-program = { path = "../programs/stake", version = "=1.6.1" }
solana-version = { path = "../version", version = "=1.6.1" }
solana-vest-program = { path = "../programs/vest", version = "=1.6.1" }
solana-vote-program = { path = "../programs/vote", version = "=1.6.1" }
tempfile = "3.1.0"
[[bin]]

View File

@@ -11,7 +11,7 @@ extern crate solana_vest_program;
use clap::{crate_description, crate_name, value_t, value_t_or_exit, App, Arg, ArgMatches};
use solana_clap_utils::{
input_parsers::{cluster_type_of, pubkey_of, pubkeys_of, unix_timestamp_from_rfc3339_datetime},
input_validators::{is_pubkey_or_keypair, is_rfc3339_datetime, is_valid_percentage},
input_validators::{is_pubkey_or_keypair, is_rfc3339_datetime, is_slot, is_valid_percentage},
};
use solana_genesis::{genesis_accounts::add_genesis_accounts, Base64Account};
use solana_ledger::{
@@ -328,6 +328,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
Arg::with_name("slots_per_epoch")
.long("slots-per-epoch")
.value_name("SLOTS")
.validator(is_slot)
.takes_value(true)
.help("The number of slots in an epoch"),
)

View File

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

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2018"
name = "solana-install"
description = "The solana cluster software installer"
version = "1.6.0"
version = "1.6.1"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -25,12 +25,12 @@ reqwest = { version = "0.10.8", default-features = false, features = ["blocking"
serde = { version = "1.0.122", features = ["derive"] }
serde_json = "1.0.62"
serde_yaml = "0.8.13"
solana-clap-utils = { path = "../clap-utils", version = "1.6.0" }
solana-client = { path = "../client", version = "1.6.0" }
solana-config-program = { path = "../programs/config", version = "1.6.0" }
solana-logger = { path = "../logger", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-version = { path = "../version", version = "1.6.0" }
solana-clap-utils = { path = "../clap-utils", version = "=1.6.1" }
solana-client = { path = "../client", version = "=1.6.1" }
solana-config-program = { path = "../programs/config", version = "=1.6.1" }
solana-logger = { path = "../logger", version = "=1.6.1" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
solana-version = { path = "../version", version = "=1.6.1" }
semver = "0.9.0"
tar = "0.4.28"
tempfile = "3.1.0"

View File

@@ -863,6 +863,7 @@ fn semver_of(string: &str) -> Result<semver::Version, String> {
fn check_for_newer_github_release(
version_filter: Option<semver::VersionReq>,
prerelease_allowed: bool,
) -> reqwest::Result<Option<String>> {
let url =
reqwest::Url::parse("https://api.github.com/repos/solana-labs/solana/releases").unwrap();
@@ -882,7 +883,7 @@ fn check_for_newer_github_release(
prerelease,
}| {
if let Ok(version) = semver_of(&tag_name) {
if !prerelease
if (prerelease_allowed || !prerelease)
&& version_filter
.as_ref()
.map_or(true, |version_filter| version_filter.matches(&version))
@@ -937,6 +938,7 @@ pub fn init_or_update(config_file: &str, is_init: bool, check_only: bool) -> Res
current_release_semver
))
.ok(),
is_init,
)
.map_err(|err| err.to_string())?;
progress_bar.finish_and_clear();

View File

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

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2018"
name = "solana-ledger-tool"
description = "Blockchain, Rebuilt for Scale"
version = "1.6.0"
version = "1.6.1"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -23,18 +23,18 @@ regex = "1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0.56"
serde_yaml = "0.8.13"
solana-clap-utils = { path = "../clap-utils", version = "1.6.0" }
solana-cli-output = { path = "../cli-output", version = "1.6.0" }
solana-ledger = { path = "../ledger", version = "1.6.0" }
solana-logger = { path = "../logger", version = "1.6.0" }
solana-measure = { path = "../measure", version = "1.6.0" }
solana-runtime = { path = "../runtime", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-stake-program = { path = "../programs/stake", version = "1.6.0" }
solana-storage-bigtable = { path = "../storage-bigtable", version = "1.6.0" }
solana-transaction-status = { path = "../transaction-status", version = "1.6.0" }
solana-version = { path = "../version", version = "1.6.0" }
solana-vote-program = { path = "../programs/vote", version = "1.6.0" }
solana-clap-utils = { path = "../clap-utils", version = "=1.6.1" }
solana-cli-output = { path = "../cli-output", version = "=1.6.1" }
solana-ledger = { path = "../ledger", version = "=1.6.1" }
solana-logger = { path = "../logger", version = "=1.6.1" }
solana-measure = { path = "../measure", version = "=1.6.1" }
solana-runtime = { path = "../runtime", version = "=1.6.1" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
solana-stake-program = { path = "../programs/stake", version = "=1.6.1" }
solana-storage-bigtable = { path = "../storage-bigtable", version = "=1.6.1" }
solana-transaction-status = { path = "../transaction-status", version = "=1.6.1" }
solana-version = { path = "../version", version = "=1.6.1" }
solana-vote-program = { path = "../programs/vote", version = "=1.6.1" }
tempfile = "3.1.0"
tokio = { version = "1.1", features = ["full"] }

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-ledger"
version = "1.6.0"
version = "1.6.1"
description = "Solana ledger"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -34,25 +34,26 @@ reed-solomon-erasure = { version = "4.0.2", features = ["simd-accel"] }
serde = "1.0.122"
serde_bytes = "0.11.4"
sha2 = "0.9.2"
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "1.6.0" }
solana-frozen-abi = { path = "../frozen-abi", version = "1.6.0" }
solana-frozen-abi-macro = { path = "../frozen-abi/macro", version = "1.6.0" }
solana-transaction-status = { path = "../transaction-status", version = "1.6.0" }
solana-logger = { path = "../logger", version = "1.6.0" }
solana-measure = { path = "../measure", version = "1.6.0" }
solana-merkle-tree = { path = "../merkle-tree", version = "1.6.0" }
solana-metrics = { path = "../metrics", version = "1.6.0" }
solana-perf = { path = "../perf", version = "1.6.0" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "1.6.0" }
solana-runtime = { path = "../runtime", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-stake-program = { path = "../programs/stake", version = "1.6.0" }
solana-storage-bigtable = { path = "../storage-bigtable", version = "1.6.0" }
solana-storage-proto = { path = "../storage-proto", version = "1.6.0" }
solana-vote-program = { path = "../programs/vote", version = "1.6.0" }
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "=1.6.1" }
solana-frozen-abi = { path = "../frozen-abi", version = "=1.6.1" }
solana-frozen-abi-macro = { path = "../frozen-abi/macro", version = "=1.6.1" }
solana-transaction-status = { path = "../transaction-status", version = "=1.6.1" }
solana-logger = { path = "../logger", version = "=1.6.1" }
solana-measure = { path = "../measure", version = "=1.6.1" }
solana-merkle-tree = { path = "../merkle-tree", version = "=1.6.1" }
solana-metrics = { path = "../metrics", version = "=1.6.1" }
solana-perf = { path = "../perf", version = "=1.6.1" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "=1.6.1" }
solana-runtime = { path = "../runtime", version = "=1.6.1" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
solana-stake-program = { path = "../programs/stake", version = "=1.6.1" }
solana-storage-bigtable = { path = "../storage-bigtable", version = "=1.6.1" }
solana-storage-proto = { path = "../storage-proto", version = "=1.6.1" }
solana-vote-program = { path = "../programs/vote", version = "=1.6.1" }
tempfile = "3.1.0"
thiserror = "1.0"
tokio = { version = "0.3", features = ["full"] }
tokio = { version = "1.1", features = ["full"] }
tokio-stream = "0.1"
trees = "0.2.1"
[dependencies.rocksdb]
@@ -65,8 +66,8 @@ features = ["lz4"]
[dev-dependencies]
assert_matches = "1.3.0"
matches = "0.1.6"
solana-account-decoder = { path = "../account-decoder", version = "1.6.0" }
solana-budget-program = { path = "../programs/budget", version = "1.6.0" }
solana-account-decoder = { path = "../account-decoder", version = "=1.6.1" }
solana-budget-program = { path = "../programs/budget", version = "=1.6.1" }
[build-dependencies]
rustc_version = "0.2"

View File

@@ -168,7 +168,7 @@ pub async fn upload_confirmed_blocks(
use futures::stream::StreamExt;
let mut stream =
tokio::stream::iter(receiver.into_iter()).chunks(NUM_BLOCKS_TO_UPLOAD_IN_PARALLEL);
tokio_stream::iter(receiver.into_iter()).chunks(NUM_BLOCKS_TO_UPLOAD_IN_PARALLEL);
while let Some(blocks) = stream.next().await {
if exit.load(Ordering::Relaxed) {

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2018"
name = "solana-local-cluster"
description = "Blockchain, Rebuilt for Scale"
version = "1.6.0"
version = "1.6.1"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -16,21 +16,21 @@ gag = "0.1.10"
fs_extra = "1.2.0"
log = "0.4.11"
rand = "0.7.0"
solana-config-program = { path = "../programs/config", version = "1.6.0" }
solana-core = { path = "../core", version = "1.6.0" }
solana-client = { path = "../client", version = "1.6.0" }
solana-download-utils = { path = "../download-utils", version = "1.6.0" }
solana-faucet = { path = "../faucet", version = "1.6.0" }
solana-exchange-program = { path = "../programs/exchange", version = "1.6.0" }
solana-ledger = { path = "../ledger", version = "1.6.0" }
solana-logger = { path = "../logger", version = "1.6.0" }
solana-runtime = { path = "../runtime", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-stake-program = { path = "../programs/stake", version = "1.6.0" }
solana-vest-program = { path = "../programs/vest", version = "1.6.0" }
solana-vote-program = { path = "../programs/vote", version = "1.6.0" }
solana-config-program = { path = "../programs/config", version = "=1.6.1" }
solana-core = { path = "../core", version = "=1.6.1" }
solana-client = { path = "../client", version = "=1.6.1" }
solana-download-utils = { path = "../download-utils", version = "=1.6.1" }
solana-faucet = { path = "../faucet", version = "=1.6.1" }
solana-exchange-program = { path = "../programs/exchange", version = "=1.6.1" }
solana-ledger = { path = "../ledger", version = "=1.6.1" }
solana-logger = { path = "../logger", version = "=1.6.1" }
solana-runtime = { path = "../runtime", version = "=1.6.1" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
solana-stake-program = { path = "../programs/stake", version = "=1.6.1" }
solana-vest-program = { path = "../programs/vest", version = "=1.6.1" }
solana-vote-program = { path = "../programs/vote", version = "=1.6.1" }
tempfile = "3.1.0"
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "1.6.0" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "=1.6.1" }
[dev-dependencies]
assert_matches = "1.3.0"

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.6.0"
version = "1.6.1"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -14,9 +14,9 @@ byte-unit = "4.0.9"
clap = "2.33.1"
serde = "1.0.122"
serde_json = "1.0.56"
solana-clap-utils = { path = "../clap-utils", version = "1.6.0" }
solana-logger = { path = "../logger", version = "1.6.0" }
solana-version = { path = "../version", version = "1.6.0" }
solana-clap-utils = { path = "../clap-utils", version = "=1.6.1" }
solana-logger = { path = "../logger", version = "=1.6.1" }
solana-version = { path = "../version", version = "=1.6.1" }
[[bin]]
name = "solana-log-analyzer"

View File

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

View File

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

View File

@@ -20,6 +20,10 @@ impl Measure {
self.duration = duration_as_ns(&self.start.elapsed());
}
pub fn as_ns(&self) -> u64 {
self.duration
}
pub fn as_us(&self) -> u64 {
self.duration / 1000
}

View File

@@ -2,7 +2,7 @@
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2018"
name = "solana-merkle-root-bench"
version = "1.6.0"
version = "1.6.1"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -10,11 +10,11 @@ publish = false
[dependencies]
log = "0.4.11"
solana-logger = { path = "../logger", version = "1.6.0" }
solana-runtime = { path = "../runtime", version = "1.6.0" }
solana-measure = { path = "../measure", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-version = { path = "../version", version = "1.6.0" }
solana-logger = { path = "../logger", version = "=1.6.1" }
solana-runtime = { path = "../runtime", version = "=1.6.1" }
solana-measure = { path = "../measure", version = "=1.6.1" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
solana-version = { path = "../version", version = "=1.6.1" }
clap = "2.33.1"
[package.metadata.docs.rs]

View File

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

View File

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

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2018"
name = "solana-net-shaper"
description = "The solana cluster network shaping tool"
version = "1.6.0"
version = "1.6.1"
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.122"
serde_json = "1.0.56"
solana-clap-utils = { path = "../clap-utils", version = "1.6.0" }
solana-logger = { path = "../logger", version = "1.6.0" }
solana-clap-utils = { path = "../clap-utils", version = "=1.6.1" }
solana-logger = { path = "../logger", version = "=1.6.1" }
rand = "0.7.0"
[[bin]]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-net-utils"
version = "1.6.0"
version = "1.6.1"
description = "Solana Network Utilities"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -18,9 +18,9 @@ rand = "0.7.0"
serde = "1.0.122"
serde_derive = "1.0.103"
socket2 = "0.3.17"
solana-clap-utils = { path = "../clap-utils", version = "1.6.0" }
solana-logger = { path = "../logger", version = "1.6.0" }
solana-version = { path = "../version", version = "1.6.0" }
solana-clap-utils = { path = "../clap-utils", version = "=1.6.1" }
solana-logger = { path = "../logger", version = "=1.6.1" }
solana-version = { path = "../version", version = "=1.6.1" }
tokio = { version = "1.1", features = ["full"] }
url = "2.1.1"

View File

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

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-perf"
version = "1.6.0"
version = "1.6.1"
description = "Solana Performance APIs"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -18,12 +18,12 @@ serde = "1.0.122"
dlopen_derive = "0.1.4"
lazy_static = "1.4.0"
log = "0.4.11"
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "1.6.0" }
solana-budget-program = { path = "../programs/budget", version = "1.6.0" }
solana-logger = { path = "../logger", version = "1.6.0" }
solana-measure = { path = "../measure", version = "1.6.0" }
solana-metrics = { path = "../metrics", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "=1.6.1" }
solana-budget-program = { path = "../programs/budget", version = "=1.6.1" }
solana-logger = { path = "../logger", version = "=1.6.1" }
solana-measure = { path = "../measure", version = "=1.6.1" }
solana-metrics = { path = "../metrics", version = "=1.6.1" }
curve25519-dalek = { version = "2" }
[lib]

View File

@@ -2,7 +2,7 @@
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2018"
name = "solana-poh-bench"
version = "1.6.0"
version = "1.6.1"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -13,13 +13,13 @@ clap = "2.33.1"
log = "0.4.11"
rand = "0.7.0"
rayon = "1.5.0"
solana-logger = { path = "../logger", version = "1.6.0" }
solana-ledger = { path = "../ledger", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-clap-utils = { path = "../clap-utils", version = "1.6.0" }
solana-measure = { path = "../measure", version = "1.6.0" }
solana-version = { path = "../version", version = "1.6.0" }
solana-perf = { path = "../perf", version = "1.6.0" }
solana-logger = { path = "../logger", version = "=1.6.1" }
solana-ledger = { path = "../ledger", version = "=1.6.1" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
solana-clap-utils = { path = "../clap-utils", version = "=1.6.1" }
solana-measure = { path = "../measure", version = "=1.6.1" }
solana-version = { path = "../version", version = "=1.6.1" }
solana-perf = { path = "../perf", version = "=1.6.1" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -5,7 +5,7 @@ edition = "2018"
license = "Apache-2.0"
name = "solana-program-test"
repository = "https://github.com/solana-labs/solana"
version = "1.6.0"
version = "1.6.1"
[dependencies]
async-trait = "0.1.42"
@@ -14,16 +14,16 @@ chrono = "0.4.19"
chrono-humanize = "0.1.1"
log = "0.4.11"
mio = "0.7.6"
solana-banks-client = { path = "../banks-client", version = "1.6.0" }
solana-banks-server = { path = "../banks-server", version = "1.6.0" }
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "1.6.0" }
solana-logger = { path = "../logger", version = "1.6.0" }
solana-program = { path = "../sdk/program", version = "1.6.0" }
solana-runtime = { path = "../runtime", version = "1.6.0" }
solana-sdk = { path = "../sdk", version = "1.6.0" }
solana-vote-program = { path = "../programs/vote", version = "1.6.0" }
solana-banks-client = { path = "../banks-client", version = "=1.6.1" }
solana-banks-server = { path = "../banks-server", version = "=1.6.1" }
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "=1.6.1" }
solana-logger = { path = "../logger", version = "=1.6.1" }
solana-program = { path = "../sdk/program", version = "=1.6.1" }
solana-runtime = { path = "../runtime", version = "=1.6.1" }
solana-sdk = { path = "../sdk", version = "=1.6.1" }
solana-vote-program = { path = "../programs/vote", version = "=1.6.1" }
thiserror = "1.0"
tokio = { version = "1.1", features = ["full"] }
[dev-dependencies]
solana-stake-program = { path = "../programs/stake", version = "1.6.0" }
solana-stake-program = { path = "../programs/stake", version = "=1.6.1" }

View File

@@ -51,6 +51,10 @@ use {
// Export types so test clients can limit their solana crate dependencies
pub use solana_banks_client::BanksClient;
// Export tokio for test clients
pub use tokio;
pub mod programs;
#[macro_use]
@@ -472,8 +476,9 @@ impl ProgramTest {
}
/// Add an account to the test environment
pub fn add_account(&mut self, address: Pubkey, account: AccountSharedData) {
self.accounts.push((address, account));
pub fn add_account(&mut self, address: Pubkey, account: Account) {
self.accounts
.push((address, AccountSharedData::from(account)));
}
/// Add an account to the test environment with the account data in the provided `filename`
@@ -486,7 +491,7 @@ impl ProgramTest {
) {
self.add_account(
address,
AccountSharedData::from(Account {
Account {
lamports,
data: read_file(find_file(filename).unwrap_or_else(|| {
panic!("Unable to locate {}", filename);
@@ -494,7 +499,7 @@ impl ProgramTest {
owner,
executable: false,
rent_epoch: 0,
}),
},
);
}
@@ -509,14 +514,14 @@ impl ProgramTest {
) {
self.add_account(
address,
AccountSharedData::from(Account {
Account {
lamports,
data: base64::decode(data_base64)
.unwrap_or_else(|err| panic!("Failed to base64 decode: {}", err)),
owner,
executable: false,
rent_epoch: 0,
}),
},
);
}
@@ -572,13 +577,13 @@ impl ProgramTest {
self.add_account(
program_id,
AccountSharedData::from(Account {
Account {
lamports: Rent::default().minimum_balance(data.len()).min(1),
data,
owner: loader,
executable: true,
rent_epoch: 0,
}),
},
);
} else {
info!("\"{}\" program loaded as native code", program_name);

245
programs/bpf/Cargo.lock generated
View File

@@ -2567,7 +2567,7 @@ dependencies = [
[[package]]
name = "solana-account-decoder"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"Inflector",
"base64 0.12.3",
@@ -2589,7 +2589,7 @@ dependencies = [
[[package]]
name = "solana-bpf-loader-program"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"bincode",
"byteorder 1.3.4",
@@ -2607,7 +2607,7 @@ dependencies = [
[[package]]
name = "solana-bpf-programs"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"bincode",
"byteorder 1.3.4",
@@ -2617,7 +2617,7 @@ dependencies = [
"net2",
"solana-bpf-loader-program",
"solana-cli-output",
"solana-logger 1.6.0",
"solana-logger 1.6.1",
"solana-measure",
"solana-runtime",
"solana-sdk",
@@ -2628,271 +2628,271 @@ dependencies = [
[[package]]
name = "solana-bpf-rust-128bit"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-bpf-rust-128bit-dep",
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-128bit-dep"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-alloc"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-call-depth"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-caller-access"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-custom-heap"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-dep-crate"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"byteorder 1.3.4",
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-deprecated-loader"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-dup-accounts"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-error-handling"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"num-derive 0.2.5",
"num-traits",
"solana-program 1.6.0",
"solana-program 1.6.1",
"thiserror",
]
[[package]]
name = "solana-bpf-rust-external-spend"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-finalize"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-instruction-introspection"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-invoke"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-bpf-rust-invoked",
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-invoke-and-error"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-invoke-and-ok"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-invoke-and-return"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-invoked"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-iter"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-many-args"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-bpf-rust-many-args-dep",
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-many-args-dep"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-mem"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-noop"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-panic"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-param-passing"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-bpf-rust-param-passing-dep",
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-param-passing-dep"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-rand"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"getrandom 0.1.14",
"rand 0.7.3",
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-ristretto"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"curve25519-dalek 3.0.0",
"getrandom 0.1.14",
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-ro-modify"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-sanity"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-sha256"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-spoof1"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-spoof1-system"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-sysval"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-upgradeable"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-bpf-rust-upgraded"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"solana-program 1.6.0",
"solana-program 1.6.1",
]
[[package]]
name = "solana-clap-utils"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"chrono",
"clap",
@@ -2906,9 +2906,10 @@ dependencies = [
[[package]]
name = "solana-cli-output"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"Inflector",
"base64 0.13.0",
"chrono",
"console 0.11.3",
"humantime",
@@ -2927,7 +2928,7 @@ dependencies = [
[[package]]
name = "solana-client"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"base64 0.13.0",
"bincode",
@@ -2957,7 +2958,7 @@ dependencies = [
[[package]]
name = "solana-config-program"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"bincode",
"chrono",
@@ -2970,7 +2971,7 @@ dependencies = [
[[package]]
name = "solana-crate-features"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"backtrace",
"bytes 0.4.12",
@@ -3012,7 +3013,7 @@ dependencies = [
[[package]]
name = "solana-frozen-abi"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"bs58",
"bv",
@@ -3023,8 +3024,8 @@ dependencies = [
"serde",
"serde_derive",
"sha2 0.9.2",
"solana-frozen-abi-macro 1.6.0",
"solana-logger 1.6.0",
"solana-frozen-abi-macro 1.6.1",
"solana-logger 1.6.1",
"thiserror",
]
@@ -3043,7 +3044,7 @@ dependencies = [
[[package]]
name = "solana-frozen-abi-macro"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"lazy_static",
"proc-macro2 1.0.24",
@@ -3065,7 +3066,7 @@ dependencies = [
[[package]]
name = "solana-logger"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"env_logger",
"lazy_static",
@@ -3074,7 +3075,7 @@ dependencies = [
[[package]]
name = "solana-measure"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"jemalloc-ctl",
"jemallocator",
@@ -3085,7 +3086,7 @@ dependencies = [
[[package]]
name = "solana-metrics"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"env_logger",
"gethostname",
@@ -3097,7 +3098,7 @@ dependencies = [
[[package]]
name = "solana-net-utils"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"bincode",
"clap",
@@ -3108,7 +3109,7 @@ dependencies = [
"serde_derive",
"socket2",
"solana-clap-utils",
"solana-logger 1.6.0",
"solana-logger 1.6.1",
"solana-version",
"tokio 1.1.1",
"url",
@@ -3146,7 +3147,7 @@ dependencies = [
[[package]]
name = "solana-program"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"bincode",
"borsh",
@@ -3167,16 +3168,16 @@ dependencies = [
"serde_bytes",
"serde_derive",
"sha2 0.9.2",
"solana-frozen-abi 1.6.0",
"solana-frozen-abi-macro 1.6.0",
"solana-logger 1.6.0",
"solana-sdk-macro 1.6.0",
"solana-frozen-abi 1.6.1",
"solana-frozen-abi-macro 1.6.1",
"solana-logger 1.6.1",
"solana-sdk-macro 1.6.1",
"thiserror",
]
[[package]]
name = "solana-rayon-threadlimit"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"lazy_static",
"num_cpus",
@@ -3184,7 +3185,7 @@ dependencies = [
[[package]]
name = "solana-remote-wallet"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"base32",
"console 0.11.3",
@@ -3202,7 +3203,7 @@ dependencies = [
[[package]]
name = "solana-runtime"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"bincode",
"blake3",
@@ -3231,9 +3232,9 @@ dependencies = [
"serde",
"serde_derive",
"solana-config-program",
"solana-frozen-abi 1.6.0",
"solana-frozen-abi-macro 1.6.0",
"solana-logger 1.6.0",
"solana-frozen-abi 1.6.1",
"solana-frozen-abi-macro 1.6.1",
"solana-logger 1.6.1",
"solana-measure",
"solana-metrics",
"solana-rayon-threadlimit",
@@ -3250,7 +3251,7 @@ dependencies = [
[[package]]
name = "solana-sdk"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"assert_matches",
"bincode",
@@ -3283,11 +3284,11 @@ dependencies = [
"sha2 0.9.2",
"sha3",
"solana-crate-features",
"solana-frozen-abi 1.6.0",
"solana-frozen-abi-macro 1.6.0",
"solana-logger 1.6.0",
"solana-program 1.6.0",
"solana-sdk-macro 1.6.0",
"solana-frozen-abi 1.6.1",
"solana-frozen-abi-macro 1.6.1",
"solana-logger 1.6.1",
"solana-program 1.6.1",
"solana-sdk-macro 1.6.1",
"thiserror",
]
@@ -3306,7 +3307,7 @@ dependencies = [
[[package]]
name = "solana-sdk-macro"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"bs58",
"proc-macro2 1.0.24",
@@ -3317,20 +3318,20 @@ dependencies = [
[[package]]
name = "solana-secp256k1-program"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"bincode",
"digest 0.9.0",
"libsecp256k1",
"rand 0.7.3",
"sha3",
"solana-logger 1.6.0",
"solana-logger 1.6.1",
"solana-sdk",
]
[[package]]
name = "solana-stake-program"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"bincode",
"log",
@@ -3340,8 +3341,8 @@ dependencies = [
"serde",
"serde_derive",
"solana-config-program",
"solana-frozen-abi 1.6.0",
"solana-frozen-abi-macro 1.6.0",
"solana-frozen-abi 1.6.1",
"solana-frozen-abi-macro 1.6.1",
"solana-metrics",
"solana-sdk",
"solana-vote-program",
@@ -3350,7 +3351,7 @@ dependencies = [
[[package]]
name = "solana-transaction-status"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"Inflector",
"base64 0.12.3",
@@ -3373,21 +3374,21 @@ dependencies = [
[[package]]
name = "solana-version"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"log",
"rustc_version",
"serde",
"serde_derive",
"solana-frozen-abi 1.6.0",
"solana-frozen-abi-macro 1.6.0",
"solana-logger 1.6.0",
"solana-frozen-abi 1.6.1",
"solana-frozen-abi-macro 1.6.1",
"solana-logger 1.6.1",
"solana-sdk",
]
[[package]]
name = "solana-vote-program"
version = "1.6.0"
version = "1.6.1"
dependencies = [
"bincode",
"log",
@@ -3396,9 +3397,9 @@ dependencies = [
"rustc_version",
"serde",
"serde_derive",
"solana-frozen-abi 1.6.0",
"solana-frozen-abi-macro 1.6.0",
"solana-logger 1.6.0",
"solana-frozen-abi 1.6.1",
"solana-frozen-abi-macro 1.6.1",
"solana-logger 1.6.1",
"solana-metrics",
"solana-sdk",
"thiserror",

View File

@@ -1,7 +1,7 @@
[package]
name = "solana-bpf-programs"
description = "Blockchain, Rebuilt for Scale"
version = "1.6.0"
version = "1.6.1"
documentation = "https://docs.rs/solana"
homepage = "https://solana.com/"
readme = "README.md"
@@ -25,14 +25,14 @@ elf = "0.0.10"
itertools = "0.10.0"
miow = "0.2.2"
net2 = "0.2.37"
solana-bpf-loader-program = { path = "../bpf_loader", version = "1.6.0" }
solana-cli-output = { path = "../../cli-output", version = "1.6.0" }
solana-logger = { path = "../../logger", version = "1.6.0" }
solana-measure = { path = "../../measure", version = "1.6.0" }
solana-bpf-loader-program = { path = "../bpf_loader", version = "=1.6.1" }
solana-cli-output = { path = "../../cli-output", version = "=1.6.1" }
solana-logger = { path = "../../logger", version = "=1.6.1" }
solana-measure = { path = "../../measure", version = "=1.6.1" }
solana_rbpf = "=0.2.5"
solana-runtime = { path = "../../runtime", version = "1.6.0" }
solana-sdk = { path = "../../sdk", version = "1.6.0" }
solana-transaction-status = { path = "../../transaction-status", version = "1.6.0" }
solana-runtime = { path = "../../runtime", version = "=1.6.1" }
solana-sdk = { path = "../../sdk", version = "=1.6.1" }
solana-transaction-status = { path = "../../transaction-status", version = "=1.6.1" }
[[bench]]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-128bit"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,8 +10,8 @@ documentation = "https://docs.rs/solana-bpf-rust-128bit"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-bpf-rust-128bit-dep = { path = "../128bit_dep", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
solana-bpf-rust-128bit-dep = { path = "../128bit_dep", version = "=1.6.1" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-128bit-dep"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-128bit-dep"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-alloc"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-alloc"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-call-depth"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-call-depth"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-caller-access"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-caller-access"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-custom-heap"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-custom-heap"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[features]
default = ["custom-heap"]

View File

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

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-deprecated-loader"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-deprecated-loader"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-dup-accounts"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-dup-accounts"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-error-handling"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,7 +12,7 @@ edition = "2018"
[dependencies]
num-derive = "0.2"
num-traits = "0.2"
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
thiserror = "1.0"
[lib]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-external-spend"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-external-spend"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-finalize"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-finalize"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-instruction-introspection"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-instruction-introspection"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-invoke"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -11,7 +11,7 @@ edition = "2018"
[dependencies]
solana-bpf-rust-invoked = { path = "../invoked", default-features = false }
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-invoke-and-error"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-invoke-and-error"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-invoke-and-ok"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-invoke-and-ok"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-invoke-and-return"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-invoke-and-return"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-invoked"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-invoked"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[features]
default = ["program"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-iter"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-iter"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-many-args"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,8 +10,8 @@ documentation = "https://docs.rs/solana-bpf-rust-many-args"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-bpf-rust-many-args-dep = { path = "../many_args_dep", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
solana-bpf-rust-many-args-dep = { path = "../many_args_dep", version = "=1.6.1" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-many-args-dep"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-many-args-dep"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-mem"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-mem"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-noop"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-noop"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-panic"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-panic"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[features]
default = ["custom-panic"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-param-passing"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,8 +10,8 @@ documentation = "https://docs.rs/solana-bpf-rust-param-passing"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-bpf-rust-param-passing-dep = { path = "../param_passing_dep", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
solana-bpf-rust-param-passing-dep = { path = "../param_passing_dep", version = "=1.6.1" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-param-passing-dep"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-param-passing-dep"
edition = "2018"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-rand"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,7 +12,7 @@ edition = "2018"
[dependencies]
getrandom = { version = "0.1.14", features = ["dummy"] }
rand = "0.7"
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-ristretto"
version = "1.6.0"
version = "1.6.1"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,7 +12,7 @@ edition = "2018"
[dependencies]
curve25519-dalek = "3"
getrandom = { version = "0.1.14", features = ["dummy"] }
solana-program = { path = "../../../../sdk/program", version = "1.6.0" }
solana-program = { path = "../../../../sdk/program", version = "=1.6.1" }
[lib]
crate-type = ["cdylib"]

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