Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
dc1dd9c
Add PacketInterface trait to allow variable packet sizes
Dec 8, 2021
817abe9
Add larger ExtendedPacket implementation of PacketInterface
ryleung-solana Dec 13, 2021
d7048d8
Add ExtendedPacket implementation
ryleung-solana Dec 14, 2021
8eebc56
De-duplicate two of the packet functions
Dec 15, 2021
c3bf110
Re-adding ryleung-solana's commit that I accidentally blew away :(
Dec 16, 2021
efc382e
First pass at enabling GPU sigverify for ExtendedPacket (needs verifi…
ryleung-solana Dec 16, 2021
c4c3259
First pass at enabling GPU Entry sigverify for transactions larger th…
ryleung-solana Dec 17, 2021
cb2af5f
Add receive and forward ports for ExtendedPackets
Dec 21, 2021
b7530cc
fmt and clippy
Dec 21, 2021
7bd6eff
Rename StandardPackets to StandardPacketBatch
Dec 21, 2021
f28ac16
Start work on making limited_deserialize work with ExtendedPacket
ryleung-solana Dec 21, 2021
dc31a35
Initial work to pipe through support for new tpu_extended_forwards po…
ryleung-solana Dec 21, 2021
728ef29
Fix comment
ryleung-solana Dec 21, 2021
7dab68e
Change send_transaction to take an extra port for extended transactions
ryleung-solana Dec 22, 2021
e07dea0
Increase max transaction size in RPC JSON interface
ryleung-solana Dec 22, 2021
4b61188
Increase max transaction size in transaction-dos test
ryleung-solana Dec 22, 2021
00ed9c5
Make RPC forward large transactions to extended TPU port
Dec 22, 2021
1cd3462
Plumb tpu_extended through several spots
Dec 23, 2021
057363d
cargo fmt and cargo clippy for no warnings
Dec 23, 2021
5fbc33e
Use iterator partition() to split standard/extended transactions
Dec 23, 2021
ed38a29
Add some instrumentation for banking stage, sigverify, and packet for…
ryleung-solana Dec 23, 2021
d873171
Add more information to instrumentation
ryleung-solana Dec 30, 2021
c08b9c9
Get rid of an unnecessary serialization in some cases
ryleung-solana Jan 3, 2022
8f812d4
Hacky testing change to bench-tps to send larger transactions to test…
ryleung-solana Jan 6, 2022
87d583a
Fix some build errors
ryleung-solana Jan 6, 2022
ec3680e
Fix remaining build errors
ryleung-solana Jan 7, 2022
2ece71b
Temporary fix for bench-tps overflow. TODO: verify that the lamports …
ryleung-solana Jan 7, 2022
4b6f887
Pull in the latest updates to init-metrics.sh from master
ryleung-solana Jan 10, 2022
06ab431
Use supplied credentials for metrics influx
ryleung-solana Jan 10, 2022
f0b0aca
Revert 06ab43115a49dd1c71c298e8925aae7323f4928a as changes on the DB …
ryleung-solana Jan 10, 2022
3fe44a4
Testing changes
ryleung-solana Jan 11, 2022
b57d0f4
Pipe through and use the TPU extended address in the thin client
ryleung-solana Jan 11, 2022
b8e7505
Remove some TODO's that we know the answer to / are outdated
Jan 11, 2022
652388e
Initial implementation of sending extended packets via Quic
ryleung-solana Jan 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 93 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,7 @@ pub(crate) mod tests {
let transaction = VersionedTransaction::from(transaction);

let transaction =
SanitizedTransaction::try_create(transaction, message_hash, Some(true), |_| {
SanitizedTransaction::try_create(transaction, message_hash, Some(true), None, |_| {
Err(TransactionError::UnsupportedVersion)
})
.unwrap();
Expand Down Expand Up @@ -1333,7 +1333,7 @@ pub(crate) mod tests {
transaction.sanitize().unwrap();

let transaction =
SanitizedTransaction::try_create(transaction, message_hash, Some(true), |_message| {
SanitizedTransaction::try_create(transaction, message_hash, Some(true), None, |_message| {
Ok(LoadedAddresses {
writable: vec![Pubkey::new_unique(), Pubkey::new_unique()],
readonly: vec![Pubkey::new_unique(), Pubkey::new_unique()],
Expand Down
10 changes: 8 additions & 2 deletions banking-bench/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ use {
get_tmp_ledger_path,
},
solana_measure::measure::Measure,
solana_perf::packet::to_packet_batches,
solana_perf::packet::{to_packet_batches, PacketBatch},
solana_poh::poh_recorder::{create_test_recorder, PohRecorder, WorkingBankEntry},
solana_runtime::{
accounts_background_service::AbsRequestSender, bank::Bank, bank_forks::BankForks,
cost_model::CostModel,
},
solana_sdk::{
hash::Hash,
packet::Packet,
signature::{Keypair, Signature},
system_transaction,
timing::{duration_as_us, timestamp},
Expand Down Expand Up @@ -167,6 +168,8 @@ fn main() {
} = create_genesis_config(mint_total);

let (verified_sender, verified_receiver) = unbounded();
// TODO: Actually pump some stuff into _verified_extended_sender like verified_sender ?
let (verified_extended_sender, verified_extended_receiver) = unbounded();
let (vote_sender, vote_receiver) = unbounded();
let (tpu_vote_sender, tpu_vote_receiver) = unbounded();
let (replay_vote_sender, _replay_vote_receiver) = unbounded();
Expand Down Expand Up @@ -212,7 +215,8 @@ fn main() {
bank.clear_signatures();
}

let mut verified: Vec<_> = to_packet_batches(&transactions, packets_per_chunk);
let mut verified: Vec<PacketBatch<Packet>> =
to_packet_batches(&transactions, packets_per_chunk);
let ledger_path = get_tmp_ledger_path!();
{
let blockstore = Arc::new(
Expand All @@ -231,6 +235,7 @@ fn main() {
&cluster_info,
&poh_recorder,
verified_receiver,
verified_extended_receiver,
tpu_vote_receiver,
vote_receiver,
None,
Expand Down Expand Up @@ -389,6 +394,7 @@ fn main() {
);

drop(verified_sender);
drop(verified_extended_sender);
drop(tpu_vote_sender);
drop(vote_sender);
exit.store(true, Ordering::Relaxed);
Expand Down
2 changes: 2 additions & 0 deletions banks-server/src/banks_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ pub async fn start_local_server(
pub async fn start_tcp_server(
listen_addr: SocketAddr,
tpu_addr: SocketAddr,
tpu_extended_addr: SocketAddr,
bank_forks: Arc<RwLock<BankForks>>,
block_commitment_cache: Arc<RwLock<BlockCommitmentCache>>,
) -> io::Result<()> {
Expand All @@ -396,6 +397,7 @@ pub async fn start_tcp_server(

SendTransactionService::new::<NullTpuInfo>(
tpu_addr,
tpu_extended_addr,
&bank_forks,
None,
receiver,
Expand Down
6 changes: 6 additions & 0 deletions banks-server/src/rpc_banks_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ pub struct RpcBanksService {
async fn start_abortable_tcp_server(
listen_addr: SocketAddr,
tpu_addr: SocketAddr,
tpu_extended_addr: SocketAddr,
bank_forks: Arc<RwLock<BankForks>>,
block_commitment_cache: Arc<RwLock<BlockCommitmentCache>>,
exit: Arc<AtomicBool>,
) {
let server = start_tcp_server(
listen_addr,
tpu_addr,
tpu_extended_addr,
bank_forks.clone(),
block_commitment_cache.clone(),
)
Expand All @@ -56,13 +58,15 @@ impl RpcBanksService {
fn run(
listen_addr: SocketAddr,
tpu_addr: SocketAddr,
tpu_extended_addr: SocketAddr,
bank_forks: Arc<RwLock<BankForks>>,
block_commitment_cache: Arc<RwLock<BlockCommitmentCache>>,
exit: Arc<AtomicBool>,
) {
let server = start_abortable_tcp_server(
listen_addr,
tpu_addr,
tpu_extended_addr,
bank_forks,
block_commitment_cache,
exit,
Expand All @@ -73,6 +77,7 @@ impl RpcBanksService {
pub fn new(
listen_addr: SocketAddr,
tpu_addr: SocketAddr,
tpu_extended_addr: SocketAddr,
bank_forks: &Arc<RwLock<BankForks>>,
block_commitment_cache: &Arc<RwLock<BlockCommitmentCache>>,
exit: &Arc<AtomicBool>,
Expand All @@ -86,6 +91,7 @@ impl RpcBanksService {
Self::run(
listen_addr,
tpu_addr,
tpu_extended_addr,
bank_forks,
block_commitment_cache,
exit,
Expand Down
5 changes: 3 additions & 2 deletions bench-streamer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use {
clap::{crate_description, crate_name, App, Arg},
solana_streamer::{
packet::{Packet, PacketBatch, PacketBatchRecycler, PACKET_DATA_SIZE},
streamer::{receiver, PacketBatchReceiver},
streamer::{receiver, StandardPacketReceiver},
},
std::{
cmp::max,
Expand Down Expand Up @@ -42,7 +42,8 @@ fn producer(addr: &SocketAddr, exit: Arc<AtomicBool>) -> JoinHandle<()> {
})
}

fn sink(exit: Arc<AtomicBool>, rvs: Arc<AtomicUsize>, r: PacketBatchReceiver) -> JoinHandle<()> {
// TODO: Revisit whether this should be generic
fn sink(exit: Arc<AtomicBool>, rvs: Arc<AtomicUsize>, r: StandardPacketReceiver) -> JoinHandle<()> {
spawn(move || loop {
if exit.load(Ordering::Relaxed) {
return;
Expand Down
2 changes: 1 addition & 1 deletion bench-tps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ solana-runtime = { path = "../runtime", version = "=1.10.0" }
solana-sdk = { path = "../sdk", version = "=1.10.0" }
solana-streamer = { path = "../streamer", version = "=1.10.0" }
solana-version = { path = "../version", version = "=1.10.0" }

bincode = "1.3.3"
[dev-dependencies]
serial_test = "0.5.1"
solana-local-cluster = { path = "../local-cluster", version = "=1.10.0" }
Expand Down
27 changes: 25 additions & 2 deletions bench-tps/src/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use {
signature::{Keypair, Signer},
system_instruction, system_transaction,
timing::{duration_as_ms, duration_as_s, duration_as_us, timestamp},
transaction::Transaction,
transaction::{Transaction, TransactionError},
},
std::{
collections::{HashSet, VecDeque},
Expand Down Expand Up @@ -324,6 +324,29 @@ fn metrics_submit_lamport_balance(lamport_balance: u64) {
);
}

/// Create and sign new large transaction of many system_instruction::Transfer
pub fn big_transfer(
from_keypair: &Keypair,
to: &Pubkey,
lamports: u64,
recent_blockhash: Hash,
) -> Transaction {
let from_pubkey = from_keypair.pubkey();

let instructions = (0..128).map(|_|
system_instruction::transfer(&from_pubkey, &to, lamports)
).collect::<Vec<_>>();

let tx = Transaction::new(&[from_keypair],
Message::new(
&instructions,
Some(&from_pubkey),
),
recent_blockhash);
info!("transaction size: {}", bincode::serialized_size(&tx).map_err(|_| 0 as u64).unwrap());
tx
}

fn generate_system_txs(
source: &[&Keypair],
dest: &VecDeque<&Keypair>,
Expand All @@ -340,7 +363,7 @@ fn generate_system_txs(
.par_iter()
.map(|(from, to)| {
(
system_transaction::transfer(from, &to.pubkey(), 1, *blockhash),
big_transfer(from, &to.pubkey(), 1, *blockhash),
timestamp(),
)
})
Expand Down
1 change: 1 addition & 0 deletions bench-tps/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ fn main() {
info!("Generating {} keypairs", keypair_count);
let (keypairs, _) = generate_keypairs(id, keypair_count as u64);
let num_accounts = keypairs.len() as u64;
//let num_lamports_per_account = num_lamports_per_account*200;
let max_fee =
FeeRateGovernor::new(*target_lamports_per_signature, 0).max_lamports_per_signature;
let num_lamports_per_account = (num_accounts - 1 + NUM_SIGNATURES_FOR_TXS * max_fee)
Expand Down
Loading