-
Notifications
You must be signed in to change notification settings - Fork 146
Conversation
11, 20, 50, 30, 34, 49, 33, 59, 79, 62, | ||
67, 96, 78, 8, 10, 99, 87, 27, 32, 23, | ||
), | ||
), |
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.
Remove the testcase since we will have test suite.
17: 0, | ||
18: 0, | ||
19: 75, # 3 * (100 // 4) | ||
19: 125, # 5 * (100 // 4) |
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.
I don't know if I updated it correctly or not... ping @NIC619
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.
Yes, that's correct.
The inclusion_slots
parameters above is updated to:
2: 31, # proposer index for inclusion slot 31: 6
3: 31,
4: 32, # proposer index for inclusion slot 32: 12
5: 32,
6: 32,
9: 35, # proposer index for inclusion slot 35: 19
10: 35,
11: 35,
12: 35,
13: 35,
15: 38, # proposer index for inclusion slot 38: 8
16: 38,
17: 38,
state.slot, | ||
CommitteeConfig(config), | ||
) | ||
slashing_proposer_index = (whistleblower_index + 1) % len(state.validator_registry) |
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.
That was interesting to find that after the endianness changes shuffling result, whistleblower_index
is as same as the slashing_proposer_index
!
Change it so that the slashing_proposer_index
won't be equal to whistleblower_index
.
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.
I'm probably mistaken but why was whistleblower tied to shuffling instead of anyone can be whistleblower?
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.
We take the block proposer who includes the ProposerSlashing
operation as the whistleblower. see https://github.com/ethereum/eth2.0-specs/blob/dev/specs/core/0_beacon-chain.md#slash_validator
whistleblower_index = get_beacon_proposer_index(state, state.slot)
So changing shuffling would change the whistleblower in this test.
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
state.slot, | ||
CommitteeConfig(config), | ||
) | ||
slashing_proposer_index = (whistleblower_index + 1) % len(state.validator_registry) |
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.
I'm probably mistaken but why was whistleblower tied to shuffling instead of anyone can be whistleblower?
What was wrong?
Fix #303
How was it fixed?
Replace big endian conversions with little endian
TODO:
Cute Animal Picture