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

Stateful entry points #68

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

fjarri
Copy link
Member

@fjarri fjarri commented Nov 9, 2024

Stacked on top of #67

This PR makes EntryPoint types stateful - that is, this removes the need for EntryPoint::Inputs because the EntryPoint-implementing type becomes the inputs itself. Fixes #64.

Benefits:

  • No need to expose Round types, only the EntryPoint impl can be public
  • Protocol writers can write custom constructors (basically what we do in synedrion in constructors.rs) with additional consistency checks or convenience methods

TODO:

  • naming?
  • Redundancy with node IDs. We get the node ID from the Session level (because it's given a Signer), but we also may have an implicit ID in the inputs (e.g. a key share). How do we ensure these two are the same? Should we? Option 1: pass id to EntryPoint::make_round(), and return an error if it's not the one expected based on other inputs. Option 2: add an EntryPoint::my_id() method, and check in Session::new() that the returned ID is the same as in Signer. Option 3: keep them entirely disconnected.
  • Resolve Determining that a round may produce a result #66?

@coveralls
Copy link

coveralls commented Nov 9, 2024

Pull Request Test Coverage Report for Build 11847505816

Details

  • 95 of 101 (94.06%) changed or added relevant lines in 8 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.8%) to 69.779%

Changes Missing Coverage Covered Lines Changed/Added Lines %
manul/src/session/transcript.rs 4 5 80.0%
manul/src/combinators/chain.rs 25 30 83.33%
Files with Coverage Reduction New Missed Lines %
manul/src/combinators/misbehave.rs 1 91.88%
Totals Coverage Status
Change from base Build 11823609419: 0.8%
Covered Lines: 1771
Relevant Lines: 2538

💛 - Coveralls

@fjarri fjarri mentioned this pull request Nov 13, 2024
@fjarri fjarri force-pushed the stateful-entry-points branch 2 times, most recently from 510668c to e331cc7 Compare November 13, 2024 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Determining that a round may produce a result Stateful entry points
2 participants