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

Upstream sync - v2.46.0 #84

Merged
merged 55 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
8f8da14
Optimized THE CAPLIN a lil bit (#7687)
Giulio2002 Jun 8, 2023
7671f41
Remove excessive logging in bor (#7690)
AlexeyAkhunov Jun 8, 2023
afa4f53
e3: use deserializeV3 for history (#7691)
AskAlexSharov Jun 9, 2023
2c39570
e3: to produce stateChanges stream (#7692)
AskAlexSharov Jun 9, 2023
ddfe93b
e3: enable ci (#7694)
AskAlexSharov Jun 9, 2023
1546a79
lru lib version up (#7695)
AskAlexSharov Jun 9, 2023
06af87d
EIP-4844: Increase Blob Throughput (#7688)
yperbasis Jun 9, 2023
614769f
Prepare regression testings for kube (#7697)
Giulio2002 Jun 9, 2023
62b2375
7667 cli params vhost (#7669)
mh0lt Jun 9, 2023
2ea9eb5
[bor] Desambiguate the term checkpoint (#7698)
AlexeyAkhunov Jun 9, 2023
1e575ea
rpc service and stageloop logger updates (#7696)
mh0lt Jun 10, 2023
8841055
Forgot to configure flags (#7701)
Giulio2002 Jun 10, 2023
b7469d2
mdbx: tx.GetOne - avoid interface casting (#7703)
AskAlexSharov Jun 11, 2023
3b89ed8
e3: erigon_getBalanceChanges (#7704)
AskAlexSharov Jun 11, 2023
4766cd8
e2: avoid do RestoreCodeHash twice (#7706)
AskAlexSharov Jun 11, 2023
f9acbff
eth_sendRawTransaction: remove logging, because we have `--txpool.tra…
mh0lt Jun 11, 2023
afd8ea9
e3: move domains to tables.go (#7707)
AskAlexSharov Jun 11, 2023
eac9ead
[Caplin] added deneb into converting payload to grpc (#7708)
enriavil1 Jun 11, 2023
e380ee4
[Caplin] added configurations for beacon api (#7699)
enriavil1 Jun 11, 2023
4d35e77
[caplin] abstract transition (#7661)
elee1766 Jun 11, 2023
6300661
Added concurrent bls (#7709)
Giulio2002 Jun 11, 2023
c21d77a
Fix: typos (#7710)
omahs Jun 12, 2023
6c8b070
e3: add lost logger (#7711)
AskAlexSharov Jun 12, 2023
31be6f6
StagedSync: fix canRunCycleInOneTransaction logic (#7712)
AskAlexSharov Jun 12, 2023
5c0c9fd
consensus/bor: optimise get span, fixes in header validation (#7689)
manav2401 Jun 12, 2023
e99269e
added --log.dir.prefix flag (#7714)
mholt-dv Jun 12, 2023
a45f6bd
Updated indoreBlock (#7716)
0xKrishna Jun 12, 2023
cefbf18
Fixed grpcing of block (#7717)
Giulio2002 Jun 12, 2023
ae1b193
use 1 constant in tests to configure initialCycle variable (#7720)
AskAlexSharov Jun 13, 2023
6121f63
kv_mdbx: don't use defer for wg.Add(). not necessary and sometime it …
AskAlexSharov Jun 13, 2023
78d9e00
sys lib version up (#7722)
AskAlexSharov Jun 13, 2023
5ff8246
e4: release some tests (#7729)
AskAlexSharov Jun 14, 2023
f4d8bd8
Crypto lib up (#7730)
AskAlexSharov Jun 14, 2023
226763b
fix test (#7731)
AskAlexSharov Jun 14, 2023
8b312d5
eip-4844: desszing blobtx: initial commit (#7715)
racytech Jun 14, 2023
1b14785
ws unfreeze (#7724)
AskAlexSharov Jun 14, 2023
862d7b6
Move ChainID from CommonTx to DynamicFeeTransaction (#7732)
yperbasis Jun 14, 2023
2dd7df9
Fix lint issues (#7733)
yperbasis Jun 14, 2023
4a2a199
Fix integration tests after ChainID move (#7734)
yperbasis Jun 14, 2023
4f812ef
Better version of libp2p where losing peers bug fixed (#7726)
Giulio2002 Jun 14, 2023
f110102
Devnet scenarios (#7723)
mh0lt Jun 14, 2023
a588673
Use BitLenToByteLen from erigon-lib (#7735)
yperbasis Jun 14, 2023
e502377
Enforce blockReader interface (#7737)
AskAlexSharov Jun 15, 2023
252e57b
Base BlobTx on DynamicFeeTransaction (#7736)
yperbasis Jun 15, 2023
d3c3be9
e2: optimize tests speed (#7738)
AskAlexSharov Jun 15, 2023
a63b24b
up NAT STUN lib (#7750)
AskAlexSharov Jun 17, 2023
94d592d
disable ci tests on another servers (#7751)
AskAlexSharov Jun 17, 2023
eae2d9a
Disable ci tests on another servers: step 2 (#7752)
AskAlexSharov Jun 17, 2023
6755f7e
save
AskAlexSharov Jun 19, 2023
d98f706
Merge tag 'v2.46.0' into upstream-v2.46.0
ImTei Jul 19, 2023
524abf5
Update erigon-lib version
ImTei Jul 19, 2023
d02c00a
Add missing lines
ImTei Jul 19, 2023
e9838d4
Fix build errors
ImTei Jul 19, 2023
8e4e432
Add ChainID initialization
ImTei Jul 20, 2023
4c52e8a
Update erigon-lib version
ImTei Jul 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ jobs:
# check with root permissions, should be cached from previous build
- name: sudo make docker
run: sudo DOCKER_TAG=testinprod/op-erigon:ci-$GITHUB_SHA DOCKER_UID=$(id -u) DOCKER_GID=$(id -g) make docker

automated-tests:
runs-on:
ubuntu-20.04
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
steps:
- uses: actions/checkout@v3

- name: run automated testing
run: BUILD_ERIGON=1 ./tests/automated-testing/run.sh
# automated-tests:
# runs-on:
# ubuntu-20.04
# if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
# steps:
# - uses: actions/checkout@v3
#
# - name: run automated testing
# run: BUILD_ERIGON=1 ./tests/automated-testing/run.sh
6 changes: 3 additions & 3 deletions DEV_CHAIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ make erigon
```


## 2. Build RPC deamon
## 2. Build RPC daemon
On the same terminal folder you can build the RPC daemon.

```bash
Expand Down Expand Up @@ -43,7 +43,7 @@ Now save the enode information generated in the logs, we will use this in a minu
enode://d30d079163d7b69fcb261c0538c0c3faba4fb4429652970e60fa25deb02a789b4811e98b468726ba0be63b9dc925a019f433177eb6b45c23bb78892f786d8f7a@127.0.0.1:53171
```

## 4. Start RPC deamon
## 4. Start RPC daemon

Open terminal 2 and navigate to erigon/build/bin folder. Here type the following command

Expand All @@ -68,7 +68,7 @@ Open terminal 3 and navigate to erigon/build/bin folder. Paste in the following
--nodiscover
```

To check if the nodes are connected, you can go to the log of both the nodes and look for the line
To check if the nodes are connected, you can go to the log of both nodes and look for the line

``` [p2p] GoodPeers eth66=1 ```

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ COPY --from=builder /app/build/bin/state /usr/local/bin/state
COPY --from=builder /app/build/bin/txpool /usr/local/bin/txpool
COPY --from=builder /app/build/bin/verkle /usr/local/bin/verkle
COPY --from=builder /app/build/bin/caplin-phase1 /usr/local/bin/caplin-phase1

COPY --from=builder /app/build/bin/caplin-regression /usr/local/bin/caplin-regression


EXPOSE 8545 \
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ COPY --from=builder /app/build/bin/state /usr/local/bin/state
COPY --from=builder /app/build/bin/txpool /usr/local/bin/txpool
COPY --from=builder /app/build/bin/verkle /usr/local/bin/verkle
COPY --from=builder /app/build/bin/caplin-phase1 /usr/local/bin/caplin-phase1
COPY --from=builder /app/build/bin/caplin-regression /usr/local/bin/caplin-regression

EXPOSE 8545 \
8551 \
Expand Down
19 changes: 9 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ CGO_CFLAGS += -DMDBX_FORCE_ASSERTIONS=0 # Enable MDBX's asserts by default in 'd
CGO_CFLAGS += -O
CGO_CFLAGS += -D__BLST_PORTABLE__
CGO_CFLAGS += -Wno-error=strict-prototypes # for Clang15, remove it when can https://github.com/ledgerwatch/erigon/issues/6113#issuecomment-1359526277
CGO_CFLAGS := CGO_CFLAGS="$(CGO_CFLAGS)"
DBG_CGO_CFLAGS += -DMDBX_DEBUG=1

# about netgo see: https://github.com/golang/go/issues/30310#issuecomment-471669125 and https://github.com/golang/go/issues/57757
BUILD_TAGS = nosqlite,noboltdb
Expand All @@ -35,9 +33,9 @@ PACKAGE = github.com/testinprod-io/op-erigon
GO_FLAGS += -trimpath -tags $(BUILD_TAGS) -buildvcs=false
GO_FLAGS += -ldflags "-X ${PACKAGE}/params.GitCommit=${GIT_COMMIT} -X ${PACKAGE}/params.GitBranch=${GIT_BRANCH} -X ${PACKAGE}/params.GitTag=${GIT_TAG}"

GOBUILD = $(CGO_CFLAGS) $(GO) build $(GO_FLAGS)
GO_DBG_BUILD = $(GO) build $(GO_FLAGS) -tags $(BUILD_TAGS),debug -gcflags=all="-N -l" # see delve docs
GOTEST = $(CGO_CFLAGS) GODEBUG=cgocheck=0 $(GO) test $(GO_FLAGS) ./... -p 2
GOBUILD = CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GO_FLAGS)
GO_DBG_BUILD = CGO_CFLAGS="$(CGO_CFLAGS) -DMDBX_DEBUG=1" $(GO) build -tags $(BUILD_TAGS),debug -gcflags=all="-N -l" # see delve docs
GOTEST = CGO_CFLAGS="$(CGO_CFLAGS)" GODEBUG=cgocheck=0 $(GO) test $(GO_FLAGS) ./... -p 2

default: all

Expand Down Expand Up @@ -87,7 +85,7 @@ setup_xdg_data_home:

## docker-compose: validate build args, setup xdg data home, and run docker-compose up
docker-compose: validate_docker_build_args setup_xdg_data_home
docker-compose up
docker compose up

## dbg debug build allows see C stack traces, run it with GOTRACEBACK=crash. You don't need debug build for C pit for profiling. To profile C code use SETCGOTRCKEBACK=1
dbg:
Expand Down Expand Up @@ -152,14 +150,14 @@ test:
$(GOTEST) --timeout 100s

test3:
$(GOTEST) --timeout 100s -tags $(BUILD_TAGS),erigon3
$(GOTEST) --timeout 100s -tags $(BUILD_TAGS),e3

## test-integration: run integration tests with a 30m timeout
test-integration:
$(GOTEST) --timeout 30m -tags $(BUILD_TAGS),integration

test3-integration:
$(GOTEST) --timeout 30m -tags $(BUILD_TAGS),integration,erigon3
$(GOTEST) --timeout 30m -tags $(BUILD_TAGS),integration,e3

## lint: run golangci-lint with .golangci.yml config file
lint:
Expand Down Expand Up @@ -192,6 +190,7 @@ devtools:
$(GOBUILD) -o $(GOBIN)/codecgen github.com/ugorji/go/codec/codecgen
PATH=$(GOBIN):$(PATH) go generate ./common
# PATH=$(GOBIN):$(PATH) go generate ./core/types
PATH=$(GOBIN):$(PATH) cd ./cmd/rpcdaemon/graphql && go run github.com/99designs/gqlgen .
PATH=$(GOBIN):$(PATH) go generate ./consensus/aura/...
#PATH=$(GOBIN):$(PATH) go generate ./eth/ethconfig/...
@type "npm" 2> /dev/null || echo 'Please install node.js and npm'
Expand All @@ -205,7 +204,7 @@ bindings:

## prometheus: run prometheus and grafana with docker-compose
prometheus:
docker-compose up prometheus grafana
docker compose up prometheus grafana

## escape: run escape path={path} to check for memory leaks e.g. run escape path=cmd/erigon
escape:
Expand All @@ -221,7 +220,7 @@ git-submodules:
@git submodule update --quiet --init --recursive --force || true

PACKAGE_NAME := github.com/testinprod-io/op-erigon
GOLANG_CROSS_VERSION ?= v1.20.4
GOLANG_CROSS_VERSION ?= v1.20.5

.PHONY: release-dry-run
release-dry-run: git-submodules
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ _Flags:_
- `log.json`
- `log.console.json` (alias for `log.json`)
- `log.dir.path`
- `log.dir.prefix`
- `log.dir.verbosity`
- `log.dir.json`

Expand All @@ -304,7 +305,7 @@ int value specifying the highest output log level:
LvlTrace = 5
```

To set an output dir for logs to be collected on disk, please set `--log.dir.path`. The flag `--log.dir.verbosity` is
To set an output dir for logs to be collected on disk, please set `--log.dir.path` If you want to change the filename prodiced from `erigon` you should also set the `--log.dir.prefix` flag to an alternate name. The flag `--log.dir.verbosity` is
also available to control the verbosity of this logging, with the same int value as above, or the string value e.g. '
debug' or 'info'. Default verbosity is 'debug' (4), for disk logging.

Expand Down Expand Up @@ -451,7 +452,7 @@ http.api : ["eth","debug","net"]
Erigon can be used as an Execution Layer (EL) for Consensus Layer clients (CL). Default configuration is OK.

If your CL client is on a different device, add `--authrpc.addr 0.0.0.0` ([Engine API] listens on localhost by default)
as well as `--authrpc.vhosts <CL host>`.
as well as `--authrpc.vhosts <CL host>` where `<CL host>` is your source host or `any`.

[Engine API]: https://github.com/ethereum/execution-apis/blob/main/src/engine/specification.md

Expand Down Expand Up @@ -662,7 +663,7 @@ Windows support for docker-compose is not ready yet. Please help us with .ps1 po

### Grafana dashboard

`docker-compose up prometheus grafana`, [detailed docs](./cmd/prometheus/Readme.md).
`docker compose up prometheus grafana`, [detailed docs](./cmd/prometheus/Readme.md).

###

Expand Down
6 changes: 3 additions & 3 deletions RELEASE_INSTRUCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ If there are any transactions where code bitmap was useful, warning messages lik
````
WARN [08-01|14:54:27.778] Code Bitmap used for detecting invalid jump tx=0x86e55d1818b5355424975de9633a57c40789ca08552297b726333a9433949c92 block number=6426298
````
In such cases (unless there are too many instances), all block numbers need to be excluded in the `SkipAnalysis` function, and comment to it. The constant `MainnetNotCheckedFrom` needs to be update to the first block number we have not checked. The value can be taken from the output of the `checkChangeSets`
In such cases (unless there are too many instances), all block numbers need to be excluded in the `SkipAnalysis` function, and comment to it. The constant `MainnetNotCheckedFrom` needs to be updated to the first block number we have not checked. The value can be taken from the output of the `checkChangeSets`
utility before it exits, like this:
````
INFO [08-01|15:36:04.282] Checked blocks=10573804 next time specify --block=10573804 duration=36m54.789025062s
````

## Update DB Schema version if required

In the file `common/dbutils/bucket.go` there is variable `DBSchemaVersion` that needs to be update if there are any changes in the database schema, leading to data migrations.
In the file `common/dbutils/bucket.go` there is variable `DBSchemaVersion` that needs to be updated if there are any changes in the database schema, leading to data migrations.
In most cases, it is enough to bump minor version.

## Update remote KV version if required

In the file `ethdb/remote/remotedbserver/server.go` there is variable `KvServiceAPIVersion` that needs to be update if there are any changes in the remote KV interface, or
In the file `ethdb/remote/remotedbserver/server.go` there is variable `KvServiceAPIVersion` that needs to be updated if there are any changes in the remote KV interface, or
database schema, leading to data migrations.
In most cases, it is enough to bump minor version. It is best to change both DB schema version and remove KV version together.
14 changes: 7 additions & 7 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ INFO [03-24|13:41:20.391] Commit cycle in=2.16378229

Here we see that the sync cycle went through all the stages for a single block `12101885`.

After that, it is useful to wait more until an Unwind is encoutered and check that Erigon handled it without errors.
After that, it is useful to wait more until an Unwind is encountered and check that Erigon handled it without errors.
Usually, errors occur at the stage
`[7/14 IntermediateHashes]` and manifest in the wrong trie root. Here is an example of processing an unwind without
errors (look for the word "Unwind" in the log):
Expand Down Expand Up @@ -148,7 +148,7 @@ ERROR[08-01|14:30:38.299] Demoting invalidated transaction hash="859191
ERROR[08-01|14:30:38.299] Demoting invalidated transaction hash="25ee67…e73153"
```

this is also likely to disappered after the introduction of new downloader/sentry design
this is also likely to disappear after the introduction of new downloader/sentry design

### Assessing relative performance of sync

Expand All @@ -172,7 +172,7 @@ INFO [03-24|13:41:20.391] Commit cycle in=2.16378229

The line above shows how long was commit cycle. We saw in the past that after some changes the commit time dramatically
increases, and these
regressions need to be investigaged. We expect "commit cycle" on Linux with NVMe drive to usually take less than a
regressions need to be investigated. We expect "commit cycle" on Linux with NVMe drive to usually take less than a
second. For other operating
systems and devices the typical time may vary, but it should significantly increase from one release to another.
Perhaps we need to log some extra information in the log to make it easier for the tester to filter out the log
Expand Down Expand Up @@ -274,19 +274,19 @@ requests for certain RPC methods, using hits provided by options `--blockFrom` a
useful ones are:

1. `bench8` tests `eth_getLogs` RPC method (compatibility with go-ethereum and OpenEthereum)
2. `bench11` tests `trace_call` RPC method (compatiblity with OpenEthereum tracing)
2. `bench11` tests `trace_call` RPC method (compatibility with OpenEthereum tracing)
3. `bench12` tests `debug_traceCall` RPC method (compatibility with go-ethereum tracing)
4. `bench13` tests `trace_callMany` RPC method (compability with OpenEthereum tracing)
4. `bench13` tests `trace_callMany` RPC method (compatibility with OpenEthereum tracing)

Options `--erigonUrl` and `--gethUrl` specify HTTP endpoints that needs to be tested against each other. Despite its
Options `--erigonUrl` and `--gethUrl` specify HTTP endpoints that need to be tested against each other. Despite its
name, `--gethUrl` option does not have to
point to go-ethereum node, it can point to anything that it supposed to be "correct" for the purpose of the test (
go-ethereum node, OpenEthereum node,
or Erigon RPC daemon & Erigon node built from the previous release code).

Option `--needCompare` triggers the comparison of JSON RPC responses. If omitted, requests to `--gethUrl` are not done.
When comparison is turned on,
the utility stops at the first occurrence of mistmatch.
the utility stops at the first occurrence of mismatch.

## RPC test recording and replay

Expand Down
36 changes: 13 additions & 23 deletions accounts/abi/bind/backends/simulated.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,16 @@ import (
"time"

"github.com/holiman/uint256"
ethereum "github.com/ledgerwatch/erigon"
"github.com/ledgerwatch/erigon-lib/chain"
libcommon "github.com/ledgerwatch/erigon-lib/common"
"github.com/ledgerwatch/erigon-lib/common/hexutility"
"github.com/ledgerwatch/erigon-lib/kv"
state2 "github.com/ledgerwatch/erigon-lib/state"
types2 "github.com/ledgerwatch/erigon-lib/types"
"github.com/ledgerwatch/erigon/turbo/services"
"github.com/ledgerwatch/log/v3"

ethereum "github.com/ledgerwatch/erigon"
"github.com/ledgerwatch/erigon/accounts/abi"
"github.com/ledgerwatch/erigon/accounts/abi/bind"
"github.com/ledgerwatch/erigon/common/math"
Expand All @@ -44,12 +47,9 @@ import (
"github.com/ledgerwatch/erigon/core/state"
"github.com/ledgerwatch/erigon/core/types"
"github.com/ledgerwatch/erigon/core/vm"
"github.com/ledgerwatch/erigon/eth/ethconfig"
"github.com/ledgerwatch/erigon/event"
"github.com/ledgerwatch/erigon/params"
"github.com/ledgerwatch/erigon/turbo/services"
"github.com/ledgerwatch/erigon/turbo/stages"
"github.com/ledgerwatch/log/v3"
)

// This nil assignment ensures at compile time that SimulatedBackend implements bind.ContractBackend.
Expand Down Expand Up @@ -93,14 +93,13 @@ func NewSimulatedBackendWithConfig(alloc types.GenesisAlloc, config *chain.Confi
genesis := types.Genesis{Config: config, GasLimit: gasLimit, Alloc: alloc}
engine := ethash.NewFaker()
m := stages.MockWithGenesisEngine(nil, &genesis, engine, false)
br, _ := m.NewBlocksIO()
backend := &SimulatedBackend{
m: m,
prependBlock: m.Genesis,
getHeader: func(hash libcommon.Hash, number uint64) (h *types.Header) {
var err error
if err = m.DB.View(context.Background(), func(tx kv.Tx) error {
h, err = br.Header(context.Background(), tx, hash, number)
h, err = m.BlockReader.Header(context.Background(), tx, hash, number)
return nil
}); err != nil {
panic(err)
Expand All @@ -125,14 +124,11 @@ func NewTestSimulatedBackendWithConfig(t *testing.T, alloc types.GenesisAlloc, c
t.Cleanup(b.Close)
return b
}
func (b *SimulatedBackend) DB() kv.RwDB { return b.m.DB }
func (b *SimulatedBackend) Agg() *state2.AggregatorV3 { return b.m.HistoryV3Components() }
func (b *SimulatedBackend) HistoryV3() bool { return b.m.HistoryV3 }
func (b *SimulatedBackend) Engine() consensus.Engine { return b.m.Engine }
func (b *SimulatedBackend) BlockReader() services.FullBlockReader {
br, _ := b.m.NewBlocksIO()
return br
}
func (b *SimulatedBackend) DB() kv.RwDB { return b.m.DB }
func (b *SimulatedBackend) Agg() *state2.AggregatorV3 { return b.m.HistoryV3Components() }
func (b *SimulatedBackend) HistoryV3() bool { return b.m.HistoryV3 }
func (b *SimulatedBackend) Engine() consensus.Engine { return b.m.Engine }
func (b *SimulatedBackend) BlockReader() services.FullBlockReader { return b.m.BlockReader }

// Close terminates the underlying blockchain's update loop.
func (b *SimulatedBackend) Close() {
Expand All @@ -151,7 +147,7 @@ func (b *SimulatedBackend) Commit() {
Headers: []*types.Header{b.pendingHeader},
Blocks: []*types.Block{b.pendingBlock},
TopBlock: b.pendingBlock,
}); err != nil {
}, nil); err != nil {
panic(err)
}
//nolint:prealloc
Expand Down Expand Up @@ -186,13 +182,7 @@ func (b *SimulatedBackend) emptyPendingBlock() {
panic(err)
}
b.pendingReaderTx = tx

if ethconfig.EnableHistoryV4InTest {
panic("implement me")
//b.pendingReader = state.NewReaderV4(b.pendingReaderTx.(kv.TemporalTx))
} else {
b.pendingReader = state.NewPlainStateReader(b.pendingReaderTx)
}
b.pendingReader = b.m.NewStateReader(b.pendingReaderTx)
b.pendingState = state.New(b.pendingReader)
}

Expand Down Expand Up @@ -747,7 +737,7 @@ func (b *SimulatedBackend) SendTransaction(ctx context.Context, tx types.Transac
defer b.mu.Unlock()

// Check transaction validity.
signer := types.MakeSigner(b.m.ChainConfig, b.pendingBlock.NumberU64())
signer := types.MakeSigner(b.m.ChainConfig, b.pendingBlock.NumberU64(), b.pendingBlock.Time())
sender, senderErr := tx.Sender(*signer)
if senderErr != nil {
return fmt.Errorf("invalid transaction: %w", senderErr)
Expand Down
Loading
Loading