https://github.com/chronicleprotocol/validator-registry
Onchain registry for Chronicle Protocol validators
https://github.com/chronicleprotocol/validator-registry
Last synced: 5 months ago
JSON representation
Onchain registry for Chronicle Protocol validators
- Host: GitHub
- URL: https://github.com/chronicleprotocol/validator-registry
- Owner: chronicleprotocol
- Created: 2024-07-03T09:16:11.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-14T14:18:27.000Z (over 1 year ago)
- Last Synced: 2025-10-10T22:30:07.699Z (9 months ago)
- Language: Solidity
- Size: 37.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ValidatorRegistry • [](https://github.com/chronicleprotocol/validator-registry/actions/workflows/ci.yml) [](https://opensource.org/licenses/MIT)
This contract provides an onchain registry for _Chronicle Protocol_ validators via 1-byte validators ids.
A validators id is computed as the highest-order byte of the validators address, ie `uint8 validatorId = uint8(uint(uint160(validator)) >> 152);`
Due to validator ids being 1 byte, the maximum number of feeds supported is 256.
Note that a set of lifted validators can be encoded in a single uint. The code refers to it as `uint bloom`.
> [!IMPORTANT]
> Due to a vulnerability in Scribe this registry also implements a proof of possession to defend against rogue key attacks.
> The proof of possession is an ECDSA signature signing a message derived from the validator's public key, the Chronicle Validator Registration Message V2.
## Installation
Install module via Foundry:
```bash
$ forge install chronicleprotocol/validator-registry@v2
```
## Contributing
The project uses the Foundry toolchain. You can find installation instructions [here](https://getfoundry.sh/).
Setup:
```bash
$ git clone https://github.com/chronicleprotocol/validator-registry
$ cd validator-registry/
$ forge install
```
Run tests:
```bash
$ forge test
$ forge test -vvvv # Run with full stack traces
$ FOUNDRY_PROFILE=intense forge test # Run in intense mode
```
Lint:
```bash
$ forge fmt [--check]
```
## Dependencies
- [chronicleprotocol/chronicle-std@v2](https://github.com/chronicleprotocol/chronicle-std/tree/v2)
- [chronicleprotocol/scribe@v2](https://github.com/chronicleprotocol/scribe/tree/v2)