Skip to content

Commit e19f119

Browse files
rjan90Kubuxu
andauthored
fix: update F3-calibnet name and bootstrap epoch Calibnet (#13469)
* fix: update F3-calibnet name and epoch fix: update F3-calibnet name and epoch * fix: unset `InitialPowerTable` fix: unset `InitialPowerTable` * fix: use manifest NetworkName for F3 pubsub topic filtering Remove BaseNetworkName from lf3.Config and use the manifest's NetworkName directly for pubsub topic filtering. This was the only remaining use of the Filecoin-to-F3 network name mapping, which is no longer needed now that the F3 network name is explicitly defined in the manifest. * chore: bump go-f3 version to v0.8.11 chore: bump go-f3 version to v0.8.11 * feat: F3 data import with manifest validation Added a check for the availability of the F3 manifest before importing F3 data into the datastore. If the manifest is not available, a warning is logged, and the import is skipped, allowing the chain import to continue. * fix(tests): patch F3ManifestBytes in TestChainExportImportWithF3Data Fixes an issue where we couldn't impport a test snapshot due to InitialPowerTable miss-match Signed-off-by: Jakub Sztandera <oss@kubuxu.com> * chore: bump go-f3 version to v0.8.12 chore: bump go-f3 version to v0.8.12 * fix: skip F3 data import when InitialPowerTable is undefined fix: skip F3 data import when InitialPowerTable is undefined * chore: update F3 calibnet BootstrapEpoch chore: update F3 calibnet BootstrapEpoch * chore: go-mod tidy chore: go-mod tidy --------- Signed-off-by: Jakub Sztandera <oss@kubuxu.com> Co-authored-by: Jakub Sztandera <oss@kubuxu.com>
1 parent 5f6c786 commit e19f119

File tree

8 files changed

+68
-58
lines changed

8 files changed

+68
-58
lines changed

build/buildconstants/f3manifest_calibnet.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
"Pause": false,
33
"ProtocolVersion": 7,
44
"InitialInstance": 0,
5-
"BootstrapEpoch": 2081674,
6-
"NetworkName": "calibrationnet",
5+
"BootstrapEpoch": 3451774,
6+
"NetworkName": "calibrationnet2",
77
"ExplicitPower": null,
88
"IgnoreECPower": false,
9-
"InitialPowerTable": {
10-
"/": "bafy2bzaceab236vmmb3n4q4tkvua2n4dphcbzzxerxuey3mot4g3cov5j3r2c"
11-
},
9+
"InitialPowerTable": null,
1210
"CommitteeLookback": 10,
1311
"CatchUpAlignment": 15000000000,
1412
"Gpbft": {

chain/lf3/config.go

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,9 @@ import (
1010
"github.com/filecoin-project/go-state-types/abi"
1111

1212
"github.com/filecoin-project/lotus/build/buildconstants"
13-
"github.com/filecoin-project/lotus/node/modules/dtypes"
1413
)
1514

1615
type Config struct {
17-
// BaseNetworkName is the base from which dynamic network names are defined and is usually
18-
// the name of the network defined by the static manifest. This must be set correctly or,
19-
// e.g., pubsub topic filters won't work correctly.
20-
BaseNetworkName gpbft.NetworkName
2116
// StaticManifest this instance's default manifest absent any dynamic manifests. Also see
2217
// PrioritizeStaticManifest.
2318
StaticManifest *manifest.Manifest
@@ -59,18 +54,9 @@ func NewManifest(
5954
}
6055
}
6156

62-
// NewConfig creates a new F3 config based on the node's build parameters and the passed network
63-
// name.
64-
func NewConfig(nn dtypes.NetworkName) *Config {
65-
// Use "filecoin" as the network name on mainnet, otherwise use the network name. Yes,
66-
// mainnet is called testnetnet in state.
67-
if nn == "testnetnet" {
68-
nn = "filecoin"
57+
// NewConfig creates a new F3 config based on the node's build parameters.
58+
func NewConfig() *Config {
59+
return &Config{
60+
StaticManifest: buildconstants.F3Manifest(),
6961
}
70-
c := &Config{
71-
BaseNetworkName: gpbft.NetworkName(nn),
72-
StaticManifest: buildconstants.F3Manifest(),
73-
}
74-
75-
return c
7662
}

chain/store/snapshot.go

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
"golang.org/x/xerrors"
2929

3030
"github.com/filecoin-project/go-f3/certstore"
31+
"github.com/filecoin-project/go-f3/manifest"
3132
"github.com/filecoin-project/go-state-types/abi"
3233

3334
bstore "github.com/filecoin-project/lotus/blockstore"
@@ -236,9 +237,17 @@ func (cs *ChainStore) Import(ctx context.Context, f3Ds dtypes.F3DS, r io.Reader)
236237
prefix := F3DatastorePrefix()
237238
f3DsWrapper := namespace.Wrap(f3Ds, prefix)
238239

239-
log.Info("Importing F3Data to datastore")
240-
if err := certstore.ImportSnapshotToDatastore(ctx, f3r, f3DsWrapper); err != nil {
241-
return nil, nil, xerrors.Errorf("failed to import f3Data to datastore: %w", err)
240+
var f3Manifest *manifest.Manifest = buildconstants.F3Manifest()
241+
if f3Manifest == nil {
242+
log.Warnf("Snapshot contains F3 data but F3 manifest is not available in this build. Skipping F3 data import.")
243+
// Skip F3 import but continue with chain import
244+
} else if !f3Manifest.InitialPowerTable.Defined() {
245+
log.Warnf("Snapshot contains F3 data but InitialPowerTable in F3 manifest is not available in this build. Skipping F3 data import.")
246+
} else {
247+
log.Info("Importing F3Data to datastore")
248+
if err := certstore.ImportSnapshotToDatastore(ctx, f3r, f3DsWrapper, f3Manifest); err != nil {
249+
return nil, nil, xerrors.Errorf("failed to import f3Data to datastore: %w", err)
250+
}
242251
}
243252
}
244253

chain/store/store_test.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package store_test
33
import (
44
"bytes"
55
"context"
6+
"encoding/json"
67
"io"
78
"testing"
89

@@ -15,10 +16,12 @@ import (
1516
"github.com/filecoin-project/go-f3/certs"
1617
"github.com/filecoin-project/go-f3/certstore"
1718
"github.com/filecoin-project/go-f3/gpbft"
19+
"github.com/filecoin-project/go-f3/manifest"
1820
"github.com/filecoin-project/go-state-types/abi"
1921
"github.com/filecoin-project/go-state-types/crypto"
2022

2123
"github.com/filecoin-project/lotus/blockstore"
24+
"github.com/filecoin-project/lotus/build/buildconstants"
2225
"github.com/filecoin-project/lotus/chain/actors/policy"
2326
"github.com/filecoin-project/lotus/chain/consensus"
2427
"github.com/filecoin-project/lotus/chain/consensus/filcns"
@@ -270,6 +273,23 @@ func TestChainExportImportWithF3Data(t *testing.T) {
270273
lc = cert
271274
}
272275

276+
{
277+
// patch out embedded manifest for testing
278+
oldManifest := buildconstants.F3ManifestBytes
279+
280+
var manif manifest.Manifest
281+
if err := json.Unmarshal(buildconstants.F3ManifestBytes, &manif); err != nil {
282+
t.Fatal(err)
283+
}
284+
manif.InitialPowerTable = ptCid
285+
defer func() {
286+
buildconstants.F3ManifestBytes = oldManifest
287+
}()
288+
if buildconstants.F3ManifestBytes, err = json.Marshal(manif); err != nil {
289+
t.Fatal(err)
290+
}
291+
}
292+
273293
certStore, err := certstore.OpenStore(context.TODO(), f3ds)
274294
if err != nil {
275295
t.Fatal(err)

go.mod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ require (
4545
github.com/filecoin-project/go-cbor-util v0.0.2
4646
github.com/filecoin-project/go-commp-utils/v2 v2.1.0
4747
github.com/filecoin-project/go-crypto v0.1.0
48-
github.com/filecoin-project/go-f3 v0.8.10
48+
github.com/filecoin-project/go-f3 v0.8.12
4949
github.com/filecoin-project/go-fil-commcid v0.3.1
5050
github.com/filecoin-project/go-hamt-ipld/v3 v3.4.1
5151
github.com/filecoin-project/go-jsonrpc v0.9.0
@@ -105,7 +105,7 @@ require (
105105
github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438
106106
github.com/jpillora/backoff v1.0.0
107107
github.com/kelseyhightower/envconfig v1.4.0
108-
github.com/klauspost/compress v1.18.0
108+
github.com/klauspost/compress v1.18.2
109109
github.com/koalacxr/quantile v0.0.1
110110
github.com/libp2p/go-buffer-pool v0.1.0
111111
github.com/libp2p/go-libp2p v0.46.0
@@ -146,16 +146,16 @@ require (
146146
github.com/zondax/ledger-filecoin-go v1.2.0
147147
github.com/zyedidia/generic v1.2.1
148148
go.opencensus.io v0.24.0
149-
go.opentelemetry.io/otel v1.38.0
149+
go.opentelemetry.io/otel v1.39.0
150150
go.opentelemetry.io/otel/bridge/opencensus v1.28.0
151151
go.opentelemetry.io/otel/exporters/jaeger v1.14.0
152152
go.opentelemetry.io/otel/exporters/prometheus v0.50.0
153-
go.opentelemetry.io/otel/metric v1.38.0
153+
go.opentelemetry.io/otel/metric v1.39.0
154154
go.opentelemetry.io/otel/sdk v1.38.0
155155
go.opentelemetry.io/otel/sdk/metric v1.38.0
156156
go.uber.org/fx v1.24.0
157157
go.uber.org/multierr v1.11.0
158-
go.uber.org/zap v1.27.0
158+
go.uber.org/zap v1.27.1
159159
golang.org/x/crypto v0.47.0
160160
golang.org/x/mod v0.31.0
161161
golang.org/x/net v0.48.0 // indirect
@@ -313,7 +313,7 @@ require (
313313
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect
314314
go.dedis.ch/fixbuf v1.0.3 // indirect
315315
go.dedis.ch/kyber/v4 v4.0.0-pre2.0.20240924132404-4de33740016e // indirect; dependency-check-ignore: unknown
316-
go.opentelemetry.io/otel/trace v1.38.0 // indirect
316+
go.opentelemetry.io/otel/trace v1.39.0 // indirect
317317
go.uber.org/dig v1.19.0 // indirect
318318
go.uber.org/mock v0.5.2 // indirect
319319
go4.org v0.0.0-20230225012048-214862532bf5 // indirect
@@ -322,7 +322,7 @@ require (
322322
gonum.org/v1/gonum v0.16.0 // indirect
323323
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 // indirect
324324
google.golang.org/grpc v1.75.0 // indirect
325-
google.golang.org/protobuf v1.36.10 // indirect
325+
google.golang.org/protobuf v1.36.11 // indirect
326326
gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect
327327
gopkg.in/yaml.v2 v2.4.0 // indirect
328328
gopkg.in/yaml.v3 v3.0.1 // indirect

go.sum

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ github.com/filecoin-project/go-commp-utils/v2 v2.1.0/go.mod h1:NbxJYlhxtWaNhlVCj
250250
github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ=
251251
github.com/filecoin-project/go-crypto v0.1.0 h1:Pob2MphoipMbe/ksxZOMcQvmBHAd3sI/WEqcbpIsGI0=
252252
github.com/filecoin-project/go-crypto v0.1.0/go.mod h1:K9UFXvvoyAVvB+0Le7oGlKiT9mgA5FHOJdYQXEE8IhI=
253-
github.com/filecoin-project/go-f3 v0.8.10 h1:Mm+daAn9EKqTTDY3ICbPTR2i3Opjb4gr6Y7bJ8oCA84=
254-
github.com/filecoin-project/go-f3 v0.8.10/go.mod h1:hFvb2CMxHDmlJAVzfiIL/V8zCtNMQqfSnhP5TyM6CHI=
253+
github.com/filecoin-project/go-f3 v0.8.12 h1:+AybcpFs+KM3qSNALYSHuY5zzWlWmJfiw3aZzO0nyh0=
254+
github.com/filecoin-project/go-f3 v0.8.12/go.mod h1:DyAT+PKCN1WfMK39qy3E+qUDSk/pdQhXL2TgfTtwm4M=
255255
github.com/filecoin-project/go-fil-commcid v0.3.1 h1:4EfxpHSlvtkOqa9weG2Yt5kxFmPib2xU7Uc9Lbqk7fs=
256256
github.com/filecoin-project/go-fil-commcid v0.3.1/go.mod h1:z7Ssf8d7kspF9QRAVHDbZ+43JK4mkhbGH5lyph1TnKY=
257257
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
709709
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
710710
github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=
711711
github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
712-
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
713-
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
712+
github.com/klauspost/compress v1.18.2 h1:iiPHWW0YrcFgpBYhsA6D1+fqHssJscY/Tm/y2Uqnapk=
713+
github.com/klauspost/compress v1.18.2/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
714714
github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
715715
github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y=
716716
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
943943
github.com/nikkolasg/hexjson v0.1.0/go.mod h1:fbGbWFZ0FmJMFbpCMtJpwb0tudVxSSZ+Es2TsCg57cA=
944944
github.com/nkovacs/streamquote v1.0.0 h1:PmVIV08Zlx2lZK5fFZlMZ04eHcDTIFJCv/5/0twVUow=
945945
github.com/nkovacs/streamquote v1.0.0/go.mod h1:BN+NaZ2CmdKqUuTUXUEm9j95B2TRbpOWpxbJYzzgUsc=
946-
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
947946
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
947+
github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY=
948+
github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc=
948949
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
949950
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
950951
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
12701271
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo=
12711272
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG0FI8OiXhBfcRtqqHcZcka+gU3cskNuf05R18=
12721273
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg=
1273-
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
1274-
go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
1274+
go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48=
1275+
go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8=
12751276
go.opentelemetry.io/otel/bridge/opencensus v1.28.0 h1:/BcyAV1bUJjSVxoeKwTQL9cS4X1iC6izZ9mheeuVSCU=
12761277
go.opentelemetry.io/otel/bridge/opencensus v1.28.0/go.mod h1:FZp2xE+46yAyp3DfLFALze58nY0iIE8zs+mCgkPAzq0=
12771278
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
12821283
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0/go.mod h1:Kz/oCE7z5wuyhPxsXDuaPteSWqjSBD5YaSdbxZYGbGk=
12831284
go.opentelemetry.io/otel/exporters/prometheus v0.50.0 h1:2Ewsda6hejmbhGFyUvWZjUThC98Cf8Zy6g0zkIimOng=
12841285
go.opentelemetry.io/otel/exporters/prometheus v0.50.0/go.mod h1:pMm5PkUo5YwbLiuEf7t2xg4wbP0/eSJrMxIMxKosynY=
1285-
go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA=
1286-
go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI=
1286+
go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0=
1287+
go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs=
12871288
go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E=
12881289
go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg=
12891290
go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM=
12901291
go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA=
1291-
go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE=
1292-
go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs=
1292+
go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI=
1293+
go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA=
12931294
go.opentelemetry.io/proto/otlp v1.7.1 h1:gTOMpGDb0WTBOP8JaO72iL3auEZhVmAQg4ipjOVAtj4=
12941295
go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE=
12951296
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
13141315
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
13151316
go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc=
13161317
go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ=
1317-
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
1318-
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
1318+
go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc=
1319+
go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
13191320
go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0=
13201321
go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8=
13211322
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
17281729
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
17291730
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
17301731
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
1731-
google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE=
1732-
google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
1732+
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
1733+
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
17331734
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
17341735
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
17351736
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

itests/f3_test.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ func TestF3_InactiveModes(t *testing.T) {
135135
if tc.mode == "not running" {
136136
m := newTestManifest(BaseNetworkName, 1<<32, blockTime)
137137
cfg := &lf3.Config{
138-
BaseNetworkName: BaseNetworkName,
139-
StaticManifest: m,
138+
StaticManifest: m,
140139
}
141140
opts = append(opts, kit.F3Config(cfg))
142141
}
@@ -383,8 +382,7 @@ func setupWithStaticManifest(t *testing.T, manif *manifest.Manifest, testBootstr
383382
})
384383

385384
cfg := &lf3.Config{
386-
BaseNetworkName: BaseNetworkName,
387-
StaticManifest: manif,
385+
StaticManifest: manif,
388386
}
389387

390388
nodeOpts := []kit.NodeOpt{kit.WithAllSubsystems(), kit.F3Config(cfg)}

node/modules/lp2p/pubsub.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -376,12 +376,10 @@ func GossipSub(in GossipIn) (service *pubsub.PubSub, err error) {
376376

377377
allowTopics = append(allowTopics, drandTopics...)
378378

379-
if in.F3Config != nil {
380-
if in.F3Config.StaticManifest != nil {
381-
gpbftTopic := manifest.PubSubTopicFromNetworkName(in.F3Config.BaseNetworkName)
382-
chainexTopic := manifest.ChainExchangeTopicFromNetworkName(in.F3Config.BaseNetworkName)
383-
allowTopics = append(allowTopics, gpbftTopic, chainexTopic)
384-
}
379+
if in.F3Config != nil && in.F3Config.StaticManifest != nil {
380+
gpbftTopic := manifest.PubSubTopicFromNetworkName(in.F3Config.StaticManifest.NetworkName)
381+
chainexTopic := manifest.ChainExchangeTopicFromNetworkName(in.F3Config.StaticManifest.NetworkName)
382+
allowTopics = append(allowTopics, gpbftTopic, chainexTopic)
385383
}
386384

387385
options = append(options,

0 commit comments

Comments
 (0)