eth-clients / slashing-protection-interchange-tests

Tests for the EIP-3076 slashing protection interchange format
https://eips.ethereum.org/EIPS/eip-3076
9 stars 6 forks source link

`single_validator_resign_block.json`: Issue in minimal slashing DB? #19

Open nalepae opened 12 months ago

nalepae commented 12 months ago

EIP-3076 states:

  1. Refuse to sign any block with slot <= min(b.slot for b in data.signed_blocks if b.pubkey == proposer_pubkey), except if it is a repeat signing as determined by the signing_root.

In test single_validator_resign_block.json, for block proposals for pubkey 0xa99a..., we have in the interchange file:

Slot                    15 ----> 16 -----> 17
Signing root            97       a1        ab

The minimal anti-slashing DB retains only the proposal with the highest slot:

Later, in steps[0].blocks[3], we want to import:

        {
          "pubkey": "0xa99a76ed7796f7be22d5b7e85deeb7c5677e88e511e0b337618f8c4eb61349b4bf2d153f649f7b53359fe8b94a38e44c",
          "slot": "17",
          "signing_root": "0x00000000000000000000000000000000000000000000000000000000000000ab",
          "should_succeed": false,
          "should_succeed_complete": true
        },

We try to import a block, corresponding to the minimal proposed slot for this pubkey (which is actually the maximum one as well if consider a minimal anti-slashing DB), with the same signing_root. ==> This import should be both valid for minimal anti-slashing DB (should_succeed) as well as for complete anti-slashing DB (should_succeed_complete)

michaelsproul commented 12 months ago

I suspect this has the same root cause as #20. Ambiguity about whether a minimal impl remembers the signing root or not