Reduce the cost of transaction data

Layer two scaling solution store data out of storage, but they often have a need to bring it in a transaction for security purposes (fraud proofs, data availability, etc.). When data is brought on-chain, this also often includes large merkle proofs relating it back to concise on-chain state.

Currently the cost of updating storage is ~ 5000 gas. The cost of verifying a single Merkle tree of depth 32 is ~70 000 gas. It is cheaper to skip L2 scaling and just store on chain.

Examples of applications that are currently constrained by transaction data cost:

  • FunFair
  • Rollup
  • StarkDEX
  • DutchX
  • Truebit

Final implementation is a trivial update of costs, but before that we need to extensively research what would be an appropriate gas cost and it’s impact on the network.

Mentions:

3 Likes

This is now being addressed in EIP-2028: Calldata gas cost reduction

Perhaps this topic can be set to locked to avoid proliferation on duplicate topics?

I will lock it.

@Recmo, PM me in this forum if you would like to keep the conversation going here for some reason…