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

Add more double/duplicate operations tests #3112

Merged
merged 4 commits into from
Nov 18, 2022
Merged

Add more double/duplicate operations tests #3112

merged 4 commits into from
Nov 18, 2022

Conversation

hwwhww
Copy link
Contributor

@hwwhww hwwhww commented Nov 18, 2022

Thanks @ajsutton for proposing this new test case.

  • [no substantive change] move test_exit_and_bls_change to test_success_exit_and_bls_change
  • add test_invalid_double_bls_changes_same_block
    • a block includes the same BLSToExecutionChange of the same validator. The first BLSToExecutionChange will succeed but the second will fail due to the assertion assert validator.withdrawal_credentials[:1] == BLS_WITHDRAWAL_PREFIX.

Copy link
Contributor

@djrtwo djrtwo left a comment

Choose a reason for hiding this comment

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

looks good!

@hwwhww hwwhww changed the title Add test_fail_double_bls_changes_in_same_block Add more double/duplicate operations tests Nov 18, 2022
@hwwhww
Copy link
Contributor Author

hwwhww commented Nov 18, 2022

reviewed and added new double operation tests:

  • existing old tests:
    • test_invalid_double_same_proposer_slashings_same_block
    • test_invalid_double_same_attester_slashing_same_block
    • test_invalid_double_validator_exit_same_block
  • added new tests in this PR:
    • test_double_same_attestation_same_block note: it's valid
    • test_invalid_double_same_deposit_same_block

Copy link
Contributor

@djrtwo djrtwo left a comment

Choose a reason for hiding this comment

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

great!

@hwwhww hwwhww merged commit c345f30 into dev Nov 18, 2022
@hwwhww hwwhww deleted the double-bls-changes branch November 18, 2022 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants