Skip to content

Commit

Permalink
trace cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gballet committed Jan 26, 2024
1 parent 78b0018 commit b2381d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 2 additions & 2 deletions core/state/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,14 @@ func (db *cachingDB) OpenTrie(root common.Hash) (Trie, error) {
// NOTE this is a kaustinen-only change, it will break replay
vkt, err := db.openVKTrie(root)
if err != nil {
fmt.Println("failed to open the vkt", err)
log.Error("failed to open the vkt", "err", err)
return nil, err
}

// If the verkle conversion has ended, return a single
// verkle trie.
if db.CurrentTransitionState.ended {
fmt.Println("vkt only")
log.Debug("transition ended, returning a simple verkle tree")
return vkt, nil
}

Expand Down
5 changes: 0 additions & 5 deletions core/vm/instructions.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
package vm

import (
"fmt"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/core/state"
Expand Down Expand Up @@ -653,7 +651,6 @@ func opCreate(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]b
input = scope.Memory.GetCopy(int64(offset.Uint64()), int64(size.Uint64()))
gas = scope.Contract.Gas
)
fmt.Println("CREATE", input, value)
if interpreter.evm.chainRules.IsPrague {
contractAddress := crypto.CreateAddress(scope.Contract.Address(), interpreter.evm.StateDB.GetNonce(scope.Contract.Address()))
statelessGas := interpreter.evm.Accesses.TouchAndChargeContractCreateInit(contractAddress.Bytes()[:], value.Sign() != 0)
Expand Down Expand Up @@ -708,7 +705,6 @@ func opCreate2(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]
input = scope.Memory.GetCopy(int64(offset.Uint64()), int64(size.Uint64()))
gas = scope.Contract.Gas
)
fmt.Println("CREATE2", salt, input, endowment)
if interpreter.evm.chainRules.IsPrague {
codeAndHash := &codeAndHash{code: input}
contractAddress := crypto.CreateAddress2(scope.Contract.Address(), salt.Bytes32(), codeAndHash.Hash().Bytes())
Expand Down Expand Up @@ -907,7 +903,6 @@ func opSelfdestruct(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext
return nil, ErrWriteProtection
}
beneficiary := scope.Stack.pop()
fmt.Println("SELFDESTRUCT", beneficiary)
balance := interpreter.evm.StateDB.GetBalance(scope.Contract.Address())
interpreter.evm.StateDB.AddBalance(beneficiary.Bytes20(), balance)
interpreter.evm.StateDB.SelfDestruct(scope.Contract.Address())
Expand Down

0 comments on commit b2381d3

Please sign in to comment.