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

pass membership to is_valid_cert #3918

Open
tbro opened this issue Nov 25, 2024 · 0 comments
Open

pass membership to is_valid_cert #3918

tbro opened this issue Nov 25, 2024 · 0 comments

Comments

@tbro
Copy link
Contributor

tbro commented Nov 25, 2024

See coment #3867 (comment) and zullip discussion.

  • is_valid_cert should take a type implementing Membershipas input
  • the is_valid_cert impl should directly call the threshold/stake table it needs from Membership (stake_table/success, stake_table/upgrade or da_stake_table/da_success). I think CERT::stake_table and CERT::threshold might be available for this, but maybe these should be on Voteable? haven't fully thought through this
  • the build_cert function in testing looks fine, but worth a double-check
    I might be mixing some things up here, but basically we want to make sure anything directly taking a stake_table or threshold is refactored to only take a Membership, where possible. I think this should be a fairly small refactor but should add a lot of safety
@tbro tbro changed the title pass membership to `is_valid_cert pass membership to is_valid_cert Nov 25, 2024
tbro added a commit that referenced this issue Nov 25, 2024
Delete Memberships and replace functionality. Add some methods to
`Membership` trait to deal w/ collapsing into one type both kinds of
memberships (stake and DA).

  * avoid passing membership into `is_valid_cert (see #3918)
  * for DA, avoid proxying threshold through `Threshold` trait
  * remove `Topic` param from `Membership::new
  * Split cert impls by marker (#3891)
  * add membership methods to Cert trait
  * remove non-existent test from justfile

---------

Co-authored-by: tbro <[email protected]>
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

No branches or pull requests

1 participant