Skip to content

Commit 6946d19

Browse files
authored
Prohibit --internalcl in E2 (#13757)
1 parent 997fa46 commit 6946d19

File tree

1 file changed

+1
-34
lines changed

1 file changed

+1
-34
lines changed

eth/backend.go

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
"errors"
2323
"fmt"
2424
"io/fs"
25-
"math"
2625
"math/big"
2726
"net"
2827
"os"
@@ -78,12 +77,7 @@ import (
7877
libtypes "github.com/erigontech/erigon-lib/types"
7978
"github.com/erigontech/erigon-lib/wrap"
8079
"github.com/erigontech/erigon/cl/clparams"
81-
"github.com/erigontech/erigon/cl/persistence/db_config"
82-
"github.com/erigontech/erigon/cl/persistence/format/snapshot_format/getters"
83-
clcore "github.com/erigontech/erigon/cl/phase1/core"
8480
executionclient "github.com/erigontech/erigon/cl/phase1/execution_client"
85-
"github.com/erigontech/erigon/cl/utils/eth_clock"
86-
"github.com/erigontech/erigon/cmd/caplin/caplin1"
8781
"github.com/erigontech/erigon/cmd/rpcdaemon/cli"
8882
"github.com/erigontech/erigon/common/debug"
8983
"github.com/erigontech/erigon/consensus"
@@ -857,34 +851,7 @@ func New(ctx context.Context, stack *node.Node, config *ethconfig.Config, logger
857851

858852
// If we choose not to run a consensus layer, run our embedded.
859853
if config.InternalCL && clparams.EmbeddedSupported(config.NetworkID) {
860-
networkCfg, beaconCfg := clparams.GetConfigsByNetwork(clparams.NetworkType(config.NetworkID))
861-
if err != nil {
862-
return nil, err
863-
}
864-
state, err := clcore.RetrieveBeaconState(ctx, beaconCfg,
865-
clparams.GetCheckpointSyncEndpoint(clparams.NetworkType(config.NetworkID)))
866-
if err != nil {
867-
return nil, err
868-
}
869-
ethClock := eth_clock.NewEthereumClock(state.GenesisTime(), state.GenesisValidatorsRoot(), beaconCfg)
870-
871-
pruneBlobDistance := uint64(128600)
872-
if config.CaplinConfig.BlobBackfilling || config.CaplinConfig.BlobPruningDisabled {
873-
pruneBlobDistance = math.MaxUint64
874-
}
875-
876-
indiciesDB, blobStorage, err := caplin1.OpenCaplinDatabase(ctx, db_config.DefaultDatabaseConfiguration, beaconCfg, ethClock, dirs.CaplinIndexing, dirs.CaplinBlobs, executionEngine, false, pruneBlobDistance)
877-
if err != nil {
878-
return nil, err
879-
}
880-
881-
go func() {
882-
eth1Getter := getters.NewExecutionSnapshotReader(ctx, beaconCfg, blockReader, backend.chainDB)
883-
if err := caplin1.RunCaplinPhase1(ctx, executionEngine, config, networkCfg, beaconCfg, ethClock, state, dirs, eth1Getter, backend.downloaderClient, config.CaplinConfig.Backfilling, config.CaplinConfig.BlobBackfilling, config.CaplinConfig.Archive, indiciesDB, blobStorage, creds); err != nil {
884-
logger.Error("could not start caplin", "err", err)
885-
}
886-
ctxCancel()
887-
}()
854+
panic("Caplin (--internalcl) in Erigon 2 is not ready for Pectra. Either upgrade to Erigon 3 or use an external CL.")
888855
}
889856

890857
if config.PolygonSync {

0 commit comments

Comments
 (0)