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

Interop tests #1411

Merged
merged 8 commits into from
Sep 26, 2019
Merged

Interop tests #1411

merged 8 commits into from
Sep 26, 2019

Conversation

djrtwo
Copy link
Contributor

@djrtwo djrtwo commented Sep 20, 2019

Increase test coverage to address some of the holes found at interop
https://github.com/djrtwo/interop-test-cases

  • crosslink tests for a tied crosslink between two epochs, favoring the previous epoch
  • rewards tests for a few basic scenarios
  • rewards test for duplicate attestation inclusion

Also:

  • fix test signatures for aggregate attestations in tests

Note:
Could either continue deeper into the rewards tests right here or just get it merged for release. Open to discussion

@djrtwo djrtwo changed the title [WIP] Interop tests Interop tests Sep 22, 2019
@djrtwo djrtwo requested a review from protolambda September 22, 2019 14:54
@djrtwo
Copy link
Contributor Author

djrtwo commented Sep 23, 2019

@protolambda Can you take a look at these soon?

@protolambda
Copy link
Contributor

Updated some use of the test util code for attestations. And parked a new test for crosslink data-root tie-breaking on a branch: dataroot-tie-test. This requires the phase-0 lines # [to be removed in phase 1] to actually be removed, for a later PR.

@protolambda
Copy link
Contributor

Documenting another two edge-cases in tiebreaking of crosslinks from interop, but unsure about reproduction in a test for now:

I:

  • Attestations with different attesters and crosslink end-epoch, but otherwise identical data
  • The attestations have different attesters, but same total weight
  • Winning crosslink attesters are chosen based on insertion order of attestations

Would it be a good idea to change the spec to tie-break more explicitly on insertion order?

II:

  • Same crosslink data, but multiple attestations with different attesters attesting to it.
  • Tiebreak is won by one of them, doesn't matter which as they are the same crosslink.
  • Aggregate winning attesters from multiple attestations that repeated this crosslink.

For II, an optimized version (zrnt...) may OR the attestations into a minimal bitfield per crosslink to rank, and then not have to aggregate at the end or repeatedly when computing the weights (sum of effective balance of unique attesters) for ranking. Having a test with multiple attestations, same crosslink, and overlapping participation may be valuable.

@protolambda
Copy link
Contributor

protolambda commented Sep 24, 2019

Looks good, cleaned up some minor things for attestation signing. And went through a few more edge cases, but need to decide on what to include in release (do we write out more edge-cases?), and continue on the testing tool (I prefer to focus on catching more things, and then write more tests later again).

@djrtwo
Copy link
Contributor Author

djrtwo commented Sep 25, 2019

This requires the phase-0 lines # [to be removed in phase 1] to actually be removed, for a later PR.

Checked it out. Looks good.


Ready to merge this. Going to prepare a release. May or may not get to some of the other tests before release

@djrtwo djrtwo merged commit b0dd7c3 into v08x Sep 26, 2019
@djrtwo djrtwo deleted the interop-tests branch September 26, 2019 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants