Skip to content
This repository was archived by the owner on Feb 27, 2025. It is now read-only.

pass membership to is_valid_cert #3918

Open
tbro opened this issue Nov 25, 2024 · 1 comment
Open

pass membership to is_valid_cert #3918

tbro opened this issue Nov 25, 2024 · 1 comment

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]>
@sveitser
Copy link
Contributor

Should be done after #3966

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants