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 tests for EIP 7549 #6672

Open
wants to merge 2 commits into
base: unstable
Choose a base branch
from
Open

Conversation

bshastry
Copy link

@bshastry bshastry commented Dec 9, 2024

Issue Addressed

Expand Electra attestation test suite

Proposed Changes

This PR adds comprehensive test coverage for Electra attestations, focusing on equivalence with base attestations and multi-committee functionality. Added tests include:

  1. Basic Creation Equivalence Test:
#[test]
fn test_creation_equivalence() {
    // Verifies that Electra attestations maintain equivalent basic properties
    // with Base attestations while supporting committee tracking
}
  1. Signature Verification:
#[test]
fn test_signature_equivalence() {
    // Ensures signature creation and verification work identically 
    // between Base and Electra attestations
}
  1. Aggregation Testing:
#[test]
fn test_aggregation_equivalence() {
    // Validates that aggregation behavior matches between
    // Base and Electra attestations
}
  1. Error Handling:
#[test]
fn test_error_handling_equivalence() {
    // Confirms error conditions are handled consistently
    // across both attestation types
}
  1. Multi-Committee Support:
#[test]
fn test_multi_committee_aggregation() {
    // Tests Electra's unique ability to handle multiple committees
    // in a single attestation
}

Additional Info

Test Coverage Focus

  • Base vs Electra equivalence for backward compatibility
  • Multi-committee functionality specific to Electra
  • Edge cases in signature aggregation
  • Error handling consistency

Testing Notes

  1. Uses create_test_data() helper for consistent test scenarios
  2. Explicitly tests both single and multi-committee cases
  3. Verifies bit manipulation for committee tracking
  4. Ensures proper index translation between committee spaces

Review Considerations

  • Pay special attention to the multi-committee test cases
  • Verify error handling matches existing behavior
  • Check signature aggregation correctness
  • Confirm committee bit manipulation is correct

@chong-he chong-he added test improvement Improve tests ready-for-review The code is ready for review labels Dec 9, 2024
@michaelsproul michaelsproul added the electra Required for the Electra/Prague fork label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
electra Required for the Electra/Prague fork ready-for-review The code is ready for review test improvement Improve tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants