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

Conversation

@Lazar955
Copy link
Member

@Lazar955 Lazar955 commented Aug 22, 2025

closes #648

Copilot AI review requested due to automatic review settings August 22, 2025 14:06
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 consolidates the EOTS manager's randomness generation methods by unifying the separate CreateRandomnessPairList and CreateRandomnessPairListWithInterval methods into a single function that accepts functional options to specify intervals.

  • Unifies two separate randomness generation methods into one flexible API
  • Introduces functional options pattern for optional interval configuration
  • Removes duplicate gRPC service method and protobuf definitions

Reviewed Changes

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

Show a summary per file
File Description
eotsmanager/proto/eotsmanager.proto Removes separate interval-based RPC method and adds optional interval field to existing request
eotsmanager/service/rpcserver.go Consolidates RPC handlers and adds option processing logic
eotsmanager/eotsmanager.go Introduces functional options pattern and unified interface
eotsmanager/localmanager.go Merges two implementation methods into one with option handling
eotsmanager/client/rpcclient.go Removes duplicate client method and unifies implementation
bsn/rollup/service/*.go Updates callers to use new unified API with interval option
finality-provider/proto/*.pb.go Updates protobuf version and adds gRPC method name constants

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

@Lazar955 Lazar955 requested a review from KonradStaniec August 22, 2025 14:49
@Lazar955
Copy link
Member Author

https://github.com/Mergifyio backport-to-release/v2.x

@Lazar955
Copy link
Member Author

https://github.com/Mergifyio backport release/v2.x

Comment on lines 72 to 74
// interval is the optional height interval between consecutive randomness pairs
// If not set or 0, consecutive heights are used
optional uint64 interval = 5;
Copy link
Member

Choose a reason for hiding this comment

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

What do you think we have this as mandatory and require the client to use 1 explicitly for consecutive heights?

Right now interval == nil and interval == &1 have the same meaning, and type *uint64 is a bit weird in Go

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this comes to personal preference in "API" design, where I find it more intuitive not to have additional clutter in the method call

@Lazar955 Lazar955 merged commit 9d27d34 into main Aug 25, 2025
44 of 46 checks passed
@Lazar955 Lazar955 deleted the lazar/refactor-eotsmanager-interface branch August 25, 2025 12:39
Lazar955 added a commit that referenced this pull request Aug 25, 2025
Lazar955 added a commit that referenced this pull request Aug 25, 2025
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.

Unify eotsmanager randomness pair list with and without interval methods

4 participants