From f829b7b9d47c8a53bd204f4e4014fc3d7e3c5cbf Mon Sep 17 00:00:00 2001 From: Minhyuk Kim Date: Sat, 10 Aug 2024 11:02:47 +0900 Subject: [PATCH] Resolve all conflicts under eth/ --- eth/backend.go | 134 +----------------- eth/ethconfig/config.go | 3 - eth/gasprice/gasprice.go | 28 +--- eth/protocols/eth/handlers.go | 21 --- eth/stagedsync/bor_heimdall_shared.go | 8 -- eth/stagedsync/default_stages.go | 9 -- eth/stagedsync/exec3.go | 10 -- eth/stagedsync/stage_bor_heimdall.go | 27 ---- eth/stagedsync/stage_mining_create_block.go | 6 +- eth/stagedsync/stage_mining_exec.go | 19 +-- eth/stagedsync/stage_snapshots.go | 75 ---------- eth/stagedsync/stagebuilder.go | 22 +-- eth/stagedsync/sync.go | 11 -- .../internal/tracetest/calltrace_test.go | 29 ---- .../internal/tracetest/prestate_test.go | 21 --- merge_status.txt | 16 --- 16 files changed, 13 insertions(+), 426 deletions(-) diff --git a/eth/backend.go b/eth/backend.go index a667a013a4d..3c773cc68ab 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -37,14 +37,6 @@ import ( "sync/atomic" "time" -<<<<<<< HEAD - "github.com/ledgerwatch/erigon-lib/common/dir" - "github.com/ledgerwatch/erigon-lib/common/disk" - "github.com/ledgerwatch/erigon-lib/common/mem" - "github.com/ledgerwatch/erigon-lib/diagnostics" - -======= ->>>>>>> v3.0.0-alpha1 "github.com/erigontech/mdbx-go/mdbx" lru "github.com/hashicorp/golang-lru/arc/v2" "github.com/holiman/uint256" @@ -54,90 +46,6 @@ import ( "google.golang.org/grpc/credentials" "google.golang.org/protobuf/types/known/emptypb" -<<<<<<< HEAD - "github.com/ledgerwatch/erigon-lib/chain" - "github.com/ledgerwatch/erigon-lib/chain/networkname" - "github.com/ledgerwatch/erigon-lib/chain/snapcfg" - libcommon "github.com/ledgerwatch/erigon-lib/common" - "github.com/ledgerwatch/erigon-lib/common/datadir" - "github.com/ledgerwatch/erigon-lib/direct" - "github.com/ledgerwatch/erigon-lib/downloader" - "github.com/ledgerwatch/erigon-lib/downloader/downloadercfg" - "github.com/ledgerwatch/erigon-lib/downloader/downloadergrpc" - "github.com/ledgerwatch/erigon-lib/downloader/snaptype" - protodownloader "github.com/ledgerwatch/erigon-lib/gointerfaces/downloader" - "github.com/ledgerwatch/erigon-lib/gointerfaces/grpcutil" - "github.com/ledgerwatch/erigon-lib/gointerfaces/remote" - rpcsentinel "github.com/ledgerwatch/erigon-lib/gointerfaces/sentinel" - protosentry "github.com/ledgerwatch/erigon-lib/gointerfaces/sentry" - txpoolproto "github.com/ledgerwatch/erigon-lib/gointerfaces/txpool" - prototypes "github.com/ledgerwatch/erigon-lib/gointerfaces/types" - "github.com/ledgerwatch/erigon-lib/kv" - "github.com/ledgerwatch/erigon-lib/kv/kvcache" - "github.com/ledgerwatch/erigon-lib/kv/kvcfg" - "github.com/ledgerwatch/erigon-lib/kv/remotedbserver" - libstate "github.com/ledgerwatch/erigon-lib/state" - "github.com/ledgerwatch/erigon-lib/txpool" - "github.com/ledgerwatch/erigon-lib/txpool/txpoolcfg" - "github.com/ledgerwatch/erigon-lib/txpool/txpooluitl" - libtypes "github.com/ledgerwatch/erigon-lib/types" - "github.com/ledgerwatch/erigon-lib/wrap" - "github.com/ledgerwatch/erigon/cl/clparams" - "github.com/ledgerwatch/erigon/cl/persistence/db_config" - "github.com/ledgerwatch/erigon/cl/persistence/format/snapshot_format/getters" - clcore "github.com/ledgerwatch/erigon/cl/phase1/core" - executionclient "github.com/ledgerwatch/erigon/cl/phase1/execution_client" - "github.com/ledgerwatch/erigon/cl/utils/eth_clock" - "github.com/ledgerwatch/erigon/cmd/caplin/caplin1" - "github.com/ledgerwatch/erigon/cmd/rpcdaemon/cli" - "github.com/ledgerwatch/erigon/common/debug" - "github.com/ledgerwatch/erigon/consensus" - "github.com/ledgerwatch/erigon/consensus/clique" - "github.com/ledgerwatch/erigon/consensus/ethash" - "github.com/ledgerwatch/erigon/consensus/merge" - "github.com/ledgerwatch/erigon/consensus/misc" - "github.com/ledgerwatch/erigon/core" - "github.com/ledgerwatch/erigon/core/rawdb" - "github.com/ledgerwatch/erigon/core/rawdb/blockio" - "github.com/ledgerwatch/erigon/core/types" - "github.com/ledgerwatch/erigon/core/vm" - "github.com/ledgerwatch/erigon/crypto" - "github.com/ledgerwatch/erigon/eth/ethconfig" - "github.com/ledgerwatch/erigon/eth/ethconsensusconfig" - "github.com/ledgerwatch/erigon/eth/ethutils" - "github.com/ledgerwatch/erigon/eth/protocols/eth" - "github.com/ledgerwatch/erigon/eth/stagedsync" - "github.com/ledgerwatch/erigon/eth/stagedsync/stages" - "github.com/ledgerwatch/erigon/ethdb/privateapi" - "github.com/ledgerwatch/erigon/ethdb/prune" - "github.com/ledgerwatch/erigon/ethstats" - "github.com/ledgerwatch/erigon/node" - "github.com/ledgerwatch/erigon/p2p" - "github.com/ledgerwatch/erigon/p2p/enode" - "github.com/ledgerwatch/erigon/p2p/sentry" - "github.com/ledgerwatch/erigon/p2p/sentry/sentry_multi_client" - "github.com/ledgerwatch/erigon/params" - "github.com/ledgerwatch/erigon/polygon/bor" - "github.com/ledgerwatch/erigon/polygon/bor/finality/flags" - "github.com/ledgerwatch/erigon/polygon/bor/valset" - "github.com/ledgerwatch/erigon/polygon/heimdall" - polygonsync "github.com/ledgerwatch/erigon/polygon/sync" - "github.com/ledgerwatch/erigon/rpc" - "github.com/ledgerwatch/erigon/turbo/builder" - "github.com/ledgerwatch/erigon/turbo/engineapi" - "github.com/ledgerwatch/erigon/turbo/engineapi/engine_block_downloader" - "github.com/ledgerwatch/erigon/turbo/engineapi/engine_helpers" - "github.com/ledgerwatch/erigon/turbo/execution/eth1" - "github.com/ledgerwatch/erigon/turbo/execution/eth1/eth1_chain_reader.go" - "github.com/ledgerwatch/erigon/turbo/jsonrpc" - "github.com/ledgerwatch/erigon/turbo/services" - "github.com/ledgerwatch/erigon/turbo/shards" - "github.com/ledgerwatch/erigon/turbo/silkworm" - "github.com/ledgerwatch/erigon/turbo/snapshotsync/freezeblocks" - "github.com/ledgerwatch/erigon/turbo/snapshotsync/snap" - stages2 "github.com/ledgerwatch/erigon/turbo/stages" - "github.com/ledgerwatch/erigon/turbo/stages/headerdownload" -======= "github.com/erigontech/erigon-lib/chain" "github.com/erigontech/erigon-lib/chain/networkname" "github.com/erigontech/erigon-lib/chain/snapcfg" @@ -230,7 +138,6 @@ import ( "github.com/erigontech/erigon/turbo/snapshotsync/snap" stages2 "github.com/erigontech/erigon/turbo/stages" "github.com/erigontech/erigon/turbo/stages/headerdownload" ->>>>>>> v3.0.0-alpha1 ) // Config contains the configuration options of the ETH protocol. @@ -425,7 +332,6 @@ func New(ctx context.Context, stack *node.Node, config *ethconfig.Config, logger backend.genesisBlock = genesis backend.genesisHash = genesis.Hash() -<<<<<<< HEAD if chainConfig.IsOptimism() { if chainConfig.RegolithTime == nil { log.Warn("Optimism RegolithTime has not been set") @@ -441,8 +347,6 @@ func New(ctx context.Context, stack *node.Node, config *ethconfig.Config, logger } } -======= ->>>>>>> v3.0.0-alpha1 setBorDefaultMinerGasPrice(chainConfig, config, logger) setBorDefaultTxPoolPriceLimit(chainConfig, config.TxPool, logger) @@ -788,14 +692,9 @@ func New(ctx context.Context, stack *node.Node, config *ethconfig.Config, logger backend.newTxs = make(chan libtypes.Announcements, 1024) //defer close(newTxs) -<<<<<<< HEAD config.TxPool.Optimism = chainConfig.Optimism != nil - backend.txPoolDB, backend.txPool, backend.txPoolFetch, backend.txPoolSend, backend.txPoolGrpcServer, err = txpooluitl.AllComponents( - ctx, config.TxPool, kvcache.NewDummy(), backend.newTxs, backend.chainDB, backend.sentriesClient.Sentries(), stateDiffClient, misc.Eip1559FeeCalculator, logger, -======= backend.txPoolDB, backend.txPool, backend.txPoolFetch, backend.txPoolSend, backend.txPoolGrpcServer, err = txpoolutil.AllComponents( ctx, config.TxPool, kvcache.NewDummy(), backend.newTxs, chainKv, backend.sentriesClient.Sentries(), stateDiffClient, misc.Eip1559FeeCalculator, logger, ->>>>>>> v3.0.0-alpha1 ) if err != nil { return nil, err @@ -826,12 +725,6 @@ func New(ctx context.Context, stack *node.Node, config *ethconfig.Config, logger config.Sync, stagedsync.MiningStages(backend.sentryCtx, stagedsync.StageMiningCreateBlockCfg(backend.chainDB, miner, *backend.chainConfig, backend.engine, backend.txPoolDB, nil, tmpdir, backend.blockReader), -<<<<<<< HEAD - stagedsync.StageBorHeimdallCfg(backend.chainDB, snapDb, miner, *backend.chainConfig, heimdallClient, backend.blockReader, nil, nil, nil, recents, signatures, false, nil), - stagedsync.StageMiningExecCfg(backend.chainDB, miner, backend.notifications.Events, *backend.chainConfig, backend.engine, &vm.Config{}, tmpdir, nil, 0, backend.txPool, backend.txPoolDB, false, blockReader), - stagedsync.StageHashStateCfg(backend.chainDB, dirs, config.HistoryV3), - stagedsync.StageTrieCfg(backend.chainDB, false, true, true, tmpdir, blockReader, nil, config.HistoryV3, backend.agg), -======= stagedsync.StageBorHeimdallCfg(backend.chainDB, snapDb, miner, *backend.chainConfig, heimdallClient, backend.blockReader, nil, nil, nil, recents, signatures, false, nil), stagedsync.StageExecuteBlocksCfg( backend.chainDB, config.Prune, @@ -851,8 +744,7 @@ func New(ctx context.Context, stack *node.Node, config *ethconfig.Config, logger stages2.SilkwormForExecutionStage(backend.silkworm, config), ), stagedsync.StageSendersCfg(backend.chainDB, chainConfig, config.Sync, false, dirs.Tmp, config.Prune, blockReader, backend.sentriesClient.Hd, loopBreakCheck), - stagedsync.StageMiningExecCfg(backend.chainDB, miner, backend.notifications.Events, *backend.chainConfig, backend.engine, &vm.Config{}, tmpdir, nil, 0, backend.txPool, backend.txPoolDB, blockReader), ->>>>>>> v3.0.0-alpha1 + stagedsync.StageMiningExecCfg(backend.chainDB, miner, backend.notifications.Events, *backend.chainConfig, backend.engine, &vm.Config{}, tmpdir, nil, 0, backend.txPool, backend.txPoolDB, false, blockReader), stagedsync.StageMiningFinishCfg(backend.chainDB, *backend.chainConfig, backend.engine, miner, backend.miningSealingQuit, backend.blockReader, latestBlockBuiltStore), ), stagedsync.MiningUnwindOrder, stagedsync.MiningPruneOrder, logger) @@ -874,14 +766,6 @@ func New(ctx context.Context, stack *node.Node, config *ethconfig.Config, logger stagedsync.MiningStages(backend.sentryCtx, stagedsync.StageMiningCreateBlockCfg(backend.chainDB, miningStatePos, *backend.chainConfig, backend.engine, backend.txPoolDB, param, tmpdir, backend.blockReader), stagedsync.StageBorHeimdallCfg(backend.chainDB, snapDb, miningStatePos, *backend.chainConfig, heimdallClient, backend.blockReader, nil, nil, nil, recents, signatures, false, nil), -<<<<<<< HEAD - stagedsync.StageMiningExecCfg(backend.chainDB, miningStatePos, backend.notifications.Events, *backend.chainConfig, backend.engine, &vm.Config{}, tmpdir, interrupt, param.PayloadId, backend.txPool, backend.txPoolDB, param.NoTxPool, blockReader), - stagedsync.StageHashStateCfg(backend.chainDB, dirs, config.HistoryV3), - stagedsync.StageTrieCfg(backend.chainDB, false, true, true, tmpdir, blockReader, nil, config.HistoryV3, backend.agg), - stagedsync.StageMiningFinishCfg(backend.chainDB, *backend.chainConfig, backend.engine, miningStatePos, backend.miningSealingQuit, backend.blockReader, latestBlockBuiltStore), - ), stagedsync.MiningUnwindOrder, stagedsync.MiningPruneOrder, - logger) -======= stagedsync.StageExecuteBlocksCfg( backend.chainDB, config.Prune, @@ -901,9 +785,8 @@ func New(ctx context.Context, stack *node.Node, config *ethconfig.Config, logger stages2.SilkwormForExecutionStage(backend.silkworm, config), ), stagedsync.StageSendersCfg(backend.chainDB, chainConfig, config.Sync, false, dirs.Tmp, config.Prune, blockReader, backend.sentriesClient.Hd, loopBreakCheck), - stagedsync.StageMiningExecCfg(backend.chainDB, miningStatePos, backend.notifications.Events, *backend.chainConfig, backend.engine, &vm.Config{}, tmpdir, interrupt, param.PayloadId, backend.txPool, backend.txPoolDB, blockReader), + stagedsync.StageMiningExecCfg(backend.chainDB, miningStatePos, backend.notifications.Events, *backend.chainConfig, backend.engine, &vm.Config{}, tmpdir, interrupt, param.PayloadId, backend.txPool, backend.txPoolDB, param.NoTxPool, blockReader), stagedsync.StageMiningFinishCfg(backend.chainDB, *backend.chainConfig, backend.engine, miningStatePos, backend.miningSealingQuit, backend.blockReader, latestBlockBuiltStore)), stagedsync.MiningUnwindOrder, stagedsync.MiningPruneOrder, logger) ->>>>>>> v3.0.0-alpha1 // We start the mining step if err := stages2.MiningStep(ctx, backend.chainDB, proposingSync, tmpdir, logger); err != nil { return nil, err @@ -1220,11 +1103,7 @@ func (s *Ethereum) Init(stack *node.Node, config *ethconfig.Config, chainConfig } } -<<<<<<< HEAD - s.apiList = jsonrpc.APIList(chainKv, ethRpcClient, txPoolRpcClient, miningRpcClient, ff, stateCache, blockReader, s.agg, &httpRpcCfg, s.engine, s.seqRPCService, s.historicalRPCService, s.logger) -======= - s.apiList = jsonrpc.APIList(chainKv, ethRpcClient, txPoolRpcClient, miningRpcClient, ff, stateCache, blockReader, &httpRpcCfg, s.engine, s.logger) ->>>>>>> v3.0.0-alpha1 + s.apiList = jsonrpc.APIList(chainKv, ethRpcClient, txPoolRpcClient, miningRpcClient, ff, stateCache, blockReader, &httpRpcCfg, s.engine, s.seqRPCService, s.historicalRPCService, s.logger) if config.SilkwormRpcDaemon && httpRpcCfg.Enabled { interface_log_settings := silkworm.RpcInterfaceLogSettings{ @@ -1703,11 +1582,7 @@ func (s *Ethereum) Start() error { nodeStages := s.stagedSync.StagesIdsList() if params.IsChainPoS(s.chainConfig, currentTDProvider) { -<<<<<<< HEAD - nodeStages = s.pipelineStagedSync.StagesIdsList() -======= diagnostics.Send(diagnostics.SyncStageList{StagesList: diagnostics.InitStagesFromList(s.pipelineStagedSync.StagesIdsList())}) ->>>>>>> v3.0.0-alpha1 s.waitForStageLoopStop = nil // TODO: Ethereum.Stop should wait for execution_server shutdown go s.eth1ExecutionServer.Start(s.sentryCtx) } else if s.config.PolygonSync { @@ -1938,8 +1813,6 @@ func setBorDefaultTxPoolPriceLimit(chainConfig *chain.Config, config txpoolcfg.C config.MinFeeCap = txpoolcfg.BorDefaultTxPoolPriceLimit } } -<<<<<<< HEAD -======= func polygonSyncSentry(sentries []direct.SentryClient) direct.SentryClient { // TODO - pending sentry multi client refactor @@ -1960,4 +1833,3 @@ func polygonSyncSentry(sentries []direct.SentryClient) direct.SentryClient { return sentryClient } ->>>>>>> v3.0.0-alpha1 diff --git a/eth/ethconfig/config.go b/eth/ethconfig/config.go index a23299e9589..4a47bbc781c 100644 --- a/eth/ethconfig/config.go +++ b/eth/ethconfig/config.go @@ -264,15 +264,12 @@ type Config struct { OverridePragueTime *big.Int `toml:",omitempty"` -<<<<<<< HEAD RollupSequencerHTTP string RollupHistoricalRPC string RollupHistoricalRPCTimeout time.Duration ForcePartialCommit bool -======= ->>>>>>> v3.0.0-alpha1 // Embedded Silkworm support SilkwormExecution bool SilkwormRpcDaemon bool diff --git a/eth/gasprice/gasprice.go b/eth/gasprice/gasprice.go index de99734569d..f9b6c9544d3 100644 --- a/eth/gasprice/gasprice.go +++ b/eth/gasprice/gasprice.go @@ -26,14 +26,6 @@ import ( "math/big" "github.com/holiman/uint256" -<<<<<<< HEAD - "github.com/ledgerwatch/erigon-lib/chain" - libcommon "github.com/ledgerwatch/erigon-lib/common" - "github.com/ledgerwatch/erigon/eth/gasprice/gaspricecfg" - "github.com/ledgerwatch/erigon/params" - "github.com/ledgerwatch/log/v3" -======= ->>>>>>> v3.0.0-alpha1 "github.com/erigontech/erigon-lib/chain" libcommon "github.com/erigontech/erigon-lib/common" @@ -76,11 +68,9 @@ type Oracle struct { percentile int maxHeaderHistory, maxBlockHistory int -<<<<<<< HEAD - minSuggestedPriorityFee *big.Int // for Optimism fee suggestion -======= log log.Logger ->>>>>>> v3.0.0-alpha1 + + minSuggestedPriorityFee *big.Int // for Optimism fee suggestion } // NewOracle returns a new gasprice oracle which can recommend suitable @@ -111,15 +101,9 @@ func NewOracle(backend OracleBackend, params gaspricecfg.Config, cache Cache, lo log.Warn("Sanitizing invalid gasprice oracle ignore price", "provided", params.IgnorePrice, "updated", ignorePrice) } -<<<<<<< HEAD - setBorDefaultGpoIgnorePrice(backend.ChainConfig(), params) - - r := &Oracle{ -======= setBorDefaultGpoIgnorePrice(backend.ChainConfig(), params, log) - return &Oracle{ ->>>>>>> v3.0.0-alpha1 + r := &Oracle{ backend: backend, lastPrice: params.Default, maxPrice: maxPrice, @@ -326,21 +310,15 @@ func (s *sortingHeap) Pop() interface{} { return x } -<<<<<<< HEAD type bigIntArray []*big.Int func (s bigIntArray) Len() int { return len(s) } func (s bigIntArray) Less(i, j int) bool { return s[i].Cmp(s[j]) < 0 } func (s bigIntArray) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -// setBorDefaultGpoIgnorePrice enforces gpo IgnorePrice to be equal to BorDefaultGpoIgnorePrice (25gwei by default) -// only for polygon amoy network. -func setBorDefaultGpoIgnorePrice(chainConfig *chain.Config, gasPriceConfig gaspricecfg.Config) { -======= // setBorDefaultGpoIgnorePrice enforces gpo IgnorePrice to be equal to BorDefaultGpoIgnorePrice (25gwei by default) // only for polygon amoy network. func setBorDefaultGpoIgnorePrice(chainConfig *chain.Config, gasPriceConfig gaspricecfg.Config, log log.Logger) { ->>>>>>> v3.0.0-alpha1 if chainConfig.Bor != nil && chainConfig.ChainID.Cmp(params.AmoyChainConfig.ChainID) == 0 && gasPriceConfig.IgnorePrice != gaspricecfg.BorDefaultGpoIgnorePrice { log.Warn("Sanitizing invalid bor gasprice oracle ignore price", "provided", gasPriceConfig.IgnorePrice, "updated", gaspricecfg.BorDefaultGpoIgnorePrice) gasPriceConfig.IgnorePrice = gaspricecfg.BorDefaultGpoIgnorePrice diff --git a/eth/protocols/eth/handlers.go b/eth/protocols/eth/handlers.go index 0cc1089442a..01aa6d71a7f 100644 --- a/eth/protocols/eth/handlers.go +++ b/eth/protocols/eth/handlers.go @@ -22,18 +22,6 @@ package eth import ( "context" "fmt" -<<<<<<< HEAD - "github.com/ledgerwatch/erigon-lib/chain" - - libcommon "github.com/ledgerwatch/erigon-lib/common" - "github.com/ledgerwatch/erigon-lib/kv" - "github.com/ledgerwatch/erigon/common" - "github.com/ledgerwatch/erigon/core/rawdb" - "github.com/ledgerwatch/erigon/core/types" - "github.com/ledgerwatch/erigon/rlp" - "github.com/ledgerwatch/erigon/turbo/services" - "github.com/ledgerwatch/log/v3" -======= "github.com/erigontech/erigon-lib/chain" libcommon "github.com/erigontech/erigon-lib/common" "github.com/erigontech/erigon-lib/kv" @@ -43,7 +31,6 @@ import ( "github.com/erigontech/erigon/core/types" "github.com/erigontech/erigon/rlp" "github.com/erigontech/erigon/turbo/services" ->>>>>>> v3.0.0-alpha1 ) func AnswerGetBlockHeadersQuery(db kv.Tx, query *GetBlockHeadersPacket, blockReader services.HeaderAndCanonicalReader) ([]*types.Header, error) { @@ -172,15 +159,11 @@ func AnswerGetBlockBodiesQuery(db kv.Tx, query GetBlockBodiesPacket, blockReader return bodies } -<<<<<<< HEAD -func AnswerGetReceiptsQuery(chainCfg *chain.Config, br services.FullBlockReader, db kv.Tx, query GetReceiptsPacket) ([]rlp.RawValue, error) { //nolint:unparam -======= type ReceiptsGetter interface { GetReceipts(ctx context.Context, cfg *chain.Config, tx kv.Tx, block *types.Block, senders []libcommon.Address) (types.Receipts, error) } func AnswerGetReceiptsQuery(ctx context.Context, cfg *chain.Config, receiptsGetter ReceiptsGetter, br services.FullBlockReader, db kv.Tx, query GetReceiptsPacket) ([]rlp.RawValue, error) { //nolint:unparam ->>>>>>> v3.0.0-alpha1 // Gather state data until the fetch or network limits is reached var ( bytes int @@ -204,16 +187,12 @@ func AnswerGetReceiptsQuery(ctx context.Context, cfg *chain.Config, receiptsGett if b == nil { return nil, nil } -<<<<<<< HEAD - results := rawdb.ReadReceipts(chainCfg, db, b, s) -======= results, err := receiptsGetter.GetReceipts(ctx, cfg, db, b, s) if err != nil { return nil, err } ->>>>>>> v3.0.0-alpha1 if results == nil { header, err := rawdb.ReadHeaderByHash(db, hash) if err != nil { diff --git a/eth/stagedsync/bor_heimdall_shared.go b/eth/stagedsync/bor_heimdall_shared.go index ec5362ce3ce..37676b6f433 100644 --- a/eth/stagedsync/bor_heimdall_shared.go +++ b/eth/stagedsync/bor_heimdall_shared.go @@ -371,15 +371,11 @@ func fetchRequiredHeimdallStateSyncEventsIfNeeded( ctx context.Context, header *types.Header, tx kv.RwTx, -<<<<<<< HEAD - cfg BorHeimdallCfg, //nolint:gocritic -======= borConfig *borcfg.BorConfig, blockReader services.FullBlockReader, heimdallClient heimdall.HeimdallClient, chainID string, stateReceiverABI abi.ABI, ->>>>>>> v3.0.0-alpha1 logPrefix string, logger log.Logger, lastStateSyncEventID uint64, @@ -411,15 +407,11 @@ func fetchAndWriteHeimdallStateSyncEvents( header *types.Header, lastStateSyncEventID uint64, tx kv.RwTx, -<<<<<<< HEAD - cfg BorHeimdallCfg, //nolint:gocritic -======= config *borcfg.BorConfig, blockReader services.FullBlockReader, heimdallClient heimdall.HeimdallClient, chainID string, stateReceiverABI abi.ABI, ->>>>>>> v3.0.0-alpha1 logPrefix string, logger log.Logger, ) (uint64, int, time.Duration, error) { diff --git a/eth/stagedsync/default_stages.go b/eth/stagedsync/default_stages.go index 0a645026dc0..96e8e30b677 100644 --- a/eth/stagedsync/default_stages.go +++ b/eth/stagedsync/default_stages.go @@ -629,14 +629,6 @@ var PipelinePruneOrder = PruneOrder{ stages.Snapshots, } -<<<<<<< HEAD -var MiningUnwindOrder = UnwindOrder{ - stages.HashState, - stages.IntermediateHashes, - stages.MiningExecution, -} -var MiningPruneOrder = PruneOrder{} // nothing to unwind in mining - because mining does not commit db changes -======= var PolygonSyncPruneOrder = PruneOrder{ stages.Finish, stages.TxLookup, @@ -648,4 +640,3 @@ var PolygonSyncPruneOrder = PruneOrder{ var MiningUnwindOrder = UnwindOrder{} // nothing to unwind in mining - because mining does not commit db changes var MiningPruneOrder = PruneOrder{} // nothing to unwind in mining - because mining does not commit db changes ->>>>>>> v3.0.0-alpha1 diff --git a/eth/stagedsync/exec3.go b/eth/stagedsync/exec3.go index e4ca252136b..5ecb3616573 100644 --- a/eth/stagedsync/exec3.go +++ b/eth/stagedsync/exec3.go @@ -649,11 +649,8 @@ Loop: } } inputBlockNum.Store(blockNum) -<<<<<<< HEAD -======= doms.SetBlockNum(blockNum) ->>>>>>> v3.0.0-alpha1 b, err = blockWithSenders(ctx, chainDb, applyTx, blockReader, blockNum) if err != nil { return err @@ -1011,8 +1008,6 @@ Loop: return nil } -<<<<<<< HEAD -======= // nolint func dumpPlainStateDebug(tx kv.RwTx, doms *state2.SharedDomains) { @@ -1141,7 +1136,6 @@ func flushAndCheckCommitmentV3(ctx context.Context, header *types.Header, applyT return false, nil } ->>>>>>> v3.0.0-alpha1 func blockWithSenders(ctx context.Context, db kv.RoDB, tx kv.Tx, blockReader services.BlockReader, blockNum uint64) (b *types.Block, err error) { if tx == nil { tx, err = db.BeginRo(ctx) @@ -1150,9 +1144,6 @@ func blockWithSenders(ctx context.Context, db kv.RoDB, tx kv.Tx, blockReader ser } defer tx.Rollback() } -<<<<<<< HEAD - return blockReader.BlockByNumber(ctx, tx, blockNum) -======= b, err = blockReader.BlockByNumber(ctx, tx, blockNum) if err != nil { return nil, err @@ -1164,7 +1155,6 @@ func blockWithSenders(ctx context.Context, db kv.RoDB, tx kv.Tx, blockReader ser _ = txn.Hash() } return b, err ->>>>>>> v3.0.0-alpha1 } func processResultQueue(ctx context.Context, in *state.QueueWithRetry, rws *state.ResultsQueue, outputTxNumIn uint64, rs *state.StateV3, agg *state2.Aggregator, applyTx kv.Tx, backPressure chan struct{}, applyWorker *exec3.Worker, canRetry, forceStopAtBlockEnd bool) (outputTxNum uint64, conflicts, triggers int, processedBlockNum uint64, stopedAtBlockEnd bool, err error) { diff --git a/eth/stagedsync/stage_bor_heimdall.go b/eth/stagedsync/stage_bor_heimdall.go index 712f84e87b8..c11eafee190 100644 --- a/eth/stagedsync/stage_bor_heimdall.go +++ b/eth/stagedsync/stage_bor_heimdall.go @@ -30,28 +30,6 @@ import ( lru "github.com/hashicorp/golang-lru/arc/v2" "golang.org/x/sync/errgroup" -<<<<<<< HEAD - "github.com/ledgerwatch/erigon-lib/chain" - "github.com/ledgerwatch/erigon-lib/chain/networkname" - libcommon "github.com/ledgerwatch/erigon-lib/common" - "github.com/ledgerwatch/erigon-lib/kv" - "github.com/ledgerwatch/erigon/accounts/abi" - "github.com/ledgerwatch/erigon/common/math" - "github.com/ledgerwatch/erigon/consensus" - "github.com/ledgerwatch/erigon/core/types" - "github.com/ledgerwatch/erigon/dataflow" - "github.com/ledgerwatch/erigon/eth/ethconfig/estimate" - "github.com/ledgerwatch/erigon/eth/stagedsync/stages" - "github.com/ledgerwatch/erigon/polygon/bor" - "github.com/ledgerwatch/erigon/polygon/bor/borcfg" - "github.com/ledgerwatch/erigon/polygon/bor/finality" - "github.com/ledgerwatch/erigon/polygon/bor/finality/whitelist" - borsnaptype "github.com/ledgerwatch/erigon/polygon/bor/snaptype" - "github.com/ledgerwatch/erigon/polygon/bor/valset" - "github.com/ledgerwatch/erigon/polygon/heimdall" - "github.com/ledgerwatch/erigon/turbo/services" - "github.com/ledgerwatch/erigon/turbo/stages/headerdownload" -======= "github.com/erigontech/erigon-lib/log/v3" "github.com/erigontech/erigon-lib/chain" @@ -75,7 +53,6 @@ import ( "github.com/erigontech/erigon/polygon/sync" "github.com/erigontech/erigon/turbo/services" "github.com/erigontech/erigon/turbo/stages/headerdownload" ->>>>>>> v3.0.0-alpha1 ) const ( @@ -866,13 +843,9 @@ func checkBorHeaderExtraData(chr consensus.ChainHeaderReader, header *types.Head return nil } -<<<<<<< HEAD func BorHeimdallUnwind(u *UnwindState, ctx context.Context, _ *StageState, tx kv.RwTx, cfg BorHeimdallCfg) (err error) { //nolint:gocritic -======= -func BorHeimdallUnwind(u *UnwindState, ctx context.Context, _ *StageState, tx kv.RwTx, cfg BorHeimdallCfg) (err error) { u.UnwindPoint = max(u.UnwindPoint, cfg.blockReader.FrozenBorBlocks()) // protect from unwind behind files ->>>>>>> v3.0.0-alpha1 if cfg.borConfig == nil { return } diff --git a/eth/stagedsync/stage_mining_create_block.go b/eth/stagedsync/stage_mining_create_block.go index 096ee645b0f..77470c47e55 100644 --- a/eth/stagedsync/stage_mining_create_block.go +++ b/eth/stagedsync/stage_mining_create_block.go @@ -50,12 +50,10 @@ type MiningBlock struct { Receipts types.Receipts Withdrawals []*types.Withdrawal PreparedTxs types.TransactionsStream -<<<<<<< HEAD + + Requests types.Requests ForceTxs types.TransactionsStream -======= - Requests types.Requests ->>>>>>> v3.0.0-alpha1 } type MiningState struct { diff --git a/eth/stagedsync/stage_mining_exec.go b/eth/stagedsync/stage_mining_exec.go index 8a92de02989..090afec38cc 100644 --- a/eth/stagedsync/stage_mining_exec.go +++ b/eth/stagedsync/stage_mining_exec.go @@ -136,17 +136,11 @@ func SpawnMiningExecStage(s *StageState, txc wrap.TxContainer, cfg MiningExecCfg // But if we disable empty precommit already, ignore it. Since // empty block is necessary to keep the liveness of the network. if noempty { -<<<<<<< HEAD if !forceTxs.Empty() { // forceTxs is sent by Optimism consensus client, and all force txs must be included in the payload. // Therefore, interrupts to block building must not be handled while force txs are being processed. // So do not pass cfg.interrupt logs, _, err := addTransactionsToMiningBlock(logPrefix, current, cfg.chainConfig, cfg.vmConfig, getHeader, cfg.engine, forceTxs, cfg.miningState.MiningConfig.Etherbase, ibs, quit, nil, cfg.payloadId, true, logger) -======= - - if txs != nil && !txs.Empty() { - logs, _, err := addTransactionsToMiningBlock(logPrefix, current, cfg.chainConfig, cfg.vmConfig, getHeader, cfg.engine, txs, cfg.miningState.MiningConfig.Etherbase, ibs, ctx, cfg.interrupt, cfg.payloadId, logger) ->>>>>>> v3.0.0-alpha1 if err != nil { return err } @@ -186,11 +180,7 @@ func SpawnMiningExecStage(s *StageState, txc wrap.TxContainer, cfg MiningExecCfg } if !txs.Empty() { -<<<<<<< HEAD - logs, stop, err := addTransactionsToMiningBlock(logPrefix, current, cfg.chainConfig, cfg.vmConfig, getHeader, cfg.engine, txs, cfg.miningState.MiningConfig.Etherbase, ibs, quit, cfg.interrupt, cfg.payloadId, false, logger) -======= - logs, stop, err := addTransactionsToMiningBlock(logPrefix, current, cfg.chainConfig, cfg.vmConfig, getHeader, cfg.engine, txs, cfg.miningState.MiningConfig.Etherbase, ibs, ctx, cfg.interrupt, cfg.payloadId, logger) ->>>>>>> v3.0.0-alpha1 + logs, stop, err := addTransactionsToMiningBlock(logPrefix, current, cfg.chainConfig, cfg.vmConfig, getHeader, cfg.engine, txs, cfg.miningState.MiningConfig.Etherbase, ibs, ctx, cfg.interrupt, cfg.payloadId, false, logger) if err != nil { return err } @@ -463,13 +453,8 @@ func filterBadTransactions(transactions []types.Transaction, config chain.Config } func addTransactionsToMiningBlock(logPrefix string, current *MiningBlock, chainConfig chain.Config, vmConfig *vm.Config, getHeader func(hash libcommon.Hash, number uint64) *types.Header, -<<<<<<< HEAD - engine consensus.Engine, txs types.TransactionsStream, coinbase libcommon.Address, ibs *state.IntraBlockState, quit <-chan struct{}, - interrupt *int32, payloadId uint64, allowDeposits bool, logger log.Logger) (types.Logs, bool, error) { -======= engine consensus.Engine, txs types.TransactionsStream, coinbase libcommon.Address, ibs *state.IntraBlockState, ctx context.Context, - interrupt *int32, payloadId uint64, logger log.Logger) (types.Logs, bool, error) { ->>>>>>> v3.0.0-alpha1 + interrupt *int32, payloadId uint64, allowDeposits bool, logger log.Logger) (types.Logs, bool, error) { header := current.Header tcount := 0 gasPool := new(core.GasPool).AddGas(header.GasLimit - header.GasUsed) diff --git a/eth/stagedsync/stage_snapshots.go b/eth/stagedsync/stage_snapshots.go index ed3fe00fd66..f8ad3d619d5 100644 --- a/eth/stagedsync/stage_snapshots.go +++ b/eth/stagedsync/stage_snapshots.go @@ -39,35 +39,6 @@ import ( "github.com/anacrolix/torrent" "golang.org/x/sync/errgroup" -<<<<<<< HEAD - "github.com/ledgerwatch/erigon-lib/chain" - "github.com/ledgerwatch/erigon-lib/chain/snapcfg" - "github.com/ledgerwatch/erigon-lib/common/datadir" - "github.com/ledgerwatch/erigon-lib/common/dbg" - "github.com/ledgerwatch/erigon-lib/common/dir" - "github.com/ledgerwatch/erigon-lib/diagnostics" - "github.com/ledgerwatch/erigon-lib/downloader" - "github.com/ledgerwatch/erigon-lib/downloader/snaptype" - "github.com/ledgerwatch/erigon-lib/etl" - protodownloader "github.com/ledgerwatch/erigon-lib/gointerfaces/downloader" - "github.com/ledgerwatch/erigon-lib/kv" - "github.com/ledgerwatch/erigon-lib/kv/kvcfg" - "github.com/ledgerwatch/erigon-lib/kv/rawdbv3" - "github.com/ledgerwatch/erigon-lib/state" - "github.com/ledgerwatch/erigon/core/rawdb" - coresnaptype "github.com/ledgerwatch/erigon/core/snaptype" - "github.com/ledgerwatch/erigon/core/types" - "github.com/ledgerwatch/erigon/eth/ethconfig" - "github.com/ledgerwatch/erigon/eth/ethconfig/estimate" - "github.com/ledgerwatch/erigon/eth/stagedsync/stages" - borsnaptype "github.com/ledgerwatch/erigon/polygon/bor/snaptype" - "github.com/ledgerwatch/erigon/rpc" - "github.com/ledgerwatch/erigon/turbo/services" - "github.com/ledgerwatch/erigon/turbo/shards" - "github.com/ledgerwatch/erigon/turbo/silkworm" - "github.com/ledgerwatch/erigon/turbo/snapshotsync" - "github.com/ledgerwatch/erigon/turbo/snapshotsync/freezeblocks" -======= "github.com/erigontech/erigon-lib/log/v3" "github.com/erigontech/erigon-lib/diagnostics" @@ -99,7 +70,6 @@ import ( "github.com/erigontech/erigon/turbo/silkworm" "github.com/erigontech/erigon/turbo/snapshotsync" "github.com/erigontech/erigon/turbo/snapshotsync/freezeblocks" ->>>>>>> v3.0.0-alpha1 ) type SnapshotsCfg struct { @@ -234,25 +204,7 @@ func SpawnStageSnapshots( return nil } -<<<<<<< HEAD func DownloadAndIndexSnapshotsIfNeed(s *StageState, ctx context.Context, tx kv.RwTx, cfg SnapshotsCfg, initialCycle bool, logger log.Logger) error { - if !initialCycle { - return nil - } - if !cfg.blockReader.FreezingCfg().Enabled { - return nil - } - - diagnostics.Send(diagnostics.CurrentSyncStage{Stage: string(stages.Snapshots)}) - - cstate := snapshotsync.NoCaplin - if cfg.caplin { //TODO(Giulio2002): uncomment - cstate = snapshotsync.AlsoCaplin - } - -======= -func DownloadAndIndexSnapshotsIfNeed(s *StageState, ctx context.Context, tx kv.RwTx, cfg SnapshotsCfg, logger log.Logger) error { ->>>>>>> v3.0.0-alpha1 if cfg.snapshotUploader != nil { subStages := diagnostics.InitSubStagesFromList([]string{"Indexing", "Fill DB"}) diagnostics.Send(diagnostics.SetSyncSubStageList{ @@ -293,22 +245,6 @@ func DownloadAndIndexSnapshotsIfNeed(s *StageState, ctx context.Context, tx kv.R return err } } -<<<<<<< HEAD - if cfg.notifier.Events != nil { // can notify right here, even that write txn is not commit - cfg.notifier.Events.OnNewSnapshot() - } - } else { - subStages := diagnostics.InitSubStagesFromList([]string{"Download snapshots", "Indexing", "Fill DB"}) - diagnostics.Send(diagnostics.SetSyncSubStageList{ - Stage: string(stages.Snapshots), - List: subStages, - }) - - diagnostics.Send(diagnostics.CurrentSyncSubStage{SubStage: "Download snapshots"}) - if err := snapshotsync.WaitForDownloader(ctx, s.LogPrefix(), cfg.historyV3, cfg.blobs, cstate, cfg.agg, tx, cfg.blockReader, &cfg.chainConfig, cfg.snapshotDownloader, s.state.StagesIdsList()); err != nil { - return err - } -======= } if !s.CurrentSyncCycle.IsFirstCycle { @@ -343,7 +279,6 @@ func DownloadAndIndexSnapshotsIfNeed(s *StageState, ctx context.Context, tx kv.R diagnostics.Send(diagnostics.CurrentSyncSubStage{SubStage: "Download snapshots"}) if err := snapshotsync.WaitForDownloader(ctx, s.LogPrefix() /*headerChain=*/, false, cfg.blobs, cfg.prune, cstate, cfg.agg, tx, cfg.blockReader, &cfg.chainConfig, cfg.snapshotDownloader, s.state.StagesIdsList()); err != nil { return err ->>>>>>> v3.0.0-alpha1 } // It's ok to notify before tx.Commit(), because RPCDaemon does read list of files by gRPC (not by reading from db) @@ -351,17 +286,7 @@ func DownloadAndIndexSnapshotsIfNeed(s *StageState, ctx context.Context, tx kv.R cfg.notifier.Events.OnNewSnapshot() } -<<<<<<< HEAD - cfg.blockReader.Snapshots().LogStat("download") - cfg.agg.LogStats(tx, func(endTxNumMinimax uint64) uint64 { - _, histBlockNumProgress, _ := rawdbv3.TxNums.FindBlockNum(tx, endTxNumMinimax) - return histBlockNumProgress - }) - - diagnostics.Send(diagnostics.CurrentSyncSubStage{SubStage: "Indexing"}) -======= diagnostics.Send(diagnostics.CurrentSyncSubStage{SubStage: "E2 Indexing"}) ->>>>>>> v3.0.0-alpha1 if err := cfg.blockRetire.BuildMissedIndicesIfNeed(ctx, s.LogPrefix(), cfg.notifier.Events, &cfg.chainConfig); err != nil { return err } diff --git a/eth/stagedsync/stagebuilder.go b/eth/stagedsync/stagebuilder.go index f15583c0bd6..f0f7add5733 100644 --- a/eth/stagedsync/stagebuilder.go +++ b/eth/stagedsync/stagebuilder.go @@ -38,20 +38,15 @@ type ChainEventNotifier interface { func MiningStages( ctx context.Context, createBlockCfg MiningCreateBlockCfg, -<<<<<<< HEAD - borHeimdallCfg BorHeimdallCfg, //nolint:gocritic -======= borHeimdallCfg BorHeimdallCfg, executeBlockCfg ExecuteBlockCfg, sendersCfg SendersCfg, ->>>>>>> v3.0.0-alpha1 execCfg MiningExecCfg, finish MiningFinishCfg, ) []*Stage { return []*Stage{ { ID: stages.MiningCreateBlock, -<<<<<<< HEAD Description: "Mining: add force-txs", Forward: func(firstCycle bool, badBlockUnwind bool, s *StageState, u Unwinder, txc wrap.TxContainer, logger log.Logger) error { return SpawnMiningForceTxsStage(s, txc.Tx, createBlockCfg, ctx.Done()) @@ -63,12 +58,8 @@ func MiningStages( }, { ID: stages.MiningCreateBlock, - Description: "Mining: construct new block from tx pool", - Forward: func(firstCycle bool, badBlockUnwind bool, s *StageState, u Unwinder, txc wrap.TxContainer, logger log.Logger) error { -======= Description: "Mining: construct new block from txn pool", Forward: func(badBlockUnwind bool, s *StageState, u Unwinder, txc wrap.TxContainer, logger log.Logger) error { ->>>>>>> v3.0.0-alpha1 return SpawnMiningCreateBlockStage(s, txc.Tx, createBlockCfg, ctx.Done(), logger) }, Unwind: func(u *UnwindState, s *StageState, txc wrap.TxContainer, logger log.Logger) error { @@ -98,11 +89,10 @@ func MiningStages( Forward: func(badBlockUnwind bool, s *StageState, u Unwinder, txc wrap.TxContainer, logger log.Logger) error { return SpawnMiningExecStage(s, txc, execCfg, sendersCfg, executeBlockCfg, ctx, logger) }, -<<<<<<< HEAD - Unwind: func(firstCycle bool, u *UnwindState, s *StageState, txc wrap.TxContainer, logger log.Logger) error { - return UnwindMiningExecutionStage(u, s, txc.Tx, ctx, execCfg, logger) + Unwind: func(u *UnwindState, s *StageState, txc wrap.TxContainer, logger log.Logger) error { + return nil }, - Prune: func(firstCycle bool, u *PruneState, tx kv.RwTx, logger log.Logger) error { return nil }, + Prune: func(u *PruneState, tx kv.RwTx, logger log.Logger) error { return nil }, }, { ID: stages.HashState, @@ -130,12 +120,6 @@ func MiningStages( return UnwindIntermediateHashesStage(u, s, txc.Tx, trieCfg, ctx, logger) }, Prune: func(firstCycle bool, u *PruneState, tx kv.RwTx, logger log.Logger) error { return nil }, -======= - Unwind: func(u *UnwindState, s *StageState, txc wrap.TxContainer, logger log.Logger) error { - return nil - }, - Prune: func(u *PruneState, tx kv.RwTx, logger log.Logger) error { return nil }, ->>>>>>> v3.0.0-alpha1 }, { ID: stages.MiningFinish, diff --git a/eth/stagedsync/sync.go b/eth/stagedsync/sync.go index 5d9b7c4dc03..83541f975a0 100644 --- a/eth/stagedsync/sync.go +++ b/eth/stagedsync/sync.go @@ -110,12 +110,6 @@ func (s *Sync) NextStage() { return } s.currentStage++ -<<<<<<< HEAD - if s.currentStage < uint(len(s.stages)) { - diagnostics.Send(diagnostics.CurrentSyncStage{Stage: string(s.stages[s.currentStage].ID)}) - } -======= ->>>>>>> v3.0.0-alpha1 } // IsBefore returns true if stage1 goes before stage2 in staged sync @@ -206,11 +200,6 @@ func (s *Sync) SetCurrentStage(id stages.SyncStage) error { for i, stage := range s.stages { if stage.ID == id { s.currentStage = uint(i) -<<<<<<< HEAD - - diagnostics.Send(diagnostics.CurrentSyncStage{Stage: string(id)}) -======= ->>>>>>> v3.0.0-alpha1 return nil } diff --git a/eth/tracers/internal/tracetest/calltrace_test.go b/eth/tracers/internal/tracetest/calltrace_test.go index 15030415922..9a588a9038c 100644 --- a/eth/tracers/internal/tracetest/calltrace_test.go +++ b/eth/tracers/internal/tracetest/calltrace_test.go @@ -30,26 +30,6 @@ import ( "github.com/holiman/uint256" "github.com/stretchr/testify/require" -<<<<<<< HEAD - "github.com/ledgerwatch/erigon-lib/chain" - libcommon "github.com/ledgerwatch/erigon-lib/common" - "github.com/ledgerwatch/erigon-lib/common/dir" - "github.com/ledgerwatch/erigon-lib/common/hexutil" - "github.com/ledgerwatch/erigon-lib/common/hexutility" - "github.com/ledgerwatch/erigon/common" - "github.com/ledgerwatch/erigon/common/math" - "github.com/ledgerwatch/erigon/core" - "github.com/ledgerwatch/erigon/core/types" - "github.com/ledgerwatch/erigon/core/vm" - "github.com/ledgerwatch/erigon/core/vm/evmtypes" - "github.com/ledgerwatch/erigon/crypto" - "github.com/ledgerwatch/erigon/eth/tracers" - _ "github.com/ledgerwatch/erigon/eth/tracers/js" - _ "github.com/ledgerwatch/erigon/eth/tracers/native" - "github.com/ledgerwatch/erigon/params" - "github.com/ledgerwatch/erigon/tests" - "github.com/ledgerwatch/erigon/turbo/stages/mock" -======= "github.com/erigontech/erigon-lib/chain" libcommon "github.com/erigontech/erigon-lib/common" "github.com/erigontech/erigon-lib/common/dir" @@ -69,7 +49,6 @@ import ( "github.com/erigontech/erigon/params" "github.com/erigontech/erigon/tests" "github.com/erigontech/erigon/turbo/stages/mock" ->>>>>>> v3.0.0-alpha1 ) type callContext struct { @@ -160,11 +139,7 @@ func testCallTracer(tracerName string, dirPath string, t *testing.T) { signer := types.MakeSigner(test.Genesis.Config, uint64(test.Context.Number), uint64(test.Context.Time)) context := evmtypes.BlockContext{ CanTransfer: core.CanTransfer, -<<<<<<< HEAD - Transfer: core.Transfer, -======= Transfer: consensus.Transfer, ->>>>>>> v3.0.0-alpha1 Coinbase: test.Context.Miner, BlockNumber: uint64(test.Context.Number), Time: uint64(test.Context.Time), @@ -180,11 +155,7 @@ func testCallTracer(tracerName string, dirPath string, t *testing.T) { dbTx, err := m.DB.BeginRw(m.Ctx) require.NoError(t, err) defer dbTx.Rollback() -<<<<<<< HEAD - statedb, err := tests.MakePreState(rules, dbTx, test.Genesis.Alloc, uint64(test.Context.Number)) -======= statedb, err := tests.MakePreState(rules, dbTx, test.Genesis.Alloc, uint64(test.Context.Number), m.HistoryV3) ->>>>>>> v3.0.0-alpha1 require.NoError(t, err) tracer, err := tracers.New(tracerName, new(tracers.Context), test.TracerConfig) if err != nil { diff --git a/eth/tracers/internal/tracetest/prestate_test.go b/eth/tracers/internal/tracetest/prestate_test.go index a389ff9629c..2a4a5852ee6 100644 --- a/eth/tracers/internal/tracetest/prestate_test.go +++ b/eth/tracers/internal/tracetest/prestate_test.go @@ -30,18 +30,6 @@ import ( "github.com/holiman/uint256" "github.com/stretchr/testify/require" -<<<<<<< HEAD - libcommon "github.com/ledgerwatch/erigon-lib/common" - "github.com/ledgerwatch/erigon-lib/common/dir" - "github.com/ledgerwatch/erigon/common" - "github.com/ledgerwatch/erigon/core" - "github.com/ledgerwatch/erigon/core/types" - "github.com/ledgerwatch/erigon/core/vm" - "github.com/ledgerwatch/erigon/core/vm/evmtypes" - "github.com/ledgerwatch/erigon/eth/tracers" - "github.com/ledgerwatch/erigon/tests" - "github.com/ledgerwatch/erigon/turbo/stages/mock" -======= libcommon "github.com/erigontech/erigon-lib/common" "github.com/erigontech/erigon-lib/common/dir" "github.com/erigontech/erigon/common" @@ -53,7 +41,6 @@ import ( "github.com/erigontech/erigon/eth/tracers" "github.com/erigontech/erigon/tests" "github.com/erigontech/erigon/turbo/stages/mock" ->>>>>>> v3.0.0-alpha1 ) // prestateTrace is the result of a prestateTrace run. @@ -117,11 +104,7 @@ func testPrestateDiffTracer(tracerName string, dirPath string, t *testing.T) { signer := types.MakeSigner(test.Genesis.Config, uint64(test.Context.Number), uint64(test.Context.Time)) context := evmtypes.BlockContext{ CanTransfer: core.CanTransfer, -<<<<<<< HEAD - Transfer: core.Transfer, -======= Transfer: consensus.Transfer, ->>>>>>> v3.0.0-alpha1 Coinbase: test.Context.Miner, BlockNumber: uint64(test.Context.Number), Time: uint64(test.Context.Time), @@ -136,12 +119,8 @@ func testPrestateDiffTracer(tracerName string, dirPath string, t *testing.T) { dbTx, err := m.DB.BeginRw(m.Ctx) require.NoError(t, err) defer dbTx.Rollback() -<<<<<<< HEAD - statedb, _ := tests.MakePreState(rules, dbTx, test.Genesis.Alloc, context.BlockNumber) -======= statedb, err := tests.MakePreState(rules, dbTx, test.Genesis.Alloc, context.BlockNumber, m.HistoryV3) require.NoError(t, err) ->>>>>>> v3.0.0-alpha1 tracer, err := tracers.New(tracerName, new(tracers.Context), test.TracerConfig) if err != nil { t.Fatalf("failed to create call tracer: %v", err) diff --git a/merge_status.txt b/merge_status.txt index dc1f35fc378..4ac6e5d2923 100644 --- a/merge_status.txt +++ b/merge_status.txt @@ -2337,22 +2337,6 @@ Unmerged paths: both modified: erigon-lib/txpool/txpoolcfg/txpoolcfg.go both modified: erigon-lib/txpool/txpoolutil/all_components.go both modified: erigon-lib/types/txn.go - both modified: eth/backend.go - both modified: eth/ethconfig/config.go - both modified: eth/gasprice/gasprice.go - both modified: eth/protocols/eth/handlers.go - both modified: eth/stagedsync/bor_heimdall_shared.go - both modified: eth/stagedsync/default_stages.go - both modified: eth/stagedsync/exec3.go - both modified: eth/stagedsync/stage_bor_heimdall.go - both modified: eth/stagedsync/stage_mining_create_block.go - both modified: eth/stagedsync/stage_mining_exec.go - both modified: eth/stagedsync/stage_snapshots.go - both modified: eth/stagedsync/stagebuilder.go - both modified: eth/stagedsync/sync.go - deleted by them: eth/tracers/api.go - both modified: eth/tracers/internal/tracetest/calltrace_test.go - both modified: eth/tracers/internal/tracetest/prestate_test.go both modified: ethdb/cbor/pool.go both modified: go.mod both modified: go.sum