fix(f3): go-f3=0.8.8, add F3GetPowerTableByInstance, use it in cli#13201
Merged
fix(f3): go-f3=0.8.8, add F3GetPowerTableByInstance, use it in cli#13201
Conversation
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
This allows resolution of historical power tables. The other methods require chain state to retrieve the power table. The certstore stories all power tables diffs and is able to provide a power table at artbitrary instance. Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
There was a problem hiding this comment.
Please update the PR title to match https://github.com/filecoin-project/lotus/blob/master/CONTRIBUTING.md#pr-title-conventions
PR title now matches the required format.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new API endpoint to fetch historical power tables by instance ID and integrates it throughout the codebase.
- Adds
F3GetPowerTableByInstanceto the full node implementation, API stubs, mocks, and OpenRPC definitions. - Updates the CLI with a
--by-tipsetflag to choose between direct instance lookups or translating to a tipset. - Bumps the
go-f3module version and adds documentation for the new method.
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| node/impl/full/f3.go | Added F3GetPowerTableByInstance method on the F3API struct |
| chain/lf3/f3.go | Extended F3Backend with GetPowerTableByInstance |
| api/api_full.go | Declared the new interface method |
| api/proxy_gen.go | Generated proxy and stub methods for the new API call |
| api/mocks/mock_full.go | Added mock recorder for F3GetPowerTableByInstance |
| itests/kit/f3.go | Added mock implementation for testing the new backend method |
| cli/f3.go | Added --by-tipset flag and logic to use the new API endpoint |
| documentation/en/api-v1-unstable-methods.md | Added docs for F3GetPowerTableByInstance |
| go.mod | Bumped go-f3 dependency version to v0.8.7 |
| build/openrpc/**/*.json | Updated line references and inserted the new method definition |
Comments suppressed due to low confidence (1)
itests/kit/f3.go:94
- Consider adding unit or integration tests covering
F3GetPowerTableByInstanceto validate behavior when retrieving historical power tables by instance, especially edge cases like missing data or non-existent instance IDs.
func (t *MockF3Backend) GetPowerTableByInstance(context.Context, uint64) (gpbft.PowerEntries, error) {
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
the fix is to set bootstrapEpoch = Finality this is because of short block times and large delay in production of blocks following the block 0 this causes f3 to try to start up too early Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
This reverts commit 0f8033a. Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
rvagg
reviewed
Jul 8, 2025
rvagg
approved these changes
Jul 8, 2025
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
22f981a to
aeb22b3
Compare
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
rvagg
approved these changes
Jul 9, 2025
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows resolution of historical power tables. The other methods
require chain state to retrieve the power table. The certstore stories all
power tables diffs and is able to provide a power table at artbitrary
instance.
Resolves #13081