Closed nalepae closed 1 year ago
I listed all tests with more than 1
step for version v2.5.1
.
Test case | Is OK with one import per test case? | Is OK with one import per step? |
---|---|---|
multiple_interchanges_single_validator_single_message_gap |
❌ | ✅ |
multiple_interchanges_multiple_validators_repeat_idem |
✅ | ✅ |
multiple_interchanges_overlapping_validators_merge_stale |
✅ | ❌ |
multiple_interchanges_overlapping_validators_repeat_idem |
✅ | ❌ |
multiple_interchanges_single_validator_fail_iff_imported |
✅ | ✅ |
multiple_interchanges_single_validator_first_surrounds_second |
✅ | ❌ |
multiple_interchanges_single_validator_second_surrounds_first |
✅ | ❌ |
multiple_interchanges_single_validator_single_att_out_of_order |
✅ | ❌ |
multiple_interchanges_single_validator_single_block_out_of_order |
✅ | ✅ |
==> My conclusion here is:
multiple_interchanges_single_validator_single_message_gap
contains errors.
If we have a agreement on this, I can propose a change on this test case.
If we have a consensus, I can modify multiple_interchanges_single_validator_single_message_gap
like this.
One initialisation per test case (not per step) is what was intended. I think the issue in #17 is separate. If we resolve that, then I'll close this issue.
I think the issue in https://github.com/eth-clients/slashing-protection-interchange-tests/issues/17 is separate.
Yes totally, those 2 issues are separated. That's why I created 2 tickets.
One initialisation per test case (not per step) is what was intended.
Thanks, perfectly clear.
I will focus on the test multiple_interchanges_single_validator_single_message_gap
, since it is the only one which may be problematic with "one initialisation per test case".
0xa99a76ed7796f7be22d5b7e85deeb7...
steps[0].interchange.data
, we import a block at slot 40
. steps[1].interchange.data
, we import a block at slot 50
==> At this point, for this pubkey, min(b.slot for b in data.signed_blocks) == 40
So when we process blocks at slots 41
, 45
& 49
(steps[1].blocks
), should_success
should be set to true
since no rule is violated.
I agree processing block at slot 50
(steps[1].blocks[3]
) should fail, because we already have in our DB a block for this slot, but with no signing root.
steps[0].interchange.data
, we import an attestation 2->30steps[1].interchange.data
, we import an attestation 10->50==> At this point, already known attestations are:
2 -----------------> 30
10 ----------------------------->50
For this key:
min_source_epoch == 2
min_target_epoch == 30
==> Importing 3 -> 31
or 9 -> 49
do not break
source_epoch < min_source_epoch
,target_epoch <= min_target_epoch
According to that, I tend to say, for these 2 attestations import, should_success
should be set to true
.
Ah right, I didn't spot that you were talking about a different test case. I think the fundamental issue is the same as #17: Complete vs Minimal. I'll try to amend this test case per your suggestions when I edit #17
Thanks!
Tests specify:
(A test can contain one to multiple steps)
My understanding reading these 2 sentences are:
step
, import theinterchange
, process theblocks
...And so, do not re-initialize the DB at each step.
However, it seems tests themselves contradict each other:
In test Multiple Interchanges Single Validator Single Message Gap:
In test Multiple Interchanges Overlapping Validators Merge Stale:
1.
is I understand that we should initialise 1 DB per step, and not 1 DB per test.2.
is I understand that we should initialise 1 DB per test, and not 1 DB per step.Or maybe Multiple Interchanges Single Validator Single Message Gap has an issue and these signatures should be allowed?