Skip to content

Commit

Permalink
pic f3 api methods from lotus
Browse files Browse the repository at this point in the history
  • Loading branch information
beeleelee committed Jul 2, 2024
1 parent aec2b7e commit 08adf12
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions venus-shared/api/chain/v1/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/filecoin-project/go-state-types/network"
"github.com/ipfs/go-cid"

"github.com/filecoin-project/go-f3/certs"

Check failure on line 17 in venus-shared/api/chain/v1/chain.go

View workflow job for this annotation

GitHub Actions / check

no required module provides package github.com/filecoin-project/go-f3/certs; to add it:

Check failure on line 17 in venus-shared/api/chain/v1/chain.go

View workflow job for this annotation

GitHub Actions / test

no required module provides package github.com/filecoin-project/go-f3/certs; to add it:
lminer "github.com/filecoin-project/venus/venus-shared/actors/builtin/miner"
"github.com/filecoin-project/venus/venus-shared/actors/builtin/verifreg"
"github.com/filecoin-project/venus/venus-shared/types"
Expand All @@ -24,6 +25,7 @@ type IChain interface {
IActor
IMinerState
IChainInfo
IF3
}

type IAccount interface {
Expand Down Expand Up @@ -224,3 +226,17 @@ type IMinerState interface {
// StateMinerAllocated returns a bitfield containing all sector numbers marked as allocated in miner state
StateMinerAllocated(context.Context, address.Address, types.TipSetKey) (*bitfield.BitField, error) //perm:read
}

type IF3 interface {
// F3Participate should be called by a miner node to participate in signing F3 consensus.
// The address should be of type ID
// The returned channel will never be closed by the F3
// If it is closed without the context being cancelled, the caller should retry.
// The values returned on the channel will inform the caller about participation
// Empty strings will be sent if participation succeeded, non-empty strings explain possible errors.
F3Participate(ctx context.Context, minerID address.Address) (<-chan string, error) //perm:admin
// F3GetCertificate returns a finality certificate at given instance number
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
}

0 comments on commit 08adf12

Please sign in to comment.