Skip to content

Commit

Permalink
feat: api: F3GetF3PowerTable (#12286)
Browse files Browse the repository at this point in the history
* add api for getting f3 powertable

* add butterfly assets

* Note that f3 apis are subject to change
  • Loading branch information
jennijuju authored Jul 24, 2024
1 parent 9a2ce76 commit 0f1df88
Show file tree
Hide file tree
Showing 12 changed files with 749 additions and 591 deletions.
8 changes: 6 additions & 2 deletions api/api_full.go
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,8 @@ type FullNode interface {
// This is an EXPERIMENTAL API and may be subject to change.
SubscribeActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) (<-chan *types.ActorEvent, error) //perm:read

//*********************************** ALL F3 APIs below are not stable & subject to change ***********************************

// F3Participate should be called by a storage provider to participate in signing F3 consensus.
// Calling this API gives the lotus node a lease to sign in F3 on behalf of given SP.
// The lease should be active only on one node. The lease will expire at the newLeaseExpiration.
Expand All @@ -879,8 +881,10 @@ type FullNode interface {
F3GetCertificate(ctx context.Context, instance uint64) (*certs.FinalityCertificate, error) //perm:read
// F3GetLatestCertificate returns the latest finality certificate
F3GetLatestCertificate(ctx context.Context) (*certs.FinalityCertificate, error) //perm:read
// F3GetPowerTable returns a F3 specific power table for use in standalone F3 nodes.
F3GetPowerTable(ctx context.Context, tsk types.TipSetKey) (gpbft.PowerEntries, error) //perm:read
// F3GetECPowerTable returns a F3 specific power table for use in standalone F3 nodes.
F3GetECPowerTable(ctx context.Context, tsk types.TipSetKey) (gpbft.PowerEntries, error) //perm:read
// F3GetF3PowerTable returns a F3 specific power table.
F3GetF3PowerTable(ctx context.Context, tsk types.TipSetKey) (gpbft.PowerEntries, error) //perm:read
}

// EthSubscriber is the reverse interface to the client, called after EthSubscribe
Expand Down
41 changes: 28 additions & 13 deletions api/mocks/mock_full.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 25 additions & 12 deletions api/proxy_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions build/bootstrap/butterflynet.pi
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/dns4/bootstrap-0.butterfly.fildev.network/tcp/1347/p2p/12D3KooWNwAkUtWuLtKCyyFP2vBzmpTHSrQao7KQx7Xfa8YvSg1N
/dns4/bootstrap-1.butterfly.fildev.network/tcp/1347/p2p/12D3KooWPn8BDeNcctAcAGuxxiic8uMw2pAi3G5vgdFtfgRs5zBu
/dns4/bootstrap-0.butterfly.fildev.network/tcp/1347/p2p/12D3KooWFDd8o5vxQ191fquVqMcXjT2Gc1uYPmgfD3ZF5VHhRXQ9
/dns4/bootstrap-1.butterfly.fildev.network/tcp/1347/p2p/12D3KooWM51uUDv1MkR3LduP27pvXPUFD4HuBa1UjBQEVKFg4yM2
Binary file modified build/genesis/butterflynet.car
Binary file not shown.
Loading

0 comments on commit 0f1df88

Please sign in to comment.