Enroll ZKV/Staked to default ism (#1796)

* Enroll ZKV/Staked to default ism

* Increase threshold and remove 2nd abacus works signer
pull/1811/head
Nam Chu Hoai 2 years ago committed by GitHub
parent 44361db3ce
commit 82ebc01054
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 37
      typescript/infra/config/environments/mainnet2/core.ts
  2. 72
      typescript/infra/config/environments/mainnet2/validators.ts
  3. 6
      typescript/infra/scripts/list-validator-checkpoint-indices.ts
  4. 13
      typescript/infra/scripts/verify-validators.ts
  5. 2
      typescript/infra/src/agents/aws/validator.ts

@ -6,91 +6,98 @@ export const core: ChainMap<MainnetChains, CoreConfig> = {
celo: { celo: {
owner: '0x1DE69322B55AC7E0999F8e7738a1428C8b130E4d', owner: '0x1DE69322B55AC7E0999F8e7738a1428C8b130E4d',
multisigIsm: { multisigIsm: {
threshold: 3, threshold: 4,
validators: [ validators: [
'0x1f20274b1210046769d48174c2f0e7c25ca7d5c5', '0x1f20274b1210046769d48174c2f0e7c25ca7d5c5',
'0xef6db730fca69e1438c9ea19fefb3060901a8dfa',
'0x3bc014bafa43f93d534aed34f750997cdffcf007', '0x3bc014bafa43f93d534aed34f750997cdffcf007',
'0xd79d506d741fa735938f7b7847a926e34a6fe6b0', '0xd79d506d741fa735938f7b7847a926e34a6fe6b0',
'0xe4a258bc61e65914c2a477b2a8a433ab4ebdf44b', '0xe4a258bc61e65914c2a477b2a8a433ab4ebdf44b',
'0x6aea63b0be4679c1385c26a92a3ff8aa6a8379f2', // staked
'0xc0085e1a49bcc69e534272adb82c74c0e007e1ca', // zkv
], ],
}, },
}, },
ethereum: { ethereum: {
owner: '0x12C5AB61Fe17dF9c65739DBa73dF294708f78d23', owner: '0x12C5AB61Fe17dF9c65739DBa73dF294708f78d23',
multisigIsm: { multisigIsm: {
threshold: 3, threshold: 4,
validators: [ validators: [
'0x4c327ccb881a7542be77500b2833dc84c839e7b7', '0x4c327ccb881a7542be77500b2833dc84c839e7b7',
'0xf4db15933d204b38c17cc027c3f1c9f3c5da9a7c',
'0x84cb373148ef9112b277e68acf676fefa9a9a9a0', '0x84cb373148ef9112b277e68acf676fefa9a9a9a0',
'0x0d860c2b28bec3af4fd3a5997283e460ff6f2789', '0x0d860c2b28bec3af4fd3a5997283e460ff6f2789',
'0xd4c1211f0eefb97a846c4e6d6589832e52fc03db', '0xd4c1211f0eefb97a846c4e6d6589832e52fc03db',
'0x600c90404d5c9df885404d2cc5350c9b314ea3a2', // staked
'0x892DC66F5B2f8C438E03f6323394e34A9C24F2D6', // zkv
], ],
}, },
}, },
avalanche: { avalanche: {
owner: '0xDF9B28B76877f1b1B4B8a11526Eb7D8D7C49f4f3', owner: '0xDF9B28B76877f1b1B4B8a11526Eb7D8D7C49f4f3',
multisigIsm: { multisigIsm: {
threshold: 3, threshold: 4,
validators: [ validators: [
'0xa7aa52623fe3d78c343008c95894be669e218b8d', '0xa7aa52623fe3d78c343008c95894be669e218b8d',
'0x37a2c96f82dc6c7fa290d858d02ea5d1e0ce86ff',
'0xb6004433fb04f643e2d48ae765c0e7f890f0bc0c', '0xb6004433fb04f643e2d48ae765c0e7f890f0bc0c',
'0xa07e213e0985b21a6128e6c22ab5fb73948b0cc2', '0xa07e213e0985b21a6128e6c22ab5fb73948b0cc2',
'0x73853ed9a5f6f2e4c521970a94d43469e3cdaea6', '0x73853ed9a5f6f2e4c521970a94d43469e3cdaea6',
'0xbd2e136cda02ba627ca882e49b184cbe976081c8', // staked
'0x1418126f944a44dad9edbab32294a8c890e7a9e3', // zkv
], ],
}, },
}, },
polygon: { polygon: {
owner: '0x0D195469f76146F6ae3De8fc887e0f0DFBA691e7', owner: '0x0D195469f76146F6ae3De8fc887e0f0DFBA691e7',
multisigIsm: { multisigIsm: {
threshold: 3, threshold: 4,
validators: [ validators: [
'0x59a001c3451e7f9f3b4759ea215382c1e9aa5fc1', '0x59a001c3451e7f9f3b4759ea215382c1e9aa5fc1',
'0x3e549171d0954194442d6b16fa780d1ec83072fd',
'0x009fb042d28944017177920c1d40da02bfebf474', '0x009fb042d28944017177920c1d40da02bfebf474',
'0xba4b13e23705a5919c1901150d9697e8ffb3ea71', '0xba4b13e23705a5919c1901150d9697e8ffb3ea71',
'0x2faa4071b718972f9b4beec1d8cbaa4eb6cca6c6', '0x2faa4071b718972f9b4beec1d8cbaa4eb6cca6c6',
'0x5ae9b0f833dfe09ef455562a1f603f1634504dd6', // staked
'0x6a163d312f7352a95c9b81dca15078d5bf77a442', // zkv
], ],
}, },
}, },
bsc: { bsc: {
owner: '0xA0d3dcB9d61Fba32cc02Ad63983e101b29E2f28a', owner: '0xA0d3dcB9d61Fba32cc02Ad63983e101b29E2f28a',
multisigIsm: { multisigIsm: {
threshold: 3, threshold: 4,
validators: [ validators: [
'0xcc84b1eb711e5076b2755cf4ad1d2b42c458a45e', '0xcc84b1eb711e5076b2755cf4ad1d2b42c458a45e',
'0x62229ff38de88464fd49d79bea0cdc48ebdebd79',
'0xefe34eae2bca1846b895d2d0762ec21796aa196a', '0xefe34eae2bca1846b895d2d0762ec21796aa196a',
'0x662674e80e189b0861d6835c287693f50ee0c2ff', '0x662674e80e189b0861d6835c287693f50ee0c2ff',
'0x8a0f59075af466841808c529624807656309c9da', '0x8a0f59075af466841808c529624807656309c9da',
'0xdd2ff046ccd748a456b4757a73d47f165469669f', // staked
'0x034c4924c30ec4aa1b7f3ad58548988f0971e1bf', // zkv
], ],
}, },
}, },
arbitrum: { arbitrum: {
owner: '0xbA47E1b575980B7D1b1508cc48bE1Df4EE508111', owner: '0xbA47E1b575980B7D1b1508cc48bE1Df4EE508111',
multisigIsm: { multisigIsm: {
threshold: 3, threshold: 4,
validators: [ validators: [
'0xbcb815f38d481a5eba4d7ac4c9e74d9d0fc2a7e7', '0xbcb815f38d481a5eba4d7ac4c9e74d9d0fc2a7e7',
'0xa0d92ee2156f74b18c6d116527e3c9001f123dac',
'0xd839424e2e5ace0a81152298dc2b1e3bb3c7fb20', '0xd839424e2e5ace0a81152298dc2b1e3bb3c7fb20',
'0xb8085c954b75b7088bcce69e61d12fcef797cd8d', '0xb8085c954b75b7088bcce69e61d12fcef797cd8d',
'0x9856dcb10fd6e5407fa74b5ab1d3b96cc193e9b7', '0x9856dcb10fd6e5407fa74b5ab1d3b96cc193e9b7',
'0x505dff4e0827aa5065f5e001db888e0569d46490', // staked
'0x25c6779d4610f940bf2488732e10bcffb9d36f81', // ZKV
], ],
}, },
}, },
optimism: { optimism: {
owner: '0xb523CFAf45AACF472859f8B793CB0BFDB16bD257', owner: '0xb523CFAf45AACF472859f8B793CB0BFDB16bD257',
multisigIsm: { multisigIsm: {
threshold: 3, threshold: 4,
validators: [ validators: [
'0x9f2296d5cfc6b5176adc7716c7596898ded13d35', '0x9f2296d5cfc6b5176adc7716c7596898ded13d35',
'0xd2d9baadd72d3a9983b06ba5f103856e5fea63cb',
'0x9c10bbe8efa03a8f49dfdb5c549258e3a8dca097', '0x9c10bbe8efa03a8f49dfdb5c549258e3a8dca097',
'0x62144d4a52a0a0335ea5bb84392ef9912461d9dd', '0x62144d4a52a0a0335ea5bb84392ef9912461d9dd',
'0xaff4718d5d637466ad07441ee3b7c4af8e328dbd', '0xaff4718d5d637466ad07441ee3b7c4af8e328dbd',
'0xc64d1efeab8ae222bc889fe669f75d21b23005d9', // staked
'0xfa174eb2b4921bb652bc1ada3e8b00e7e280bf3c', // ZKV
], ],
}, },
}, },
@ -100,9 +107,9 @@ export const core: ChainMap<MainnetChains, CoreConfig> = {
threshold: 3, threshold: 3,
validators: [ validators: [
'0x237243d32d10e3bdbbf8dbcccc98ad44c1c172ea', '0x237243d32d10e3bdbbf8dbcccc98ad44c1c172ea',
'0x02424d4222f35c04da62a2f2dea8c778030bb324',
'0x9509c8cf0a06955f27342262af501b74874e98fb', '0x9509c8cf0a06955f27342262af501b74874e98fb',
'0xb7113c999e4d587b162dd1a28c73f3f51c6bdcdc', '0xb7113c999e4d587b162dd1a28c73f3f51c6bdcdc',
'0x26725501597d47352a23cd26f122709f69ad53bc', // staked
], ],
}, },
}, },

@ -28,15 +28,6 @@ export const validators: ChainValidatorConfigs<MainnetChains> = {
region: s3BucketRegion, region: s3BucketRegion,
}, },
}, },
{
address: '0xef6db730fca69e1438c9ea19fefb3060901a8dfa',
name: s3BucketName('celo', 1),
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: s3BucketName('celo', 1),
region: s3BucketRegion,
},
},
], ],
}, },
ethereum: { ethereum: {
@ -52,15 +43,6 @@ export const validators: ChainValidatorConfigs<MainnetChains> = {
region: s3BucketRegion, region: s3BucketRegion,
}, },
}, },
{
address: '0xf4db15933d204b38c17cc027c3f1c9f3c5da9a7c',
name: s3BucketName('ethereum', 1),
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: s3BucketName('ethereum', 1),
region: s3BucketRegion,
},
},
], ],
}, },
avalanche: { avalanche: {
@ -76,15 +58,6 @@ export const validators: ChainValidatorConfigs<MainnetChains> = {
region: s3BucketRegion, region: s3BucketRegion,
}, },
}, },
{
address: '0x37a2c96f82dc6c7fa290d858d02ea5d1e0ce86ff',
name: s3BucketName('avalanche', 1),
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: s3BucketName('avalanche', 1),
region: s3BucketRegion,
},
},
], ],
}, },
polygon: { polygon: {
@ -100,15 +73,6 @@ export const validators: ChainValidatorConfigs<MainnetChains> = {
region: s3BucketRegion, region: s3BucketRegion,
}, },
}, },
{
address: '0x3e549171d0954194442d6b16fa780d1ec83072fd',
name: s3BucketName('polygon', 1),
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: s3BucketName('polygon', 1),
region: s3BucketRegion,
},
},
], ],
}, },
bsc: { bsc: {
@ -124,15 +88,6 @@ export const validators: ChainValidatorConfigs<MainnetChains> = {
region: s3BucketRegion, region: s3BucketRegion,
}, },
}, },
{
address: '0x62229ff38de88464fd49d79bea0cdc48ebdebd79',
name: s3BucketName('bsc', 1),
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: s3BucketName('bsc', 1),
region: s3BucketRegion,
},
},
], ],
}, },
arbitrum: { arbitrum: {
@ -148,15 +103,6 @@ export const validators: ChainValidatorConfigs<MainnetChains> = {
region: s3BucketRegion, region: s3BucketRegion,
}, },
}, },
{
address: '0xa0d92ee2156f74b18c6d116527e3c9001f123dac',
name: s3BucketName('arbitrum', 1),
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: s3BucketName('arbitrum', 1),
region: s3BucketRegion,
},
},
], ],
}, },
optimism: { optimism: {
@ -172,15 +118,6 @@ export const validators: ChainValidatorConfigs<MainnetChains> = {
region: s3BucketRegion, region: s3BucketRegion,
}, },
}, },
{
address: '0xd2d9baadd72d3a9983b06ba5f103856e5fea63cb',
name: s3BucketName('optimism', 1),
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: s3BucketName('optimism', 1),
region: s3BucketRegion,
},
},
], ],
}, },
moonbeam: { moonbeam: {
@ -196,15 +133,6 @@ export const validators: ChainValidatorConfigs<MainnetChains> = {
region: s3BucketRegion, region: s3BucketRegion,
}, },
}, },
{
address: '0x02424d4222f35c04da62a2f2dea8c778030bb324',
name: s3BucketName('moonbeam', 1),
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: s3BucketName('moonbeam', 1),
region: s3BucketRegion,
},
},
], ],
}, },
gnosis: { gnosis: {

@ -30,11 +30,13 @@ async function main() {
await validatorAnnounce.getAnnouncedStorageLocations([validator]); await validatorAnnounce.getAnnouncedStorageLocations([validator]);
// Only use the latest announcement for now // Only use the latest announcement for now
let index = null; let index = null;
let identifier = validator;
if (storageLocations.length == 1 && storageLocations[0].length == 1) { if (storageLocations.length == 1 && storageLocations[0].length == 1) {
try { try {
const s3Validator = await S3Validator.fromStorageLocation( const s3Validator = await S3Validator.fromStorageLocation(
storageLocations[0][0], storageLocations[0][0],
); );
identifier = storageLocations[0][0];
index = await s3Validator.getLatestCheckpointIndex(); index = await s3Validator.getLatestCheckpointIndex();
} catch (e) { } catch (e) {
console.error(e); console.error(e);
@ -42,13 +44,13 @@ async function main() {
} }
return { return {
chain, chain,
address: validator, identifier,
index, index,
}; };
}, },
); );
console.table(indices, ['chain', 'index', 'address']); console.table(indices, ['chain', 'index', 'identifier']);
} }
main().catch(console.error); main().catch(console.error);

@ -28,26 +28,31 @@ async function main() {
if (storageLocations[i].length != 1) { if (storageLocations[i].length != 1) {
throw new Error('Only support single announcement'); throw new Error('Only support single announcement');
} }
return S3Validator.fromStorageLocation(validator); return S3Validator.fromStorageLocation(storageLocations[i][0]);
}), }),
); );
const controlValidator = validators[0]; const controlValidator = validators[0];
for (let i = 1; i < validators.length; i++) { for (let i = 1; i < validators.length; i++) {
const prospectiveValidator = validators[i]; const prospectiveValidator = validators[i];
const address = prospectiveValidator.address; const address = prospectiveValidator.address;
const bucket = prospectiveValidator.s3Bucket.bucket;
try { try {
const metrics = await prospectiveValidator.compare(controlValidator); const metrics = await prospectiveValidator.compare(controlValidator);
const valid = const valid =
metrics.filter((metric) => metric.status !== CheckpointStatus.VALID) metrics.filter((metric) => metric.status !== CheckpointStatus.VALID)
.length === 0; .length === 0;
if (!valid) { if (!valid) {
console.log(`${address} has >=1 non-valid checkpoints for ${chain}`); console.log(
`${address}@${bucket} has >=1 non-valid checkpoints for ${chain}`,
);
console.log(JSON.stringify(metrics, null, 2)); console.log(JSON.stringify(metrics, null, 2));
} else { } else {
console.log(`${address} has valid checkpoints for ${chain}`); console.log(
`${address}@${bucket} has valid checkpoints for ${chain}`,
);
} }
} catch (error) { } catch (error) {
console.error(`Comparing validator ${address} failed:`); console.error(`Comparing validator ${address}@${bucket} failed:`);
console.error(error); console.error(error);
throw error; throw error;
} }

@ -44,7 +44,7 @@ const ANNOUNCEMENT_KEY = 'announcement.json';
* Extension of BaseValidator that includes AWS S3 utilities. * Extension of BaseValidator that includes AWS S3 utilities.
*/ */
export class S3Validator extends BaseValidator { export class S3Validator extends BaseValidator {
private s3Bucket: S3Wrapper; s3Bucket: S3Wrapper;
constructor( constructor(
address: string, address: string,

Loading…
Cancel
Save