-
Notifications
You must be signed in to change notification settings - Fork 47
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
Light client contract related changes #3655
Conversation
This reverts commit 998dd79.
…en removed from the light client state
…he light client state
…ems/HotShot into lc-contract-updates
self.0[5] | ||
} | ||
|
||
/// Return the threshold | ||
#[must_use] | ||
pub fn threshold(&self) -> F { | ||
self.0[6] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these magic numbers are kind of tricky to reason about, can we just use a named struct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alxiong @alysiahuggins do you remember if there is any particular reason why we don't use a named struct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the decision made by @mrain and i recall the public input right now is simple enough to keep track of?
i also personally prefer a named struct, less error prone.
but i tried to make minimal changes for this task, so kept the legacy way. Can update in the future as tech debt.
Part of EspressoSystems/espresso-sequencer#1938
This PR:
The purpose of this PR is to update the GenericLightClientState struct (removing 4 fields) and introduce a new struct
GenericStakeTableState
to represent the stake table state (which is fixed). These changes are required to account for a refactoring of the Light Client contract which purpose is to remove all logic related to epochs. See EspressoSystems/espresso-sequencer#1938 for more context.Key places to review:
Only
crates/types/src/light_client.rs
as other changes are due to runningcargo fmt
.As usual (see README.md)