Commit 47293ac7 authored by George Hotz's avatar George Hotz

testing many blocks

parent 00f02645
......@@ -19,6 +19,7 @@ package core
import (
"fmt"
"math/big"
"os"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/consensus"
......@@ -74,7 +75,8 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
vmenv := vm.NewEVM(blockContext, vm.TxContext{}, statedb, p.config, cfg)
// Iterate over and process the individual transactions
for i, tx := range block.Transactions() {
fmt.Println(i, tx.Hash())
//fmt.Println(i, tx.Hash())
os.Stdout.WriteString(".")
msg, err := tx.AsMessage(types.MakeSigner(p.config, header.Number), header.BaseFee)
if err != nil {
return nil, nil, 0, fmt.Errorf("could not apply tx %d [%v]: %w", i, tx.Hash().Hex(), err)
......
......@@ -66,7 +66,7 @@ func main() {
statedb, _ := state.New(parent.Root, database, nil)
vmconfig := vm.Config{}
processor := core.NewStateProcessor(params.MainnetChainConfig, bc, bc.Engine())
fmt.Println("made state processor")
fmt.Println("processing state:", parent.Number, "->", newheader.Number)
// read txs
//traverseStackTrie(newheader.TxHash)
......
......@@ -15,7 +15,8 @@ import (
)
var preimages = make(map[common.Hash][]byte)
var inputs [7]common.Hash
// only 6 here
var inputs [6]common.Hash
var inputsLoaded bool = false
func byteAt(addr uint64, length int) []byte {
......
......@@ -2,7 +2,6 @@ package trie
import (
"bytes"
"fmt"
"io"
"math/big"
"sync"
......@@ -36,7 +35,7 @@ type Database struct {
func NewDatabase(header types.Header) Database {
triedb := Database{BlockNumber: header.Number, Root: header.Root}
//triedb.preimages = make(map[common.Hash][]byte)
fmt.Println("init database")
//fmt.Println("init database")
oracle.PrefetchAccount(header.Number, common.Address{}, nil)
//panic("preseed")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment