Skip to content

Commit

Permalink
Add non-empty example for F3 finality cert
Browse files Browse the repository at this point in the history
  • Loading branch information
masih committed Dec 3, 2024
1 parent 9d5a2b0 commit bd6dd76
Show file tree
Hide file tree
Showing 3 changed files with 161 additions and 17 deletions.
26 changes: 25 additions & 1 deletion api/docgen/docgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,31 @@ func init() {
addExample(f3Lease)
addExample(&f3Lease)

f3Cert := certs.FinalityCertificate{
GPBFTInstance: 0,
ECChain: []gpbft.TipSet{
{
Epoch: 0,
Key: tsk.Bytes(),
PowerTable: c,
},
},
SupplementalData: gpbft.SupplementalData{
PowerTable: c,
},
Signers: bitfield.NewFromSet([]uint64{2, 3, 5, 7}),
Signature: []byte("UnDadaSeA"),
PowerTableDelta: []certs.PowerTableDelta{
{
ParticipantID: 0,
PowerDelta: gpbft.StoragePower{},
SigningKey: []byte("BaRrelEYe"),
},
},
}
addExample(f3Cert)
addExample(&f3Cert)

block := blocks.Block(&blocks.BasicBlock{})
ExampleValues[reflect.TypeOf(&block).Elem()] = block

Expand Down Expand Up @@ -429,7 +454,6 @@ func init() {
FromHeight: epochPtr(1010),
ToHeight: epochPtr(1020),
})
addExample(&certs.FinalityCertificate{})
addExample(&manifest.Manifest{})
addExample(gpbft.NetworkName("filecoin"))
addExample(gpbft.ActorID(1000))
Expand Down
76 changes: 68 additions & 8 deletions build/openrpc/full.json
Original file line number Diff line number Diff line change
Expand Up @@ -7084,15 +7084,45 @@
"examples": [
{
"GPBFTInstance": 0,
"ECChain": null,
"ECChain": [
{
"Key": [
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
"Commitments": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"Epoch": 0,
"PowerTable": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
}
],
"SupplementalData": {
"Commitments": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"PowerTable": null
"PowerTable": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
},
"Signers": [
0
2,
2,
1,
1,
1,
1
],
"Signature": null
"Signature": "VW5EYWRhU2VB",
"PowerTableDelta": [
{
"ParticipantID": 0,
"PowerDelta": "0",
"SigningKey": "QmFScmVsRVll"
}
]
}
],
"additionalProperties": false,
Expand Down Expand Up @@ -7383,15 +7413,45 @@
"examples": [
{
"GPBFTInstance": 0,
"ECChain": null,
"ECChain": [
{
"Key": [
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
"Commitments": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"Epoch": 0,
"PowerTable": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
}
],
"SupplementalData": {
"Commitments": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"PowerTable": null
"PowerTable": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
},
"Signers": [
0
2,
2,
1,
1,
1,
1
],
"Signature": null
"Signature": "VW5EYWRhU2VB",
"PowerTableDelta": [
{
"ParticipantID": 0,
"PowerDelta": "0",
"SigningKey": "QmFScmVsRVll"
}
]
}
],
"additionalProperties": false,
Expand Down
76 changes: 68 additions & 8 deletions documentation/en/api-v1-unstable-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -2417,15 +2417,45 @@ Response:
```json
{
"GPBFTInstance": 0,
"ECChain": null,
"ECChain": [
{
"Key": [
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
"Commitments": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"Epoch": 0,
"PowerTable": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
}
],
"SupplementalData": {
"Commitments": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"PowerTable": null
"PowerTable": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
},
"Signers": [
0
2,
2,
1,
1,
1,
1
],
"Signature": null
"Signature": "VW5EYWRhU2VB",
"PowerTableDelta": [
{
"ParticipantID": 0,
"PowerDelta": "0",
"SigningKey": "QmFScmVsRVll"
}
]
}
```

Expand Down Expand Up @@ -2503,15 +2533,45 @@ Response:
```json
{
"GPBFTInstance": 0,
"ECChain": null,
"ECChain": [
{
"Key": [
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
"Commitments": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"Epoch": 0,
"PowerTable": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
}
],
"SupplementalData": {
"Commitments": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"PowerTable": null
"PowerTable": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
},
"Signers": [
0
2,
2,
1,
1,
1,
1
],
"Signature": null
"Signature": "VW5EYWRhU2VB",
"PowerTableDelta": [
{
"ParticipantID": 0,
"PowerDelta": "0",
"SigningKey": "QmFScmVsRVll"
}
]
}
```

Expand Down

0 comments on commit bd6dd76

Please sign in to comment.