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

Iquidus dev/ecip 1099 #5

Open
wants to merge 60 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
54add42
cmd/geth/tests: try to fix spurious travis failure in les tests (#21410)
holiman Aug 14, 2020
f3bafec
metrics: make meter updates lock-free (#21446)
MariusVanDerWijden Aug 18, 2020
2ff464b
core/state: fixed some comments (#21450)
Neurone Aug 19, 2020
32b078d
build: drop disco, enable groovy on Ubuntu PPAs
karalabe Aug 19, 2020
560d444
Merge pull request #21461 from karalabe/ppa-drop-disco
karalabe Aug 19, 2020
7ebc6c4
cmd/evm: statet8n output folder + tx hashes on trace filenames (#21406)
holiman Aug 19, 2020
0bdd295
core: more detailed metering for reorgs (#21420)
MariusVanDerWijden Aug 20, 2020
8cbdc86
core: define and test chain rewind corner cases (#21409)
karalabe Aug 20, 2020
15fdaf2
travis, dockerfile, appveyor, build: bump to Go 1.15
karalabe Aug 20, 2020
a70a79b
Merge pull request #21466 from karalabe/go1.15
karalabe Aug 20, 2020
4e54b1a
metrics: zero temp variable in updateMeter (#21470)
MariusVanDerWijden Aug 21, 2020
9f7b79a
eth/downloader: fix rollback issue on short chains
holiman Aug 21, 2020
b68929c
Merge pull request #21472 from holiman/fix_dltest_fail
karalabe Aug 21, 2020
87c0ba9
core, eth, les, trie: add a prefix to contract code (#21080)
rjl493456442 Aug 21, 2020
1b5a867
core: do less lookups when writing fast-sync block bodies (#21468)
holiman Aug 22, 2020
0f4e7c9
eth: utilize sync bloom for getNodeData (#21445)
holiman Aug 24, 2020
3ee91b9
core/state/snapshot: reduce disk layer depth during generation
karalabe Aug 24, 2020
bdde616
Merge pull request #21477 from karalabe/snapshotter-shallow-generator
karalabe Aug 24, 2020
7b5107b
p2p/discover: avoid dropping unverified nodes when table is almost em…
timcooijmans Aug 24, 2020
5655dce
core/rawdb: only complain loudly if truncating many items
karalabe Aug 25, 2020
d13b8e5
Merge pull request #21483 from karalabe/freezer-truncate-silent
karalabe Aug 25, 2020
341f451
graphql: add support for retrieving the chain id (#21451)
islishude Aug 25, 2020
ce5f949
params: update CHTs for v1.9.20 release
karalabe Aug 25, 2020
63a9d4b
Merge pull request #21486 from karalabe/cht-1.9.20
karalabe Aug 25, 2020
979fc96
params: release Geth v1.9.20
fjl Aug 25, 2020
fc20680
params: begin v1.9.21 release cycle
fjl Aug 25, 2020
92b12ee
accounts/abi/bind/backends: Disallow AdjustTime for non-empty blocks …
MariusVanDerWijden Aug 26, 2020
d8da0b3
core/state, eth, trie: stabilize memory use, fix memory leak
karalabe Aug 26, 2020
16d7eae
eth: updated comments (#21490)
MariusVanDerWijden Aug 26, 2020
856307d
go.mod | goleveldb latest update (#21448)
ucwong Aug 26, 2020
d97e006
Merge pull request #21491 from karalabe/state-sync-leak-fix
karalabe Aug 27, 2020
05280a7
eth/tracers: revert reason in call_tracer + error for failed internal…
libotony Aug 27, 2020
43529af
Merge remote-tracking branch 'foundation/master' into merge/foundatio…
meowsbits Aug 27, 2020
a6daef3
go mod tidy
meowsbits Aug 27, 2020
154b902
rawdb: fix import path FullImmutabilityThreshold
meowsbits Aug 27, 2020
3a9f942
core,rawdb,miner,tracers: remove unused imports
meowsbits Aug 27, 2020
64404d9
graphql: fix no method ChainId
meowsbits Aug 27, 2020
a5f7028
backends: fix TxGas not declared by package params
meowsbits Aug 27, 2020
c279b9a
core: fix types.DeriveSha sig use, test rollback->sethead
meowsbits Aug 27, 2020
dbfe59c
core: fix MustCommit Genesis calls
meowsbits Aug 27, 2020
297b3cb
rawdb,fetcher: (lint) goimports -w
meowsbits Aug 27, 2020
5d0928c
lib,core,rawdb,test.out: fix TestFastVsFullChains_RemoteFreezer
meowsbits Aug 27, 2020
bf84a9a
core: remove invalid test
meowsbits Aug 27, 2020
ede0a95
rawdb: (lint) goimports -w
meowsbits Aug 27, 2020
df0126c
rawdb: add missing import
meowsbits Aug 27, 2020
7269a17
core: fix initialization from freezer
meowsbits Aug 27, 2020
448fb71
core: add nil condition and comment for writeHeadBlock if bc empty
meowsbits Aug 28, 2020
e834039
params: bump version to v1.11.13-stable
meowsbits Sep 8, 2020
172c244
params: bump version to v1.11.14-unstable
meowsbits Sep 8, 2020
eb8bbb0
Merge pull request #179 from etclabscore/release/v1.11.13
iquidus Sep 9, 2020
1af78e0
ecip-1099: minimal implementation
iquidus Sep 14, 2020
3c052e7
ecip-1099: add fix example for TestConcurrentDiskCacheGeneration failure
iquidus Sep 14, 2020
67c28d1
ecip-1099: update tests
iquidus Sep 14, 2020
88da6c6
ecip-1099: fix TestConcurrentDiskCacheGeneration
iquidus Sep 14, 2020
518b983
ecip-1099: add epochLength to DAG & cache generation logs
iquidus Sep 14, 2020
a4d9f2c
ecip-1099: optimize, calcEpoch() return epochLength with epoch
iquidus Sep 14, 2020
e35f1ed
ecip-1099: update algorithm_test
iquidus Sep 14, 2020
b80868d
travisci cleanup
Cody-Burns Sep 15, 2020
ecaedda
expect pirl
Cody-Burns Sep 16, 2020
66815a1
make lint achieved perfection
Cody-Burns Sep 16, 2020
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
79 changes: 47 additions & 32 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ jobs:
- stage: lint
os: linux
dist: xenial
go: 1.14.x
go: 1.15.x
env:
- lint
git:
submodules: false
script:
- make lint

# Run chipprgeth -specific tests, proving regression-safety and config interoperability.
#- stage: test
# name: "Go1.14.x: make test-chipprgeth"
# os: linux
# dist: xenial
# go: 1.14.x
# script:
# - make test-chipprgeth
# Run core-geth -specific tests, proving regression-safety and config interoperability.
- stage: build
name: "Go1.15.x: make test-chipprgeth"
os: linux
dist: xenial
go: 1.15.x
script:
- make test-chipprgeth

# Run build and tests against latest-1 Go version.
#- stage: test
Expand All @@ -37,26 +37,39 @@ jobs:
# - make all
# - travis_wait 60 make test

# Run build and tests on ARM64 on Pull Requests.
#- stage: test
# name: "ARM64/Go1.14.x: make test"
# if: type = pull_request
# os: linux
# arch: arm64
# dist: xenial
# go: 1.14.x
# env:
# - GO111MODULE=on
# script:
# - make all
# - travis_wait 60 make test
#
# Run build with environment-aware possible artifact deployment.
- stage: deploy
name: "Go1.14.x: make all && deploy"
# Run build and tests against latest-1 Go version.
- stage: build
name: "Go1.14.x: make test"
os: linux
dist: xenial
go: 1.14.x
env:
- GO111MODULE=on
script:
- make all
- travis_wait 60 make test

# Run build and tests on ARM64 on Pull Requests.
- stage: build
name: "ARM64/Go1.15.x: make test"
if: type = pull_request
os: linux
arch: arm64
dist: xenial
go: 1.15.x
env:
- GO111MODULE=on
script:
- make all
- travis_wait 60 make test

# Run build and tests with environment-aware possible artifact deployment.
- stage: build
if: type = push
name: "Go1.15.x: make test && deploy"
os: linux
dist: xenial
go: 1.15.x
script:
- make all
before_deploy:
Expand All @@ -75,12 +88,13 @@ jobs:
tag_name: "$TRAVIS_TAG"

# Run build on ARM5 with environment-aware possible artifact deployment.
- stage: deploy
name: "ARM5/Go1.14.x: go run build/ci.go install && deploy"
- stage: build
if: type = push
name: "ARM5/Go1.15.x: go run build/ci.go install && deploy"
os: linux
dist: xenial
sudo: required
go: 1.14.x
go: 1.15.x
env:
- ARMv5
git:
Expand Down Expand Up @@ -110,10 +124,11 @@ jobs:
tag_name: "$TRAVIS_TAG"

#Run build on OSX with environment-aware possible artifact deployment.
- stage: deploy
name: "OSX/Go1.14.x: make all && deploy"
- stage: build
if: type = push
name: "OSX/Go1.15.x: make all && deploy"
os: osx
go: 1.14.x
go: 1.15.x
script:
- echo "Increase the maximum number of open file descriptors on macOS"
- NOFILE=20480
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build Geth in a stock Go builder container
FROM golang:1.14-alpine as builder
FROM golang:1.15-alpine as builder

RUN apk add --no-cache make gcc musl-dev linux-headers git

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.alltools
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build Geth in a stock Go builder container
FROM golang:1.14-alpine as builder
FROM golang:1.15-alpine as builder

RUN apk add --no-cache make gcc musl-dev linux-headers git

Expand Down
8 changes: 5 additions & 3 deletions accounts/abi/bind/backends/simulated.go
Original file line number Diff line number Diff line change
Expand Up @@ -678,14 +678,16 @@ func (b *SimulatedBackend) SubscribeNewHead(ctx context.Context, ch chan<- *type
}

// AdjustTime adds a time shift to the simulated clock.
// It can only be called on empty blocks.
func (b *SimulatedBackend) AdjustTime(adjustment time.Duration) error {
b.mu.Lock()
defer b.mu.Unlock()

if len(b.pendingBlock.Transactions()) != 0 {
return errors.New("Could not adjust time on non-empty block")
}

blocks, _ := core.GenerateChain(b.config, b.blockchain.CurrentBlock(), ethash.NewFaker(), b.database, 1, func(number int, block *core.BlockGen) {
for _, tx := range b.pendingBlock.Transactions() {
block.AddTx(tx)
}
block.OffsetTime(int64(adjustment.Seconds()))
})
statedb, _ := b.blockchain.State()
Expand Down
41 changes: 39 additions & 2 deletions accounts/abi/bind/backends/simulated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ func TestSimulatedBackend_AdjustTime(t *testing.T) {
defer sim.Close()

prevTime := sim.pendingBlock.Time()
err := sim.AdjustTime(time.Second)
if err != nil {
if err := sim.AdjustTime(time.Second); err != nil {
t.Error(err)
}
newTime := sim.pendingBlock.Time()
Expand All @@ -155,6 +154,44 @@ func TestSimulatedBackend_AdjustTime(t *testing.T) {
}
}

func TestNewSimulatedBackend_AdjustTimeFail(t *testing.T) {
testAddr := crypto.PubkeyToAddress(testKey.PublicKey)
sim := simTestBackend(testAddr)
// Create tx and send
tx := types.NewTransaction(0, testAddr, big.NewInt(1000), vars.TxGas, big.NewInt(1), nil)
signedTx, err := types.SignTx(tx, types.HomesteadSigner{}, testKey)
if err != nil {
t.Errorf("could not sign tx: %v", err)
}
sim.SendTransaction(context.Background(), signedTx)
// AdjustTime should fail on non-empty block
if err := sim.AdjustTime(time.Second); err == nil {
t.Error("Expected adjust time to error on non-empty block")
}
sim.Commit()

prevTime := sim.pendingBlock.Time()
if err := sim.AdjustTime(time.Minute); err != nil {
t.Error(err)
}
newTime := sim.pendingBlock.Time()
if newTime-prevTime != uint64(time.Minute.Seconds()) {
t.Errorf("adjusted time not equal to a minute. prev: %v, new: %v", prevTime, newTime)
}
// Put a transaction after adjusting time
tx2 := types.NewTransaction(1, testAddr, big.NewInt(1000), vars.TxGas, big.NewInt(1), nil)
signedTx2, err := types.SignTx(tx2, types.HomesteadSigner{}, testKey)
if err != nil {
t.Errorf("could not sign tx: %v", err)
}
sim.SendTransaction(context.Background(), signedTx2)
sim.Commit()
newTime = sim.pendingBlock.Time()
if newTime-prevTime >= uint64(time.Minute.Seconds()) {
t.Errorf("time adjusted, but shouldn't be: prev: %v, new: %v", prevTime, newTime)
}
}

func TestSimulatedBackend_BalanceAt(t *testing.T) {
testAddr := crypto.PubkeyToAddress(testKey.PublicKey)
expectedBal := big.NewInt(10000000000)
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ environment:
install:
- git submodule update --init
- rmdir C:\go /s /q
- appveyor DownloadFile https://dl.google.com/go/go1.14.2.windows-%GETH_ARCH%.zip
- 7z x go1.14.2.windows-%GETH_ARCH%.zip -y -oC:\ > NUL
- appveyor DownloadFile https://dl.google.com/go/go1.15.windows-%GETH_ARCH%.zip
- 7z x go1.15.windows-%GETH_ARCH%.zip -y -oC:\ > NUL
- go version
- gcc --version

Expand Down
2 changes: 1 addition & 1 deletion build/checksums.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file contains sha256 checksums of optional build dependencies.

98de84e69726a66da7b4e58eac41b99cbe274d7e8906eeb8a5b7eb0aadee7f7c go1.14.2.src.tar.gz
69438f7ed4f532154ffaf878f3dfd83747e7a00b70b3556eddabf7aaee28ac3a go1.15.src.tar.gz

d998a84eea42f2271aca792a7b027ca5c1edfcba229e8e5a844c9ac3f336df35 golangci-lint-1.27.0-linux-armv7.tar.gz
bf781f05b0d393b4bf0a327d9e62926949a4f14d7774d950c4e009fc766ed1d4 golangci-lint.exe-1.27.0-windows-amd64.zip
Expand Down
3 changes: 2 additions & 1 deletion build/ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,14 @@ var (
// Note: zesty is unsupported because it was officially deprecated on Launchpad.
// Note: artful is unsupported because it was officially deprecated on Launchpad.
// Note: cosmic is unsupported because it was officially deprecated on Launchpad.
// Note: disco is unsupported because it was officially deprecated on Launchpad.
debDistroGoBoots = map[string]string{
"trusty": "golang-1.11",
"xenial": "golang-go",
"bionic": "golang-go",
"disco": "golang-go",
"eoan": "golang-go",
"focal": "golang-go",
"groovy": "golang-go",
}

debGoBootPaths = map[string]string{
Expand Down
16 changes: 8 additions & 8 deletions cmd/ancient-store-mem/lib/mem.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ func (f *MemFreezerRemoteServerAPI) Reset() {
}

func (f *MemFreezerRemoteServerAPI) HasAncient(kind string, number uint64) (bool, error) {
fmt.Println("mock server called", "method=HasAncient")
// fmt.Println("mock server called", "method=HasAncient")
f.mu.Lock()
defer f.mu.Unlock()
_, ok := f.store[f.storeKey(kind, number)]
return ok, nil
}

func (f *MemFreezerRemoteServerAPI) Ancient(kind string, number uint64) ([]byte, error) {
fmt.Println("mock server called", "method=Ancient")
// fmt.Println("mock server called", "method=Ancient")
f.mu.Lock()
defer f.mu.Unlock()
v, ok := f.store[f.storeKey(kind, number)]
Expand All @@ -79,12 +79,12 @@ func (f *MemFreezerRemoteServerAPI) Ancient(kind string, number uint64) ([]byte,
}

func (f *MemFreezerRemoteServerAPI) Ancients() (uint64, error) {
fmt.Println("mock server called", "method=Ancients")
// fmt.Println("mock server called", "method=Ancients")
return f.count, nil
}

func (f *MemFreezerRemoteServerAPI) AncientSize(kind string) (uint64, error) {
fmt.Println("mock server called", "method=AncientSize")
// fmt.Println("mock server called", "method=AncientSize")
sum := uint64(0)
for k, v := range f.store {
if strings.HasPrefix(k, kind) {
Expand All @@ -95,7 +95,7 @@ func (f *MemFreezerRemoteServerAPI) AncientSize(kind string) (uint64, error) {
}

func (f *MemFreezerRemoteServerAPI) AppendAncient(number uint64, hash, header, body, receipt, td []byte) error {
fmt.Println("mock server called", "method=AppendAncient", "number=", number, "header", fmt.Sprintf("%x", header))
// fmt.Println("mock server called", "method=AppendAncient", "number=", number, "header", fmt.Sprintf("%x", header))
fieldNames := []string{
freezerRemoteHashTable,
freezerRemoteHeaderTable,
Expand All @@ -118,7 +118,7 @@ func (f *MemFreezerRemoteServerAPI) AppendAncient(number uint64, hash, header, b
}

func (f *MemFreezerRemoteServerAPI) TruncateAncients(n uint64) error {
fmt.Println("mock server called", "method=TruncateAncients")
// fmt.Println("mock server called", "method=TruncateAncients")
f.count = n
f.mu.Lock()
defer f.mu.Unlock()
Expand All @@ -136,11 +136,11 @@ func (f *MemFreezerRemoteServerAPI) TruncateAncients(n uint64) error {
}

func (f *MemFreezerRemoteServerAPI) Sync() error {
fmt.Println("mock server called", "method=Sync")
// fmt.Println("mock server called", "method=Sync")
return nil
}

func (f *MemFreezerRemoteServerAPI) Close() error {
fmt.Println("mock server called", "method=Close")
// fmt.Println("mock server called", "method=Close")
return nil
}
18 changes: 10 additions & 8 deletions cmd/evm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Command line params that has to be supported are
--trace Output full trace logs to files <txhash>.jsonl
--trace.nomemory Disable full memory dump in traces
--trace.nostack Disable stack output in traces
--trace.noreturndata Disable return data output in traces
--output.basedir value Specifies where output files are placed. Will be created if it does not exist. (default: ".")
--output.alloc alloc Determines where to put the alloc of the post-state.
`stdout` - into the stdout output
`stderr` - into the stderr output
Expand Down Expand Up @@ -232,13 +234,13 @@ Example where blockhashes are provided:
./evm t8n --input.alloc=./testdata/3/alloc.json --input.txs=./testdata/3/txs.json --input.env=./testdata/3/env.json --trace
```
```
cat trace-0.jsonl | grep BLOCKHASH -C2
cat trace-0-0x72fadbef39cd251a437eea619cfeda752271a5faaaa2147df012e112159ffb81.jsonl | grep BLOCKHASH -C2
```
```
{"pc":0,"op":96,"gas":"0x5f58ef8","gasCost":"0x3","memory":"0x","memSize":0,"stack":[],"returnStack":[],"depth":1,"refund":0,"opName":"PUSH1","error":""}
{"pc":2,"op":64,"gas":"0x5f58ef5","gasCost":"0x14","memory":"0x","memSize":0,"stack":["0x1"],"returnStack":[],"depth":1,"refund":0,"opName":"BLOCKHASH","error":""}
{"pc":3,"op":0,"gas":"0x5f58ee1","gasCost":"0x0","memory":"0x","memSize":0,"stack":["0xdac58aa524e50956d0c0bae7f3f8bb9d35381365d07804dd5b48a5a297c06af4"],"returnStack":[],"depth":1,"refund":0,"opName":"STOP","error":""}
{"output":"","gasUsed":"0x17","time":155861}
{"pc":0,"op":96,"gas":"0x5f58ef8","gasCost":"0x3","memory":"0x","memSize":0,"stack":[],"returnStack":[],"returnData":null,"depth":1,"refund":0,"opName":"PUSH1","error":""}
{"pc":2,"op":64,"gas":"0x5f58ef5","gasCost":"0x14","memory":"0x","memSize":0,"stack":["0x1"],"returnStack":[],"returnData":null,"depth":1,"refund":0,"opName":"BLOCKHASH","error":""}
{"pc":3,"op":0,"gas":"0x5f58ee1","gasCost":"0x0","memory":"0x","memSize":0,"stack":["0xdac58aa524e50956d0c0bae7f3f8bb9d35381365d07804dd5b48a5a297c06af4"],"returnStack":[],"returnData":null,"depth":1,"refund":0,"opName":"STOP","error":""}
{"output":"","gasUsed":"0x17","time":112885}
```

In this example, the caller has not provided the required blockhash:
Expand All @@ -254,9 +256,9 @@ Error code: 4
Another thing that can be done, is to chain invocations:
```
./evm t8n --input.alloc=./testdata/1/alloc.json --input.txs=./testdata/1/txs.json --input.env=./testdata/1/env.json --output.alloc=stdout | ./evm t8n --input.alloc=stdin --input.env=./testdata/1/env.json --input.txs=./testdata/1/txs.json
INFO [06-29|11:52:04.934] rejected tx index=1 hash="0557ba…18d673" from=0x8A8eAFb1cf62BfBeb1741769DAE1a9dd47996192 error="nonce too low"
INFO [06-29|11:52:04.936] rejected tx index=0 hash="0557ba…18d673" from=0x8A8eAFb1cf62BfBeb1741769DAE1a9dd47996192 error="nonce too low"
INFO [06-29|11:52:04.936] rejected tx index=1 hash="0557ba…18d673" from=0x8A8eAFb1cf62BfBeb1741769DAE1a9dd47996192 error="nonce too low"
INFO [08-03|15:25:15.168] rejected tx index=1 hash="0557ba…18d673" from=0x8A8eAFb1cf62BfBeb1741769DAE1a9dd47996192 error="nonce too low"
INFO [08-03|15:25:15.169] rejected tx index=0 hash="0557ba…18d673" from=0x8A8eAFb1cf62BfBeb1741769DAE1a9dd47996192 error="nonce too low"
INFO [08-03|15:25:15.169] rejected tx index=1 hash="0557ba…18d673" from=0x8A8eAFb1cf62BfBeb1741769DAE1a9dd47996192 error="nonce too low"

```
What happened here, is that we first applied two identical transactions, so the second one was rejected.
Expand Down
9 changes: 5 additions & 4 deletions cmd/evm/internal/t8ntool/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import (
"github.com/ethereum/go-ethereum/params/types/ctypes"
"github.com/ethereum/go-ethereum/params/types/genesisT"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/trie"
"golang.org/x/crypto/sha3"
)

Expand Down Expand Up @@ -82,7 +83,7 @@ type stEnvMarshaling struct {
// Apply applies a set of transactions to a pre-state
func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig ctypes.ChainConfigurator,
txs types.Transactions, miningReward int64,
getTracerFn func(txIndex int) (tracer vm.Tracer, err error)) (*state.StateDB, *ExecutionResult, error) {
getTracerFn func(txIndex int, txHash common.Hash) (tracer vm.Tracer, err error)) (*state.StateDB, *ExecutionResult, error) {

// Capture errors for BLOCKHASH operation, if we haven't been supplied the
// required blockhashes
Expand Down Expand Up @@ -137,7 +138,7 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig ctypes.ChainConfigura
rejectedTxs = append(rejectedTxs, i)
continue
}
tracer, err := getTracerFn(txIndex)
tracer, err := getTracerFn(txIndex, tx.Hash())
if err != nil {
return nil, nil, err
}
Expand Down Expand Up @@ -223,8 +224,8 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig ctypes.ChainConfigura
}
execRs := &ExecutionResult{
StateRoot: root,
TxRoot: types.DeriveSha(includedTxs),
ReceiptRoot: types.DeriveSha(receipts),
TxRoot: types.DeriveSha(includedTxs, new(trie.Trie)),
ReceiptRoot: types.DeriveSha(receipts, new(trie.Trie)),
Bloom: types.CreateBloom(receipts),
LogsHash: rlpHash(statedb.Logs()),
Receipts: receipts,
Expand Down
5 changes: 5 additions & 0 deletions cmd/evm/internal/t8ntool/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ var (
Name: "trace.noreturndata",
Usage: "Disable return data output in traces",
}
OutputBasedir = cli.StringFlag{
Name: "output.basedir",
Usage: "Specifies where output files are placed. Will be created if it does not exist.",
Value: "",
}
OutputAllocFlag = cli.StringFlag{
Name: "output.alloc",
Usage: "Determines where to put the `alloc` of the post-state.\n" +
Expand Down
Loading