Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into docs-secp256k1
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed Jul 9, 2022
2 parents 0ed5f61 + 105c7e1 commit abc54ba
Show file tree
Hide file tree
Showing 261 changed files with 7,644 additions and 6,301 deletions.
652 changes: 352 additions & 300 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions account-decoder/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "solana-account-decoder"
version = "1.11.2"
version = "1.11.3"
description = "Solana account decoder"
authors = ["Solana Maintainers <[email protected]>"]
repository = "https://github.com/solana-labs/solana"
Expand All @@ -16,12 +16,12 @@ bincode = "1.3.3"
bs58 = "0.4.0"
bv = "0.11.1"
lazy_static = "1.4.0"
serde = "1.0.137"
serde = "1.0.138"
serde_derive = "1.0.103"
serde_json = "1.0.81"
solana-config-program = { path = "../programs/config", version = "=1.11.2" }
solana-sdk = { path = "../sdk", version = "=1.11.2" }
solana-vote-program = { path = "../programs/vote", version = "=1.11.2" }
solana-config-program = { path = "../programs/config", version = "=1.11.3" }
solana-sdk = { path = "../sdk", version = "=1.11.3" }
solana-vote-program = { path = "../programs/vote", version = "=1.11.3" }
spl-token = { version = "=3.3.0", features = ["no-entrypoint"] }
spl-token-2022 = { version = "=0.3.0", features = ["no-entrypoint"] }
thiserror = "1.0"
Expand Down
5 changes: 1 addition & 4 deletions account-decoder/src/parse_account_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,7 @@ mod test {
assert_eq!(parsed.program, "vote".to_string());
assert_eq!(parsed.space, VoteState::size_of() as u64);

let nonce_data = Versions::new(
State::Initialized(Data::default()),
true, // separate_domains
);
let nonce_data = Versions::new(State::Initialized(Data::default()));
let nonce_account_data = bincode::serialize(&nonce_data).unwrap();
let parsed = parse_account_data(
&account_pubkey,
Expand Down
5 changes: 1 addition & 4 deletions account-decoder/src/parse_nonce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ mod test {

#[test]
fn test_parse_nonce() {
let nonce_data = Versions::new(
State::Initialized(Data::default()),
true, // separate_domains
);
let nonce_data = Versions::new(State::Initialized(Data::default()));
let nonce_account_data = bincode::serialize(&nonce_data).unwrap();
assert_eq!(
parse_nonce(&nonce_account_data).unwrap(),
Expand Down
12 changes: 6 additions & 6 deletions accounts-bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["Solana Maintainers <[email protected]>"]
edition = "2021"
name = "solana-accounts-bench"
version = "1.11.2"
version = "1.11.3"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
Expand All @@ -12,11 +12,11 @@ publish = false
clap = "2.33.1"
log = "0.4.17"
rayon = "1.5.3"
solana-logger = { path = "../logger", version = "=1.11.2" }
solana-measure = { path = "../measure", version = "=1.11.2" }
solana-runtime = { path = "../runtime", version = "=1.11.2" }
solana-sdk = { path = "../sdk", version = "=1.11.2" }
solana-version = { path = "../version", version = "=1.11.2" }
solana-logger = { path = "../logger", version = "=1.11.3" }
solana-measure = { path = "../measure", version = "=1.11.3" }
solana-runtime = { path = "../runtime", version = "=1.11.3" }
solana-sdk = { path = "../sdk", version = "=1.11.3" }
solana-version = { path = "../version", version = "=1.11.3" }

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
34 changes: 17 additions & 17 deletions accounts-cluster-bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["Solana Maintainers <[email protected]>"]
edition = "2021"
name = "solana-accounts-cluster-bench"
version = "1.11.2"
version = "1.11.3"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
Expand All @@ -13,25 +13,25 @@ clap = "2.33.1"
log = "0.4.17"
rand = "0.7.0"
rayon = "1.5.3"
solana-account-decoder = { path = "../account-decoder", version = "=1.11.2" }
solana-clap-utils = { path = "../clap-utils", version = "=1.11.2" }
solana-client = { path = "../client", version = "=1.11.2" }
solana-faucet = { path = "../faucet", version = "=1.11.2" }
solana-gossip = { path = "../gossip", version = "=1.11.2" }
solana-logger = { path = "../logger", version = "=1.11.2" }
solana-measure = { path = "../measure", version = "=1.11.2" }
solana-net-utils = { path = "../net-utils", version = "=1.11.2" }
solana-runtime = { path = "../runtime", version = "=1.11.2" }
solana-sdk = { path = "../sdk", version = "=1.11.2" }
solana-streamer = { path = "../streamer", version = "=1.11.2" }
solana-transaction-status = { path = "../transaction-status", version = "=1.11.2" }
solana-version = { path = "../version", version = "=1.11.2" }
solana-account-decoder = { path = "../account-decoder", version = "=1.11.3" }
solana-clap-utils = { path = "../clap-utils", version = "=1.11.3" }
solana-client = { path = "../client", version = "=1.11.3" }
solana-faucet = { path = "../faucet", version = "=1.11.3" }
solana-gossip = { path = "../gossip", version = "=1.11.3" }
solana-logger = { path = "../logger", version = "=1.11.3" }
solana-measure = { path = "../measure", version = "=1.11.3" }
solana-net-utils = { path = "../net-utils", version = "=1.11.3" }
solana-runtime = { path = "../runtime", version = "=1.11.3" }
solana-sdk = { path = "../sdk", version = "=1.11.3" }
solana-streamer = { path = "../streamer", version = "=1.11.3" }
solana-transaction-status = { path = "../transaction-status", version = "=1.11.3" }
solana-version = { path = "../version", version = "=1.11.3" }
spl-token = { version = "=3.3.0", features = ["no-entrypoint"] }

[dev-dependencies]
solana-core = { path = "../core", version = "=1.11.2" }
solana-local-cluster = { path = "../local-cluster", version = "=1.11.2" }
solana-test-validator = { path = "../test-validator", version = "=1.11.2" }
solana-core = { path = "../core", version = "=1.11.3" }
solana-local-cluster = { path = "../local-cluster", version = "=1.11.3" }
solana-test-validator = { path = "../test-validator", version = "=1.11.3" }

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
26 changes: 13 additions & 13 deletions banking-bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["Solana Maintainers <[email protected]>"]
edition = "2021"
name = "solana-banking-bench"
version = "1.11.2"
version = "1.11.3"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
Expand All @@ -14,18 +14,18 @@ crossbeam-channel = "0.5"
log = "0.4.17"
rand = "0.7.0"
rayon = "1.5.3"
solana-client = { path = "../client", version = "=1.11.2" }
solana-core = { path = "../core", version = "=1.11.2" }
solana-gossip = { path = "../gossip", version = "=1.11.2" }
solana-ledger = { path = "../ledger", version = "=1.11.2" }
solana-logger = { path = "../logger", version = "=1.11.2" }
solana-measure = { path = "../measure", version = "=1.11.2" }
solana-perf = { path = "../perf", version = "=1.11.2" }
solana-poh = { path = "../poh", version = "=1.11.2" }
solana-runtime = { path = "../runtime", version = "=1.11.2" }
solana-sdk = { path = "../sdk", version = "=1.11.2" }
solana-streamer = { path = "../streamer", version = "=1.11.2" }
solana-version = { path = "../version", version = "=1.11.2" }
solana-client = { path = "../client", version = "=1.11.3" }
solana-core = { path = "../core", version = "=1.11.3" }
solana-gossip = { path = "../gossip", version = "=1.11.3" }
solana-ledger = { path = "../ledger", version = "=1.11.3" }
solana-logger = { path = "../logger", version = "=1.11.3" }
solana-measure = { path = "../measure", version = "=1.11.3" }
solana-perf = { path = "../perf", version = "=1.11.3" }
solana-poh = { path = "../poh", version = "=1.11.3" }
solana-runtime = { path = "../runtime", version = "=1.11.3" }
solana-sdk = { path = "../sdk", version = "=1.11.3" }
solana-streamer = { path = "../streamer", version = "=1.11.3" }
solana-version = { path = "../version", version = "=1.11.3" }

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
50 changes: 29 additions & 21 deletions banking-bench/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use {
log::*,
rand::{thread_rng, Rng},
rayon::prelude::*,
solana_client::connection_cache::{ConnectionCache, UseQUIC, DEFAULT_TPU_CONNECTION_POOL_SIZE},
solana_client::connection_cache::{ConnectionCache, DEFAULT_TPU_CONNECTION_POOL_SIZE},
solana_core::banking_stage::BankingStage,
solana_gossip::cluster_info::{ClusterInfo, Node},
solana_ledger::{
Expand All @@ -30,7 +30,7 @@ use {
},
solana_streamer::socket::SocketAddrSpace,
std::{
sync::{atomic::Ordering, Arc, Mutex, RwLock},
sync::{atomic::Ordering, Arc, RwLock},
thread::sleep,
time::{Duration, Instant},
},
Expand All @@ -39,7 +39,7 @@ use {
fn check_txs(
receiver: &Arc<Receiver<WorkingBankEntry>>,
ref_tx_count: usize,
poh_recorder: &Arc<Mutex<PohRecorder>>,
poh_recorder: &Arc<RwLock<PohRecorder>>,
) -> bool {
let mut total = 0;
let now = Instant::now();
Expand All @@ -55,7 +55,7 @@ fn check_txs(
if now.elapsed().as_secs() > 60 {
break;
}
if poh_recorder.lock().unwrap().bank().is_none() {
if poh_recorder.read().unwrap().bank().is_none() {
no_bank = true;
break;
}
Expand Down Expand Up @@ -249,8 +249,8 @@ fn main() {
let (tpu_vote_sender, tpu_vote_receiver) = unbounded();
let (replay_vote_sender, _replay_vote_receiver) = unbounded();
let bank0 = Bank::new_for_benches(&genesis_config);
let mut bank_forks = BankForks::new(bank0);
let mut bank = bank_forks.working_bank();
let bank_forks = Arc::new(RwLock::new(BankForks::new(bank0)));
let mut bank = bank_forks.read().unwrap().working_bank();

// set cost tracker limits to MAX so it will not filter out TXs
bank.write_cost_tracker()
Expand Down Expand Up @@ -341,8 +341,11 @@ fn main() {
SocketAddrSpace::Unspecified,
);
let cluster_info = Arc::new(cluster_info);
let tpu_use_quic = UseQUIC::new(matches.is_present("tpu_use_quic"))
.expect("Failed to initialize QUIC flags");
let tpu_use_quic = matches.is_present("tpu_use_quic");
let connection_cache = match tpu_use_quic {
true => ConnectionCache::new(DEFAULT_TPU_CONNECTION_POOL_SIZE),
false => ConnectionCache::with_udp(DEFAULT_TPU_CONNECTION_POOL_SIZE),
};
let banking_stage = BankingStage::new_num_threads(
&cluster_info,
&poh_recorder,
Expand All @@ -353,12 +356,10 @@ fn main() {
None,
replay_vote_sender,
Arc::new(RwLock::new(CostModel::default())),
Arc::new(ConnectionCache::new(
tpu_use_quic,
DEFAULT_TPU_CONNECTION_POOL_SIZE,
)),
Arc::new(connection_cache),
bank_forks.clone(),
);
poh_recorder.lock().unwrap().set_bank(&bank, false);
poh_recorder.write().unwrap().set_bank(&bank, false);

// This is so that the signal_receiver does not go out of scope after the closure.
// If it is dropped before poh_service, then poh_service will error when
Expand Down Expand Up @@ -396,7 +397,7 @@ fn main() {
if bank.get_signature_status(&tx.signatures[0]).is_some() {
break;
}
if poh_recorder.lock().unwrap().bank().is_none() {
if poh_recorder.read().unwrap().bank().is_none() {
break;
}
sleep(Duration::from_millis(5));
Expand All @@ -418,7 +419,7 @@ fn main() {

let mut poh_time = Measure::start("poh_time");
poh_recorder
.lock()
.write()
.unwrap()
.reset(bank.clone(), Some((bank.slot(), bank.slot() + 1)));
poh_time.stop();
Expand All @@ -428,8 +429,8 @@ fn main() {
new_bank_time.stop();

let mut insert_time = Measure::start("insert_time");
bank_forks.insert(new_bank);
bank = bank_forks.working_bank();
bank_forks.write().unwrap().insert(new_bank);
bank = bank_forks.read().unwrap().working_bank();
insert_time.stop();

// set cost tracker limits to MAX so it will not filter out TXs
Expand All @@ -439,11 +440,14 @@ fn main() {
std::u64::MAX,
);

poh_recorder.lock().unwrap().set_bank(&bank, false);
assert!(poh_recorder.lock().unwrap().bank().is_some());
poh_recorder.write().unwrap().set_bank(&bank, false);
assert!(poh_recorder.read().unwrap().bank().is_some());
if bank.slot() > 32 {
leader_schedule_cache.set_root(&bank);
bank_forks.set_root(root, &AbsRequestSender::default(), None);
bank_forks
.write()
.unwrap()
.set_root(root, &AbsRequestSender::default(), None);
root += 1;
}
debug!(
Expand Down Expand Up @@ -476,7 +480,11 @@ fn main() {
}
}
}
let txs_processed = bank_forks.working_bank().transaction_count();
let txs_processed = bank_forks
.read()
.unwrap()
.working_bank()
.transaction_count();
debug!("processed: {} base: {}", txs_processed, base_tx_count);
eprintln!(
"{{'name': 'banking_bench_total', 'median': '{:.2}'}}",
Expand Down
12 changes: 6 additions & 6 deletions banks-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "solana-banks-client"
version = "1.11.2"
version = "1.11.3"
description = "Solana banks client"
authors = ["Solana Maintainers <[email protected]>"]
repository = "https://github.com/solana-labs/solana"
Expand All @@ -12,17 +12,17 @@ edition = "2021"
[dependencies]
borsh = "0.9.3"
futures = "0.3"
solana-banks-interface = { path = "../banks-interface", version = "=1.11.2" }
solana-program = { path = "../sdk/program", version = "=1.11.2" }
solana-sdk = { path = "../sdk", version = "=1.11.2" }
solana-banks-interface = { path = "../banks-interface", version = "=1.11.3" }
solana-program = { path = "../sdk/program", version = "=1.11.3" }
solana-sdk = { path = "../sdk", version = "=1.11.3" }
tarpc = { version = "0.29.0", features = ["full"] }
thiserror = "1.0"
tokio = { version = "~1.14.1", features = ["full"] }
tokio-serde = { version = "0.8", features = ["bincode"] }

[dev-dependencies]
solana-banks-server = { path = "../banks-server", version = "=1.11.2" }
solana-runtime = { path = "../runtime", version = "=1.11.2" }
solana-banks-server = { path = "../banks-server", version = "=1.11.3" }
solana-runtime = { path = "../runtime", version = "=1.11.3" }

[lib]
crate-type = ["lib"]
Expand Down
6 changes: 3 additions & 3 deletions banks-interface/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "solana-banks-interface"
version = "1.11.2"
version = "1.11.3"
description = "Solana banks RPC interface"
authors = ["Solana Maintainers <[email protected]>"]
repository = "https://github.com/solana-labs/solana"
Expand All @@ -10,8 +10,8 @@ documentation = "https://docs.rs/solana-banks-interface"
edition = "2021"

[dependencies]
serde = { version = "1.0.137", features = ["derive"] }
solana-sdk = { path = "../sdk", version = "=1.11.2" }
serde = { version = "1.0.138", features = ["derive"] }
solana-sdk = { path = "../sdk", version = "=1.11.3" }
tarpc = { version = "0.29.0", features = ["full"] }

[lib]
Expand Down
12 changes: 6 additions & 6 deletions banks-server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "solana-banks-server"
version = "1.11.2"
version = "1.11.3"
description = "Solana banks server"
authors = ["Solana Maintainers <[email protected]>"]
repository = "https://github.com/solana-labs/solana"
Expand All @@ -13,11 +13,11 @@ edition = "2021"
bincode = "1.3.3"
crossbeam-channel = "0.5"
futures = "0.3"
solana-banks-interface = { path = "../banks-interface", version = "=1.11.2" }
solana-client = { path = "../client", version = "=1.11.2" }
solana-runtime = { path = "../runtime", version = "=1.11.2" }
solana-sdk = { path = "../sdk", version = "=1.11.2" }
solana-send-transaction-service = { path = "../send-transaction-service", version = "=1.11.2" }
solana-banks-interface = { path = "../banks-interface", version = "=1.11.3" }
solana-client = { path = "../client", version = "=1.11.3" }
solana-runtime = { path = "../runtime", version = "=1.11.3" }
solana-sdk = { path = "../sdk", version = "=1.11.3" }
solana-send-transaction-service = { path = "../send-transaction-service", version = "=1.11.3" }
tarpc = { version = "0.29.0", features = ["full"] }
tokio = { version = "~1.14.1", features = ["full"] }
tokio-serde = { version = "0.8", features = ["bincode"] }
Expand Down
8 changes: 4 additions & 4 deletions bench-streamer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["Solana Maintainers <[email protected]>"]
edition = "2021"
name = "solana-bench-streamer"
version = "1.11.2"
version = "1.11.3"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
Expand All @@ -11,9 +11,9 @@ publish = false
[dependencies]
clap = { version = "3.1.5", features = ["cargo"] }
crossbeam-channel = "0.5"
solana-net-utils = { path = "../net-utils", version = "=1.11.2" }
solana-streamer = { path = "../streamer", version = "=1.11.2" }
solana-version = { path = "../version", version = "=1.11.2" }
solana-net-utils = { path = "../net-utils", version = "=1.11.3" }
solana-streamer = { path = "../streamer", version = "=1.11.3" }
solana-version = { path = "../version", version = "=1.11.3" }

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Loading

0 comments on commit abc54ba

Please sign in to comment.