ethexe: commitments architecture changes
#4608
Replies: 2 comments
-
Big batch commitmentsProblemCurrent logic suppose, that if block producer creates a gear block and send it to other validators for execution, then block producer must create a batchCommitment, which includes freshly produced block and all other blocks which is not committed before current one. This can lead to a situation, when batch comment is too big to be applied in one ethereum block. SolutionAllow block producer not include some blocks in a chain commitment (even this own freshly produced block). We have the same approach for code and other commitments. Also this allows to skip chain commitment at all, event if some blocks wait for commitment. The only one restriction must be that blocks in batch commitments must be from the same branch with block, for which producer published a block. This would allow producer to control the cost of batch submission. ExampleLet's see an example. /// For gear blocks:
/// [x] - empty block
/// [[x]] - not empty block
/// [[xc]] - committed block
ETH BLOCKS_________[0]<-----[1]<-----[2]<-----[3]<-----[4]
GEAR BLOCKS________[0]<----[[1c]]<--[[2]]<----[3]<----[[4]]Chain head Problems
|
Beta Was this translation helpful? Give feedback.
-
|
UPDATE: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Current approach
Currently (3633640) we have below commitments architecture:
gear/ethexe/contracts/src/libraries/Gear.sol
Lines 68 to 71 in 3633640
gear/ethexe/contracts/src/libraries/Gear.sol
Lines 53 to 59 in 3633640
gear/ethexe/contracts/src/libraries/Gear.sol
Lines 47 to 51 in 3633640
Problems with this approach
-
timestamp- because we need timestamp only for the last block in commitments chain. And actually it's useless for codes.-
predecessorBlock- equal for each block commitment-
previousCommittedBlock- needed only for the first block in block commitments chain.PtransitionH1 -> H2, and the second contains transitionH2 -> H3, then we could make onlyH1 -> H3and spend less amount of gas.Possible solution
BatchCommitment)CommittedBlockInfoand append instead:Beta Was this translation helpful? Give feedback.
All reactions