This repository has been archived by the owner on Apr 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 118
[wip] OVM self-upgradability #357
Draft
ben-chain
wants to merge
38
commits into
master
Choose a base branch
from
feat/763/ovm-self-upgrade
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
b6289b2
new create codepath working
ben-chain 8b7aa9d
get calls ported over to new function
ben-chain c8b9a5c
remove from interface
ben-chain 810b67a
Merge branch 'master' into feat/simplify-creation
ben-chain 8ccd116
clean up, add comments
ben-chain 6e71f6a
remove unused commented code
ben-chain 222e345
fix nuisance gas
ben-chain 42035c6
add return type to ovmCREATE
ben-chain a648449
focus on final failing test
ben-chain 563853f
finish up tests with new contract account revert type
ben-chain bd7cc45
remove test focus
ben-chain 477819b
linting
ben-chain 9ed5fee
cleanup
ben-chain 18734c7
add explicit unsafe bytecode test
ben-chain eb8e24d
linting
ben-chain 06f3399
Merge branch 'master' into feat/simplify-creation
ben-chain d546cf0
remove pointless ternary
ben-chain 99d96d6
fix docstring
ben-chain bbb4bc5
stub putcode
ben-chain 7f17283
unauthenticated upgrader for easy testing
ben-chain ec4d11d
Merge branch 'master' into feat/763/ovm-self-upgrade
ben-chain 31f87eb
Merge branch 'master' into feat/simplify-creation
ben-chain c64991d
fix eth_call for creates and fix contract account reversions
ben-chain 4278b54
use if statement instead
ben-chain b8e3810
nits
ben-chain b8027b2
Update contracts/optimistic-ethereum/OVM/execution/OVM_ExecutionManag…
ben-chain 250442d
Update contracts/optimistic-ethereum/OVM/execution/OVM_ExecutionManag…
ben-chain 5856cf8
Update contracts/optimistic-ethereum/OVM/execution/OVM_ExecutionManag…
ben-chain 821d27a
Update contracts/optimistic-ethereum/OVM/execution/OVM_ExecutionManag…
ben-chain 014ed31
Update contracts/optimistic-ethereum/OVM/execution/OVM_ExecutionManag…
ben-chain 4a0bdd4
Merge branch 'feat/simplify-creation' into feat/763/ovm-self-upgrade
ben-chain aff7395
auth skeleton
ben-chain d111f06
Merge branch 'master' into feat/763/ovm-self-upgrade
ben-chain bc52f97
add tests setstorage
ben-chain 6bfa26a
update smock, get smoddit assertions passing
ben-chain c7240c4
finish unit tests
ben-chain 843d684
clean up EM
ben-chain 29c3d2a
address PR feedback
ben-chain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
contracts/optimistic-ethereum/OVM/predeploys/OVM_Upgrader.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity >0.5.0 <0.8.0; | ||
|
||
/* Library Imports */ | ||
import { Lib_SafeExecutionManagerWrapper } from "../../libraries/wrappers/Lib_SafeExecutionManagerWrapper.sol"; | ||
|
||
contract OVM_Upgrader { | ||
// TODO: implement me | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,14 +42,15 @@ interface iOVM_StateManager { | |
|
||
function putAccount(address _address, Lib_OVMCodec.Account memory _account) external; | ||
function putEmptyAccount(address _address) external; | ||
function putAccountCode(address _address, bytes memory _code) external; | ||
function getAccount(address _address) external view returns (Lib_OVMCodec.Account memory _account); | ||
function hasAccount(address _address) external view returns (bool _exists); | ||
function hasEmptyAccount(address _address) external view returns (bool _exists); | ||
function setAccountNonce(address _address, uint256 _nonce) external; | ||
function getAccountNonce(address _address) external view returns (uint256 _nonce); | ||
function getAccountEthAddress(address _address) external view returns (address _ethAddress); | ||
function getAccountStorageRoot(address _address) external view returns (bytes32 _storageRoot); | ||
function initPendingAccount(address _address) external; | ||
function initPendingAccount(address _address) external; // todo: deprecate/combine these two with this change? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reminder on this todo |
||
function commitPendingAccount(address _address, address _ethAddress, bytes32 _codeHash) external; | ||
function testAndSetAccountLoaded(address _address) external returns (bool _wasAccountAlreadyLoaded); | ||
function testAndSetAccountChanged(address _address) external returns (bool _wasAccountAlreadyChanged); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Needs comments
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.
Also although IMO the name
OVM_Upgrader
is fine, we should take a few mins to brainstorm names + make sure the name won't be confusing going forward. Since it's much easier to change the name now than in the future, as we're well aware...