Skip to content

chronicleprotocol/validator-registry

Repository files navigation

ValidatorRegistry • CI License: 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:

$ forge install chronicleprotocol/validator-registry@v2

Contributing

The project uses the Foundry toolchain. You can find installation instructions here.

Setup:

$ git clone https://github.com/chronicleprotocol/validator-registry
$ cd validator-registry/
$ forge install

Run tests:

$ forge test
$ forge test -vvvv # Run with full stack traces
$ FOUNDRY_PROFILE=intense forge test # Run in intense mode

Lint:

$ forge fmt [--check]

Dependencies

About

Onchain registry for Chronicle Protocol validators

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published