Vigilante submitter
Description
This package implements the vigilante submitter. The code is adapted from this source↗.
This vigilante submitter is responsible for gathering the correct information from the BBN chain such as checkpoints, and submitting it to the BTC main chain.
Invariants
For reference, here are some examples:
Should attempt to submit the checkpoints at least twice
Should send checkpoints in sequential order without missing any checkpoint
Should correctly account for the node going down
Test coverage
Cases covered
Fuzzing tests with various randomly generated checkpoints and data, then invariants, are checked to ensure that all the checkpoints are submitted in the correct order.
General E2E testing ensures that checkpoints are submitted.
Cases not covered
E2E test — relayer retry tests
More tests to ensure that the fee amounts and possible edge cases are covered
Attack surface
A malicious proposer/validator/network participant should not be able to form malicious checkpoints, such that the submitter fails at submitting according to the invariants before — or a checkpoint that the submitter cannot poll due to parsing, memory, or other issues.