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

Upgrade go-f3 to v0.3.0 and implement Backend.Finalize #4775

Closed
2 tasks done
hanabi1224 opened this issue Sep 19, 2024 · 0 comments · Fixed by #4853
Closed
2 tasks done

Upgrade go-f3 to v0.3.0 and implement Backend.Finalize #4775

hanabi1224 opened this issue Sep 19, 2024 · 0 comments · Fixed by #4853
Assignees

Comments

@hanabi1224
Copy link
Contributor

hanabi1224 commented Sep 19, 2024

Issue summary

go-f3 v0.3.0 v0.7.0 has been released with some breaking changes in its APIs. To keep Forest up-to-date, we should

        // Finalize marks the tipset that corresponds to the given key as finalised
	// beyond which no forks are allowed to occur. The finalised tipset overrides the
	// head tipset if it is not an ancestor of the current head.
	//
	// See GetHead.
	Finalize(context.Context, gpbft.TipSetKey) error
func (ec *ecWrapper) Finalize(ctx context.Context, key gpbft.TipSetKey) error {
	if !ec.Checkpoint {
		return nil // Nothing to do; checkpointing is not enabled.
	}
	tsk, err := toLotusTipSetKey(key)
	if err != nil {
		return err
	}
	if err = ec.Syncer.SyncCheckpoint(ctx, tsk); err != nil {
		return xerrors.Errorf("checkpointing finalized tipset: %w", err)
	}
	return nil
}

Other information and links

https://github.com/filecoin-project/go-f3/releases/tag/v0.3.0

@hanabi1224 hanabi1224 self-assigned this Sep 19, 2024
@hanabi1224 hanabi1224 changed the title Upgrade go-f3 to v0.3.0 Upgrade go-f3 to v0.3.0 and implement Backend.Finalize Sep 19, 2024
@hanabi1224 hanabi1224 linked a pull request Oct 10, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant