Enroll v2 validators (#1649)

* Enroll v2 validators

* Mark external validators as readonly
nambrot/celo-safe
Nam Chu Hoai 2 years ago committed by GitHub
parent 3ff3893a9a
commit ab2de7ebab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 238
      typescript/infra/config/environments/mainnet2/validators.ts
  2. 9
      typescript/infra/scripts/check-deploy.ts
  3. 24
      typescript/infra/scripts/verify-validators.ts
  4. 4
      typescript/infra/src/agents/aws/validator.ts

@ -16,7 +16,7 @@ const s3BucketName = <Chain extends ChainName>(
export const validators: ChainValidatorSets<MainnetChains> = {
celo: {
threshold: 2,
threshold: 3,
validators: [
{
address: '0x1f20274b1210046769d48174c2f0e7c25ca7d5c5',
@ -37,18 +37,39 @@ export const validators: ChainValidatorSets<MainnetChains> = {
},
},
{
address: '0x573b59ee4c3a20132e5a710530d1c1589290f63a',
name: s3BucketName('celo', 2),
address: '0x3bc014bafa43f93d534aed34f750997cdffcf007',
name: 'dsrv-celo-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: s3BucketName('celo', 2),
region: s3BucketRegion,
bucket: 'dsrv-hyperlane-v2-validator-signatures-validator4-celo',
region: 'eu-central-1',
},
},
{
address: '0xd79d506d741fa735938f7b7847a926e34a6fe6b0',
name: 'everstake-celo-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: 'hyperlane-v2-validator-signatures-everstake-celo',
region: 'us-east-2',
},
},
{
address: '0xe4a258bc61e65914c2a477b2a8a433ab4ebdf44b',
name: 'ZPLabs-celo-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: 'hyperlane-validator-signatures-zplabs-celo',
region: 'eu-central-1',
},
},
],
},
ethereum: {
threshold: 2,
threshold: 3,
validators: [
{
address: '0x4c327ccb881a7542be77500b2833dc84c839e7b7',
@ -69,18 +90,39 @@ export const validators: ChainValidatorSets<MainnetChains> = {
},
},
{
address: '0xdbaa55951204f78c47dc5687783d624fd8d8426a',
name: s3BucketName('ethereum', 2),
address: '0x84cb373148ef9112b277e68acf676fefa9a9a9a0',
name: 'dsrv-ethereum-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: s3BucketName('ethereum', 2),
region: s3BucketRegion,
bucket: 'dsrv-hyperlane-v2-validator-signatures-validator1-ethereum',
region: 'eu-central-1',
},
},
{
address: '0x0d860c2b28bec3af4fd3a5997283e460ff6f2789',
name: 'everstake-ethereum-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: 'hyperlane-v2-validator-signatures-everstake-ethereum',
region: 'us-east-2',
},
},
{
address: '0xd4c1211f0eefb97a846c4e6d6589832e52fc03db',
name: 'ZPLabs-ethereum-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: 'hyperlane-validator-signatures-zplabs-eth',
region: 'eu-central-1',
},
},
],
},
avalanche: {
threshold: 2,
threshold: 3,
validators: [
{
address: '0xa7aa52623fe3d78c343008c95894be669e218b8d',
@ -101,18 +143,39 @@ export const validators: ChainValidatorSets<MainnetChains> = {
},
},
{
address: '0x37417806864e822b0f3df8310f53acd3bbd4294a',
name: s3BucketName('avalanche', 2),
address: '0xb6004433fb04f643e2d48ae765c0e7f890f0bc0c',
name: 'dsrv-avalanche-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: s3BucketName('avalanche', 2),
region: s3BucketRegion,
bucket: 'dsrv-hyperlane-v2-validator-signatures-validator2-avalanche',
region: 'eu-central-1',
},
},
{
address: '0xa07e213e0985b21a6128e6c22ab5fb73948b0cc2',
name: 'everstake-avalanche-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: 'hyperlane-v2-validator-signatures-everstake-avalanche',
region: 'us-east-2',
},
},
{
address: '0x73853ed9a5f6f2e4c521970a94d43469e3cdaea6',
name: 'ZPLabs-avalanche-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: 'hyperlane-validator-signatures-zplabs-avax',
region: 'eu-central-1',
},
},
],
},
polygon: {
threshold: 2,
threshold: 3,
validators: [
{
address: '0x59a001c3451e7f9f3b4759ea215382c1e9aa5fc1',
@ -133,18 +196,39 @@ export const validators: ChainValidatorSets<MainnetChains> = {
},
},
{
address: '0x6ec07957adecd7f95371040b54dfedcd57115825',
name: s3BucketName('polygon', 2),
address: '0x009fb042d28944017177920c1d40da02bfebf474',
name: 'dsrv-polygon-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: s3BucketName('polygon', 2),
region: s3BucketRegion,
bucket: 'dsrv-hyperlane-v2-validator-signatures-validator6-polygon',
region: 'eu-central-1',
},
},
{
address: '0xba4b13e23705a5919c1901150d9697e8ffb3ea71',
name: 'everstake-polygon-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: 'hyperlane-v2-validator-signatures-everstake-polygon',
region: 'us-east-2',
},
},
{
address: '0x2faa4071b718972f9b4beec1d8cbaa4eb6cca6c6',
name: 'ZPLabs-polygon-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: 'hyperlane-validator-signatures-zplabs-pgon',
region: 'eu-central-1',
},
},
],
},
bsc: {
threshold: 2,
threshold: 3,
validators: [
{
address: '0xcc84b1eb711e5076b2755cf4ad1d2b42c458a45e',
@ -165,18 +249,39 @@ export const validators: ChainValidatorSets<MainnetChains> = {
},
},
{
address: '0x4baf7993f2ce2447b61384f5b8b90304913af4ea',
name: s3BucketName('bsc', 2),
address: '0xefe34eae2bca1846b895d2d0762ec21796aa196a',
name: 'dsrv-bsc-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: s3BucketName('bsc', 2),
region: s3BucketRegion,
bucket: 'dsrv-hyperlane-v2-validator-signatures-validator3-bsc',
region: 'eu-central-1',
},
},
{
address: '0x662674e80e189b0861d6835c287693f50ee0c2ff',
name: 'everstake-bsc-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: 'hyperlane-v2-validator-signatures-everstake-bsc',
region: 'us-east-2',
},
},
{
address: '0x8a0f59075af466841808c529624807656309c9da',
name: 'ZPLabs-bsc-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: 'hyperlane-validator-signatures-zplabs-bsc',
region: 'eu-central-1',
},
},
],
},
arbitrum: {
threshold: 2,
threshold: 3,
validators: [
{
address: '0xbcb815f38d481a5eba4d7ac4c9e74d9d0fc2a7e7',
@ -197,18 +302,39 @@ export const validators: ChainValidatorSets<MainnetChains> = {
},
},
{
address: '0x6413a166851cdf1501dcf5d23cddf0c9ad9bfe5b',
name: s3BucketName('arbitrum', 2),
address: '0xd839424e2e5ace0a81152298dc2b1e3bb3c7fb20',
name: 'dsrv-arbitrum-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: s3BucketName('arbitrum', 2),
region: s3BucketRegion,
bucket: 'dsrv-hyperlane-v2-validator-signatures-validator7-arbitrum',
region: 'eu-central-1',
},
},
{
address: '0xb8085c954b75b7088bcce69e61d12fcef797cd8d',
name: 'everstake-arbitrum-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: 'hyperlane-v2-validator-signatures-everstake-arbitrum',
region: 'us-east-2',
},
},
{
address: '0x9856dcb10fd6e5407fa74b5ab1d3b96cc193e9b7',
name: 'ZPLabs-arbitrum-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: 'hyperlane-validator-signatures-zplabs-arbitrum',
region: 'eu-central-1',
},
},
],
},
optimism: {
threshold: 2,
threshold: 3,
validators: [
{
address: '0x9f2296d5cfc6b5176adc7716c7596898ded13d35',
@ -229,18 +355,39 @@ export const validators: ChainValidatorSets<MainnetChains> = {
},
},
{
address: '0x2ef8ad572738c3371e2e5652d34f7e66f3f47d8c',
name: s3BucketName('optimism', 2),
address: '0x9c10bbe8efa03a8f49dfdb5c549258e3a8dca097',
name: 'dsrv-optimism-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: s3BucketName('optimism', 2),
region: s3BucketRegion,
bucket: 'dsrv-hyperlane-v2-validator-signatures-validator8-optimism',
region: 'eu-central-1',
},
},
{
address: '0x62144d4a52a0a0335ea5bb84392ef9912461d9dd',
name: 'everstake-optimism-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: 'hyperlane-v2-validator-signatures-everstake-optimism',
region: 'us-east-2',
},
},
{
address: '0xaff4718d5d637466ad07441ee3b7c4af8e328dbd',
name: 'ZPLabs-optimism-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: 'hyperlane-validator-signatures-zplabs-optimism',
region: 'eu-central-1',
},
},
],
},
moonbeam: {
threshold: 2,
threshold: 3,
validators: [
{
address: '0x237243d32d10e3bdbbf8dbcccc98ad44c1c172ea',
@ -261,12 +408,23 @@ export const validators: ChainValidatorSets<MainnetChains> = {
},
},
{
address: '0x618599e44109068018ae5f06fa142a80721945e3',
name: s3BucketName('moonbeam', 2),
address: '0x9509c8cf0a06955f27342262af501b74874e98fb',
name: 'dsrv-moonbeam-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: s3BucketName('moonbeam', 2),
region: s3BucketRegion,
bucket: 'dsrv-hyperlane-v2-validator-signatures-validator5-moonbeam',
region: 'eu-central-1',
},
},
{
address: '0xb7113c999e4d587b162dd1a28c73f3f51c6bdcdc',
name: 'everstake-moonbeam-v2',
readonly: true,
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: 'hyperlane-v2-validator-signatures-everstake-moonbeam',
region: 'us-east-2',
},
},
],

@ -22,7 +22,14 @@ async function check() {
await coreChecker.check();
if (coreChecker.violations.length > 0) {
console.error(JSON.stringify(coreChecker.violations));
console.table(coreChecker.violations, [
'chain',
'remote',
'type',
'subType',
'actual',
'expected',
]);
throw new Error(
`Checking core deploy yielded ${coreChecker.violations.length} violations`,
);

@ -35,16 +35,22 @@ async function main() {
const controlValidator = validators[0];
for (let i = 1; i < validators.length; i++) {
const prospectiveValidator = validators[i];
const metrics = await prospectiveValidator.compare(controlValidator);
const valid =
metrics.filter((metric) => metric.status !== CheckpointStatus.VALID)
.length === 0;
const name = validatorSet.validators[i].name;
if (!valid) {
console.log(`${name} has >=1 non-valid checkpoints for ${chain}`);
console.log(JSON.stringify(metrics, null, 2));
} else {
console.log(`${name} has valid checkpoints for ${chain}`);
try {
const metrics = await prospectiveValidator.compare(controlValidator);
const valid =
metrics.filter((metric) => metric.status !== CheckpointStatus.VALID)
.length === 0;
if (!valid) {
console.log(`${name} has >=1 non-valid checkpoints for ${chain}`);
console.log(JSON.stringify(metrics, null, 2));
} else {
console.log(`${name} has valid checkpoints for ${chain}`);
}
} catch (error) {
console.error(`Comparing validator ${name} failed:`);
console.error(error);
throw error;
}
}
});

@ -21,7 +21,7 @@ interface CheckpointMetric {
* Shape of a checkpoint in S3 as published by the agent.
*/
interface S3Checkpoint {
checkpoint: {
value: {
outbox_domain: number;
root: string;
index: number;
@ -149,7 +149,9 @@ export class S3Validator extends BaseValidator {
}
const checkpoint: types.Checkpoint = {
signature: s3Object.data.signature,
// @ts-ignore Old checkpoints might still be in this format
...s3Object.data.checkpoint,
...s3Object.data.value,
};
if (!utils.isCheckpoint(checkpoint)) {
throw new Error('Failed to parse checkpoint');

Loading…
Cancel
Save