-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: combine signatures into gateway batch #153
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have added small comments, still need to test it.
evm/combine-signatures.js
Outdated
for (const signatureJSON of sortedSignatures) { | ||
const keyId = signatureJSON.key_id; | ||
const msgHash = `0x${signatureJSON.msg_hash}`; | ||
const pubKey = `0x${signatureJSON.pub_key}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verify that pub key matches the validator address in the file as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const validatorWeight = validatorWeights[validatorAddress.toLowerCase()];
if (!validatorWeight) {
printError('Validator does not belong to current epoch', validatorAddress);
return;
}
This check should ensure that all the validator public keys correspond to valid validators in the current epoch
kubectl exec -ti axelar-core-node-validator1-5b68db5c49-mf5q6 -n stagenet-validator1 -c vald -- sh | ||
``` | ||
|
||
7. Within the validator container, run the vald command from step 2 with the correct validator address. Validator addresses can be found by appending this endpoint `/axelar/multisig/v1beta1/key?key_id=[KEY_ID]` to the Axelar lcd url in the chains config file. Running this command should result in a JSON output containing the signature, similar to the example below: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@milapsheth is there a simpler way to identify the validator address of a container than looping through all the validators mentioned in the endpoint. this approach might not be viable on testnet or mainnet.
Draft PR for manually combining validator signatures into gateway batch as per AXE-2733