Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

fix(mempool): Prevent runTx failures #1425

Merged
merged 57 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
b8ff23d
checktx
itsdevbear Jan 14, 2024
d20570d
x
itsdevbear Jan 14, 2024
b697a60
config
itsdevbear Jan 14, 2024
838fd0c
added
itsdevbear Jan 14, 2024
d50e582
bing bong
itsdevbear Jan 14, 2024
7a2ea33
rc5
itsdevbear Jan 14, 2024
e8f31ad
default gas price
itsdevbear Jan 14, 2024
a8bc57d
removeyeet
itsdevbear Jan 14, 2024
1cb455c
bing bong
itsdevbear Jan 14, 2024
a77f174
bing bong
itsdevbear Jan 14, 2024
69329b1
preparecheckstate
itsdevbear Jan 14, 2024
bc65f34
bing bong
itsdevbear Jan 14, 2024
5262965
fix
itsdevbear Jan 14, 2024
9e56706
removing
itsdevbear Jan 14, 2024
cf9c1d5
state mgmt pt 1
calbera Jan 15, 2024
1fdca16
state mgmt pt 2
calbera Jan 16, 2024
ace17c4
cleanup latest query context
calbera Jan 16, 2024
127a25f
eviction from comet mempool
calbera Jan 16, 2024
0e03eff
bump sdk
itsdevbear Jan 16, 2024
324e24a
deletion from timeInserted map
calbera Jan 16, 2024
6bd959e
fire chain head
calbera Jan 16, 2024
0c0b3d0
comet remote cache
calbera Jan 16, 2024
f686f83
minor
calbera Jan 16, 2024
dc6302c
default removal to false
calbera Jan 16, 2024
c1a9e54
rw lock on block building
calbera Jan 16, 2024
51e7c77
unfuck
itsdevbear Jan 16, 2024
40303ec
test1
itsdevbear Jan 16, 2024
d5d59b7
hack7
itsdevbear Jan 16, 2024
49eb151
bet
itsdevbear Jan 16, 2024
a76c9b5
bet
itsdevbear Jan 16, 2024
7c420b0
semver
itsdevbear Jan 16, 2024
7c758a1
tag
itsdevbear Jan 16, 2024
deff092
experimental
itsdevbear Jan 16, 2024
0292437
bet
itsdevbear Jan 16, 2024
af457a4
Merge branch 'main' into 222
itsdevbear Jan 17, 2024
c82042a
bet
itsdevbear Jan 17, 2024
92cadd1
merge
itsdevbear Jan 17, 2024
a8222c0
remove pebble from geth
itsdevbear Jan 17, 2024
66e3f65
merge
itsdevbear Jan 17, 2024
ba7c9dc
bet
itsdevbear Jan 17, 2024
f2c30d6
remove unused flag
itsdevbear Jan 17, 2024
e0e30d7
bet
itsdevbear Jan 17, 2024
9f08107
lint
itsdevbear Jan 17, 2024
bd216d5
bet
itsdevbear Jan 17, 2024
3fc2ac1
focus
itsdevbear Jan 17, 2024
e50a5e9
ooga booga
itsdevbear Jan 17, 2024
c2870a8
ci
itsdevbear Jan 17, 2024
2c752d7
not gonna break on ci
itsdevbear Jan 17, 2024
80533a6
fix
itsdevbear Jan 17, 2024
1cc85b8
scam
itsdevbear Jan 17, 2024
8c96574
format
itsdevbear Jan 17, 2024
8a521ab
bet
itsdevbear Jan 17, 2024
9b8fc41
attemp to fix
itsdevbear Jan 17, 2024
a4363aa
hood
itsdevbear Jan 17, 2024
9d39963
fix unit tests
itsdevbear Jan 17, 2024
fce00ab
bet
itsdevbear Jan 17, 2024
b75cafa
bet
itsdevbear Jan 17, 2024
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

Large diffs are not rendered by default.

217 changes: 46 additions & 171 deletions cosmos/api/polaris/evm/v1alpha1/tx.pulsar.go

Large diffs are not rendered by default.

27 changes: 14 additions & 13 deletions cosmos/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ import (
"github.com/berachain/polaris/cosmos/config/flags"
"github.com/berachain/polaris/eth"
"github.com/berachain/polaris/eth/accounts"
"github.com/berachain/polaris/eth/node"
"github.com/berachain/polaris/eth/polar"

sdkflags "github.com/cosmos/cosmos-sdk/client/flags"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
sdk "github.com/cosmos/cosmos-sdk/types"
version "github.com/cosmos/cosmos-sdk/version"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The search results indicate that the DefaultConfig function is indeed used in various places within the codebase. Specifically, it is referenced in files such as eth/node/config.go, eth/polar/config.go, cosmos/precompile/governance/testutil.go, and several times within cosmos/config/default.go.

Given this information, it appears that the removal of the DefaultConfig function from cosmos/config/config.go could potentially impact other parts of the codebase where this function is expected to exist.

Analysis chain

The removal of the DefaultConfig function is not mentioned in the summary. Please confirm that this function is not used elsewhere in the codebase.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Search for usage of DefaultConfig in the codebase.
rg --type go 'DefaultConfig\(\)'

Length of output: 445


"github.com/ethereum/go-ethereum/common/hexutil"
)

type Config = eth.Config
Expand All @@ -49,17 +50,6 @@ func SetupCosmosConfig() {
config.Seal()
}

// DefaultConfig returns the default configuration for a polaris chain.
func DefaultConfig() *Config {
nodeCfg := node.DefaultConfig()
nodeCfg.DataDir = ""
nodeCfg.KeyStoreDir = ""
return &Config{
Polar: *polar.DefaultConfig(),
Node: *nodeCfg,
}
}

// MustReadConfigFromAppOpts reads the configuration options from the given
// application options. Panics if the configuration cannot be read.
func MustReadConfigFromAppOpts(opts servertypes.AppOptions) *Config {
Expand Down Expand Up @@ -105,6 +95,17 @@ func readConfigFromAppOptsParser(parser AppOptionsParser) (*Config, error) {
parser.GetHexutilBytes(flags.MinerExtraData); err != nil {
return nil, err
}

if len(conf.Polar.Miner.ExtraData) == 0 {
commit := version.NewInfo().GitCommit
if len(commit) != 40 { //nolint:gomnd // its okay.
return nil, err
}
conf.Polar.Miner.ExtraData = hexutil.Bytes(
commit[32:40],
)
}

if conf.Polar.Miner.GasFloor, err =
parser.GetUint64(flags.MinerGasFloor); err != nil {
return nil, err
Expand Down
72 changes: 72 additions & 0 deletions cosmos/config/default.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// SPDX-License-Identifier: BUSL-1.1
//
// Copyright (C) 2023, Berachain Foundation. All rights reserved.
// Use of this software is govered by the Business Source License included
// in the LICENSE file of this repository and at www.mariadb.com/bsl11.
//
// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY
// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER
// VERSIONS OF THE LICENSED WORK.
//
// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF
// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF
// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE).
//
// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
// TITLE.

package config

import (
"github.com/berachain/polaris/eth/node"
"github.com/berachain/polaris/eth/polar"

cmtcfg "github.com/cometbft/cometbft/config"

serverconfig "github.com/cosmos/cosmos-sdk/server/config"
)

// RecommendedCometBFTConfig returns the recommended CometBFT config
// for the application.
func RecommendedCometBFTConfig() *cmtcfg.Config {
cfg := cmtcfg.DefaultConfig()
cfg.Mempool.Size = 30000
cfg.Mempool.CacheSize = 30000
cfg.Mempool.Recheck = true
cfg.Mempool.Type = "flood"

cfg.P2P.MaxNumInboundPeers = 10
cfg.P2P.MaxNumOutboundPeers = 15

cfg.TxIndex.Indexer = "null"

cfg.Instrumentation.Prometheus = true
return cfg
}

// RecommendedServerConfig returns the recommended server config.
func RecommendedServerConfig() *serverconfig.Config {
cfg := serverconfig.DefaultConfig()
cfg.MinGasPrices = "0abera"
cfg.API.Enable = true
cfg.Telemetry.Enabled = true
cfg.Telemetry.PrometheusRetentionTime = 180
cfg.Telemetry.EnableHostnameLabel = true
cfg.Telemetry.GlobalLabels = [][]string{}
cfg.IAVLCacheSize = 20000
return cfg
}

// DefaultPolarisConfig returns the default polaris config.
func DefaultPolarisConfig() *Config {
nodeCfg := node.DefaultConfig()
nodeCfg.DataDir = ""
nodeCfg.KeyStoreDir = ""
return &Config{
Polar: *polar.DefaultConfig(),
Node: *nodeCfg,
}
}
2 changes: 1 addition & 1 deletion cosmos/config/mocks/app_options.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cosmos/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ replace (
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
github.com/cockroachdb/pebble => github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593
// We replace `go-ethereum` with `polaris-geth` in order include our required changes.
github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20240108202417-27ce389773c0
github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20240114134402-f43e40102ad1
// Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities.
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1
Expand Down
4 changes: 2 additions & 2 deletions cosmos/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/berachain/polaris-geth v0.0.0-20240108202417-27ce389773c0 h1:jGah7o6k6xytfTFH7hIKmfJZOPnAhCb9bmCb+lRS4Bk=
github.com/berachain/polaris-geth v0.0.0-20240108202417-27ce389773c0/go.mod h1:sc48XYQxCzH3fG9BcrXCOOgQk2JfZzNAmIKnceogzsA=
github.com/berachain/polaris-geth v0.0.0-20240114134402-f43e40102ad1 h1:Rh5+bQB/Z1fdQhVT7ltZQRAVNOn3KJe6zsA5gUXnPDc=
github.com/berachain/polaris-geth v0.0.0-20240114134402-f43e40102ad1/go.mod h1:sc48XYQxCzH3fG9BcrXCOOgQk2JfZzNAmIKnceogzsA=
github.com/berachain/polaris/contracts v0.1.0-alpha h1:ZRkh0JyMHp11Xe8z7gcJhfnn9X6vU6/3iSG3Bdi/kJQ=
github.com/berachain/polaris/contracts v0.1.0-alpha/go.mod h1:Sm1T+tIQGuP0wEJnF/TlgZiJ+NPHgOZWO7vAz7FkwVs=
github.com/berachain/polaris/eth v0.1.2-alpha h1:kKp2peFLTGK3LaupZcngycSHk+zRxmczGKgsiU59R08=
Expand Down
2 changes: 2 additions & 0 deletions cosmos/runtime/abci/proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

"github.com/berachain/polaris/cosmos/runtime/chain"
"github.com/berachain/polaris/cosmos/runtime/miner"
"github.com/berachain/polaris/cosmos/runtime/txpool"

cometabci "github.com/cometbft/cometbft/abci/types"

Expand All @@ -42,6 +43,7 @@
beginBlocker sdk.BeginBlocker
wrappedMiner *miner.Miner
wrappedBlockchain *chain.WrappedBlockchain
wrappedTxPool *txpool.Mempool

Check failure on line 46 in cosmos/runtime/abci/proposal.go

View workflow job for this annotation

GitHub Actions / ci (lint, polaris-linux-latest, 1.21.6)

field `wrappedTxPool` is unused (unused)

// TODO: refactor validator commands out of the wbc and miner.
// valCmdProcessor *ValidatorCommands
Expand Down
4 changes: 2 additions & 2 deletions cosmos/runtime/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import (
// EVMKeeper is an interface that defines the methods needed for the EVM setup.
type EVMKeeper interface {
// Setup initializes the EVM keeper.
Setup(core.Blockchain) error
Setup(core.Blockchain, *txpool.Mempool) error
GetStatePluginFactory() core.StatePluginFactory
SetLatestQueryContext(context.Context) error
GetHost() core.PolarisHostChain
Expand Down Expand Up @@ -154,7 +154,7 @@ func (p *Polaris) Build(
app.SetPrepareProposal(p.ProposalProvider.PrepareProposal)
app.SetProcessProposal(p.ProposalProvider.ProcessProposal)

if err := ek.Setup(p.WrappedBlockchain); err != nil {
if err := ek.Setup(p.WrappedBlockchain, p.WrappedTxPool); err != nil {
return err
}

Expand Down
24 changes: 14 additions & 10 deletions cosmos/runtime/txpool/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/berachain/polaris/cosmos/x/evm/types"
"github.com/berachain/polaris/lib/utils"

"github.com/cosmos/cosmos-sdk/telemetry"
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/ethereum/go-ethereum/common"
Expand All @@ -41,9 +42,10 @@ func (m *Mempool) AnteHandle(
ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler,
) (sdk.Context, error) {
msgs := tx.GetMsgs()
// Record the time it takes to build a payload.

// We only want to eject transactions from comet on recheck.
if ctx.ExecMode() == sdk.ExecModeReCheck {
if ctx.ExecMode() == sdk.ExecModeCheck || ctx.ExecMode() == sdk.ExecModeReCheck {
itsdevbear marked this conversation as resolved.
Show resolved Hide resolved
if wet, ok := utils.GetAs[*types.WrappedEthereumTransaction](msgs[0]); ok {
if m.shouldEjectFromCometMempool(ctx.BlockTime(), wet.Unwrap()) {
return ctx, errors.New("eject from comet mempool")
Expand All @@ -57,6 +59,7 @@ func (m *Mempool) AnteHandle(
func (m *Mempool) shouldEjectFromCometMempool(
currentTime time.Time, tx *ethtypes.Transaction,
) bool {
defer telemetry.MeasureSince(time.Now(), MetricKeyTimeShouldEject)
if tx == nil {
return false
}
Expand All @@ -66,21 +69,22 @@ func (m *Mempool) shouldEjectFromCometMempool(
// 1. If the transaction has been included in a block.
// 2. If the transaction is unknown to the node.
// 3. If the transaction has been in the mempool for longer than the configured timeout.
return txStatus == txpool.TxStatusIncluded || txStatus == txpool.TxStatusUnknown ||
return txStatus == txpool.TxStatusIncluded ||
currentTime.Sub(tx.Time()) > m.lifetime
}

// txStatus returns the status of the transaction.
func (m *Mempool) txStatus(hash common.Hash) txpool.TxStatus {
// Looking for the transaction in txpool first.
status := m.txpool.Status(hash)
// // Looking for the transaction in txpool first.
// status := m.txpool.Status(hash)

// If the transaction is unknown to the pool, try looking it up locally.
if status == txpool.TxStatusUnknown {
lookup := m.chain.GetTransactionLookup(hash)
if lookup != nil {
status = txpool.TxStatusIncluded
}
// // If the transaction is unknown to the pool, try looking it up locally.
// if status == txpool.TxStatusUnknown {
var status txpool.TxStatus
lookup := m.chain.GetTransactionLookup(hash)
if lookup != nil {
status = txpool.TxStatusIncluded
}
// }
return status
}
4 changes: 3 additions & 1 deletion cosmos/runtime/txpool/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ func (h *handler) broadcastTransaction(tx *ethtypes.Transaction, retries int) {
return
}

if rsp == nil || rsp.Code == 0 {
// If rsp == 1, likely the txn is already in a block, and thus the broadcast failing is actually
// the desired behaviour.
if rsp == nil || rsp.Code == 0 || rsp.Code == 1 {
return
}

Expand Down
27 changes: 21 additions & 6 deletions cosmos/runtime/txpool/mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ type GethTxPool interface {
// is to allow for transactions coming in from CometBFT's gossip to be added to the underlying
// geth txpool during `CheckTx`, that is the only purpose of `Mempool“.
type Mempool struct {
txpool eth.TxPool
eth.TxPool
lifetime time.Duration
chain core.ChainReader
handler Lifecycle
Expand All @@ -70,7 +70,7 @@ type Mempool struct {
// New creates a new Mempool.
func New(chain core.ChainReader, txpool eth.TxPool, lifetime time.Duration) *Mempool {
return &Mempool{
txpool: txpool,
TxPool: txpool,
chain: chain,
lifetime: lifetime,
}
Expand All @@ -82,7 +82,7 @@ func (m *Mempool) Init(
txBroadcaster TxBroadcaster,
txSerializer TxSerializer,
) {
m.handler = newHandler(txBroadcaster, m.txpool, txSerializer, logger)
m.handler = newHandler(txBroadcaster, m.TxPool, txSerializer, logger)
}

// Start starts the Mempool TxHandler.
Expand All @@ -107,7 +107,7 @@ func (m *Mempool) Insert(ctx context.Context, sdkTx sdk.Tx) error {
if wet, ok := utils.GetAs[*types.WrappedEthereumTransaction](msgs[0]); !ok {
// We have to return nil for non-ethereum transactions as to not fail check-tx.
return nil
} else if errs := m.txpool.Add(
} else if errs := m.TxPool.Add(
[]*ethtypes.Transaction{wet.Unwrap()}, false, false,
); len(errs) != 0 {
// Handle case where a node broadcasts to itself, we don't want it to fail CheckTx.
Expand All @@ -122,7 +122,7 @@ func (m *Mempool) Insert(ctx context.Context, sdkTx sdk.Tx) error {

// CountTx returns the number of transactions currently in the mempool.
func (m *Mempool) CountTx() int {
runnable, blocked := m.txpool.Stats()
runnable, blocked := m.TxPool.Stats()
return runnable + blocked
}

Expand All @@ -132,6 +132,21 @@ func (m *Mempool) Select(context.Context, [][]byte) mempool.Iterator {
}

// Remove is an intentional no-op as the eth txpool handles removals.
func (m *Mempool) Remove(sdk.Tx) error {
func (m *Mempool) Remove(tx sdk.Tx) error {
calbera marked this conversation as resolved.
Show resolved Hide resolved
calbera marked this conversation as resolved.
Show resolved Hide resolved
msgs := tx.GetMsgs()
if len(msgs) == 1 {
env, ok := utils.GetAs[*types.WrappedPayloadEnvelope](msgs[0])
if !ok {
return nil
}

txBzs := env.UnwrapPayload().ExecutionPayload.Transactions

for _, txBz := range txBzs {
ethTx := new(ethtypes.Transaction)
_ = ethTx.UnmarshalBinary(txBz)
m.TxPool.Remove(ethTx.Hash())
}
}
return nil
}
2 changes: 1 addition & 1 deletion cosmos/runtime/txpool/mempool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
BeforeEach(func() {
txPool = mocks.NewGethTxPool(t)
sdkTx = mocks.NewSdkTx(t)
mempool = &Mempool{txpool: txPool}
mempool = &Mempool{TxPool: txPool}

Check failure on line 53 in cosmos/runtime/txpool/mempool_test.go

View workflow job for this annotation

GitHub Actions / ci (lint, polaris-linux-latest, 1.21.6)

cannot use txPool (variable of type *mocks.GethTxPool) as "github.com/berachain/polaris/eth".TxPool value in struct literal: *mocks.GethTxPool does not implement "github.com/berachain/polaris/eth".TxPool (missing method Remove) (typecheck)
wet, _ = evmtypes.WrapTx(ethtypes.NewTx(&ethtypes.LegacyTx{}))
})

Expand Down
2 changes: 1 addition & 1 deletion cosmos/runtime/txpool/mocks/geth_tx_pool.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cosmos/runtime/txpool/mocks/lifecycle.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cosmos/runtime/txpool/mocks/sdk_tx.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cosmos/runtime/txpool/mocks/subscription.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cosmos/runtime/txpool/mocks/tx_broadcaster.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cosmos/runtime/txpool/mocks/tx_serializer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cosmos/runtime/txpool/mocks/tx_sub_provider.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions cosmos/runtime/txpool/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ package txpool
const (
MetricKeyMempoolFull = "polaris_cometbft_mempool_full"
MetricKeyBroadcastFailure = "polaris_cometbft_broadcast_failure"
MetricKeyTimeShouldEject = "polaris_cometbft_time_should_eject"
)
3 changes: 2 additions & 1 deletion cosmos/x/evm/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ var _ = Describe("Genesis", func() {
BeforeEach(func() {
ctx, ak, _, _ = testutil.SetupMinimalKeepers(log.NewTestLogger(GinkgoT()))
ctx = ctx.WithBlockHeight(0)
cfg := config.DefaultConfig()
cfg := config.DefaultPolarisConfig()
ethGen.Config = params.DefaultChainConfig
cfg.Node.DataDir = GinkgoT().TempDir()
cfg.Node.KeyStoreDir = GinkgoT().TempDir()
Expand All @@ -86,6 +86,7 @@ var _ = Describe("Genesis", func() {
)
err = k.Setup(
chain.New(core.NewChain(k.Host, params.DefaultChainConfig, beacon.NewFaker()), nil),
nil,
)
Expect(err).ToNot(HaveOccurred())

Expand Down
Loading
Loading