Closed PaulRBerg closed 1 month ago
Relevant information for how to read the block gas limit on OP Stack chains:
https://github.com/foundry-rs/forge-std/issues/535#issuecomment-2031648878
Are on track to complete this task by the time the private audit finishes in two weeks, @smol-ninja, @andreivladbrg?
Yes. It will be done by then
@PaulRBerg tagging you since its been added in https://github.com/sablier-labs/v2-core/pull/908.
Context
While reviewing Shub's gas estimation script here, it dawned on me that we have been too lax about the values of
MAX_SEGMENT_COUNT
andMAX_TRANCHE_COUNT
.Basically, we have relied on heuristics and quick-and-dirty scripts to obtain them.
It's about time to develop a robust shell script for estimating the max segment and the tranche counts. My rationale is thus:
Mechanism of Action
The script would work something like this:
createWithDurations
(which is always more expensive thancreateWithTimestamps
) until the consumed gas is right below the block gas limit per chainLockupDynamic
andLockupTranched
(separately)A related suggestion is that we may want to turn the
maxCount
variable into a mapping inBaseScript
.