Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase txMaxSize to 512kb from 128kb to help support on chain data availability in rollups. #23920

Closed
joeandrews opened this issue Nov 16, 2021 · 11 comments

Comments

@joeandrews
Copy link

joeandrews commented Nov 16, 2021

Rationale

Why should this feature exist?

L2 zkrollups that support on chain data availability need to send a large amount of call data to the Ethereum blockchain to ensure the liveness of their networks. Limiting this to 128kb (far below the block gas limit) introduces a cap on the max TPS a zkrollup can do with on chain data availability.

What are the use-cases?

Increasing the cap to 512kb would allow a zkRollup like Aztec to bundle ~500txs in a single block instead of 112.

Implementation

Do you have ideas regarding the implementation of this feature?

I would like to ask the community to opine on the effects of increasing this cap, and if this may cause problems for geth client, other clients or the network in general?

Are you willing to implement this feature?

Aztec would be willing to contribute development resources to implement this feature.

@joeandrews
Copy link
Author

@joeandrews
Copy link
Author

Previous discussion for EIP 2028 can be found here. https://ethereum-magicians.org/t/eip-2028-transaction-data-gas-cost-reduction/3280.

If there are no objections, I will make a PR to make the change in tx_pool.go.

@MariusVanDerWijden
Copy link
Member

I think we have some objections to this kinda change. I'll bring it up in our next meeting

@holiman
Copy link
Contributor

holiman commented Nov 16, 2021

Considering that we do get a number of issue reports about memory going out of bounds, where the root cause often seems to be the memory usage in the txpool, it might definitely be problematic to further raise the limit.

@joeandrews
Copy link
Author

What would happen if transactions >128kb started being mined by other clients or existed in the mempool?

@holiman
Copy link
Contributor

holiman commented Nov 16, 2021

If they were just included in blocks, it wouldn't be a big deal, from the perspective of the txpool. They wouldn't blow up txpool nor would they add network overhead when passed between peers.

Theoretically, it shouldn't be an issue with the txpool either way though, because we have this notion of how many slots a tx takes up, so it might be fine.

(whether they would be problematic from block propagation perspective, if blocks suddenly were full of 512kb transactions, that's another question which I don't have any answer for).

@karalabe
Copy link
Member

Is there any project already using such proofs live on mainnet? My guess would be that we'd need to wait until there's actual use that we can see the effect of, and then gradually go from 128 to whereever in smaller increments. Yes, this would take time, but it's easier to react to a small clog than to have to update the entire network because it just went belly up and we need to undo a release.

@joeandrews
Copy link
Author

joeandrews commented Nov 22, 2021

Hi @karalabe Yep, Aztec is already constrained by the 128kb limit. We are currently maxed out at 112 transactions per rollup. I can send across a local transaction payload if that would be helpful with much higher call data? Below is our main-net transaction.

Due to the way the rollup works, our circuits need to increase in powers of 2. This next circuit size would be ~224 transactions which is ~200kb of call data. Would an initial increase to 256kb be feasible?

Main-net tx with ~100kb of call data.

https://etherscan.io/tx/0xa21724a4b64f50e84cbebfcafbcd662538eff3e4c453e0c925eae306b9a06ef3

@karalabe
Copy link
Member

karalabe commented Nov 23, 2021

Well, as long as there's one large tx every day that doesn't really help us figure out how the network behaves unfortunately. Raising the limits but the network not using it is dangerous because you don't see how it may be abused by an attacker (not using it all the time I mean). That's the rationale why we're a bit hesitant.

@joeandrews
Copy link
Author

I am curious how EIP4488 would affect this decision. Rollup transactions will want to be close to the proposed block limit, but far higher than the 128kb in GETH. Would you be open to a PR to persist the tx_pool out of memory?

ethereum/EIPs#4488

@MariusVanDerWijden
Copy link
Member

I think this issue can be closed now with 4844 coming up. With 4844 we will disallow blob transactions to be broadcasted and only fetch them if announced. This will mitigate some of the dos issues we have with big transactions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants
@ligi @karalabe @holiman @joeandrews @MariusVanDerWijden and others