-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: pick out Stack changes #6
Conversation
@@ -871,9 +871,9 @@ | |||
) | |||
*pc += 1 | |||
if *pc < codeLen { | |||
scope.Stack.push(integer.SetUint64(uint64(scope.Contract.Code[*pc]))) | |||
scope.Stack.Push(integer.SetUint64(uint64(scope.Contract.Code[*pc]))) |
Check failure
Code scanning / gosec
Potential integer overflow by integer type conversion
return nil, nil | ||
} | ||
|
||
func opMsize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { | ||
scope.Stack.push(new(uint256.Int).SetUint64(uint64(scope.Memory.Len()))) | ||
scope.Stack.Push(new(uint256.Int).SetUint64(uint64(scope.Memory.Len()))) |
Check failure
Code scanning / gosec
Potential integer overflow by integer type conversion
@@ -316,7 +316,7 @@ | |||
} | |||
|
|||
func gasExpEIP158(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { | |||
expByteLen := uint64((stack.data[stack.len()-2].BitLen() + 7) / 8) | |||
expByteLen := uint64((stack.Data[stack.Len()-2].BitLen() + 7) / 8) |
Check failure
Code scanning / gosec
Potential integer overflow by integer type conversion
@@ -303,7 +303,7 @@ | |||
} | |||
|
|||
func gasExpFrontier(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { | |||
expByteLen := uint64((stack.data[stack.len()-2].BitLen() + 7) / 8) | |||
expByteLen := uint64((stack.Data[stack.Len()-2].BitLen() + 7) / 8) |
Check failure
Code scanning / gosec
Potential integer overflow by integer type conversion
@Mergifyio backport release/1.10 |
(cherry picked from commit 01221e9) # Conflicts: # CHANGELOG.md # core/vm/eips.go # core/vm/instructions.go # core/vm/instructions_test.go # eth/tracers/native/call.go
✅ Backports have been created
|
This PR refactors the default
vm.Stack
and it's usage across the codebase.