Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch tpu calls in send-transaction-service #24083

Merged
merged 46 commits into from
Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
05aa70c
WIP sending transaction in batches
lijunwangs Apr 2, 2022
a515683
Refactor code and eliminate side-effect
lijunwangs Apr 2, 2022
eea312c
Introduce batch send rate.
lijunwangs Apr 2, 2022
4f01239
Handle retry rate in batch mode and make batch size configurable
lijunwangs Apr 2, 2022
97bd598
Fixed a clippy warning
lijunwangs Apr 3, 2022
81e65c7
Added logging for starting STS for better debug
lijunwangs Apr 3, 2022
b15eb0a
Added tpu changes to start scripts
lijunwangs Apr 4, 2022
d8631dd
Addressed some code review feedback from Trent
lijunwangs Apr 6, 2022
72d3e25
Fixed rate checks for rpc-send-batch-ms and rpc-send-retry-ms
lijunwangs Apr 6, 2022
0123d52
Fixed some fmt issues
lijunwangs Apr 6, 2022
58d2564
FMT issue
lijunwangs Apr 6, 2022
29e3bd2
Update send-transaction-service/src/send_transaction_service.rs
lijunwangs Apr 6, 2022
3d7153b
Update send-transaction-service/src/send_transaction_service.rs
lijunwangs Apr 6, 2022
9987f92
Refactor code
lijunwangs Apr 7, 2022
62bba74
Changed multinode scripts to pass the batch send transaction parameters
lijunwangs Apr 7, 2022
fc02593
Added realistic max values for batch size and rate
lijunwangs Apr 7, 2022
585c883
Fixed a few more review feedback
lijunwangs Apr 7, 2022
cfd7564
Fixed some clippy warnings
lijunwangs Apr 7, 2022
628c45f
Fixed unit test failures
lijunwangs Apr 8, 2022
8ac15b7
Fixed unit test failures
lijunwangs Apr 8, 2022
9ede2cf
Fixed the test failure with nonce transactions being dropped pre-matu…
lijunwangs Apr 11, 2022
22729dc
Fixed unit test failure related to nonce
lijunwangs Apr 12, 2022
17313cb
Decouple retry from batch processing new txns
lijunwangs Apr 12, 2022
ee7d1c6
Ensure batch size honored from retry path
lijunwangs Apr 12, 2022
44708b6
Removed unused import
lijunwangs Apr 12, 2022
564bc34
Addressed some self review findings
lijunwangs Apr 12, 2022
d9476c3
Use common code for sending transactions. Also differentiate between …
lijunwangs Apr 14, 2022
fc9a871
fixed a bug adding to retry queue
lijunwangs Apr 14, 2022
9993dd8
Fixed a comp issue
lijunwangs Apr 14, 2022
1b9f650
Use async for batch.
lijunwangs Apr 15, 2022
e78a02a
Fixed local cluster test issue due to STS exit hung
lijunwangs Apr 16, 2022
503e87d
Addressed some feedback from Trent, Pankaj and Ryan.
lijunwangs Apr 19, 2022
d73dcb0
Addressed some feedback from Trent
lijunwangs Apr 20, 2022
11d7c3e
Update send-transaction-service/src/send_transaction_service.rs
lijunwangs Apr 20, 2022
48ab73e
Merge branch 'batch_tpu_calls' of github.com:lijunwangs/solana into b…
lijunwangs Apr 20, 2022
a7341b6
Update send-transaction-service/src/send_transaction_service.rs
lijunwangs Apr 20, 2022
704c969
Merge branch 'batch_tpu_calls' of github.com:lijunwangs/solana into b…
lijunwangs Apr 20, 2022
697ea14
Fixed build issue
lijunwangs Apr 20, 2022
e439890
Addressed some feedback from Tyera
lijunwangs Apr 21, 2022
9007a6e
Update send-transaction-service/src/send_transaction_service.rs
lijunwangs Apr 21, 2022
78f5285
Update send-transaction-service/src/send_transaction_service.rs
lijunwangs Apr 21, 2022
afc760d
Update send-transaction-service/src/send_transaction_service.rs
lijunwangs Apr 21, 2022
c8b4e9a
Update send-transaction-service/src/send_transaction_service.rs
lijunwangs Apr 21, 2022
023bd7b
Update send-transaction-service/src/send_transaction_service.rs
lijunwangs Apr 21, 2022
2a88c62
Addressed more review feedback from Tyera
lijunwangs Apr 21, 2022
aca582a
Merge branch 'leader_info_refresher' into batch_tpu_calls
lijunwangs Apr 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions banks-server/src/banks_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ impl Banks for BanksServer {
last_valid_block_height,
None,
None,
None,
);
self.transaction_sender.send(info).unwrap();
}
Expand Down Expand Up @@ -310,6 +311,7 @@ impl Banks for BanksServer {
last_valid_block_height,
None,
None,
None,
);
self.transaction_sender.send(info).unwrap();
self.poll_signature_status(&signature, blockhash, last_valid_block_height, commitment)
Expand Down
9 changes: 9 additions & 0 deletions multinode-demo/bootstrap-validator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ while [[ -n $1 ]]; do
elif [[ $1 = --enable-rpc-bigtable-ledger-storage ]]; then
args+=("$1")
shift
elif [[ $1 = --tpu-use-quic ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for plumbing these

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct @CriesofCarrots. This is a heuristic controls to avoid extreme configurations of the two parameters. It is not a full rate limiting implementation. That will require another PR to address.

args+=("$1")
shift
elif [[ $1 = --rpc-send-batch-ms ]]; then
args+=("$1" "$2")
shift 2
elif [[ $1 = --rpc-send-batch-size ]]; then
args+=("$1" "$2")
shift 2
elif [[ $1 = --skip-poh-verify ]]; then
args+=("$1")
shift
Expand Down
9 changes: 9 additions & 0 deletions multinode-demo/validator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,15 @@ while [[ -n $1 ]]; do
elif [[ $1 = --skip-poh-verify ]]; then
args+=("$1")
shift
elif [[ $1 = --tpu-use-quic ]]; then
args+=("$1")
shift
elif [[ $1 = --rpc-send-batch-ms ]]; then
args+=("$1" "$2")
shift 2
elif [[ $1 = --rpc-send-batch-size ]]; then
args+=("$1" "$2")
shift 2
elif [[ $1 = --log ]]; then
args+=("$1" "$2")
shift 2
Expand Down
1 change: 1 addition & 0 deletions rpc/src/cluster_tpu_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use {
},
};

#[derive(Clone)]
pub struct ClusterTpuInfo {
cluster_info: Arc<ClusterInfo>,
poh_recorder: Arc<Mutex<PohRecorder>>,
Expand Down
1 change: 1 addition & 0 deletions rpc/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2392,6 +2392,7 @@ fn _send_transaction(
last_valid_block_height,
durable_nonce_info,
max_retries,
None,
);
meta.transaction_sender
.lock()
Expand Down