Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
0868e2f1
Commit
0868e2f1
authored
Sep 22, 2020
by
ben-chain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more lint
parent
a7760482
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
28 deletions
+1
-28
OVM_ExecutionManager.sol
...ptimistic-ethereum/OVM/execution/OVM_ExecutionManager.sol
+1
-28
No files found.
packages/contracts/contracts/optimistic-ethereum/OVM/execution/OVM_ExecutionManager.sol
View file @
0868e2f1
...
@@ -487,8 +487,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
...
@@ -487,8 +487,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
bytes memory _returndata
bytes memory _returndata
)
)
{
{
console.log("ovmCALL to");
console.logAddress(_address);
// CALL updates the CALLER and ADDRESS.
// CALL updates the CALLER and ADDRESS.
MessageContext memory nextMessageContext = messageContext;
MessageContext memory nextMessageContext = messageContext;
nextMessageContext.ovmCALLER = nextMessageContext.ovmADDRESS;
nextMessageContext.ovmCALLER = nextMessageContext.ovmADDRESS;
...
@@ -729,9 +727,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
...
@@ -729,9 +727,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
override
override
public
public
{
{
console.log("in safecreate with nuisance gas:");
console.log(messageRecord.nuisanceGasLeft);
// Since this function is public, anyone can attempt to directly call it. We need to make
// Since this function is public, anyone can attempt to directly call it. We need to make
// sure that the OVM_ExecutionManager itself is the only party that can actually try to
// sure that the OVM_ExecutionManager itself is the only party that can actually try to
// call this function.
// call this function.
...
@@ -773,7 +768,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
...
@@ -773,7 +768,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
// left over since contract calls can only be passed 63/64ths of total gas, so we need to
// left over since contract calls can only be passed 63/64ths of total gas, so we need to
// explicitly handle this case here.
// explicitly handle this case here.
if (ethAddress == address(0)) {
if (ethAddress == address(0)) {
console.log("detected the create exception");
_revertWithFlag(RevertFlag.CREATE_EXCEPTION);
_revertWithFlag(RevertFlag.CREATE_EXCEPTION);
}
}
...
@@ -820,8 +814,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
...
@@ -820,8 +814,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
address _created
address _created
)
)
{
{
console.log("createContract with addy");
console.logAddress(_contractAddress);
// We always update the nonce of the creating account, even if the creation fails.
// We always update the nonce of the creating account, even if the creation fails.
_setAccountNonce(ovmADDRESS(), 1);
_setAccountNonce(ovmADDRESS(), 1);
...
@@ -876,8 +868,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
...
@@ -876,8 +868,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
bytes memory _returndata
bytes memory _returndata
)
)
{
{
console.log("_callContract with nuisance gas:");
console.log(messageRecord.nuisanceGasLeft);
return _handleExternalInteraction(
return _handleExternalInteraction(
_nextMessageContext,
_nextMessageContext,
_gasLimit,
_gasLimit,
...
@@ -910,8 +900,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
...
@@ -910,8 +900,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
bytes memory _returndata
bytes memory _returndata
)
)
{
{
console.log("starting _handleExternalInteraction with gasLeft");
console.log(gasleft());
// We need to switch over to our next message context for the duration of this call.
// We need to switch over to our next message context for the duration of this call.
MessageContext memory prevMessageContext = messageContext;
MessageContext memory prevMessageContext = messageContext;
_switchMessageContext(prevMessageContext, _nextMessageContext);
_switchMessageContext(prevMessageContext, _nextMessageContext);
...
@@ -948,9 +936,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
...
@@ -948,9 +936,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
bytes memory returndataFromFlag
bytes memory returndataFromFlag
) = _decodeRevertData(returndata);
) = _decodeRevertData(returndata);
console.log("unsuccessfull safecreate with nuisance gas left post-revert:");
console.log(nuisanceGasLeftPostRevert);
// INVALID_STATE_ACCESS is the only flag that triggers an immediate abort of the
// INVALID_STATE_ACCESS is the only flag that triggers an immediate abort of the
// parent EVM message. This behavior is necessary because INVALID_STATE_ACCESS must
// parent EVM message. This behavior is necessary because INVALID_STATE_ACCESS must
// halt any further transaction execution that could impact the execution result.
// halt any further transaction execution that could impact the execution result.
...
@@ -1175,7 +1160,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
...
@@ -1175,7 +1160,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
)
)
internal
internal
{
{
console.log("checking account load");
// See `_checkContractStorageLoad` for more information.
// See `_checkContractStorageLoad` for more information.
if (gasleft() < MIN_GAS_FOR_INVALID_STATE_ACCESS) {
if (gasleft() < MIN_GAS_FOR_INVALID_STATE_ACCESS) {
_revertWithFlag(RevertFlag.OUT_OF_GAS);
_revertWithFlag(RevertFlag.OUT_OF_GAS);
...
@@ -1195,14 +1179,10 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
...
@@ -1195,14 +1179,10 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
// If we hadn't already loaded the account, then we'll need to charge "nuisance gas" based
// If we hadn't already loaded the account, then we'll need to charge "nuisance gas" based
// on the size of the contract code.
// on the size of the contract code.
if (_wasAccountAlreadyLoaded == false) {
if (_wasAccountAlreadyLoaded == false) {
console.log("was not already loaded");
_useNuisanceGas(
_useNuisanceGas(
(Lib_EthUtils.getCodeSize(_getAccountEthAddress(_address)) * NUISANCE_GAS_PER_CONTRACT_BYTE) + MIN_NUISANCE_GAS_PER_CONTRACT
(Lib_EthUtils.getCodeSize(_getAccountEthAddress(_address)) * NUISANCE_GAS_PER_CONTRACT_BYTE) + MIN_NUISANCE_GAS_PER_CONTRACT
);
);
console.log("got code size:");
console.log(Lib_EthUtils.getCodeSize(_getAccountEthAddress(_address)));
}
}
console.log("was already loaded");
}
}
/**
/**
...
@@ -1386,8 +1366,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
...
@@ -1386,8 +1366,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
}
}
// ABI decode the incoming data.
// ABI decode the incoming data.
console.log("raw revert data:");
console.logBytes(_revertdata);
return abi.decode(_revertdata, (RevertFlag, uint256, uint256, bytes));
return abi.decode(_revertdata, (RevertFlag, uint256, uint256, bytes));
}
}
...
@@ -1436,7 +1414,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
...
@@ -1436,7 +1414,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
)
)
internal
internal
{
{
console.log("reverting with no info other than flag");
_revertWithFlag(_flag, bytes(''));
_revertWithFlag(_flag, bytes(''));
}
}
...
@@ -1474,8 +1451,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
...
@@ -1474,8 +1451,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
)
)
internal
internal
{
{
console.log("using nuisance gas of amount:");
console.log(_amount);
// Essentially the same as a standard OUT_OF_GAS, except we also retain a record of the gas
// Essentially the same as a standard OUT_OF_GAS, except we also retain a record of the gas
// refund to be given at the end of the transaction.
// refund to be given at the end of the transaction.
if (messageRecord.nuisanceGasLeft < _amount) {
if (messageRecord.nuisanceGasLeft < _amount) {
...
@@ -1680,8 +1655,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
...
@@ -1680,8 +1655,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
)
)
internal
internal
{
{
console.log("setting number to:");
console.log(_transaction.number);
transactionContext.ovmTIMESTAMP = _transaction.timestamp;
transactionContext.ovmTIMESTAMP = _transaction.timestamp;
transactionContext.ovmNUMBER = _transaction.number;
transactionContext.ovmNUMBER = _transaction.number;
transactionContext.ovmTXGASLIMIT = _transaction.gasLimit;
transactionContext.ovmTXGASLIMIT = _transaction.gasLimit;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment