Skip to content
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

fix committee assignment bugs #699

Merged
merged 3 commits into from
Mar 3, 2019
Merged

fix committee assignment bugs #699

merged 3 commits into from
Mar 3, 2019

Conversation

djrtwo
Copy link
Contributor

@djrtwo djrtwo commented Feb 27, 2019

2 bugs:

  • We were modifying current_shuffling_epoch and then calling get_current_epoch_committee_count expecting that it was still getting the committee count from the previous value of current_shuffling_epoch. Switch operations to prevent this error
  • when getting next epoch committee assignments, we were sometimes modifying committees_per_epoch and shuffling_epoch when these things should have remained constant.

@djrtwo djrtwo added the general:bug Something isn't working label Feb 27, 2019
@djrtwo djrtwo requested review from JustinDrake and hwwhww and removed request for JustinDrake February 27, 2019 18:37
@djrtwo djrtwo changed the title fix committee start shard bug fix committee assignment bugs Feb 27, 2019
@JustinDrake
Copy link
Collaborator

At this point get_crosslink_committees_at_slot is black magic to me. I wish it could somehow be massively simplified, similar to how we massively simplified the validator state machine (which had a bunch of subtle bugs, and was brittle).

@djrtwo
Copy link
Contributor Author

djrtwo commented Mar 1, 2019

These fixes are pretty critical. Let's get it merged and try to simplify after

@terencechain
Copy link
Contributor

At this point get_crosslink_committees_at_slot is black magic to me. I wish it could somehow be massively simplified, similar to how we massively simplified the validator state machine (which had a bunch of subtle bugs, and was brittle).

Can confirm, whenever there's a validator run time failure we immediately look at this function then begin to scratch our head 😆

@JustinDrake JustinDrake self-requested a review March 1, 2019 07:13
@JustinDrake
Copy link
Collaborator

Let's get it merged

Approved!

Copy link
Contributor

@hwwhww hwwhww left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Trinity side sync + refactoring: ethereum/trinity#334

@djrtwo djrtwo merged commit 146aef3 into dev Mar 3, 2019
@djrtwo djrtwo deleted the start_shard_bug branch March 3, 2019 23:54
hwwhww added a commit to ethereum/trinity that referenced this pull request Mar 4, 2019
…#334)

* Sync with ethereum/consensus-specs#699

* Refactor `get_crosslink_committees_at_slot` with `ShufflingContext`

* Fix typo

* Sections
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
general:bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants