You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above huge calldata includes a context array. And there is an array iteration in appendSequencerBatch.
for (uint32 i = 0; i < numContexts; i++) {
BatchContext memory nextContext = _getBatchContext(i);
// Now we can update our current context.
curContext = nextContext;
// Process sequencer transactions first.
numSequencerTransactions += uint32(curContext.numSequencedTransactions);
// Now process any subsequent queue transactions.
nextQueueIndex += uint40(curContext.numSubsequentQueueTransactions);
}
If it can be optimized into an array with only one element, the later rollup transactions will be much smaller than current rollup transactions and expensive array iteration in smart contract will be avoided, which might significantly reduce rollup gas consumption.
According to our analysis, after optimization, each batch rollup transaction will reduce 1/18 to 1/6 gas consumption
The text was updated successfully, but these errors were encountered:
guoshijiang
changed the title
[batch-submitter]: gas optimization / encode data array many to one
[batch-submitter]: gas optimization / encode data groupedBlocks array from many element to one element
Aug 29, 2023
guoshijiang
changed the title
[batch-submitter]: gas optimization / encode data groupedBlocks array from many element to one element
[batch-submitter]: gas optimization / Change groupedBlocks array from many element to one element for gas optimization
Aug 29, 2023
guoshijiang
changed the title
[batch-submitter]: gas optimization / Change groupedBlocks array from many element to one element for gas optimization
[batch-submitter]: gas optimization / Change groupedBlocks array from many to one element for gas optimization
Aug 29, 2023
Simplify groupedBlocks array to include only one element to reduce gas consumption.
Current calldata of CTC appendSequencerBatch:
The above huge calldata includes a context array. And there is an array iteration in appendSequencerBatch.
If it can be optimized into an array with only one element, the later rollup transactions will be much smaller than current rollup transactions and expensive array iteration in smart contract will be avoided, which might significantly reduce rollup gas consumption.
According to our analysis, after optimization, each batch rollup transaction will reduce 1/18 to 1/6 gas consumption
The text was updated successfully, but these errors were encountered: