You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Adds the helper function `verify_slashable_vote_data`
* Fix import
* Various formatting fixes from the linter
* Turn constants into function parameters
* Use appropriate python instead of pseudocode from spec
* Handle import/use of SignatureDomain enum properly
* Some light refactoring while preferring tuples over lists
Tuples are preferred in this codebase (over lists) due to their immutability.
This commit also contains some other refactorings to break the verification
down into small distinct steps (for better understandability).
* Use 'forward references' for types that need to avoid import issues
* Adjust grammar to be consistent with repo standard
* formatting
* Use more specific name for signature function
* Formatting fixes to satisfy linter
* Move messages generation to property of `SlashableVoteData` class
* Insert missing class for "params" field into test fixture
The prior implementation was passing a flat dictionary (rather than
instantiating a class of the appropriate type with said dictionary) and the
existing tests didn't have a problem with this as they were simply checking
for equality of this dictionary.
This yields a SlashableVoteData instance that fails rlp serialization however
which is fixed by instantiating the appropriate class when we get the
constructor arguments for this fixture
* Add tests performing sanity checks on SlashableVoteData properties
* Minimize the interface this function requests
The function requests less now; this is good practice and if anything makes the
tests easier to write
* Add tests for `verify_slashable_vote_data` helper
* Add `validators` property on BeaconState for convenience
* Change hash of `SlashableVoteData` to be the attestation data
This value is likely to change soon so we just want _some_ hash for now.
We use the attestation data as before we were hashing the entire container
including the signature putting us in a catch-22.
* Update test to reflect updated hash
* Remove unused import to satisfy linter
* variety of linter fixes
* formatting
* Linter caught unused variable that is unnecessary
Change allows for simplification of code
* Linter caught unused function that, in fact, should be tested
* Add additional test property
* Code clean-up
* Be more precise in how we "corrupt" the vote count
* Remove property that may be confused for other representation
* Formatting fixes, some small code adjustments based on feedback
* Tighter test condition
* Use a value for the errant `privkey` that produces invalid signature
The previous value of `0` seems to produce a signature that verifies any message
0 commit comments