-
Notifications
You must be signed in to change notification settings - Fork 29
docs(release): update CW template for coordinator v2 #876
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
base: feat/coordinator_script
Are you sure you want to change the base?
docs(release): update CW template for coordinator v2 #876
Conversation
a334217
to
58ea502
Compare
810e932
to
aa80079
Compare
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.
Greptile Summary
This PR updates the CosmWasm deployment template documentation to use the new Coordinator script instead of individual contract instantiation commands. The changes represent a significant simplification of the deployment process, consolidating 11 individual governance proposal commands into 3 high-level coordinator commands.
The key transformation involves replacing manual contract deployment steps (VotingVerifier, Gateway, MultisigProver instantiation, Router registration, Coordinator registration, and Multisig authorization) with a single coordinator.ts instantiate
command that handles the complex orchestration automatically. The PR also introduces a new register-deployment
command and simplifies variable naming from camelCase to UPPER_CASE for environment variables.
This change aligns with the coordinator.ts script that exists in the codebase (visible in the cosmwasm/coordinator/ directory) and represents a move toward automated deployment workflows. The coordinator approach reduces the total deployment steps from 15 to 11 and eliminates the need for operators to manually manage complex inter-contract relationships and configurations. This fits into the broader Axelar ecosystem by providing a more reliable and consistent deployment experience across different blockchain environments in the Amplifier network.
Important Files Changed
Files Changed
Filename | Score | Overview |
---|---|---|
releases/cosmwasm/EVM-CosmWasm-Release-Template.md | 4/5 | Updated deployment template to use new Coordinator script, replacing 11 individual commands with 3 simplified coordinator commands |
Confidence score: 4/5
- This PR is safe to merge with minimal risk as it only updates documentation templates
- Score reflects that this is documentation-only changes that align with existing coordinator infrastructure
- Pay attention to ensuring the coordinator.ts script supports all the parameters and operations referenced in the new template
Sequence Diagram
sequenceDiagram
participant User
participant Coordinator
participant Gateway
participant VotingVerifier
participant MultisigProver
participant Rewards
participant Router
participant Multisig
participant Governance
User->>Coordinator: "Instantiate Gateway, Verifier and Prover contracts"
Coordinator->>Gateway: "Deploy contract instance"
Coordinator->>VotingVerifier: "Deploy contract instance"
Coordinator->>MultisigProver: "Deploy contract instance"
User->>Coordinator: "Register deployment for chain"
Coordinator->>Coordinator: "Register chain deployment"
User->>Governance: "Submit proposal: Create reward pool for voting verifier"
Governance->>Rewards: "Create pool for voting verifier"
User->>Governance: "Submit proposal: Create reward pool for multisig"
Governance->>Rewards: "Create pool for multisig"
User->>Governance: "Submit proposal: Register ITS edge contract on ITS Hub"
Governance->>Router: "Register ITS edge contract"
User->>Rewards: "Add funds to multisig reward pool"
User->>Rewards: "Add funds to voting verifier reward pool"
User->>Router: "Query chain info to verify Gateway registration"
Router-->>User: "Return chain gateway info"
User->>Multisig: "Query caller authorization for MultisigProver"
Multisig-->>User: "Return authorization status"
User->>User: "Update ampd configuration with chain handlers"
User->>User: "Register chain support in ampd"
User->>MultisigProver: "Create genesis verifier set"
MultisigProver->>MultisigProver: "Update verifier set"
User->>MultisigProver: "Query current verifier set"
MultisigProver-->>User: "Return active verifier set"
1 file reviewed, no comments
…cs/update_cw_contracts_deployment
# Add under `config.axelar.contracts.VotingVerifier` based on Network | ||
"$CHAIN" : { | ||
"governanceAddress": "[governance address]", | ||
"serviceName": "[service name]", | ||
"sourceGatewayAddress": "[external gateway address]", | ||
"votingThreshold": "[voting threshold]", | ||
"blockExpiry": 10, | ||
"confirmationHeight": 1000000, # if $CHAIN uses a custom finality mechanism such as the "finalized" tag, set this value very high (i.e. 1000000) to prevent accidental use | ||
"msgIdFormat": "hex_tx_hash_and_event_index", | ||
"addressFormat": "eip55" | ||
} | ||
|
||
# Add under `config.axelar.contracts.MultisigProver` based on Network | ||
"$CHAIN" : { | ||
"governanceAddress": "[governance address]", | ||
"adminAddress": "[admin address]", | ||
"signingThreshold": "[signing threshold]", | ||
"serviceName": "[service name]", | ||
"verifierSetDiffThreshold": 0, | ||
"encoder": "abi", | ||
"keyType": "ecdsa" | ||
} |
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.
why are we removing these. There are certain configuration that still need to be published and the scripts dont do that
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.
It's covered by the new script
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.
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.
- see the
ts-node cosmwasm/coordinator.ts instantiate
command below. It is automatically saved in the config file
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.
i dont agree with this approach, in the new scripts and PR you have set constant DEFAULT value that only matches testnet, but you can see that the values are not equivalent across all the environments so this would make it harder for deployer since now they need to still pass values in manually.
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.
User can override the DEFAULT values by using CLI options - everything can be updated when using a single CLI command. The default values were taken directly from this document. We can always remove them and make the options required to be provided by a user
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.
Please check the new configure
command
``` | ||
|
||
- Add a community post for the mainnet proposal. i.e: https://community.axelar.network/t/proposal-add-its-hub-to-mainnet/3227 | ||
- Note: [ITS proposal](../evm/EVM-ITS-Release-Template.md) should also be submitted at this time if possible. |
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.
this step is already in the guide here, as step 10 (now step 6)
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.
I refactored a little bit the - Note: all the following governance proposals should be submitted at one time so deployment doesn't get held up while waiting for voting. [ITS proposal](../evm/EVM-ITS-Release-Template.md) should also be submitted at this time if possible.
note. It says that we can proceed with ITS in parallel, though I didn't check if that makes sense - only wanted to keep it as it was
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.
lets just add the instruction to go to step 6 for the proposal instructions rather than linking the external guide
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.
I read the EVM-ITS-Release-Template.md
and it seems that the doc and the step.7
are something different. This should be analyzed from the ITS perspective once again
…cs/update_cw_contracts_deployment
…cs/update_cw_contracts_deployment
``` | ||
|
||
| Network | `deployer address` | | ||
| Network | `DEPLOYER_ADDRESS` | |
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.
I'm not sure where the deployer address is actually used at the moment. The instantiate
message needs to be run by a governance account
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.
I think it will change once we have the AddOperator
functionality implemented in the Coordinator contract
- Check Gateway registered at Router | ||
```bash | ||
axelard q wasm contract-state smart $ROUTER "{\"chain_info\": \"$CHAIN\"}" --output json | jq . | ||
# You should see something like this: | ||
{ | ||
"data": { | ||
"name": \"$CHAIN\", | ||
"gateway": { | ||
"address": "axelar1jah3ac59xke2r266yjhh45tugzsvnlzsefyvx6jgp0msk6tp7vqqaktuz2" | ||
}, | ||
"frozen_status": 0, | ||
"msg_id_format": "hex_tx_hash_and_event_index" | ||
} | ||
} | ||
``` | ||
|
||
- Check Multisig Prover authorized on Multisig | ||
```bash | ||
axelard q wasm contract-state smart $MULTISIG "{\"is_caller_authorized\": {\"contract_address\": \"$MULTISIG_PROVER\", \"chain_name\": \"$CHAIN\"}}" --output json | jq . | ||
# Result should look like: | ||
{ | ||
"data": true | ||
} | ||
``` | ||
|
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.
I removed the registration and authorization checks since they are now part of the Coordinator contract responsibility. We should not test the implementation details of the contract during each release
No description provided.