Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ledgerwatch/erigon into shutter-dec…
Browse files Browse the repository at this point in the history
…ryption-keys-listener
  • Loading branch information
taratorio committed Jan 7, 2025
2 parents 8aac990 + 04799cb commit 9c40035
Show file tree
Hide file tree
Showing 17 changed files with 3,159 additions and 2,599 deletions.
3 changes: 0 additions & 3 deletions cmd/caplin/caplin1/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,6 @@ func RunCaplinService(ctx context.Context, engine execution_client.ExecutionEngi
}
}
stateSnapshots := snapshotsync.NewCaplinStateSnapshots(ethconfig.BlocksFreezing{}, beaconConfig, dirs, snapshotsync.MakeCaplinStateSnapshotsTypes(indexDB), logger)
if err := stateSnapshots.OpenFolder(); err != nil {
return err
}
antiq := antiquary.NewAntiquary(ctx, blobStorage, genesisState, vTables, beaconConfig, dirs, snDownloader, indexDB, stateSnapshots, csn, rcsn, syncedDataManager, logger, config.ArchiveStates, config.ArchiveBlocks, config.ArchiveBlobs, config.SnapshotGenerationEnabled, snBuildSema)
// Create the antiquary
go func() {
Expand Down
36 changes: 19 additions & 17 deletions cmd/txpool/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (

libcommon "github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/common/datadir"
"github.com/erigontech/erigon-lib/common/paths"
"github.com/erigontech/erigon-lib/direct"
"github.com/erigontech/erigon-lib/gointerfaces"
"github.com/erigontech/erigon-lib/gointerfaces/grpcutil"
Expand All @@ -38,16 +39,12 @@ import (
"github.com/erigontech/erigon-lib/kv/remotedbserver"
"github.com/erigontech/erigon-lib/log/v3"
"github.com/erigontech/erigon/cmd/rpcdaemon/rpcdaemontest"
"github.com/erigontech/erigon/consensus/misc"
"github.com/erigontech/erigon/ethdb/privateapi"
"github.com/erigontech/erigon/txnprovider/txpool"
"github.com/erigontech/erigon/txnprovider/txpool/txpoolcfg"
"github.com/erigontech/erigon/txnprovider/txpool/txpoolutil"

"github.com/erigontech/erigon-lib/common/paths"
"github.com/erigontech/erigon/cmd/utils"
"github.com/erigontech/erigon/ethdb/privateapi"
"github.com/erigontech/erigon/turbo/debug"
"github.com/erigontech/erigon/turbo/logging"
"github.com/erigontech/erigon/txnprovider/txpool"
"github.com/erigontech/erigon/txnprovider/txpool/txpoolcfg"
)

var (
Expand Down Expand Up @@ -183,26 +180,31 @@ func doTxpool(ctx context.Context, logger log.Logger) error {
cfg.TracedSenders[i] = string(sender[:])
}

newTxs := make(chan txpool.Announcements, 1024)
defer close(newTxs)
txPoolDB, txPool, fetch, send, txpoolGrpcServer, err := txpoolutil.AllComponents(ctx, cfg,
kvcache.New(cacheConfig), newTxs, coreDB, sentryClients, kvClient, misc.Eip1559FeeCalculator, logger)
notifyMiner := func() {}
txPool, txpoolGrpcServer, err := txpool.Assemble(
ctx,
cfg,
coreDB,
kvcache.New(cacheConfig),
sentryClients,
kvClient,
notifyMiner,
logger,
)
if err != nil {
return err
}
defer txPoolDB.Close()
fetch.ConnectCore()
fetch.ConnectSentries()

miningGrpcServer := privateapi.NewMiningServer(ctx, &rpcdaemontest.IsMiningMock{}, nil, logger)

grpcServer, err := txpool.StartGrpc(txpoolGrpcServer, miningGrpcServer, txpoolApiAddr, nil, logger)
if err != nil {
return err
}

notifyMiner := func() {}
txpool.MainLoop(ctx, txPool, newTxs, send, txpoolGrpcServer.NewSlotsStreams, notifyMiner)
err = txPool.Run(ctx)
if err != nil {
return err
}

grpcServer.GracefulStop()
return nil
Expand Down
Loading

0 comments on commit 9c40035

Please sign in to comment.