Skip to content

Commit 729b97f

Browse files
rjan90Kubuxu
andcommitted
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 4e64bcb commit 729b97f

File tree

8 files changed

+74
-65
lines changed

8 files changed

+74
-65
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: 13 additions & 14 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
@@ -104,7 +104,7 @@ require (
104104
github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438
105105
github.com/jpillora/backoff v1.0.0
106106
github.com/kelseyhightower/envconfig v1.4.0
107-
github.com/klauspost/compress v1.18.0
107+
github.com/klauspost/compress v1.18.2
108108
github.com/koalacxr/quantile v0.0.1
109109
github.com/libp2p/go-buffer-pool v0.1.0
110110
github.com/libp2p/go-libp2p v0.44.0
@@ -145,22 +145,22 @@ require (
145145
github.com/zondax/ledger-filecoin-go v1.2.0
146146
github.com/zyedidia/generic v1.2.1
147147
go.opencensus.io v0.24.0
148-
go.opentelemetry.io/otel v1.38.0
148+
go.opentelemetry.io/otel v1.39.0
149149
go.opentelemetry.io/otel/bridge/opencensus v1.28.0
150150
go.opentelemetry.io/otel/exporters/jaeger v1.14.0
151151
go.opentelemetry.io/otel/exporters/prometheus v0.50.0
152-
go.opentelemetry.io/otel/metric v1.38.0
152+
go.opentelemetry.io/otel/metric v1.39.0
153153
go.opentelemetry.io/otel/sdk v1.38.0
154154
go.opentelemetry.io/otel/sdk/metric v1.38.0
155155
go.uber.org/fx v1.24.0
156156
go.uber.org/multierr v1.11.0
157-
go.uber.org/zap v1.27.0
158-
golang.org/x/crypto v0.43.0
159-
golang.org/x/mod v0.28.0
160-
golang.org/x/net v0.45.0
161-
golang.org/x/sync v0.17.0
162-
golang.org/x/sys v0.37.0
163-
golang.org/x/term v0.36.0
157+
go.uber.org/zap v1.27.1
158+
golang.org/x/crypto v0.47.0
159+
golang.org/x/mod v0.31.0
160+
golang.org/x/net v0.48.0 // indirect
161+
golang.org/x/sync v0.19.0
162+
golang.org/x/sys v0.40.0
163+
golang.org/x/term v0.39.0
164164
golang.org/x/time v0.14.0
165165
golang.org/x/tools v0.37.0
166166
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da
@@ -320,8 +320,7 @@ require (
320320
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect
321321
go.dedis.ch/fixbuf v1.0.3 // indirect
322322
go.dedis.ch/kyber/v4 v4.0.0-pre2.0.20240924132404-4de33740016e // indirect; dependency-check-ignore: unknown
323-
go.opentelemetry.io/otel/trace v1.38.0 // indirect
324-
go.uber.org/atomic v1.11.0 // indirect
323+
go.opentelemetry.io/otel/trace v1.39.0 // indirect
325324
go.uber.org/dig v1.19.0 // indirect
326325
go.uber.org/mock v0.5.2 // indirect
327326
go4.org v0.0.0-20230225012048-214862532bf5 // indirect
@@ -330,7 +329,7 @@ require (
330329
gonum.org/v1/gonum v0.16.0 // indirect
331330
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 // indirect
332331
google.golang.org/grpc v1.75.0 // indirect
333-
google.golang.org/protobuf v1.36.9 // indirect
332+
google.golang.org/protobuf v1.36.11 // indirect
334333
gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect
335334
gopkg.in/yaml.v2 v2.4.0 // indirect
336335
gopkg.in/yaml.v3 v3.0.1 // indirect

go.sum

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@ github.com/filecoin-project/go-commp-utils/v2 v2.1.0/go.mod h1:NbxJYlhxtWaNhlVCj
261261
github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ=
262262
github.com/filecoin-project/go-crypto v0.1.0 h1:Pob2MphoipMbe/ksxZOMcQvmBHAd3sI/WEqcbpIsGI0=
263263
github.com/filecoin-project/go-crypto v0.1.0/go.mod h1:K9UFXvvoyAVvB+0Le7oGlKiT9mgA5FHOJdYQXEE8IhI=
264-
github.com/filecoin-project/go-f3 v0.8.10 h1:Mm+daAn9EKqTTDY3ICbPTR2i3Opjb4gr6Y7bJ8oCA84=
265-
github.com/filecoin-project/go-f3 v0.8.10/go.mod h1:hFvb2CMxHDmlJAVzfiIL/V8zCtNMQqfSnhP5TyM6CHI=
264+
github.com/filecoin-project/go-f3 v0.8.12 h1:+AybcpFs+KM3qSNALYSHuY5zzWlWmJfiw3aZzO0nyh0=
265+
github.com/filecoin-project/go-f3 v0.8.12/go.mod h1:DyAT+PKCN1WfMK39qy3E+qUDSk/pdQhXL2TgfTtwm4M=
266266
github.com/filecoin-project/go-fil-commcid v0.3.1 h1:4EfxpHSlvtkOqa9weG2Yt5kxFmPib2xU7Uc9Lbqk7fs=
267267
github.com/filecoin-project/go-fil-commcid v0.3.1/go.mod h1:z7Ssf8d7kspF9QRAVHDbZ+43JK4mkhbGH5lyph1TnKY=
268268
github.com/filecoin-project/go-fil-commp-hashhash v0.2.0 h1:HYIUugzjq78YvV3vC6rL95+SfC/aSTVSnZSZiDV5pCk=
@@ -754,8 +754,8 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI
754754
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
755755
github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=
756756
github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
757-
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
758-
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
757+
github.com/klauspost/compress v1.18.2 h1:iiPHWW0YrcFgpBYhsA6D1+fqHssJscY/Tm/y2Uqnapk=
758+
github.com/klauspost/compress v1.18.2/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
759759
github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
760760
github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y=
761761
github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
@@ -994,8 +994,9 @@ github.com/nikkolasg/hexjson v0.1.0 h1:Cgi1MSZVQFoJKYeRpBNEcdF3LB+Zo4fYKsDz7h8uJ
994994
github.com/nikkolasg/hexjson v0.1.0/go.mod h1:fbGbWFZ0FmJMFbpCMtJpwb0tudVxSSZ+Es2TsCg57cA=
995995
github.com/nkovacs/streamquote v1.0.0 h1:PmVIV08Zlx2lZK5fFZlMZ04eHcDTIFJCv/5/0twVUow=
996996
github.com/nkovacs/streamquote v1.0.0/go.mod h1:BN+NaZ2CmdKqUuTUXUEm9j95B2TRbpOWpxbJYzzgUsc=
997-
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
998997
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
998+
github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY=
999+
github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc=
9991000
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
10001001
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
10011002
github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
@@ -1354,8 +1355,8 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.6
13541355
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo=
13551356
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG0FI8OiXhBfcRtqqHcZcka+gU3cskNuf05R18=
13561357
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg=
1357-
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
1358-
go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
1358+
go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48=
1359+
go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8=
13591360
go.opentelemetry.io/otel/bridge/opencensus v1.28.0 h1:/BcyAV1bUJjSVxoeKwTQL9cS4X1iC6izZ9mheeuVSCU=
13601361
go.opentelemetry.io/otel/bridge/opencensus v1.28.0/go.mod h1:FZp2xE+46yAyp3DfLFALze58nY0iIE8zs+mCgkPAzq0=
13611362
go.opentelemetry.io/otel/exporters/jaeger v1.14.0 h1:CjbUNd4iN2hHmWekmOqZ+zSCU+dzZppG8XsV+A3oc8Q=
@@ -1366,14 +1367,14 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 h1:lwI4D
13661367
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0/go.mod h1:Kz/oCE7z5wuyhPxsXDuaPteSWqjSBD5YaSdbxZYGbGk=
13671368
go.opentelemetry.io/otel/exporters/prometheus v0.50.0 h1:2Ewsda6hejmbhGFyUvWZjUThC98Cf8Zy6g0zkIimOng=
13681369
go.opentelemetry.io/otel/exporters/prometheus v0.50.0/go.mod h1:pMm5PkUo5YwbLiuEf7t2xg4wbP0/eSJrMxIMxKosynY=
1369-
go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA=
1370-
go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI=
1370+
go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0=
1371+
go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs=
13711372
go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E=
13721373
go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg=
13731374
go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM=
13741375
go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA=
1375-
go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE=
1376-
go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs=
1376+
go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI=
1377+
go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA=
13771378
go.opentelemetry.io/proto/otlp v1.7.1 h1:gTOMpGDb0WTBOP8JaO72iL3auEZhVmAQg4ipjOVAtj4=
13781379
go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE=
13791380
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
@@ -1400,8 +1401,8 @@ go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9E
14001401
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
14011402
go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc=
14021403
go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ=
1403-
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
1404-
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
1404+
go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc=
1405+
go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
14051406
go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0=
14061407
go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8=
14071408
go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE=
@@ -1841,8 +1842,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0
18411842
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
18421843
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
18431844
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
1844-
google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw=
1845-
google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
1845+
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
1846+
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
18461847
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
18471848
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
18481849
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)