Skip to content

Speedup pending_transactions() #2837

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

Closed
wants to merge 9 commits into from
Closed

Speedup pending_transactions() #2837

wants to merge 9 commits into from

Conversation

shawn-zil
Copy link
Contributor

@shawn-zil shawn-zil commented May 29, 2025

Refer to issue for details. These small changes result in the following speedup:

time cast rpc --rpc-url http://localhost:44201 txpool_status
{"pending":4000,"queued":1000}

real    0m0.029s
user    0m0.003s
sys     0m0.011s

@shawn-zil shawn-zil linked an issue May 29, 2025 that may be closed by this pull request
@shawn-zil shawn-zil enabled auto-merge May 29, 2025 06:56
Copy link
Contributor

@maxconway maxconway left a comment

Choose a reason for hiding this comment

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

I'm a bit suspicious of limiting the number of pending transactions based on a timer - I'd have thought we'd want the pending transactions list to be deterministic

Copy link
Contributor

🐰 Bencher Report

Branch2836-speedup-pending
Testbedself-hosted
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
full-blocks-erc20-transfers/full-blocks-erc20-transfers📈 view plot
🚷 view threshold
1,041.90 ms
(-16.47%)Baseline: 1,247.34 ms
1,671.76 ms
(62.32%)
full-blocks-evm-transfers/full-blocks-evm-transfers📈 view plot
🚷 view threshold
473.66 ms
(-8.14%)Baseline: 515.64 ms
667.33 ms
(70.98%)
full-blocks-giant-deploy/full-blocks-giant-deploy📈 view plot
🚷 view threshold
6,943.50 ms
(-5.82%)Baseline: 7,372.82 ms
10,334.75 ms
(67.19%)
full-blocks-scilla-add/full-blocks-scilla-add📈 view plot
🚷 view threshold
1,116.70 ms
(-6.28%)Baseline: 1,191.56 ms
1,648.29 ms
(67.75%)
full-blocks-scilla-load/full-blocks-scilla-load📈 view plot
🚷 view threshold
3,802.40 ms
(-7.73%)Baseline: 4,121.06 ms
5,190.39 ms
(73.26%)
full-blocks-scilla-store/full-blocks-scilla-store📈 view plot
🚷 view threshold
3,261.00 ms
(-5.50%)Baseline: 3,450.80 ms
4,238.24 ms
(76.94%)
full-blocks-zil-transfers/full-blocks-zil-transfers📈 view plot
🚷 view threshold
4,958.20 ms
(+21.72%)Baseline: 4,073.60 ms
5,885.63 ms
(84.24%)
process-empty/process-empty📈 view plot
🚷 view threshold
11.54 ms
(-5.23%)Baseline: 12.18 ms
13.74 ms
(83.99%)
🐰 View full continuous benchmarking report in Bencher

@shawn-zil shawn-zil force-pushed the 2836-speedup-pending branch from fe8c82e to a460925 Compare May 29, 2025 09:45
@shawn-zil shawn-zil force-pushed the 2836-speedup-pending branch from 954c231 to 95cdae2 Compare May 29, 2025 09:54
@shawn-zil
Copy link
Contributor Author

I'll leave this here @maxconway you may extend this, cherry pick bits into #2838 or abandon this. I leave that decision to you.

@shawn-zil
Copy link
Contributor Author

Closed in favour of #2838

@shawn-zil shawn-zil closed this May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Speed up RPC: txpool_status
2 participants