Skip to content

Remove L1 contracts from L2 state dump process#1445

Merged
smartcontracts merged 1 commit intoethereum-optimism:developfrom
neelriyer:remove-l1-contracts-from-l2-state-dump-process
Sep 29, 2021
Merged

Remove L1 contracts from L2 state dump process#1445
smartcontracts merged 1 commit intoethereum-optimism:developfrom
neelriyer:remove-l1-contracts-from-l2-state-dump-process

Conversation

@neelriyer
Copy link
Copy Markdown
Contributor

Description
Removes the l1 only contracts from the deployment configuration since these are not actually deployed using this configuration.

Additional context
Doesn’t change too much. This is my first commit to this repo.

Metadata

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Sep 12, 2021

🦋 Changeset detected

Latest commit: 7f7f35c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@eth-optimism/contracts Major
@eth-optimism/batch-submitter Patch
@eth-optimism/data-transport-layer Patch
@eth-optimism/message-relayer Patch

Not sure what this means? Click here to learn what changesets are.

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

@smartcontracts
Copy link
Copy Markdown
Contributor

Nice. For some context, we used to use this as our L1 and L2 deployment script but have since moved to using hardhat-deploy for L1. Super useful PR!

@neelriyer
Copy link
Copy Markdown
Contributor Author

@smartcontracts thanks for your help! You made this PR super easy. I noticed that there are 3 workflows awaiting approval, do you need anything from me to get those done?

@tynes
Copy link
Copy Markdown
Contributor

tynes commented Sep 14, 2021

Hey @spiyer99, could you add a patch changeset for the contracts package using yarn changeset and squash the commits into a single commit that looks like contracts: remove l1 contracts from l2 state dump process

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 15, 2021

Codecov Report

Merging #1445 (2e7d783) into develop (b08d725) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1445   +/-   ##
========================================
  Coverage    76.47%   76.47%           
========================================
  Files           81       81           
  Lines         3018     3018           
  Branches       463      463           
========================================
  Hits          2308     2308           
  Misses         710      710           
Flag Coverage Δ
batch-submitter 60.99% <ø> (ø)
contracts 86.05% <ø> (ø)
core-utils 68.16% <ø> (ø)
data-transport-layer 37.86% <ø> (ø)
message-relayer 72.22% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b08d725...2e7d783. Read the comment docs.

@neelriyer
Copy link
Copy Markdown
Contributor Author

Sure @tynes, will do. I'll reply here when I'm done.

@neelriyer
Copy link
Copy Markdown
Contributor Author

neelriyer commented Sep 21, 2021

@tynes, I added a patch changeset for the contracts package and squashed the commits into a single commit using the message you specified earlier. Hopefully I've done this correctly. Happy to change things if I've messed up somewhere.

@smartcontracts
Copy link
Copy Markdown
Contributor

Looking good! Could you just rebase this on top of the latest version of develop and then mark it as ready for review?

@smartcontracts
Copy link
Copy Markdown
Contributor

git fetch followed by git rebase origin/develop or git rebase -i origin/develop (if you want an interactive rebase)

@neelriyer neelriyer marked this pull request as ready for review September 23, 2021 10:23
@neelriyer
Copy link
Copy Markdown
Contributor Author

Thanks for the help @smartcontracts!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Whoops my apologies, this contract should actually still be included.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@smartcontracts no worries, I included the contract in the latest commit.

@smartcontracts
Copy link
Copy Markdown
Contributor

Hey! Sorry for the delay here. Would you mind rebasing one more time so we can get this baby merged? Thank you!

@neelriyer
Copy link
Copy Markdown
Contributor Author

@smartcontracts just rebased it. Let me know if there are any more issues. Also, how else could I help out here?

@smartcontracts smartcontracts merged commit 0847f19 into ethereum-optimism:develop Sep 29, 2021
@smartcontracts
Copy link
Copy Markdown
Contributor

Merged! Great job here @spiyer99. If you're looking for an easy issue to tackle, we need to remove this code from the L1CrossDomainMessenger and fix any tests that might break when that code gets removed:

/**********************
* Function Modifiers *
**********************/
/**
* Modifier to enforce that, if configured, only the OVM_L2MessageRelayer contract may
* successfully call a method.
*/
modifier onlyRelayer() {
address relayer = resolve("OVM_L2MessageRelayer");
if (relayer != address(0)) {
require(
msg.sender == relayer,
"Only OVM_L2MessageRelayer can relay L2-to-L1 messages."
);
}
_;
}

Please make this change against the experimental branch if you decide to tackle it! https://github.com/ethereum-optimism/optimism/tree/experimental

@neelriyer
Copy link
Copy Markdown
Contributor Author

Merged! Great job here @spiyer99. If you're looking for an easy issue to tackle, we need to remove this code from the L1CrossDomainMessenger and fix any tests that might break when that code gets removed:

/**********************
* Function Modifiers *
**********************/
/**
* Modifier to enforce that, if configured, only the OVM_L2MessageRelayer contract may
* successfully call a method.
*/
modifier onlyRelayer() {
address relayer = resolve("OVM_L2MessageRelayer");
if (relayer != address(0)) {
require(
msg.sender == relayer,
"Only OVM_L2MessageRelayer can relay L2-to-L1 messages."
);
}
_;
}

Please make this change against the experimental branch if you decide to tackle it! https://github.com/ethereum-optimism/optimism/tree/experimental

@smartcontracts thanks for merging the PR!

Happy to work on the issue mentioned above. Should I create a formal issue before submitting a PR?

theochap pushed a commit that referenced this pull request Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove L1 contracts from L2 state dump process

4 participants