Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

## ⭐ New Features

- feat(shed): add `lotus-shed finality-calculator` for EC finality probability computation per [FRC-0089](https://github.com/filecoin-project/FIPs/blob/master/FRCs/frc-0089.md) ([filecoin-project/lotus#12093](https://github.com/filecoin-project/lotus/pull/12093))
- feat(api): integrate [FRC-0089](https://github.com/filecoin-project/FIPs/blob/master/FRCs/frc-0089.md) EC finality calculator into v2 API and Eth RPC, so `"finalized"` and `"safe"` tags reflect actual chain health (~20-30 epochs) rather than worst-case static 900-epoch fallback. Adds `ChainGetTipSetFinalityStatus` v2 endpoint for finality diagnostics. ([filecoin-project/lotus#13547](https://github.com/filecoin-project/lotus/pull/13547))
- feat(shed): add `lotus-shed finality-calculator` for EC finality probability computation per FRC-0089 ([filecoin-project/lotus#12093](https://github.com/filecoin-project/lotus/pull/12093))

## 👌 Improvements
- fix(gateway): return `ErrFilterNotFound` error instead of empty result for unknown filter IDs in `EthGetFilterLogs` ([filecoin-project/lotus#13519](https://github.com/filecoin-project/lotus/pull/13519))
Expand Down
7 changes: 7 additions & 0 deletions api/docgen/docgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,13 @@ func init() {
Input: ecchain,
})
addExample(types.TipSetSelectors.Finalized)
addExample(&types.FinalityStatus{
ECFinalityThresholdDepth: 30,
ECFinalizedTipSet: &ts,
F3FinalizedTipSet: &ts,
FinalizedTipSet: &ts,
Head: &ts,
})
}

func GetAPIType(name, pkg string) (i interface{}, t reflect.Type, permStruct []reflect.Type) {
Expand Down
10 changes: 10 additions & 0 deletions api/v2api/full.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ type FullNode interface {
//
ChainGetTipSet(context.Context, types.TipSetSelector) (*types.TipSet, error) //perm:read

// ChainGetTipSetFinalityStatus returns a breakdown of how the node is
// currently determining finality. The result includes the EC probabilistic
// finality depth (based on observed chain health), the F3-finalized tipset
// (if available), and the overall finalized tipset the node is using.
//
// Useful for monitoring chain health and diagnosing finality lag.
//
// Experimental: This API is experimental and may change without notice.
ChainGetTipSetFinalityStatus(context.Context) (*types.FinalityStatus, error) //perm:read

// MethodGroup: State
// The State method group contains methods for interacting with the Filecoin
// blockchain state, including actor information, addresses, and chain data.
Expand Down
1 change: 1 addition & 0 deletions api/v2api/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var _ FullNode = (Gateway)(nil)

type Gateway interface {
ChainGetTipSet(context.Context, types.TipSetSelector) (*types.TipSet, error)
ChainGetTipSetFinalityStatus(context.Context) (*types.FinalityStatus, error)
StateGetActor(context.Context, address.Address, types.TipSetSelector) (*types.Actor, error)
StateGetID(context.Context, address.Address, types.TipSetSelector) (*address.Address, error)
EthAddressToFilecoinAddress(ctx context.Context, ethAddress ethtypes.EthAddress) (address.Address, error)
Expand Down
26 changes: 26 additions & 0 deletions api/v2api/proxy_gen.go

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

15 changes: 15 additions & 0 deletions api/v2api/v2mocks/mock_full.go

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

Loading
Loading