diff --git a/build/buildconstants/f3manifest_calibnet.json b/build/buildconstants/f3manifest_calibnet.json index 9ac51fcbf74..868b27c5dc4 100644 --- a/build/buildconstants/f3manifest_calibnet.json +++ b/build/buildconstants/f3manifest_calibnet.json @@ -2,13 +2,11 @@ "Pause": false, "ProtocolVersion": 7, "InitialInstance": 0, - "BootstrapEpoch": 2081674, - "NetworkName": "calibrationnet", + "BootstrapEpoch": 3451774, + "NetworkName": "calibrationnet2", "ExplicitPower": null, "IgnoreECPower": false, - "InitialPowerTable": { - "/": "bafy2bzaceab236vmmb3n4q4tkvua2n4dphcbzzxerxuey3mot4g3cov5j3r2c" - }, + "InitialPowerTable": null, "CommitteeLookback": 10, "CatchUpAlignment": 15000000000, "Gpbft": { diff --git a/chain/lf3/config.go b/chain/lf3/config.go index 7802a8e0f89..2306fe104e0 100644 --- a/chain/lf3/config.go +++ b/chain/lf3/config.go @@ -10,14 +10,9 @@ import ( "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/lotus/build/buildconstants" - "github.com/filecoin-project/lotus/node/modules/dtypes" ) type Config struct { - // BaseNetworkName is the base from which dynamic network names are defined and is usually - // the name of the network defined by the static manifest. This must be set correctly or, - // e.g., pubsub topic filters won't work correctly. - BaseNetworkName gpbft.NetworkName // StaticManifest this instance's default manifest absent any dynamic manifests. Also see // PrioritizeStaticManifest. StaticManifest *manifest.Manifest @@ -59,18 +54,9 @@ func NewManifest( } } -// NewConfig creates a new F3 config based on the node's build parameters and the passed network -// name. -func NewConfig(nn dtypes.NetworkName) *Config { - // Use "filecoin" as the network name on mainnet, otherwise use the network name. Yes, - // mainnet is called testnetnet in state. - if nn == "testnetnet" { - nn = "filecoin" +// NewConfig creates a new F3 config based on the node's build parameters. +func NewConfig() *Config { + return &Config{ + StaticManifest: buildconstants.F3Manifest(), } - c := &Config{ - BaseNetworkName: gpbft.NetworkName(nn), - StaticManifest: buildconstants.F3Manifest(), - } - - return c } diff --git a/chain/store/snapshot.go b/chain/store/snapshot.go index 61e9ce1f782..b189e337901 100644 --- a/chain/store/snapshot.go +++ b/chain/store/snapshot.go @@ -28,6 +28,7 @@ import ( "golang.org/x/xerrors" "github.com/filecoin-project/go-f3/certstore" + "github.com/filecoin-project/go-f3/manifest" "github.com/filecoin-project/go-state-types/abi" bstore "github.com/filecoin-project/lotus/blockstore" @@ -236,9 +237,17 @@ func (cs *ChainStore) Import(ctx context.Context, f3Ds dtypes.F3DS, r io.Reader) prefix := F3DatastorePrefix() f3DsWrapper := namespace.Wrap(f3Ds, prefix) - log.Info("Importing F3Data to datastore") - if err := certstore.ImportSnapshotToDatastore(ctx, f3r, f3DsWrapper); err != nil { - return nil, nil, xerrors.Errorf("failed to import f3Data to datastore: %w", err) + var f3Manifest *manifest.Manifest = buildconstants.F3Manifest() + if f3Manifest == nil { + log.Warnf("Snapshot contains F3 data but F3 manifest is not available in this build. Skipping F3 data import.") + // Skip F3 import but continue with chain import + } else if !f3Manifest.InitialPowerTable.Defined() { + log.Warnf("Snapshot contains F3 data but InitialPowerTable in F3 manifest is not available in this build. Skipping F3 data import.") + } else { + log.Info("Importing F3Data to datastore") + if err := certstore.ImportSnapshotToDatastore(ctx, f3r, f3DsWrapper, f3Manifest); err != nil { + return nil, nil, xerrors.Errorf("failed to import f3Data to datastore: %w", err) + } } } diff --git a/chain/store/store_test.go b/chain/store/store_test.go index 02dcf1cf5b8..3356cd7b4be 100644 --- a/chain/store/store_test.go +++ b/chain/store/store_test.go @@ -3,6 +3,7 @@ package store_test import ( "bytes" "context" + "encoding/json" "io" "testing" @@ -15,10 +16,12 @@ import ( "github.com/filecoin-project/go-f3/certs" "github.com/filecoin-project/go-f3/certstore" "github.com/filecoin-project/go-f3/gpbft" + "github.com/filecoin-project/go-f3/manifest" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/lotus/blockstore" + "github.com/filecoin-project/lotus/build/buildconstants" "github.com/filecoin-project/lotus/chain/actors/policy" "github.com/filecoin-project/lotus/chain/consensus" "github.com/filecoin-project/lotus/chain/consensus/filcns" @@ -270,6 +273,23 @@ func TestChainExportImportWithF3Data(t *testing.T) { lc = cert } + { + // patch out embedded manifest for testing + oldManifest := buildconstants.F3ManifestBytes + + var manif manifest.Manifest + if err := json.Unmarshal(buildconstants.F3ManifestBytes, &manif); err != nil { + t.Fatal(err) + } + manif.InitialPowerTable = ptCid + defer func() { + buildconstants.F3ManifestBytes = oldManifest + }() + if buildconstants.F3ManifestBytes, err = json.Marshal(manif); err != nil { + t.Fatal(err) + } + } + certStore, err := certstore.OpenStore(context.TODO(), f3ds) if err != nil { t.Fatal(err) diff --git a/go.mod b/go.mod index 4eb9408d39d..e67d5699d1a 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( github.com/filecoin-project/go-cbor-util v0.0.2 github.com/filecoin-project/go-commp-utils/v2 v2.1.0 github.com/filecoin-project/go-crypto v0.1.0 - github.com/filecoin-project/go-f3 v0.8.10 + github.com/filecoin-project/go-f3 v0.8.12 github.com/filecoin-project/go-fil-commcid v0.3.1 github.com/filecoin-project/go-hamt-ipld/v3 v3.4.1 github.com/filecoin-project/go-jsonrpc v0.9.0 @@ -105,7 +105,7 @@ require ( github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438 github.com/jpillora/backoff v1.0.0 github.com/kelseyhightower/envconfig v1.4.0 - github.com/klauspost/compress v1.18.0 + github.com/klauspost/compress v1.18.2 github.com/koalacxr/quantile v0.0.1 github.com/libp2p/go-buffer-pool v0.1.0 github.com/libp2p/go-libp2p v0.46.0 @@ -146,16 +146,16 @@ require ( github.com/zondax/ledger-filecoin-go v1.2.0 github.com/zyedidia/generic v1.2.1 go.opencensus.io v0.24.0 - go.opentelemetry.io/otel v1.38.0 + go.opentelemetry.io/otel v1.39.0 go.opentelemetry.io/otel/bridge/opencensus v1.28.0 go.opentelemetry.io/otel/exporters/jaeger v1.14.0 go.opentelemetry.io/otel/exporters/prometheus v0.50.0 - go.opentelemetry.io/otel/metric v1.38.0 + go.opentelemetry.io/otel/metric v1.39.0 go.opentelemetry.io/otel/sdk v1.38.0 go.opentelemetry.io/otel/sdk/metric v1.38.0 go.uber.org/fx v1.24.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.27.0 + go.uber.org/zap v1.27.1 golang.org/x/crypto v0.47.0 golang.org/x/mod v0.31.0 golang.org/x/net v0.48.0 // indirect @@ -313,7 +313,7 @@ require ( gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect go.dedis.ch/fixbuf v1.0.3 // indirect go.dedis.ch/kyber/v4 v4.0.0-pre2.0.20240924132404-4de33740016e // indirect; dependency-check-ignore: unknown - go.opentelemetry.io/otel/trace v1.38.0 // indirect + go.opentelemetry.io/otel/trace v1.39.0 // indirect go.uber.org/dig v1.19.0 // indirect go.uber.org/mock v0.5.2 // indirect go4.org v0.0.0-20230225012048-214862532bf5 // indirect @@ -322,7 +322,7 @@ require ( gonum.org/v1/gonum v0.16.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 // indirect google.golang.org/grpc v1.75.0 // indirect - google.golang.org/protobuf v1.36.10 // indirect + google.golang.org/protobuf v1.36.11 // indirect gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index c198af3f44f..696f6b22d1f 100644 --- a/go.sum +++ b/go.sum @@ -250,8 +250,8 @@ github.com/filecoin-project/go-commp-utils/v2 v2.1.0/go.mod h1:NbxJYlhxtWaNhlVCj github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= github.com/filecoin-project/go-crypto v0.1.0 h1:Pob2MphoipMbe/ksxZOMcQvmBHAd3sI/WEqcbpIsGI0= github.com/filecoin-project/go-crypto v0.1.0/go.mod h1:K9UFXvvoyAVvB+0Le7oGlKiT9mgA5FHOJdYQXEE8IhI= -github.com/filecoin-project/go-f3 v0.8.10 h1:Mm+daAn9EKqTTDY3ICbPTR2i3Opjb4gr6Y7bJ8oCA84= -github.com/filecoin-project/go-f3 v0.8.10/go.mod h1:hFvb2CMxHDmlJAVzfiIL/V8zCtNMQqfSnhP5TyM6CHI= +github.com/filecoin-project/go-f3 v0.8.12 h1:+AybcpFs+KM3qSNALYSHuY5zzWlWmJfiw3aZzO0nyh0= +github.com/filecoin-project/go-f3 v0.8.12/go.mod h1:DyAT+PKCN1WfMK39qy3E+qUDSk/pdQhXL2TgfTtwm4M= github.com/filecoin-project/go-fil-commcid v0.3.1 h1:4EfxpHSlvtkOqa9weG2Yt5kxFmPib2xU7Uc9Lbqk7fs= github.com/filecoin-project/go-fil-commcid v0.3.1/go.mod h1:z7Ssf8d7kspF9QRAVHDbZ+43JK4mkhbGH5lyph1TnKY= github.com/filecoin-project/go-fil-commp-hashhash v0.2.0 h1:HYIUugzjq78YvV3vC6rL95+SfC/aSTVSnZSZiDV5pCk= @@ -709,8 +709,8 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= -github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= +github.com/klauspost/compress v1.18.2 h1:iiPHWW0YrcFgpBYhsA6D1+fqHssJscY/Tm/y2Uqnapk= +github.com/klauspost/compress v1.18.2/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= @@ -943,8 +943,9 @@ github.com/nikkolasg/hexjson v0.1.0 h1:Cgi1MSZVQFoJKYeRpBNEcdF3LB+Zo4fYKsDz7h8uJ github.com/nikkolasg/hexjson v0.1.0/go.mod h1:fbGbWFZ0FmJMFbpCMtJpwb0tudVxSSZ+Es2TsCg57cA= github.com/nkovacs/streamquote v1.0.0 h1:PmVIV08Zlx2lZK5fFZlMZ04eHcDTIFJCv/5/0twVUow= github.com/nkovacs/streamquote v1.0.0/go.mod h1:BN+NaZ2CmdKqUuTUXUEm9j95B2TRbpOWpxbJYzzgUsc= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= +github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -1270,8 +1271,8 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.6 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG0FI8OiXhBfcRtqqHcZcka+gU3cskNuf05R18= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg= -go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= -go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48= +go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8= go.opentelemetry.io/otel/bridge/opencensus v1.28.0 h1:/BcyAV1bUJjSVxoeKwTQL9cS4X1iC6izZ9mheeuVSCU= go.opentelemetry.io/otel/bridge/opencensus v1.28.0/go.mod h1:FZp2xE+46yAyp3DfLFALze58nY0iIE8zs+mCgkPAzq0= go.opentelemetry.io/otel/exporters/jaeger v1.14.0 h1:CjbUNd4iN2hHmWekmOqZ+zSCU+dzZppG8XsV+A3oc8Q= @@ -1282,14 +1283,14 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 h1:lwI4D go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0/go.mod h1:Kz/oCE7z5wuyhPxsXDuaPteSWqjSBD5YaSdbxZYGbGk= go.opentelemetry.io/otel/exporters/prometheus v0.50.0 h1:2Ewsda6hejmbhGFyUvWZjUThC98Cf8Zy6g0zkIimOng= go.opentelemetry.io/otel/exporters/prometheus v0.50.0/go.mod h1:pMm5PkUo5YwbLiuEf7t2xg4wbP0/eSJrMxIMxKosynY= -go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= -go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0= +go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs= go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= -go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= -go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI= +go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA= go.opentelemetry.io/proto/otlp v1.7.1 h1:gTOMpGDb0WTBOP8JaO72iL3auEZhVmAQg4ipjOVAtj4= go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1314,8 +1315,8 @@ go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9E go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= -go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= -go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc= +go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg= @@ -1728,8 +1729,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= -google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/itests/f3_test.go b/itests/f3_test.go index c563e930888..71a3d604eb2 100644 --- a/itests/f3_test.go +++ b/itests/f3_test.go @@ -135,8 +135,7 @@ func TestF3_InactiveModes(t *testing.T) { if tc.mode == "not running" { m := newTestManifest(BaseNetworkName, 1<<32, blockTime) cfg := &lf3.Config{ - BaseNetworkName: BaseNetworkName, - StaticManifest: m, + StaticManifest: m, } opts = append(opts, kit.F3Config(cfg)) } @@ -383,8 +382,7 @@ func setupWithStaticManifest(t *testing.T, manif *manifest.Manifest, testBootstr }) cfg := &lf3.Config{ - BaseNetworkName: BaseNetworkName, - StaticManifest: manif, + StaticManifest: manif, } nodeOpts := []kit.NodeOpt{kit.WithAllSubsystems(), kit.F3Config(cfg)} diff --git a/node/modules/lp2p/pubsub.go b/node/modules/lp2p/pubsub.go index 2cdbd249b54..0f63072d1d3 100644 --- a/node/modules/lp2p/pubsub.go +++ b/node/modules/lp2p/pubsub.go @@ -376,12 +376,10 @@ func GossipSub(in GossipIn) (service *pubsub.PubSub, err error) { allowTopics = append(allowTopics, drandTopics...) - if in.F3Config != nil { - if in.F3Config.StaticManifest != nil { - gpbftTopic := manifest.PubSubTopicFromNetworkName(in.F3Config.BaseNetworkName) - chainexTopic := manifest.ChainExchangeTopicFromNetworkName(in.F3Config.BaseNetworkName) - allowTopics = append(allowTopics, gpbftTopic, chainexTopic) - } + if in.F3Config != nil && in.F3Config.StaticManifest != nil { + gpbftTopic := manifest.PubSubTopicFromNetworkName(in.F3Config.StaticManifest.NetworkName) + chainexTopic := manifest.ChainExchangeTopicFromNetworkName(in.F3Config.StaticManifest.NetworkName) + allowTopics = append(allowTopics, gpbftTopic, chainexTopic) } options = append(options,