Skip to content

fix(f3): go-f3=0.8.8, add F3GetPowerTableByInstance, use it in cli#13201

Merged
Kubuxu merged 11 commits intomasterfrom
fix/f3-history-powertable
Jul 9, 2025
Merged

fix(f3): go-f3=0.8.8, add F3GetPowerTableByInstance, use it in cli#13201
Kubuxu merged 11 commits intomasterfrom
fix/f3-history-powertable

Conversation

@Kubuxu
Copy link
Contributor

@Kubuxu Kubuxu commented Jul 7, 2025

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

Kubuxu added 2 commits July 7, 2025 14:24
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>
Copilot AI review requested due to automatic review settings July 7, 2025 13:09
@github-project-automation github-project-automation bot moved this to 📌 Triage in FilOz Jul 7, 2025
@github-project-automation github-project-automation bot moved this to Todo in F3 Jul 7, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-project-automation github-project-automation bot moved this from 📌 Triage to ⌨️ In Progress in FilOz Jul 7, 2025
@github-project-automation github-project-automation bot moved this from Todo to In progress in F3 Jul 7, 2025
@Kubuxu Kubuxu changed the title fix(f3/cli/api): add F3GetPowerTableByInstance fix(f3): add F3GetPowerTableByInstance, use it in cli Jul 7, 2025
@github-actions github-actions bot dismissed their stale review July 7, 2025 13:10

PR title now matches the required format.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 F3GetPowerTableByInstance to the full node implementation, API stubs, mocks, and OpenRPC definitions.
  • Updates the CLI with a --by-tipset flag to choose between direct instance lookups or translating to a tipset.
  • Bumps the go-f3 module 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 F3GetPowerTableByInstance to 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) {

Kubuxu added 6 commits July 7, 2025 15:11
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
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>
@BigLep BigLep moved this from In progress to In review in F3 Jul 7, 2025
@BigLep BigLep requested a review from rvagg July 7, 2025 20:43
@BigLep BigLep moved this from ⌨️ In Progress to 🔎 Awaiting Review in FilOz Jul 7, 2025
@github-project-automation github-project-automation bot moved this from 🔎 Awaiting Review to ✔️ Approved by reviewer in FilOz Jul 8, 2025
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
@Kubuxu Kubuxu force-pushed the fix/f3-history-powertable branch from 22f981a to aeb22b3 Compare July 8, 2025 13:12
Kubuxu added 2 commits July 8, 2025 16:03
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
@Kubuxu Kubuxu changed the title fix(f3): add F3GetPowerTableByInstance, use it in cli fix(f3): go-f3=0.8.8, add F3GetPowerTableByInstance, use it in cli Jul 9, 2025
@Kubuxu Kubuxu merged commit 4a8c446 into master Jul 9, 2025
179 of 180 checks passed
@Kubuxu Kubuxu deleted the fix/f3-history-powertable branch July 9, 2025 12:41
@github-project-automation github-project-automation bot moved this from ✔️ Approved by reviewer to 🎉 Done in FilOz Jul 9, 2025
@github-project-automation github-project-automation bot moved this from In review to Done in F3 Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done
Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

f3: lotus f3 powertable commands depend on chain state

4 participants