Skip to content

Commit 38830e9

Browse files
Kubuxumasih
andauthored
feat(f3): remove dynamic manifests and specify full static manifests (#13074) (#13090)
* feat(f3): allow specifying full static manifests * fix interop ManifestServerID * cleanup F3BoostrapEpoch * fix butterfly * Rip out dynamic manifest handling * Fix itests * fix lint * Disable non-relevant linter * fix tests * Address review * add CHANGELOG * Update build/buildconstants/f3manifest_butterfly.json * Update build/buildconstants/f3manifest_interop.json * Update build/buildconstants/f3manifest_2k.json --------- Signed-off-by: Jakub Sztandera <[email protected]> Co-authored-by: Masih H. Derkani <[email protected]>
1 parent 8f59fe9 commit 38830e9

24 files changed

+333
-714
lines changed

.golangci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ linters:
1010
- gosec
1111
- unconvert
1212
- staticcheck
13-
- exportloopref
1413
- unused
1514

1615
# We don't want to skip builtin/
@@ -51,7 +50,6 @@ issues:
5150

5251
exclude-use-default: false
5352
exclude-rules:
54-
5553
- path: .*_test.go
5654
linters:
5755
- gosec

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- feat: expose `/v2` APIs through Lotus Gateway ([filecoin-project/lotus#13075](https://github.com/filecoin-project/lotus/pull/13075))
1919
- chore: upgrade to go-f3 `v0.8.4` ([filecoin-project/lotus#13084](https://github.com/filecoin-project/lotus/pull/13084))
2020
- fix(f3): limit the concurrency of F3 power table calculation ([filecoin-project/lotus#13085](https://github.com/filecoin-project/lotus/pull/13085))
21+
- feat(f3): remove dynnamic manifest functionality and use static manifest ([filecoin-project/lotus#13074](https://github.com/filecoin-project/lotus/pull/13074))
2122

2223
### Experimental v2 APIs with F3 awareness
2324

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"Pause": false,
3+
"ProtocolVersion": 7,
4+
"InitialInstance": 0,
5+
"BootstrapEpoch": 1000,
6+
"NetworkName": "2k",
7+
"ExplicitPower": null,
8+
"IgnoreECPower": false,
9+
"InitialPowerTable": null,
10+
"CommitteeLookback": 10,
11+
"CatchUpAlignment": 15000000000,
12+
"Gpbft": {
13+
"Delta": 6000000000,
14+
"DeltaBackOffExponent": 2,
15+
"QualityDeltaMultiplier": 1,
16+
"MaxLookaheadRounds": 5,
17+
"ChainProposedLength": 100,
18+
"RebroadcastBackoffBase": 6000000000,
19+
"RebroadcastBackoffExponent": 1.3,
20+
"RebroadcastBackoffSpread": 0.1,
21+
"RebroadcastBackoffMax": 60000000000
22+
},
23+
"EC": {
24+
"Period": 4000000000,
25+
"Finality": 900,
26+
"DelayMultiplier": 2,
27+
"BaseDecisionBackoffTable": [1.3, 1.69, 2.2, 2.86, 3.71, 4.83, 6.27, 7.5],
28+
"HeadLookback": 4,
29+
"Finalize": true
30+
},
31+
"CertificateExchange": {
32+
"ClientRequestTimeout": 10000000000,
33+
"ServerRequestTimeout": 60000000000,
34+
"MinimumPollInterval": 30000000000,
35+
"MaximumPollInterval": 120000000000
36+
},
37+
"PubSub": {
38+
"CompressionEnabled": true,
39+
"ChainCompressionEnabled": true,
40+
"GMessageSubscriptionBufferSize": 128,
41+
"ValidatedMessageBufferSize": 128
42+
},
43+
"ChainExchange": {
44+
"SubscriptionBufferSize": 32,
45+
"MaxChainLength": 100,
46+
"MaxInstanceLookahead": 10,
47+
"MaxDiscoveredChainsPerInstance": 1000,
48+
"MaxWantedChainsPerInstance": 1000,
49+
"RebroadcastInterval": 2000000000,
50+
"MaxTimestampAge": 8000000000
51+
},
52+
"PartialMessageManager": {
53+
"PendingDiscoveredChainsBufferSize": 100,
54+
"PendingPartialMessagesBufferSize": 100,
55+
"PendingChainBroadcastsBufferSize": 100,
56+
"PendingInstanceRemovalBufferSize": 10,
57+
"CompletedMessagesBufferSize": 100,
58+
"MaxBufferedMessagesPerInstance": 25000,
59+
"MaxCachedValidatedMessagesPerInstance": 25000
60+
}
61+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"Pause": false,
3+
"ProtocolVersion": 7,
4+
"InitialInstance": 0,
5+
"BootstrapEpoch": 1000,
6+
"NetworkName": "butterflynet",
7+
"ExplicitPower": null,
8+
"IgnoreECPower": false,
9+
"InitialPowerTable": null,
10+
"CommitteeLookback": 10,
11+
"CatchUpAlignment": 15000000000,
12+
"Gpbft": {
13+
"Delta": 6000000000,
14+
"DeltaBackOffExponent": 2,
15+
"QualityDeltaMultiplier": 1,
16+
"MaxLookaheadRounds": 5,
17+
"ChainProposedLength": 100,
18+
"RebroadcastBackoffBase": 6000000000,
19+
"RebroadcastBackoffExponent": 1.3,
20+
"RebroadcastBackoffSpread": 0.1,
21+
"RebroadcastBackoffMax": 60000000000
22+
},
23+
"EC": {
24+
"Period": 30000000000,
25+
"Finality": 900,
26+
"DelayMultiplier": 2,
27+
"BaseDecisionBackoffTable": [1.3, 1.69, 2.2, 2.86, 3.71, 4.83, 6.27, 7.5],
28+
"HeadLookback": 4,
29+
"Finalize": true
30+
},
31+
"CertificateExchange": {
32+
"ClientRequestTimeout": 10000000000,
33+
"ServerRequestTimeout": 60000000000,
34+
"MinimumPollInterval": 30000000000,
35+
"MaximumPollInterval": 120000000000
36+
},
37+
"PubSub": {
38+
"CompressionEnabled": true,
39+
"ChainCompressionEnabled": true,
40+
"GMessageSubscriptionBufferSize": 128,
41+
"ValidatedMessageBufferSize": 128
42+
},
43+
"ChainExchange": {
44+
"SubscriptionBufferSize": 32,
45+
"MaxChainLength": 100,
46+
"MaxInstanceLookahead": 10,
47+
"MaxDiscoveredChainsPerInstance": 1000,
48+
"MaxWantedChainsPerInstance": 1000,
49+
"RebroadcastInterval": 2000000000,
50+
"MaxTimestampAge": 8000000000
51+
},
52+
"PartialMessageManager": {
53+
"PendingDiscoveredChainsBufferSize": 100,
54+
"PendingPartialMessagesBufferSize": 100,
55+
"PendingChainBroadcastsBufferSize": 100,
56+
"PendingInstanceRemovalBufferSize": 10,
57+
"CompletedMessagesBufferSize": 100,
58+
"MaxBufferedMessagesPerInstance": 25000,
59+
"MaxCachedValidatedMessagesPerInstance": 25000
60+
}
61+
}

chain/lf3/testdata/contract_manifest_golden.json renamed to build/buildconstants/f3manifest_calibnet.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
"Pause": false,
33
"ProtocolVersion": 7,
44
"InitialInstance": 0,
5-
"BootstrapEpoch": 5000000,
6-
"NetworkName": "filecoin",
5+
"BootstrapEpoch": 2081674,
6+
"NetworkName": "calibrationnet",
77
"ExplicitPower": null,
88
"IgnoreECPower": false,
9-
"InitialPowerTable": null,
9+
"InitialPowerTable": {
10+
"/": "bafy2bzaceab236vmmb3n4q4tkvua2n4dphcbzzxerxuey3mot4g3cov5j3r2c"
11+
},
1012
"CommitteeLookback": 10,
1113
"CatchUpAlignment": 15000000000,
1214
"Gpbft": {
@@ -34,7 +36,7 @@
3436
6.27,
3537
7.5
3638
],
37-
"HeadLookback": 0,
39+
"HeadLookback": 4,
3840
"Finalize": true
3941
},
4042
"CertificateExchange": {
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"Pause": false,
3+
"ProtocolVersion": 7,
4+
"InitialInstance": 0,
5+
"BootstrapEpoch": 1000,
6+
"NetworkName": "interopnet",
7+
"ExplicitPower": null,
8+
"IgnoreECPower": false,
9+
"InitialPowerTable": null,
10+
"CommitteeLookback": 10,
11+
"CatchUpAlignment": 15000000000,
12+
"Gpbft": {
13+
"Delta": 6000000000,
14+
"DeltaBackOffExponent": 2,
15+
"QualityDeltaMultiplier": 1,
16+
"MaxLookaheadRounds": 5,
17+
"ChainProposedLength": 100,
18+
"RebroadcastBackoffBase": 6000000000,
19+
"RebroadcastBackoffExponent": 1.3,
20+
"RebroadcastBackoffSpread": 0.1,
21+
"RebroadcastBackoffMax": 60000000000
22+
},
23+
"EC": {
24+
"Period": 30000000000,
25+
"Finality": 900,
26+
"DelayMultiplier": 2,
27+
"BaseDecisionBackoffTable": [1.3, 1.69, 2.2, 2.86, 3.71, 4.83, 6.27, 7.5],
28+
"HeadLookback": 4,
29+
"Finalize": true
30+
},
31+
"CertificateExchange": {
32+
"ClientRequestTimeout": 10000000000,
33+
"ServerRequestTimeout": 60000000000,
34+
"MinimumPollInterval": 30000000000,
35+
"MaximumPollInterval": 120000000000
36+
},
37+
"PubSub": {
38+
"CompressionEnabled": true,
39+
"ChainCompressionEnabled": true,
40+
"GMessageSubscriptionBufferSize": 128,
41+
"ValidatedMessageBufferSize": 128
42+
},
43+
"ChainExchange": {
44+
"SubscriptionBufferSize": 32,
45+
"MaxChainLength": 100,
46+
"MaxInstanceLookahead": 10,
47+
"MaxDiscoveredChainsPerInstance": 1000,
48+
"MaxWantedChainsPerInstance": 1000,
49+
"RebroadcastInterval": 2000000000,
50+
"MaxTimestampAge": 8000000000
51+
},
52+
"PartialMessageManager": {
53+
"PendingDiscoveredChainsBufferSize": 100,
54+
"PendingPartialMessagesBufferSize": 100,
55+
"PendingChainBroadcastsBufferSize": 100,
56+
"PendingInstanceRemovalBufferSize": 10,
57+
"CompletedMessagesBufferSize": 100,
58+
"MaxBufferedMessagesPerInstance": 25000,
59+
"MaxCachedValidatedMessagesPerInstance": 25000
60+
}
61+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"Pause": false,
3+
"ProtocolVersion": 7,
4+
"InitialInstance": 0,
5+
"BootstrapEpoch": 4920480,
6+
"NetworkName": "filecoin",
7+
"ExplicitPower": null,
8+
"IgnoreECPower": false,
9+
"InitialPowerTable": {
10+
"/": "bafy2bzacecklgxd2eksmodvhgurqvorkg3wamgqkrunir3al2gchv2cikgmbu"
11+
},
12+
"CommitteeLookback": 10,
13+
"CatchUpAlignment": 15000000000,
14+
"Gpbft": {
15+
"Delta": 6000000000,
16+
"DeltaBackOffExponent": 2,
17+
"QualityDeltaMultiplier": 8,
18+
"MaxLookaheadRounds": 5,
19+
"ChainProposedLength": 20,
20+
"RebroadcastBackoffBase": 6000000000,
21+
"RebroadcastBackoffExponent": 1.3,
22+
"RebroadcastBackoffSpread": 0.1,
23+
"RebroadcastBackoffMax": 60000000000
24+
},
25+
"EC": {
26+
"Period": 30000000000,
27+
"Finality": 900,
28+
"DelayMultiplier": 2,
29+
"BaseDecisionBackoffTable": [1.3, 1.69, 2.2, 2.86, 3.71, 4.83, 6.27, 7.5],
30+
"HeadLookback": 4,
31+
"Finalize": true
32+
},
33+
"CertificateExchange": {
34+
"ClientRequestTimeout": 10000000000,
35+
"ServerRequestTimeout": 60000000000,
36+
"MinimumPollInterval": 30000000000,
37+
"MaximumPollInterval": 120000000000
38+
},
39+
"PubSub": {
40+
"CompressionEnabled": true,
41+
"ChainCompressionEnabled": true,
42+
"GMessageSubscriptionBufferSize": 768,
43+
"ValidatedMessageBufferSize": 1024
44+
},
45+
"ChainExchange": {
46+
"SubscriptionBufferSize": 64,
47+
"MaxChainLength": 20,
48+
"MaxInstanceLookahead": 10,
49+
"MaxDiscoveredChainsPerInstance": 1000,
50+
"MaxWantedChainsPerInstance": 1000,
51+
"RebroadcastInterval": 2000000000,
52+
"MaxTimestampAge": 16000000000
53+
},
54+
"PartialMessageManager": {
55+
"PendingDiscoveredChainsBufferSize": 100,
56+
"PendingPartialMessagesBufferSize": 100,
57+
"PendingChainBroadcastsBufferSize": 100,
58+
"PendingInstanceRemovalBufferSize": 10,
59+
"CompletedMessagesBufferSize": 100,
60+
"MaxBufferedMessagesPerInstance": 25000,
61+
"MaxCachedValidatedMessagesPerInstance": 25000
62+
}
63+
}

build/buildconstants/params_2k.go

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package buildconstants
55

66
import (
7+
_ "embed"
78
"os"
89
"strconv"
910
"strings"
@@ -180,7 +181,6 @@ func init() {
180181
}
181182

182183
F3Enabled = getBoolean("LOTUS_F3_ENABLED", F3Enabled)
183-
F3BootstrapEpoch = getUpgradeHeight("LOTUS_F3_BOOTSTRAP_EPOCH", F3BootstrapEpoch)
184184

185185
BuildType |= Build2k
186186

@@ -211,11 +211,5 @@ var WhitelistedBlock = cid.Undef
211211

212212
var F3Enabled = true
213213

214-
var F3ManifestServerID = MustParseID("12D3KooWHcNBkqXEBrsjoveQvj6zDF3vK5S9tAfqyYaQF1LGSJwG")
215-
216-
// The initial F3 power table CID.
217-
var F3InitialPowerTableCID cid.Cid = cid.Undef
218-
219-
var F3BootstrapEpoch abi.ChainEpoch = 1000
220-
221-
var F3ParamsAddress = ""
214+
//go:embed f3manifest_2k.json
215+
var F3ManifestBytes []byte

build/buildconstants/params_butterfly.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
package buildconstants
55

66
import (
7+
_ "embed"
8+
79
"github.com/ipfs/go-cid"
810

911
"github.com/filecoin-project/go-address"
@@ -109,10 +111,5 @@ var WhitelistedBlock = cid.Undef
109111

110112
const F3Enabled = true
111113

112-
var F3ManifestServerID = MustParseID("12D3KooWJr9jy4ngtJNR7JC1xgLFra3DjEtyxskRYWvBK9TC3Yn6")
113-
114-
// The initial F3 power table CID.
115-
var F3InitialPowerTableCID cid.Cid = cid.Undef
116-
117-
const F3BootstrapEpoch abi.ChainEpoch = -1
118-
const F3ParamsAddress = "0x9fd3B2D38EE4C920c9954DA752eDF810887501c1"
114+
//go:embed f3manifest_butterfly.json
115+
var F3ManifestBytes []byte

build/buildconstants/params_calibnet.go

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package buildconstants
55

66
import (
7+
_ "embed"
78
"os"
89
"strconv"
910

@@ -167,12 +168,5 @@ var WhitelistedBlock = cid.Undef
167168

168169
const F3Enabled = true
169170

170-
var F3ManifestServerID = MustParseID("12D3KooWS9vD9uwm8u2uPyJV32QBAhKAmPYwmziAgr3Xzk2FU1Mr")
171-
172-
// The initial F3 power table CID.
173-
var F3InitialPowerTableCID cid.Cid = cid.MustParse("bafy2bzaceab236vmmb3n4q4tkvua2n4dphcbzzxerxuey3mot4g3cov5j3r2c")
174-
175-
// Calibnet F3 activation epoch is 2024-10-24T13:30:00Z - Epoch 2081674
176-
const F3BootstrapEpoch abi.ChainEpoch = UpgradeTuktukHeight + 2880
177-
178-
var F3ParamsAddress = ""
171+
//go:embed f3manifest_calibnet.json
172+
var F3ManifestBytes []byte

0 commit comments

Comments
 (0)