@@ -22,7 +22,6 @@ import (
22
22
"errors"
23
23
"fmt"
24
24
"io/fs"
25
- "math"
26
25
"math/big"
27
26
"net"
28
27
"os"
@@ -78,12 +77,7 @@ import (
78
77
libtypes "github.com/erigontech/erigon-lib/types"
79
78
"github.com/erigontech/erigon-lib/wrap"
80
79
"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"
84
80
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"
87
81
"github.com/erigontech/erigon/cmd/rpcdaemon/cli"
88
82
"github.com/erigontech/erigon/common/debug"
89
83
"github.com/erigontech/erigon/consensus"
@@ -857,34 +851,7 @@ func New(ctx context.Context, stack *node.Node, config *ethconfig.Config, logger
857
851
858
852
// If we choose not to run a consensus layer, run our embedded.
859
853
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." )
888
855
}
889
856
890
857
if config .PolygonSync {
0 commit comments