Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ec: Integrate Fast Finality for Filecoin #12119

Merged
merged 32 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
5861704
F3 WIP
Kubuxu Jun 19, 2024
3c2f783
Expose F3Participate API, general cleanup
Kubuxu Jun 22, 2024
10660a0
Remove replace directive
Kubuxu Jun 22, 2024
128f47b
Skip to the end of the loop in case of broadcast failures
Kubuxu Jun 22, 2024
12b1a5e
make gen
Kubuxu Jun 22, 2024
68a5e6e
Don't upgrade urfave/cli
Kubuxu Jun 22, 2024
0b303ca
Add F3GetCertificate and F3GetLatestCertificate
Kubuxu Jun 24, 2024
d3245a4
Cleanup, network params, change the behaviour of F3Participate
Kubuxu Jun 24, 2024
bef79be
Update to go-f3@main
Kubuxu Jun 24, 2024
75a917e
Add one more context guard
Kubuxu Jun 24, 2024
c404a6d
Fix building
Kubuxu Jun 24, 2024
919ae0f
make gen
Kubuxu Jun 24, 2024
791621b
Add a log, don't start F3Participation if built without F3
Kubuxu Jun 24, 2024
9a7f0f2
Resolve errors
Kubuxu Jun 24, 2024
9689014
Add additional checks for miner power
Kubuxu Jun 25, 2024
1202788
update go f3
jennijuju Jun 26, 2024
0f1e688
adjust testnet params
jennijuju Jun 26, 2024
168e091
Signal explicitly with typed error when F3 is disabled
masih Jun 27, 2024
de6de9f
Remove redundant function wrapping
masih Jun 27, 2024
7ba49e9
Address first round of review comments
masih Jun 27, 2024
f49d351
avoid double pointer indirection in f3 tipset wrapper
Stebalien Jun 27, 2024
62f3383
f3: use the correct lifetime context
Stebalien Jun 27, 2024
f5c4ffa
simpler power comparison
Stebalien Jun 27, 2024
7f8a8be
nits and stuff
Stebalien Jun 27, 2024
1a97629
Adjust F3 participate documentation
masih Jun 28, 2024
37100e1
Document non-nil beacon
masih Jun 28, 2024
911ec06
doc gen
masih Jun 28, 2024
3ecc927
Bubble up the fix to backoff delay at f3 0.0.2
masih Jun 28, 2024
18e37c9
Fix err check condition
masih Jun 28, 2024
69c4080
Allow F3 topic only when F3 is enabled
masih Jun 28, 2024
4bf9eef
Document Tipset typecheck and leave TODO to clean up after testing
masih Jun 28, 2024
2bc26d7
Address review comments
masih Jun 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions api/api_full.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-bitfield"
"github.com/filecoin-project/go-f3/certs"
"github.com/filecoin-project/go-jsonrpc"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
Expand Down Expand Up @@ -859,6 +860,19 @@ type FullNode interface {
// Note: this API is only available via websocket connections.
// This is an EXPERIMENTAL API and may be subject to change.
SubscribeActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) (<-chan *types.ActorEvent, error) //perm:read

// F3Participate should be called by a miner node to particpate in signing F3 consensus.
// The address should be of type ID
// F3Participate can only be used through websocket connection
masih marked this conversation as resolved.
Show resolved Hide resolved
// 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
aarshkshah1992 marked this conversation as resolved.
Show resolved Hide resolved
// F3GetLatestCertificate returns the latest finality certificate
F3GetLatestCertificate(ctx context.Context) (*certs.FinalityCertificate, error) //perm:read
aarshkshah1992 marked this conversation as resolved.
Show resolved Hide resolved
}

// reverse interface to the client, called after EthSubscribe
Expand Down
2 changes: 2 additions & 0 deletions api/docgen/docgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (

"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-bitfield"
"github.com/filecoin-project/go-f3/certs"
"github.com/filecoin-project/go-jsonrpc/auth"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
Expand Down Expand Up @@ -399,6 +400,7 @@ func init() {
FromHeight: epochPtr(1010),
ToHeight: epochPtr(1020),
})
addExample(&certs.FinalityCertificate{})
}

func GetAPIType(name, pkg string) (i interface{}, t reflect.Type, permStruct []reflect.Type) {
Expand Down
46 changes: 46 additions & 0 deletions api/mocks/mock_full.go

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

40 changes: 40 additions & 0 deletions api/proxy_gen.go

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

Loading