Closed piersy closed 1 week ago
Finally these changes ensure that the migration block has a non zero gas limit, even if the parent block had a zero gas limit
This looks fine to me, the rest I leave for @alecps .
Out of curiosity, the gas limit of zero would be problematic because it would be used in the next block as well or is there another reason?
@palango its because gas limit zero is used to determine whether a block is pre or post gingerbread and so with a gas limit of zero the trasition block wouldn't be decoded properly. It would be missing all the post gingerbread fields and all the extra fields from op-geth. I should probably add a comment to that effect.
@palango its because gas limit zero is used to determine whether a block is pre or post gingerbread and so with a gas limit of zero the trasition block wouldn't be decoded properly. It would be missing all the post gingerbread fields and all the extra fields from op-geth. I should probably add a comment to that effect.
That makes sense. Yeah, please add a comment and we should also add a page to the spec mentioning all those details.
Also, the base branch needs to be changed to celo7
@palango Added a ticket here for adding to the spec - https://github.com/celo-org/celo-blockchain-planning/issues/356
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 75.47%. Comparing base (
9907e11
) to head (6cedcfa
).
These fixes ensure that the migration script works when there are no ancients and also when the final celo L1 block is a pre-gingerbread block.
The migration script was assuming that ancients would be present and was considering the numAncients-1 to be first non ancient block to migrate but when numAncients is zero that's a problem.
Also removed logic for picking up where db migration left of for the level db since it was complicating the logic for correctly calculating the non ancient block to start migrating from.
Finally these changes ensure that the migration block has a non zero gas limit, even if the parent block had a zero gas limit