Content pfp
Content
@
0 reply
0 recast
2 reactions

horsefacts pfp
horsefacts
@horsefacts.eth
Optimizing my first serious L2 contracts has been a journey: 1) Dev: your intuitions are all wrong now. 2) Testnet: cheap L2 gas, cheap L1 calldata. Many tools overestimate L2 gas and it can outweigh calldata unlike IRL. 3) Mainnet: cheap L2 gas, L1 calldata is 20-100x testnet cost. Calldata costs dominate everything.
5 replies
6 recasts
22 reactions

horsefacts pfp
horsefacts
@horsefacts.eth
My advice to others would be to 1) profile calldata during development as a proxy for total cost, the same way you're used to watching gas and 2) trust only mainnet forks to profile real cost—easy to fool yourself otherwise.
2 replies
0 recast
4 reactions

shazow pfp
shazow
@shazow.eth
Also the fact that different L2s have different calldata optimization/compression, and also all of this is going to drastically change post-4844. It's weird profiling L2 contract costs with so many temporal caveats "today it'll cost X, in a few months probably Y, in a year probably 1/100 of that"
0 reply
0 recast
2 reactions

timdaub pfp
timdaub
@timdaub.eth
what did u have to change specifically to make the biggest optimization gains?
1 reply
0 recast
0 reaction

0xcacti pfp
0xcacti
@0xcacti
It's a fun little change up to think about calldata compression more.
0 reply
0 recast
1 reaction

Phil Liao pfp
Phil Liao
@philipliao
Thoughts on optimizing for L1 calldata now and then after 4844, L1 calldata costs plummet? Rewrite?
1 reply
0 recast
0 reaction