foundry
foundry copied to clipboard
`--buffer` flag for `forge script` to adjust broadcast buffer size
Component
Forge
Describe the feature you would like
add a --buffer flag for forge script to adjust broadcast buffer size – transactions are broadcasted in hardcoded batches of 100, introduced in https://github.com/foundry-rs/foundry/pull/1824. This is fine for most chains, but is still too big for some (eg Optimism Sepolia).
--slow works, but can be excruciatingly slow with big scripts. Proposing --buffer as an optional flag (defaults to 100) that customises this broadcast buffer size. This would enable somewhere between --slow and buffer=100 and bigger buffer sizes for chains that support it
Additional context
working on a large testnet deployment on Optimism Sepolia (~2000 txes) and getting rate limited very quickly. Running a personal archive node, tracked down the issue to the central sequencer rate limiting after sending about 20-30 transactions at once
--slow takes over 12h to run this script TT
Sounds reasonable, wdyt @Evalir @mattsse
Yeah I think this is a good idea. We've seen similar complaints about the batch size a few months ago, doesn't hurt to add it
<3
Implemented as --batch-size in https://github.com/foundry-rs/foundry/pull/7540