Feature: add transaction size limits to chain definitions #4177
Unanswered
PaulRBerg
asked this question in
Idea / Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Context
Some chains have transaction size limits that differ from Ethereum mainnet. For example, ZK rollups like zkSync Era have a 131,072 bytes (128 KB) limit on transaction size. This affects applications that batch multiple operations in a single transaction.
Currently, we have to maintain these constants separately in our codebase:
Proposal
Add a
txSizeLimit(or similar) property to chain definitions where applicable:This would allow apps to dynamically query the limit:
Chains that would benefit
Benefits
Would love to hear if this aligns with viem's scope, or if there's a preferred pattern for handling chain-specific constraints like this.
Beta Was this translation helpful? Give feedback.
All reactions