Skip to content

perf: cache recent state-aware balance#5551

Open
tempoxyz-bot wants to merge 1 commit into
mainfrom
auto-opt/20260609-state-aware-last-balance-cache
Open

perf: cache recent state-aware balance#5551
tempoxyz-bot wants to merge 1 commit into
mainfrom
auto-opt/20260609-state-aware-last-balance-cache

Conversation

@tempoxyz-bot

Copy link
Copy Markdown
Contributor

Keep a one-entry cache of the most recently updated decreased fee-balance slot in the state-aware best-transaction iterator. Candidate checks can use the cached balance before falling back to the hash map when payload selection sees repeated fee payers.

Keep a one-entry cache of the most recently updated decreased fee-balance slot in the state-aware best-transaction iterator. Candidate checks can use the cached balance before falling back to the hash map when payload selection sees repeated fee payers.
@tempoxyz-bot tempoxyz-bot self-assigned this Jun 9, 2026
@tempoxyz-bot

Copy link
Copy Markdown
Contributor Author

derek bench mode=e2e otlp=false

@decofe

decofe commented Jun 9, 2026

Copy link
Copy Markdown
Member

cc @tempoxyz-bot

✅ Benchmark complete: Improvement View job

✅ Bench Comparison: Improvement

Refs: main vs auto-opt/20260609-state-aware-last-balance-cache
Criteria: 95% run-bootstrap CI must clear floor; cells show delta (+/-CI/floor).

Configuration

  • Derek command: derek bench mode=e2e preset=tip20 duration=90 bloat=100 tps=50000 accounts=1000 max-concurrent-requests=500 baseline=main feature=auto-opt/20260609-state-aware-last-balance-cache baseline-hardfork="" feature-hardfork="" gas-limit=1000000000 run-pairs=3 otlp=false metrics=false no-cache=false force-bloat=false
  • Bloat: 100000 MiB
  • Preset: tip20
  • Target TPS: 50000
  • Duration: 90s
  • Run pairs: 3
  • Baseline blocks: 486
  • Feature blocks: 483

Tempo Metrics

Metric Baseline Feature Delta
TPS Mean 22309 22453 +0.65% ⚪ (+/-1.02/floor 0.55)
Gas Throughput [Mgas/s] 987.0 993.3 +0.64% ⚪ (+/-1.02/floor 0.50)
Block Time Mean [ms] 554.0 554.8 +0.14% ⚪ (+/-0.31/floor 0.40)
Block Time P50 [ms] 555.0 557.0 +0.36% ⚪ (+/-0.27/floor 0.70)
Block Time P90 [ms] 584.0 587.0 +0.51% ⚪ (+/-0.34/floor 0.70)
Block Time P99 [ms] 611.0 615.0 +0.65% ⚪ (+/-1.91/floor 1.60)
Serialized Block Size / Tx P50 [B/tx] 251.1 251.1 +0.00% ⚪ (+/-0.00/floor 0.70)
Serialized Block Size / Tx P90 [B/tx] 251.1 251.1 +0.00% ⚪ (+/-0.00/floor 0.70)
Serialized Block Size / Tx P99 [B/tx] 251.1 251.1 +0.00% ⚪ (+/-0.00/floor 0.70)

Builder

Metric Baseline Feature Delta
Gas Throughput [Mgas/s] 2376.3 2398.0 +0.91% ⚪ (+/-0.87/floor 0.70)
P50 [ms] 228.8 228.8 +0.00% ⚪ (+/-0.36/floor 0.35)
P90 [ms] 242.4 241.4 -0.41% ⚪ (+/-0.85/floor 0.70)
P99 [ms] 291.7 269.9 -7.47% ✅ (+/-4.93/floor 0.95)
Builder details
Metric Baseline Feature Delta
Finish P50 [ms] 22.8 23.3 +2.19%
Finish P90 [ms] 32.6 32.4 -0.61%
Finish P99 [ms] 42.1 41.6 -1.19%
Pool Fetch P50 [ms] 9.8 10.5 +7.14%
Pool Fetch P90 [ms] 23.5 25.1 +6.81%
Pool Fetch P99 [ms] 32.6 32.7 +0.31%
Included Tx Exec P50 [ms] - -
Included Tx Exec P90 [ms] - -
Included Tx Exec P99 [ms] - -
Invalid Tx Exec P50 [ms] - -
Invalid Tx Exec P90 [ms] - -
Invalid Tx Exec P99 [ms] - -
Invalid Tx Attempts P50 0.0 0.0 0.00%
Invalid Tx Attempts P90 0.0 0.0 0.00%
Invalid Tx Attempts P99 0.0 0.0 0.00%
Invalid Tx Skips 0 0 0.00%
Nonce Too Low Skips 0 0 0.00%
Serialized Block Size P50 [KiB] 3085.9 3102.4 +0.53%
Serialized Block Size P90 [KiB] 3400.7 3448.7 +1.41%
Serialized Block Size P99 [KiB] 3941.2 3987.2 +1.17%
Fill Overhead P50 [ms] - -
Fill Overhead P90 [ms] - -
Fill Overhead P99 [ms] - -
Fill Idle P50 [ms] 0.0 0.0 0.00%
Fill Idle P90 [ms] 13.0 8.0 -38.46%
Fill Idle P99 [ms] 117.0 96.0 -17.95%

Validator

Metric Baseline Feature Delta
Gas Throughput [Mgas/s] 2319.2 2315.9 -0.14% ⚪ (+/-0.41/floor 0.65)
P50 [ms] 238.1 239.2 +0.46% ⚪ (+/-0.67/floor 1.55)
P90 [ms] 258.9 260.0 +0.42% ⚪ (+/-0.36/floor 1.55)
P99 [ms] 270.5 277.3 +2.51% ⚪ (+/-2.74/floor 2.05)

Observability

@tempoxyz-bot tempoxyz-bot marked this pull request as ready for review June 9, 2026 23:24
@tempoxyz-bot

Copy link
Copy Markdown
Contributor Author

derek bench samply run-pairs=1 duration=300 no-slack

@tempoxyz-bot tempoxyz-bot requested a review from mattsse as a code owner June 9, 2026 23:24
@decofe

decofe commented Jun 9, 2026

Copy link
Copy Markdown
Member

cc @tempoxyz-bot

⚪ Benchmark complete: No Difference View job

⚪ Bench Comparison: No Difference

Refs: main vs auto-opt/20260609-state-aware-last-balance-cache
Criteria: 95% run-bootstrap CI must clear floor; cells show delta (+/-CI/floor).

Configuration

  • Derek command: derek bench mode=e2e preset=tip20 duration=300 bloat=100 tps=50000 accounts=1000 max-concurrent-requests=500 baseline=main feature=auto-opt/20260609-state-aware-last-balance-cache baseline-hardfork="" feature-hardfork="" gas-limit=1000000000 run-pairs=1 otlp=true metrics=false no-cache=false force-bloat=false samply
  • Bloat: 100000 MiB
  • Preset: tip20
  • Target TPS: 50000
  • Duration: 300s
  • Run pairs: 1
  • Baseline blocks: 546
  • Feature blocks: 548

Tempo Metrics

Metric Baseline Feature Delta
TPS Mean 20574 20484 -0.44% ⚪
Gas Throughput [Mgas/s] 910.2 906.2 -0.44% ⚪
Block Time Mean [ms] 547.8 546.5 -0.24% ⚪
Block Time P50 [ms] 546.0 547.0 +0.18% ⚪
Block Time P90 [ms] 584.0 584.0 +0.00% ⚪
Block Time P99 [ms] 620.0 615.0 -0.81% ⚪
Serialized Block Size / Tx P50 [B/tx] 251.1 251.1 +0.00% ⚪
Serialized Block Size / Tx P90 [B/tx] 251.1 251.1 +0.00% ⚪
Serialized Block Size / Tx P99 [B/tx] 251.1 251.1 +0.00% ⚪

Builder

Metric Baseline Feature Delta
Gas Throughput [Mgas/s] 2190.6 2187.1 -0.16% ⚪
P50 [ms] 226.9 225.7 -0.53% ⚪
P90 [ms] 241.8 242.1 +0.12% ⚪
P99 [ms] 257.0 263.5 +2.53% ⚪
Builder details
Metric Baseline Feature Delta
Finish P50 [ms] 31.8 31.3 -1.57%
Finish P90 [ms] 49.0 48.5 -1.02%
Finish P99 [ms] 58.1 60.0 +3.27%
Pool Fetch P50 [ms] 8.6 9.3 +8.14%
Pool Fetch P90 [ms] 23.4 22.2 -5.13%
Pool Fetch P99 [ms] 32.3 29.3 -9.29%
Included Tx Exec P50 [ms] - -
Included Tx Exec P90 [ms] - -
Included Tx Exec P99 [ms] - -
Invalid Tx Exec P50 [ms] - -
Invalid Tx Exec P90 [ms] - -
Invalid Tx Exec P99 [ms] - -
Invalid Tx Attempts P50 0.0 0.0 0.00%
Invalid Tx Attempts P90 0.0 0.0 0.00%
Invalid Tx Attempts P99 0.0 0.0 0.00%
Invalid Tx Skips 0 0 0.00%
Nonce Too Low Skips 0 0 0.00%
Serialized Block Size P50 [KiB] 2786.2 2761.2 -0.90%
Serialized Block Size P90 [KiB] 3125.2 3124.9 -0.01%
Serialized Block Size P99 [KiB] 3762.2 3625.9 -3.62%
Fill Overhead P50 [ms] - -
Fill Overhead P90 [ms] - -
Fill Overhead P99 [ms] - -
Fill Idle P50 [ms] 0.0 0.0 0.00%
Fill Idle P90 [ms] 8.0 3.0 -62.50%
Fill Idle P99 [ms] 83.0 87.0 +4.82%

Validator

Metric Baseline Feature Delta
Gas Throughput [Mgas/s] 2142.6 2132.8 -0.46% ⚪
P50 [ms] 232.5 232.5 +0.00% ⚪
P90 [ms] 257.1 257.8 +0.27% ⚪
P99 [ms] 274.2 275.1 +0.33% ⚪

Observability

Samply Profiles

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.

2 participants