lighthouse icon indicating copy to clipboard operation
lighthouse copied to clipboard

Add tests for EIP 7549

Open bshastry opened this issue 1 year ago • 1 comments

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

bshastry avatar Dec 09 '24 11:12 bshastry

Some required checks have failed. Could you please take a look @bshastry? 🙏

mergify[bot] avatar May 27 '25 15:05 mergify[bot]

Hi @bshastry, this pull request has been closed automatically due to 30 days of inactivity. If you’d like to continue working on it, feel free to reopen at any time.

mergify[bot] avatar Jun 26 '25 15:06 mergify[bot]