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
f331428f
Commit
f331428f
authored
Aug 24, 2021
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l2geth: update memory usage in geth
This PR updates the memory usage
parent
4a5833f7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
hot-turkeys-pretend.md
.changeset/hot-turkeys-pretend.md
+5
-0
instructions.go
l2geth/core/vm/instructions.go
+4
-0
interpreter.go
l2geth/core/vm/interpreter.go
+1
-1
No files found.
.changeset/hot-turkeys-pretend.md
0 → 100644
View file @
f331428f
---
'
@eth-optimism/l2geth'
:
patch
---
Update the memory usage in geth
l2geth/core/vm/instructions.go
View file @
f331428f
...
@@ -767,6 +767,7 @@ func opCall(pc *uint64, interpreter *EVMInterpreter, contract *Contract, memory
...
@@ -767,6 +767,7 @@ func opCall(pc *uint64, interpreter *EVMInterpreter, contract *Contract, memory
stack
.
push
(
interpreter
.
intPool
.
get
()
.
SetUint64
(
1
))
stack
.
push
(
interpreter
.
intPool
.
get
()
.
SetUint64
(
1
))
}
}
if
err
==
nil
||
err
==
errExecutionReverted
{
if
err
==
nil
||
err
==
errExecutionReverted
{
ret
=
common
.
CopyBytes
(
ret
)
memory
.
Set
(
retOffset
.
Uint64
(),
retSize
.
Uint64
(),
ret
)
memory
.
Set
(
retOffset
.
Uint64
(),
retSize
.
Uint64
(),
ret
)
}
}
contract
.
Gas
+=
returnGas
contract
.
Gas
+=
returnGas
...
@@ -796,6 +797,7 @@ func opCallCode(pc *uint64, interpreter *EVMInterpreter, contract *Contract, mem
...
@@ -796,6 +797,7 @@ func opCallCode(pc *uint64, interpreter *EVMInterpreter, contract *Contract, mem
stack
.
push
(
interpreter
.
intPool
.
get
()
.
SetUint64
(
1
))
stack
.
push
(
interpreter
.
intPool
.
get
()
.
SetUint64
(
1
))
}
}
if
err
==
nil
||
err
==
errExecutionReverted
{
if
err
==
nil
||
err
==
errExecutionReverted
{
ret
=
common
.
CopyBytes
(
ret
)
memory
.
Set
(
retOffset
.
Uint64
(),
retSize
.
Uint64
(),
ret
)
memory
.
Set
(
retOffset
.
Uint64
(),
retSize
.
Uint64
(),
ret
)
}
}
contract
.
Gas
+=
returnGas
contract
.
Gas
+=
returnGas
...
@@ -821,6 +823,7 @@ func opDelegateCall(pc *uint64, interpreter *EVMInterpreter, contract *Contract,
...
@@ -821,6 +823,7 @@ func opDelegateCall(pc *uint64, interpreter *EVMInterpreter, contract *Contract,
stack
.
push
(
interpreter
.
intPool
.
get
()
.
SetUint64
(
1
))
stack
.
push
(
interpreter
.
intPool
.
get
()
.
SetUint64
(
1
))
}
}
if
err
==
nil
||
err
==
errExecutionReverted
{
if
err
==
nil
||
err
==
errExecutionReverted
{
ret
=
common
.
CopyBytes
(
ret
)
memory
.
Set
(
retOffset
.
Uint64
(),
retSize
.
Uint64
(),
ret
)
memory
.
Set
(
retOffset
.
Uint64
(),
retSize
.
Uint64
(),
ret
)
}
}
contract
.
Gas
+=
returnGas
contract
.
Gas
+=
returnGas
...
@@ -846,6 +849,7 @@ func opStaticCall(pc *uint64, interpreter *EVMInterpreter, contract *Contract, m
...
@@ -846,6 +849,7 @@ func opStaticCall(pc *uint64, interpreter *EVMInterpreter, contract *Contract, m
stack
.
push
(
interpreter
.
intPool
.
get
()
.
SetUint64
(
1
))
stack
.
push
(
interpreter
.
intPool
.
get
()
.
SetUint64
(
1
))
}
}
if
err
==
nil
||
err
==
errExecutionReverted
{
if
err
==
nil
||
err
==
errExecutionReverted
{
ret
=
common
.
CopyBytes
(
ret
)
memory
.
Set
(
retOffset
.
Uint64
(),
retSize
.
Uint64
(),
ret
)
memory
.
Set
(
retOffset
.
Uint64
(),
retSize
.
Uint64
(),
ret
)
}
}
contract
.
Gas
+=
returnGas
contract
.
Gas
+=
returnGas
...
...
l2geth/core/vm/interpreter.go
View file @
f331428f
...
@@ -276,7 +276,7 @@ func (in *EVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) (
...
@@ -276,7 +276,7 @@ func (in *EVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) (
// if the operation clears the return data (e.g. it has returning data)
// if the operation clears the return data (e.g. it has returning data)
// set the last return to the result of the operation.
// set the last return to the result of the operation.
if
operation
.
returns
{
if
operation
.
returns
{
in
.
returnData
=
common
.
CopyBytes
(
res
)
in
.
returnData
=
res
}
}
switch
{
switch
{
...
...
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