Skip to content
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

Merged
merged 7 commits into from Jul 29, 2022
Merged

Conversation

trianglesphere
Copy link
Contributor

@trianglesphere trianglesphere commented Jul 22, 2022

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

  • Fixes ENG-2473

@changeset-bot
Copy link

changeset-bot bot commented Jul 22, 2022

⚠️ No Changeset found

Latest commit: 93c1fa8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added 2-reviewers A-pkg-contracts-bedrock Area: packages/contracts-bedrock labels Jul 22, 2022
@mergify
Copy link
Contributor

mergify bot commented Jul 22, 2022

This PR changes implementation code, but doesn't include a changeset. Did you forget to add one?

@trianglesphere trianglesphere force-pushed the jg/new_hh_tasks branch 6 times, most recently from 3185bdf to a50ca0b Compare July 28, 2022 20:13
@trianglesphere trianglesphere marked this pull request as ready for review July 28, 2022 20:13
@mergify
Copy link
Contributor

mergify bot commented Jul 28, 2022

Hey @trianglesphere! This PR has merge conflicts. Please fix them before continuing review.

@mergify
Copy link
Contributor

mergify bot commented Jul 28, 2022

Hey @trianglesphere! This PR has merge conflicts. Please fix them before continuing review.

@mergify mergify bot added the conflict label Jul 28, 2022
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.
@protolambda
Copy link
Contributor

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.

Copy link
Contributor

@optimisticben optimisticben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mslipper
Copy link
Collaborator

Fixed lint. Added do-not-merge until @tynes acks. Mark - if everything looks good to you just remove the label and this will auto-merge.

Copy link
Contributor

@tynes tynes left a 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

@mergify
Copy link
Contributor

mergify bot commented Jul 29, 2022

This PR has been added to the merge queue, and will be merged soon.

@mergify
Copy link
Contributor

mergify bot commented Jul 29, 2022

This PR is next in line to be merged, and will be merged as soon as checks pass.

@mergify mergify bot merged commit 9e97694 into develop Jul 29, 2022
@mergify mergify bot deleted the jg/new_hh_tasks branch July 29, 2022 20:00
@mergify mergify bot removed the on-merge-train label Jul 29, 2022
@mslipper mslipper mentioned this pull request Aug 4, 2022
maurelian pushed a commit that referenced this pull request Sep 15, 2022
* 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>
sam-goldman pushed a commit that referenced this pull request Sep 15, 2022
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-pkg-contracts-bedrock Area: packages/contracts-bedrock
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants