Description
In light of the recent Holesky incident, it may be useful to be able to manually import blocks and attestations to the slasher.
On Holesky, many slashers were shutdown during the non-finality period, meaning they missed the detection of many surround votes made by validators. One way we could get some of these slashings would be to manually feed blocks from the invalid chain to the slasher, so it can ingest the invalid attestations contained in those blocks and detect slashings.
The complication is, attestations in blocks require their BeaconState
/committee to be converted into indexed attestations. And the slasher needs indexed attestations (it needs to know which validators are attesting to the bad chain).
So I think we probably need a few new endpoints:
Import attestations
- Path:
/lighthouse/slasher/import_attestations
- Method: POST
- Request body:
Vec<IndexedAttestation>
- Response: status code only
This endpoint is more important. It would import all of the indexed attestations to the slasher:
lighthouse/beacon_node/beacon_chain/src/beacon_chain.rs
Lines 4305 to 4330 in bf955c7
Export indexed attestations
- Path:
/lighthouse/indexed_attestations
- Method: POST
- Request body:
SignedBeaconBlock
(orSignedBlindedBeaconBlock
) - Response:
Vec<IndexedAttestation>
This would need to be run on a node with the dodgy chain import (possibly imported via lcli http-sync
). It would convert all of the attestations in the block into indexed attestations using the committees from the parent BeaconState
.
These indexed attestations could then be saved to disk and plumbed into the /lighthouse/slasher/import_attestations
endpoint.
Import block
- Path:
/lighthouse/slasher/import_block
- Method: POST
- Request body:
SignedBeaconBlock
(orSignedBlindedBeaconBlock
?) - Response: status code only
This method is not as useful as I originally hoped, it would just be able to import the block header to the slasher due to the shuffling issue described above.
The implementation should pass the block itself to the slasher, probably using accept_block_header
like in block verification: