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

[F3] Implement F3.Finalize RPC method #4876

Open
1 task
hanabi1224 opened this issue Oct 10, 2024 · 0 comments
Open
1 task

[F3] Implement F3.Finalize RPC method #4876

hanabi1224 opened this issue Oct 10, 2024 · 0 comments
Assignees
Labels
Type: Task Discrete task to implement

Comments

@hanabi1224
Copy link
Contributor

Summary

Originally part of #4775

        // 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
}

Completion Criteria

  • Implement F3.Finalize RPC method

Additional Links & Resources

@hanabi1224 hanabi1224 added the Type: Task Discrete task to implement label Oct 10, 2024
@hanabi1224 hanabi1224 self-assigned this Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Task Discrete task to implement
Projects
Status: Ready
Development

No branches or pull requests

1 participant