Skip to content

Add L2 governance bridge relay temp circumvention#1438

Merged
eternauta1337 merged 20 commits intogovernance-bridgefrom
add-relay-backdoor
Aug 17, 2021
Merged

Add L2 governance bridge relay temp circumvention#1438
eternauta1337 merged 20 commits intogovernance-bridgefrom
add-relay-backdoor

Conversation

@mjlescano
Copy link
Copy Markdown
Contributor

@mjlescano mjlescano commented Jul 29, 2021

This PR adds the method directRelay to the OwnerRelayOnOptimism contract so we can directly execute any relayed method directly on L2, circumventing the governance bridge functionality. The OwnerRelayOnOptimism contract now has to be instantiated with a TempOwner, which is the only address allowed to execute the directRelay method, and an EOL date for this permission. This is just a temporary precaution in case we encounter a bug on the new governance bridge and avoid a potential loss ownership of all the relayed contracts.

Notes

  • ⚠️ The temporary owner and EOL date can only be assigned when calling the constructor of OwnerRelayOnOptimism and cannot be modified after that. ⚠️
  • Not assigning an address or a EOL will make the check fail, in case we don't want to add the backdoor at all.

TODO

  • Update deploy configuration

This mixin adds an extension to be able to execute a function from a hardcoded address with an EOL
This method can only be executed by the temporary owner before the specified EOL date on contructor
Copy link
Copy Markdown
Contributor

@leomassazza leomassazza left a comment

Choose a reason for hiding this comment

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

LGTM

@mjlescano mjlescano changed the title Add L2 governance bridge relay backdoor Add L2 governance bridge relay temp circumvention Aug 11, 2021
@eternauta1337 eternauta1337 marked this pull request as ready for review August 16, 2021 20:31
@codecov
Copy link
Copy Markdown

codecov bot commented Aug 16, 2021

Codecov Report

Merging #1438 (561bb2a) into governance-bridge (88506ba) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@                  Coverage Diff                  @@
##           governance-bridge    #1438      +/-   ##
=====================================================
+ Coverage              95.56%   95.58%   +0.01%     
=====================================================
  Files                     83       84       +1     
  Lines                   1917     1925       +8     
  Branches                 632      635       +3     
=====================================================
+ Hits                    1832     1840       +8     
  Misses                    85       85              
Impacted Files Coverage Δ
contracts/OwnerRelayOnEthereum.sol 100.00% <100.00%> (ø)
contracts/OwnerRelayOnOptimism.sol 100.00% <100.00%> (ø)
contracts/TemporarilyOwned.sol 100.00% <100.00%> (ø)

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 88506ba...561bb2a. Read the comment docs.

Copy link
Copy Markdown
Contributor

@i-stam i-stam left a comment

Choose a reason for hiding this comment

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

LGTM: left a minor comment (edit: let's use block.timestamp since now is deprecated in newer versions of solidity)

Copy link
Copy Markdown
Contributor

@jjgonecrypto jjgonecrypto left a comment

Choose a reason for hiding this comment

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

A few items left - nothing major

@eternauta1337 eternauta1337 merged commit fe34f1f into governance-bridge Aug 17, 2021
@eternauta1337 eternauta1337 deleted the add-relay-backdoor branch August 17, 2021 17:43
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.

5 participants