New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ops: Use starting L1 Block for timestamp everywhere #3085
Conversation
|
This PR changes implementation code, but doesn't include a changeset. Did you forget to add one? |
3185bdf
to
a50ca0b
Compare
Hey @trianglesphere! This PR has merge conflicts. Please fix them before continuing review. |
a50ca0b
to
c236a1b
Compare
Hey @trianglesphere! This PR has merge conflicts. Please fix them before continuing review. |
This transitions the starting timestamp to a new flow. The L2 rollup is anchored on a L1 block. The L2 genesis block & rollup config use the timestamp of the L1 start block as the their time. Properly threading this through the HH tasks is a little tricky but possible. This is because we have two flows: creating a L1 network & placing the rollup on that and creating a rollup on an existing L1 network (like goerli). There is still a L1 starting time for the first flow. This also fixes a circular dependcy that previously existed. The starting timestamp was provided and served as the starting timestamp for the L1 genesis & the "L2 Starting Time" in the L2 Output Oracle. The actual L2 genesis & rollup start time were based on when the Optimism Portal contract was deployed (after the L2 Output Oracle contract must have been deployed). The rollup is resilient to being started before contracts are fully deployed, so using a specific L1 block as the start is the cleanest solution I have seen.
c236a1b
to
c1a5d14
Compare
There's a linting issue and I'd like an ACK from @tynes to change the bedrock hardhat deploy code, but LGTM otherwise. And it looks like I can use this in the Hive setup code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Fixed lint. Added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple nits that are easy to fix
This PR has been added to the merge queue, and will be merged soon. |
This PR is next in line to be merged, and will be merged as soon as checks pass. |
* ops: Use starting L1 Block for timestamp everywhere This transitions the starting timestamp to a new flow. The L2 rollup is anchored on a L1 block. The L2 genesis block & rollup config use the timestamp of the L1 start block as the their time. Properly threading this through the HH tasks is a little tricky but possible. This is because we have two flows: creating a L1 network & placing the rollup on that and creating a rollup on an existing L1 network (like goerli). There is still a L1 starting time for the first flow. This also fixes a circular dependcy that previously existed. The starting timestamp was provided and served as the starting timestamp for the L1 genesis & the "L2 Starting Time" in the L2 Output Oracle. The actual L2 genesis & rollup start time were based on when the Optimism Portal contract was deployed (after the L2 Output Oracle contract must have been deployed). The rollup is resilient to being started before contracts are fully deployed, so using a specific L1 block as the start is the cleanest solution I have seen. * Fix lint * Update packages/contracts-bedrock/deploy-config/goerli.ts * Add undefined checks to l1StartingBlockTag * lint * fix checks Co-authored-by: Matthew Slipper <me@matthewslipper.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* ops: Use starting L1 Block for timestamp everywhere This transitions the starting timestamp to a new flow. The L2 rollup is anchored on a L1 block. The L2 genesis block & rollup config use the timestamp of the L1 start block as the their time. Properly threading this through the HH tasks is a little tricky but possible. This is because we have two flows: creating a L1 network & placing the rollup on that and creating a rollup on an existing L1 network (like goerli). There is still a L1 starting time for the first flow. This also fixes a circular dependcy that previously existed. The starting timestamp was provided and served as the starting timestamp for the L1 genesis & the "L2 Starting Time" in the L2 Output Oracle. The actual L2 genesis & rollup start time were based on when the Optimism Portal contract was deployed (after the L2 Output Oracle contract must have been deployed). The rollup is resilient to being started before contracts are fully deployed, so using a specific L1 block as the start is the cleanest solution I have seen. * Fix lint * Update packages/contracts-bedrock/deploy-config/goerli.ts * Add undefined checks to l1StartingBlockTag * lint * fix checks Co-authored-by: Matthew Slipper <me@matthewslipper.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Description
This transitions the starting timestamp to a new flow. The L2 rollup
is anchored on a L1 block. The L2 genesis block & rollup config use
the timestamp of the L1 start block as the their time. Properly
threading this through the HH tasks is a little tricky but possible.
This is because we have two flows: creating a L1 network & placing
the rollup on that and creating a rollup on an existing L1 network
(like goerli). There is still a L1 starting time for the first flow.
This also fixes a circular dependcy that previously existed. The
starting timestamp was provided and served as the starting timestamp
for the L1 genesis & the "L2 Starting Time" in the L2 Output Oracle.
The actual L2 genesis & rollup start time were based on when the
Optimism Portal contract was deployed (after the L2 Output Oracle
contract must have been deployed). The rollup is resilient to being
started before contracts are fully deployed, so using a specific
L1 block as the start is the cleanest solution I have seen.
Additional context
This is part of work to improve automation of devnet deployments.
I have confirmed that this works with the local devnet. It needs testing
with the goerli devnet.
Metadata