Closed piersy closed 1 week ago
Hey @alecps, I was thinking that we might want to use the flag for the actual migration, it would give us flexibility, for example if we defined the celo-blockchain end block but then had some problems deploying the contracts to L1 and ended up with the L1 contract deployment happening after the end block. The thing is you don't want to deploy the l1 contracts too far in advance since op-node will try to "catch up" to ensure that the time between l1 origin and now is filled with the appropriate number of l2 blocks.
We were encountering the following error when running op-node with a migrated datadir:
This pr fixes that by using time.Now for the time of the l2 transition block. We really do need a deterministic time for the migration block so that all parties that run the migration arrive at the same migration block but the problem is that op-geth requires that the L2 migration block (aka l2 origin) occurs after the l1 origin (I guess the point where you deploy the bridge contracts to the l1). When we migrate a partially synced datadir the block before the transition block will be very old, up to 4 years old! So of course it occurs before the l1 origin. So a fix just to get things working is to use time.Now(), but probably we should make this a configurable parameter.