Skip to content

fix(multi): skip unnecessary RPC calls in --cache mode#812

Open
fakedev9999 wants to merge 2 commits into
mainfrom
fakedev9999/cache-mode-no-rpc
Open

fix(multi): skip unnecessary RPC calls in --cache mode#812
fakedev9999 wants to merge 2 commits into
mainfrom
fakedev9999/cache-mode-no-rpc

Conversation

@fakedev9999
Copy link
Copy Markdown
Member

Summary

  • When --cache is used with explicit --start and --end, adds a fast path that skips all heavy RPC calls (optimism_rollupConfig, block range validation, host initialization)
  • Prevents HTTP 403 errors on restricted RPC endpoints when running SP1 execution from cached witness data
  • Block data for stats is fetched with a graceful fallback to zeroed entries if the RPC is unavailable

Test plan

  • Run cargo run --bin multi --release -- --start 41900000 --end 41900100 --cache against a restricted RPC endpoint and verify no 403 errors
  • Verify standard (non-cache) flow still works unchanged
  • Verify --prove --cache path works from cached witness

When --cache is used with explicit --start and --end, the multi binary
now takes a fast path that avoids all heavy RPC calls (rollup config
fetch, block range validation, host initialization). This prevents 403
errors on restricted RPC endpoints when running SP1 execution from
cached witness data. Block data for stats is fetched with a graceful
fallback to zeroed entries if the RPC is unavailable.
@github-actions
Copy link
Copy Markdown
Contributor

Metric Value
Batch Start 14,268,645
Batch End 14,268,650
Witness Generation (seconds) 0
Execution Duration (seconds) 21
Total Instruction Count 521,761,865
Oracle Verify Cycles 61,755,147
Derivation Cycles 375,892,572
Block Execution Cycles 7,071,831
Blob Verification Cycles 23,426,259
Total SP1 Gas 804,143,739
Number of Blocks 5
Number of Transactions 5
Ethereum Gas Used 242,278
Cycles per Block 104,352,373
Cycles per Transaction 104,352,373
Transactions per Block 1
Gas Used per Block 48,455
Gas Used per Transaction 48,455
BN Pair Cycles 0
BN Add Cycles 0
BN Mul Cycles 0
KZG Eval Cycles 0
EC Recover Cycles 0
P256 Verify Cycles 0

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.

1 participant