-
Notifications
You must be signed in to change notification settings - Fork 146
Conversation
@jannikluhn Oh I found the answer, privkey shouldn't be @pytest.mark.parametrize(
["is_valid", "epoch", "expected_epoch", "proposer_privkey", "expected_proposer_privkey"],
(
(True, 0, 0, 1, 1),
(True, 1, 1, 2, 2),
(False, 0, 1, 1, 1),
(False, 0, 0, 1, 2),
)
)
def test_randao_reveal_validation(... and also def test_randao_processing_validates_randao_reveal(sample_beacon_block_params,
sample_beacon_state_params,
sample_fork_params,
config):
proposer_privkey = 1
... |
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.
LGTM 👍 Just some nitpicks.
And @jannikluhn @NIC619 , about get_current_epoch
, get_previous_epoch
, and get_next_epoch
.... what do you think about adding them as the instance functions of BeaconState
?
tests/eth2/beacon/state_machines/forks/test_serenity_block_processing.py
Outdated
Show resolved
Hide resolved
tests/eth2/beacon/state_machines/forks/test_serenity_block_processing.py
Outdated
Show resolved
Hide resolved
tests/eth2/beacon/state_machines/forks/test_serenity_block_validation.py
Outdated
Show resolved
Hide resolved
👍 on making them instance function of |
Didn't know they existed, thanks 👍, will use those. It would be nice if we could pass the whole config to |
Yep... |
d32d51c
to
53a0090
Compare
I just realized that, one more thing, in this PR,
I imagine you will have to modify |
53a0090
to
2f3b760
Compare
What was wrong?
RANDAO processing was missing and the original PR for this was outdated.
How was it fixed?
Implemented the function
process_randao
plus the helpersvalidate_randao
,slot_to_epoch
, andget_current_epoch
according to the spec.However, some signature checking tests are failing and I don't understand why: Even though a different message is signed,
bls.verify
still returnsTrue
. Any idea what the issue is? (this is the reason why I labeled it as WIP.)There are two
FIXME
comments that I think should be addressed in #235 (or here, depending what's merged earlier, cc @NIC619 ).Cute Animal Picture