这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@Lazar955
Copy link
Member

@Lazar955 Lazar955 commented Aug 18, 2025

Remove duplicate methods, use variadic options.

Closes #635

Copilot AI review requested due to automatic review settings August 18, 2025 13:42
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 unifies proof building by removing duplicate methods and introducing a variadic options pattern. The main goal is to eliminate code duplication between regular proof building and interval-based proof building by consolidating them into a single flexible API.

  • Replaces duplicate buildKeys and buildKeysWithInterval functions with a single configurable buildKeys function
  • Removes the AddPubRandProofListWithInterval method and consolidates functionality into AddPubRandProofList using options
  • Introduces a functional options pattern with KeyBuildOption and WithInterval for configurable behavior

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

File Description
finality-provider/store/pub_rand.go Consolidates key building functions and adds options pattern, removes duplicate method
finality-provider/service/rand_committer.go Updates call to use new unified API with interval option
finality-provider/service/pub_rand_store_adapter.go Removes duplicate adapter method and updates existing method to support options
bsn/rollup/cmd/rollup-fpd/daemon/recover_proof.go Updates call to use new unified API with interval option
Comments suppressed due to low confidence (1)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Lazar955 Lazar955 merged commit 5487fbc into main Aug 18, 2025
32 of 33 checks passed
@Lazar955 Lazar955 deleted the laza/unify-proof-building branch August 18, 2025 14:17
Lazar955 added a commit that referenced this pull request Aug 20, 2025
Remove duplicate methods, use variadic options.

Closes #635
Lazar955 added a commit that referenced this pull request Aug 20, 2025
Remove duplicate methods, use variadic options.

Closes #635
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cleanup AddPubRandProofListWithInterval

3 participants