Skip to content
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

review feedback for rebase over kiln #97

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1594,12 +1594,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals, setHead bool)

// Process block using the parent state as reference point
substart := time.Now()
var (
usedGas uint64
receipts types.Receipts
logs []*types.Log
)
receipts, logs, usedGas, err = bc.processor.Process(block, statedb, bc.vmConfig)
receipts, logs, usedGas, err := bc.processor.Process(block, statedb, bc.vmConfig)
if err != nil {
bc.reportBlock(block, receipts, err)
atomic.StoreUint32(&followupInterrupt, 1)
Expand Down
15 changes: 0 additions & 15 deletions core/state/state_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -612,25 +612,10 @@ func (s *stateObject) Balance() *big.Int {
return s.data.Balance
}

func (s *stateObject) BalanceLE() []byte {
var out [32]byte
for i, b := range s.data.Balance.Bytes() {
out[len(s.data.Balance.Bytes())-1-i] = b
}

return out[:]
}

func (s *stateObject) Nonce() uint64 {
return s.data.Nonce
}

func (s *stateObject) NonceLE() []byte {
var out [32]byte
binary.LittleEndian.PutUint64(out[:8], s.data.Nonce)
return out[:]
}

// Never called, but must be present to allow stateObject to be used
// as a vm.Account interface that also satisfies the vm.ContractRef
// interface. Interfaces are awesome.
Expand Down
1 change: 0 additions & 1 deletion core/types/access_witness.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const (

// AccessWitness lists the locations of the state that are being accessed
// during the production of a block.
// TODO(@gballet) this doesn't fully support deletions
type AccessWitness struct {
// Branches flags if a given branch has been loaded
Branches map[VerkleStem]Mode
Expand Down
1 change: 0 additions & 1 deletion core/vm/interpreter.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ func (in *EVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) (
contract.Gas -= touchEachChunksOnReadAndChargeGas(pc, 1, contract.Address().Bytes()[:], contract.Code, contract, in.evm.TxContext.Accesses, contract.IsDeployment)
}

// TODO how can we tell if we are in stateless mode here and need to get the op from the witness
// If we are in witness mode, then raise an error
op = contract.GetOp(pc)

Expand Down