Skip to content

Commit fb3b9c7

Browse files
committed
Upgrade to go-f3 v0.8.3
Upgrade to the latest go-f3, to bubble up: * various bug fixes * extended manifest parameters for better control in passive testing Note that the return type from F3GetProgress API has changed to now include the input chain to an instance. Update CLI templates to print the additional fields.
1 parent f8bce11 commit fb3b9c7

File tree

15 files changed

+200
-42
lines changed

15 files changed

+200
-42
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
- chore: switch to pure-go zstd decoder for snapshot imports. ([filecoin-project/lotus#12857](https://github.com/filecoin-project/lotus/pull/12857))
1717
- feat: automatically detect if the genesis is zstd compressed. ([filecoin-project/lotus#12885](https://github.com/filecoin-project/lotus/pull/12885)
1818
- `lotus send` now supports `--csv` option for sending multiple transactions. ([filecoin-project/lotus#12892](https://github.com/filecoin-project/lotus/pull/12892))
19-
- chore: upgrade to the latest go-f3 and allow F3 chain exchange topics ([filecoin-project/lotus#12893](https://github.com/filecoin-project/lotus/pull/12893)
19+
- chore: upgrade to go-f3 `v.0.8.3`
2020
- chore: upgrade to a minimum Golang version of `1.23.6` ([filecoin-project/lotus#12910](https://github.com/filecoin-project/lotus/pull/12910)
2121
- feat: add a `LOTUS_DISABLE_F3_ACTIVATION` enviroment variable allowing disabling F3 activation for a specific contract address or epoch ([filecoin-project/lotus#12920](https://github.com/filecoin-project/lotus/pull/12920)). The `LOTUS_DISABLE_F3` env-var has been renamed to `LOTUS_DISABLE_F3_SUBSYSTEM` to distinguish it from the other F3-related environment variables: `LOTUS_DISABLE_F3_PASSIVE_TESTING` and `LOTUS_DISABLE_F3_ACTIVATION`.
2222
- feat: add `GenesisTimestamp` field to `StateGetNetworkParams` response ([filecoin-project/lotus#12925](https://github.com/filecoin-project/lotus/pull/12925))

api/api_full.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ type FullNode interface {
10311031
// it's enabled, and an error when disabled entirely.
10321032
F3IsRunning(ctx context.Context) (bool, error) //perm:read
10331033
// F3GetProgress returns the progress of the current F3 instance in terms of instance ID, round and phase.
1034-
F3GetProgress(ctx context.Context) (gpbft.Instant, error) //perm:read
1034+
F3GetProgress(ctx context.Context) (gpbft.InstanceProgress, error) //perm:read
10351035
// F3ListParticipants returns the list of miners that are currently participating in F3 via this node.
10361036
F3ListParticipants(ctx context.Context) ([]F3Participant, error) //perm:read
10371037
}

api/docgen/docgen.go

+18-9
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,18 @@ func init() {
105105
addExample(f3Lease)
106106
addExample(&f3Lease)
107107

108-
f3Cert := certs.FinalityCertificate{
109-
GPBFTInstance: 0,
110-
ECChain: &gpbft.ECChain{
111-
TipSets: []*gpbft.TipSet{
112-
{
113-
Epoch: 0,
114-
Key: tsk.Bytes(),
115-
PowerTable: c,
116-
},
108+
ecchain := &gpbft.ECChain{
109+
TipSets: []*gpbft.TipSet{
110+
{
111+
Epoch: 0,
112+
Key: tsk.Bytes(),
113+
PowerTable: c,
117114
},
118115
},
116+
}
117+
f3Cert := certs.FinalityCertificate{
118+
GPBFTInstance: 0,
119+
ECChain: ecchain,
119120
SupplementalData: gpbft.SupplementalData{
120121
PowerTable: c,
121122
},
@@ -459,6 +460,14 @@ func init() {
459460
addExample(&manifest.Manifest{})
460461
addExample(gpbft.NetworkName("filecoin"))
461462
addExample(gpbft.ActorID(1000))
463+
addExample(gpbft.InstanceProgress{
464+
Instant: gpbft.Instant{
465+
ID: 1413,
466+
Round: 1,
467+
Phase: gpbft.COMMIT_PHASE,
468+
},
469+
Input: ecchain,
470+
})
462471
}
463472

464473
func GetAPIType(name, pkg string) (i interface{}, t reflect.Type, permStruct []reflect.Type) {

api/mocks/mock_full.go

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/proxy_gen.go

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/openrpc/full.json

+114-7
Original file line numberDiff line numberDiff line change
@@ -7611,7 +7611,10 @@
76117611
"MaximumPollInterval": 0
76127612
},
76137613
"PubSub": {
7614-
"CompressionEnabled": false
7614+
"CompressionEnabled": false,
7615+
"ChainCompressionEnabled": false,
7616+
"GMessageSubscriptionBufferSize": 0,
7617+
"ValidatedMessageBufferSize": 0
76157618
},
76167619
"ChainExchange": {
76177620
"SubscriptionBufferSize": 0,
@@ -7621,6 +7624,15 @@
76217624
"MaxWantedChainsPerInstance": 0,
76227625
"RebroadcastInterval": 0,
76237626
"MaxTimestampAge": 0
7627+
},
7628+
"PartialMessageManager": {
7629+
"PendingDiscoveredChainsBufferSize": 0,
7630+
"PendingPartialMessagesBufferSize": 0,
7631+
"PendingChainBroadcastsBufferSize": 0,
7632+
"PendingInstanceRemovalBufferSize": 0,
7633+
"CompletedMessagesBufferSize": 0,
7634+
"MaxBufferedMessagesPerInstance": 0,
7635+
"MaxCachedValidatedMessagesPerInstance": 0
76247636
}
76257637
}
76267638
],
@@ -7801,6 +7813,40 @@
78017813
"NetworkName": {
78027814
"type": "string"
78037815
},
7816+
"PartialMessageManager": {
7817+
"additionalProperties": false,
7818+
"properties": {
7819+
"CompletedMessagesBufferSize": {
7820+
"title": "number",
7821+
"type": "number"
7822+
},
7823+
"MaxBufferedMessagesPerInstance": {
7824+
"title": "number",
7825+
"type": "number"
7826+
},
7827+
"MaxCachedValidatedMessagesPerInstance": {
7828+
"title": "number",
7829+
"type": "number"
7830+
},
7831+
"PendingChainBroadcastsBufferSize": {
7832+
"title": "number",
7833+
"type": "number"
7834+
},
7835+
"PendingDiscoveredChainsBufferSize": {
7836+
"title": "number",
7837+
"type": "number"
7838+
},
7839+
"PendingInstanceRemovalBufferSize": {
7840+
"title": "number",
7841+
"type": "number"
7842+
},
7843+
"PendingPartialMessagesBufferSize": {
7844+
"title": "number",
7845+
"type": "number"
7846+
}
7847+
},
7848+
"type": "object"
7849+
},
78047850
"Pause": {
78057851
"type": "boolean"
78067852
},
@@ -7811,8 +7857,19 @@
78117857
"PubSub": {
78127858
"additionalProperties": false,
78137859
"properties": {
7860+
"ChainCompressionEnabled": {
7861+
"type": "boolean"
7862+
},
78147863
"CompressionEnabled": {
78157864
"type": "boolean"
7865+
},
7866+
"GMessageSubscriptionBufferSize": {
7867+
"title": "number",
7868+
"type": "number"
7869+
},
7870+
"ValidatedMessageBufferSize": {
7871+
"title": "number",
7872+
"type": "number"
78167873
}
78177874
},
78187875
"type": "object"
@@ -7927,20 +7984,37 @@
79277984
},
79287985
{
79297986
"name": "Filecoin.F3GetProgress",
7930-
"description": "```go\nfunc (s *FullNodeStruct) F3GetProgress(p0 context.Context) (gpbft.Instant, error) {\n\tif s.Internal.F3GetProgress == nil {\n\t\treturn *new(gpbft.Instant), ErrNotSupported\n\t}\n\treturn s.Internal.F3GetProgress(p0)\n}\n```",
7987+
"description": "```go\nfunc (s *FullNodeStruct) F3GetProgress(p0 context.Context) (gpbft.InstanceProgress, error) {\n\tif s.Internal.F3GetProgress == nil {\n\t\treturn *new(gpbft.InstanceProgress), ErrNotSupported\n\t}\n\treturn s.Internal.F3GetProgress(p0)\n}\n```",
79317988
"summary": "F3GetProgress returns the progress of the current F3 instance in terms of instance ID, round and phase.\n",
79327989
"paramStructure": "by-position",
79337990
"params": [],
79347991
"result": {
7935-
"name": "gpbft.Instant",
7936-
"description": "gpbft.Instant",
7992+
"name": "gpbft.InstanceProgress",
7993+
"description": "gpbft.InstanceProgress",
79377994
"summary": "",
79387995
"schema": {
79397996
"examples": [
79407997
{
7941-
"ID": 42,
7942-
"Round": 42,
7943-
"Phase": 0
7998+
"ID": 1413,
7999+
"Round": 1,
8000+
"Phase": 4,
8001+
"Input": [
8002+
{
8003+
"Key": [
8004+
{
8005+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
8006+
},
8007+
{
8008+
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
8009+
}
8010+
],
8011+
"Commitments": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
8012+
"Epoch": 0,
8013+
"PowerTable": {
8014+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
8015+
}
8016+
}
8017+
]
79448018
}
79458019
],
79468020
"additionalProperties": false,
@@ -7949,6 +8023,39 @@
79498023
"title": "number",
79508024
"type": "number"
79518025
},
8026+
"Input": {
8027+
"items": {
8028+
"additionalProperties": false,
8029+
"properties": {
8030+
"Commitments": {
8031+
"items": {
8032+
"description": "Number is a number",
8033+
"title": "number",
8034+
"type": "number"
8035+
},
8036+
"maxItems": 32,
8037+
"minItems": 32,
8038+
"type": "array"
8039+
},
8040+
"Epoch": {
8041+
"title": "number",
8042+
"type": "number"
8043+
},
8044+
"Key": {
8045+
"media": {
8046+
"binaryEncoding": "base64"
8047+
},
8048+
"type": "string"
8049+
},
8050+
"PowerTable": {
8051+
"title": "Content Identifier",
8052+
"type": "string"
8053+
}
8054+
},
8055+
"type": "object"
8056+
},
8057+
"type": "array"
8058+
},
79528059
"Phase": {
79538060
"title": "number",
79548061
"type": "number"

chain/lf3/config.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ func NewManifest(
7171
MinimumPollInterval: ecPeriod,
7272
MaximumPollInterval: 4 * ecPeriod,
7373
},
74-
PubSub: manifest.DefaultPubSubConfig,
75-
ChainExchange: manifest.DefaultChainExchangeConfig,
74+
PubSub: manifest.DefaultPubSubConfig,
75+
ChainExchange: manifest.DefaultChainExchangeConfig,
76+
PartialMessageManager: manifest.DefaultPartialMessageManagerConfig,
7677
}
7778
}
7879

chain/lf3/f3.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func New(mctx helpers.MetricsCtx, lc fx.Lifecycle, params F3Params) (*F3, error)
7979
// maxLeasableInstances is the maximum number of leased F3 instances this node
8080
// would give out.
8181
const maxLeasableInstances = 5
82-
status := func() (*manifest.Manifest, gpbft.Instant) {
82+
status := func() (*manifest.Manifest, gpbft.InstanceProgress) {
8383
return module.Manifest(), module.Progress()
8484
}
8585
fff := &F3{
@@ -215,7 +215,7 @@ func (fff *F3) IsRunning() bool {
215215
return fff.inner.IsRunning()
216216
}
217217

218-
func (fff *F3) Progress() gpbft.Instant {
218+
func (fff *F3) Progress() gpbft.InstanceProgress {
219219
return fff.inner.Progress()
220220
}
221221

chain/lf3/participation_lease.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/filecoin-project/lotus/api"
1616
)
1717

18-
type f3Status = func() (*manifest.Manifest, gpbft.Instant)
18+
type f3Status = func() (*manifest.Manifest, gpbft.InstanceProgress)
1919

2020
type leaser struct {
2121
mutex sync.Mutex

cli/templates/f3_manifest.go.tmpl

+12-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ Manifest:
3030
Certificate Exchange Min Poll Interval: {{.CertificateExchange.MinimumPollInterval}}
3131
Certificate Exchange Max Poll Interval: {{.CertificateExchange.MaximumPollInterval}}
3232

33-
PubSub Compression Enabled: {{.PubSub.CompressionEnabled}}
33+
PubSub Compression Enabled: {{.PubSub.CompressionEnabled}}
34+
PubSub Chain Compression Enabled: {{.PubSub.ChainCompressionEnabled}}
35+
PubSub GMessage Subscription Buffer Size: {{.PubSub.GMessageSubscriptionBufferSize}}
36+
PubSub Validated Message Buffer Size: {{.PubSub.ValidatedMessageBufferSize}}
3437

3538
Chain Exchange Subscription Buffer Size: {{.ChainExchange.SubscriptionBufferSize}}
3639
Chain Exchange Max Chain Length: {{.ChainExchange.MaxChainLength}}
@@ -39,3 +42,11 @@ Manifest:
3942
Chain Exchange Max Wanted Chains Per Instance: {{.ChainExchange.MaxWantedChainsPerInstance}}
4043
Chain Exchange Rebroadcast Interval: {{.ChainExchange.RebroadcastInterval}}
4144
Chain Exchange Max Timestamp Age: {{.ChainExchange.MaxTimestampAge}}
45+
46+
Partial Message Pending Discovered Chains Buffer Size: {{.PartialMessageManager.PendingDiscoveredChainsBufferSize}}
47+
Partial Message Pending Partial Messages Buffer Size: {{.PartialMessageManager.PendingPartialMessagesBufferSize}}
48+
Partial Message Pending Chain Broadcasts Buffer Size: {{.PartialMessageManager.PendingChainBroadcastsBufferSize}}
49+
Partial Message Pending Instance Removal Buffer Size: {{.PartialMessageManager.PendingInstanceRemovalBufferSize}}
50+
Partial Message Completed Messages Buffer Size: {{.PartialMessageManager.CompletedMessagesBufferSize}}
51+
Partial Message Max Buffered Messages Per Instance: {{.PartialMessageManager.MaxBufferedMessagesPerInstance}}
52+
Partial Message Max Cached Validated Messages Per Instance: {{.PartialMessageManager.MaxCachedValidatedMessagesPerInstance}}

documentation/en/api-v1-unstable-methods.md

+33-4
Original file line numberDiff line numberDiff line change
@@ -2647,7 +2647,10 @@ Response:
26472647
"MaximumPollInterval": 0
26482648
},
26492649
"PubSub": {
2650-
"CompressionEnabled": false
2650+
"CompressionEnabled": false,
2651+
"ChainCompressionEnabled": false,
2652+
"GMessageSubscriptionBufferSize": 0,
2653+
"ValidatedMessageBufferSize": 0
26512654
},
26522655
"ChainExchange": {
26532656
"SubscriptionBufferSize": 0,
@@ -2657,6 +2660,15 @@ Response:
26572660
"MaxWantedChainsPerInstance": 0,
26582661
"RebroadcastInterval": 0,
26592662
"MaxTimestampAge": 0
2663+
},
2664+
"PartialMessageManager": {
2665+
"PendingDiscoveredChainsBufferSize": 0,
2666+
"PendingPartialMessagesBufferSize": 0,
2667+
"PendingChainBroadcastsBufferSize": 0,
2668+
"PendingInstanceRemovalBufferSize": 0,
2669+
"CompletedMessagesBufferSize": 0,
2670+
"MaxBufferedMessagesPerInstance": 0,
2671+
"MaxCachedValidatedMessagesPerInstance": 0
26602672
}
26612673
}
26622674
```
@@ -2707,9 +2719,26 @@ Inputs: `null`
27072719
Response:
27082720
```json
27092721
{
2710-
"ID": 42,
2711-
"Round": 42,
2712-
"Phase": 0
2722+
"ID": 1413,
2723+
"Round": 1,
2724+
"Phase": 4,
2725+
"Input": [
2726+
{
2727+
"Key": [
2728+
{
2729+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
2730+
},
2731+
{
2732+
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
2733+
}
2734+
],
2735+
"Commitments": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
2736+
"Epoch": 0,
2737+
"PowerTable": {
2738+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
2739+
}
2740+
}
2741+
]
27132742
}
27142743
```
27152744

0 commit comments

Comments
 (0)