Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

[wip] OVM self-upgradability #357

Draft
wants to merge 38 commits into
base: master
Choose a base branch
from
Draft

Conversation

ben-chain
Copy link
Collaborator

Description
A clear and concise description of the features you're adding in this pull request.

Additional context
Add any other context about the problem you're solving.

Metadata

  • Fixes #[Link to Issue]

ben-chain and others added 30 commits March 8, 2021 14:11
onlyCallableBy(address(0x4200000000000000000000000000000000000009))
{
_checkAccountLoad(_address);
ovmStateManager.putAccountCode(_address, _code);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we need to be very explicit about the security considerations here. Primarily w/r/t how fraud proofs are impacted, what's safe to do, what isn't. etc.

@@ -322,6 +322,24 @@ library Lib_SafeExecutionManagerWrapper {
);
}

/**
* Performs a safe asdfasdfasdfasdf call.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Reminder to update this.

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?
Copy link
Collaborator

Choose a reason for hiding this comment

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

Reminder on this todo

getContractDefinition('Helper_TestRunner').deployedBytecode
).byteLength
} catch {
1
Copy link
Collaborator

Choose a reason for hiding this comment

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

what does this line do?

Copy link
Collaborator Author

@ben-chain ben-chain Apr 2, 2021

Choose a reason for hiding this comment

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

It stores a digital history of my typo :)

import { Lib_ECDSAUtils } from "../../libraries/utils/Lib_ECDSAUtils.sol";
import { Lib_SafeExecutionManagerWrapper } from "../../libraries/wrappers/Lib_SafeExecutionManagerWrapper.sol";

contract OVM_Upgrader {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Needs comments

Copy link
Collaborator

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...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants