diff --git a/CHANGELOG.md b/CHANGELOG.md index 79f7d55f0c7..8e93ff6e2ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - https://github.com/filecoin-project/lotus/pull/12203: Fix slice modification bug in ETH Tx Events Bloom Filter - https://github.com/filecoin-project/lotus/pull/12221: Fix a nil reference panic in the ETH Trace API - https://github.com/filecoin-project/lotus/pull/12112: Moved consts from build/ to build/buildconstants/ for ligher curio deps. +- https://github.com/filecoin-project/lotus/pull/12237: Upgrade to go-f3 `v0.0.4`. ## ☢️ Upgrade Warnings ☢️ diff --git a/chain/lf3/ec.go b/chain/lf3/ec.go index 98ffe332ef9..baa483e16e6 100644 --- a/chain/lf3/ec.go +++ b/chain/lf3/ec.go @@ -25,12 +25,18 @@ type ecWrapper struct { StateManager *stmgr.StateManager } +var _ ec.TipSet = (*f3TipSet)(nil) + type f3TipSet types.TipSet func (ts *f3TipSet) cast() *types.TipSet { return (*types.TipSet)(ts) } +func (ts *f3TipSet) String() string { + return ts.cast().String() +} + func (ts *f3TipSet) Key() gpbft.TipSetKey { return ts.cast().Key().Bytes() } diff --git a/chain/lf3/manifest.go b/chain/lf3/manifest.go index da09173d687..4e304a5eab1 100644 --- a/chain/lf3/manifest.go +++ b/chain/lf3/manifest.go @@ -11,30 +11,23 @@ import ( "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build/buildconstants" - "github.com/filecoin-project/lotus/chain/stmgr" - "github.com/filecoin-project/lotus/chain/store" "github.com/filecoin-project/lotus/node/modules/dtypes" ) -func NewManifestProvider(nn dtypes.NetworkName, cs *store.ChainStore, sm *stmgr.StateManager, ps *pubsub.PubSub) manifest.ManifestProvider { +func NewManifestProvider(nn dtypes.NetworkName, ps *pubsub.PubSub) manifest.ManifestProvider { m := manifest.LocalDevnetManifest() m.NetworkName = gpbft.NetworkName(nn) m.ECDelayMultiplier = 2. m.ECPeriod = time.Duration(build.BlockDelaySecs) * time.Second m.BootstrapEpoch = int64(buildconstants.F3BootstrapEpoch) m.ECFinality = int64(build.Finality) - m.CommiteeLookback = 5 - - ec := &ecWrapper{ - ChainStore: cs, - StateManager: sm, - } + m.CommitteeLookback = 5 switch manifestServerID, err := peer.Decode(buildconstants.ManifestServerID); { case err != nil: log.Warnw("Cannot decode F3 manifest sever identity; falling back on static manifest provider", "err", err) return manifest.NewStaticManifestProvider(m) default: - return manifest.NewDynamicManifestProvider(m, ps, ec, manifestServerID) + return manifest.NewDynamicManifestProvider(m, ps, manifestServerID) } } diff --git a/go.mod b/go.mod index 360d25c4925..ddc4f1baed1 100644 --- a/go.mod +++ b/go.mod @@ -41,7 +41,7 @@ require ( github.com/filecoin-project/go-commp-utils v0.1.3 github.com/filecoin-project/go-commp-utils/nonffi v0.0.0-20220905160352-62059082a837 github.com/filecoin-project/go-crypto v0.0.1 - github.com/filecoin-project/go-f3 v0.0.3 + github.com/filecoin-project/go-f3 v0.0.4 github.com/filecoin-project/go-fil-commcid v0.1.0 github.com/filecoin-project/go-hamt-ipld/v3 v3.1.0 github.com/filecoin-project/go-jsonrpc v0.3.2 diff --git a/go.sum b/go.sum index 3ae4d177a9b..a8fd4c48e32 100644 --- a/go.sum +++ b/go.sum @@ -266,8 +266,8 @@ github.com/filecoin-project/go-commp-utils/nonffi v0.0.0-20220905160352-62059082 github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= github.com/filecoin-project/go-crypto v0.0.1 h1:AcvpSGGCgjaY8y1az6AMfKQWreF/pWO2JJGLl6gCq6o= github.com/filecoin-project/go-crypto v0.0.1/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= -github.com/filecoin-project/go-f3 v0.0.3 h1:12jodQO47QNL0xnb2O1kbKIq0R+/MYWPK05Lb6MrHmU= -github.com/filecoin-project/go-f3 v0.0.3/go.mod h1:QgyFNiqCoQQFMo+w5o9tC/HqS9UwGZV4B1ssfAdGqtY= +github.com/filecoin-project/go-f3 v0.0.4 h1:ZzScl5S4b/JxD/g4z5pyyly7jZdz8HTlvR1j+iuYPAg= +github.com/filecoin-project/go-f3 v0.0.4/go.mod h1:pkt1YT85Gyzjdyma9M+JkTtneWncxEhuw68ABVn95S4= github.com/filecoin-project/go-fil-commcid v0.0.0-20201016201715-d41df56b4f6a/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= github.com/filecoin-project/go-fil-commcid v0.1.0 h1:3R4ds1A9r6cr8mvZBfMYxTS88OqLYEo6roi+GiIeOh8= github.com/filecoin-project/go-fil-commcid v0.1.0/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ=