-
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
docs(releases): add Stellar GMP and ITS release #523
base: main
Are you sure you want to change the base?
Changes from 7 commits
1ea0b4d
1e28779
473db2e
10ed0f0
25756e7
bc767c9
624268b
d19e65e
940ab13
bd0e433
27047b7
89a469d
e89219e
0578489
c69be06
3f3b020
3335c14
03d55f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,143 @@ | ||||||
# DEPLOY COSMWASM FOR STELLAR GMP v1.0.0 | ||||||
ahramy marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
| | **Owner** | | ||||||
| -------------- | ------------------------------------ | | ||||||
| **Created By** | @ahramy <[email protected]> | | ||||||
| **Deployment** | @RiceAndMeet <[email protected]> | | ||||||
|
||||||
| **Network** | **Deployment Status** | **Date** | | ||||||
| -------------------- | --------------------- | -------- | | ||||||
| **Devnet Amplifier** | - | TBD | | ||||||
| **Stagenet** | - | TBD | | ||||||
| **Testnet** | - | TBD | | ||||||
| **Mainnet** | - | TBD | | ||||||
|
||||||
## Background | ||||||
|
||||||
1. This is Cosmwasm Deployment for Stellar GMP v1.0.0. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. checklist is weird. Link to the release as in other docs. Also, the latest axelar-amplifier official release should be used here, not the stellar release version |
||||||
|
||||||
## Deployment | ||||||
|
||||||
Create an `.env` config. | ||||||
ahramy marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
```yaml | ||||||
PRIVATE_KEY=xyz | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. MNEMONIC needs to be set here, not private key, see the amplifier cmds |
||||||
ENV=xyz | ||||||
CHAIN=stellar | ||||||
ahramy marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
``` | ||||||
|
||||||
## Deployment | ||||||
|
||||||
- This rollout will create a new stellar connection | ||||||
ahramy marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
```bash | ||||||
GATEWAY_ADDRESS=gateway | ||||||
PROVER_ADDRESS=prover | ||||||
RUN_AS_ACCOUNT=run_as_account | ||||||
REWARD_POOL=reward_pool | ||||||
VERIFY_REWARD_POOL=verify_reward_pool | ||||||
MULTISIG_REWARD_POOL=multisig_reward_pool | ||||||
Comment on lines
+34
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these env vars can't be set at this point, so it's confusing |
||||||
DEPOSIT_VALUE=100000000 | ||||||
``` | ||||||
|
||||||
```bash | ||||||
# Instantiate stellar VotingVerifier | ||||||
node ./cosmwasm/deploy-contract.js instantiate -c VotingVerifier -n $CHAIN --fetchCodeId --instantiate2 | ||||||
ahramy marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
# Instantiate stellar gateway | ||||||
node ./cosmwasm/deploy-contract.js instantiate -c Gateway -n $CHAIN --fetchCodeId --instantiate2 | ||||||
|
||||||
# Instantiate stellar MultisigProver | ||||||
node ./cosmwasm/deploy-contract.js instantiate -c MultisigProver -n $CHAIN --fetchCodeId --instantiate2 | ||||||
|
||||||
# Register stellar gateway at the Router | ||||||
node cosmwasm/submit-proposal.js execute \ | ||||||
-c Router \ | ||||||
-t "Register Gateway for stellar" \ | ||||||
-d "Register Gateway address for stellar at Router contract" \ | ||||||
--deposit $DEPOSIT_VALUE \ | ||||||
--runAs $RUN_AS_ACCOUNT \ | ||||||
--msg '{"register_chain":{"chain":"'"$CHAIN"'","gateway_address":"'"$GATEWAY_ADDRESS"'","msg_id_format":"hex_tx_hash_and_event_index"}}' | ||||||
|
||||||
# Register prover contract on coordinator | ||||||
node cosmwasm/submit-proposal.js execute \ | ||||||
-c Coordinator \ | ||||||
-t "Register Multisig Prover for stellar" \ | ||||||
-d "Register Multisig Prover address for stellar at Coordinator contract" \ | ||||||
--deposit $DEPOSIT_VALUE \ | ||||||
--runAs $RUN_AS_ACCOUNT \ | ||||||
--msg '{"register_prover_contract":{"chain_name":"'"$CHAIN"'","new_prover_addr":""'"$PROVER_ADDRESS"'""}}' | ||||||
|
||||||
# Authorize callers on multisig prover | ||||||
node cosmwasm/submit-proposal.js execute \ | ||||||
-c Multisig \ | ||||||
-t "Authorize Multisig Prover for stellar" \ | ||||||
-d "Authorize Multisig Prover address for stellar at Multisig contract" \ | ||||||
--runAs $RUN_AS_ACCOUNT \ | ||||||
--deposit $DEPOSIT_VALUE \ | ||||||
--msg '{"authorize_callers":{"contracts":{"'"$PROVER_ADDRESS"'":"'"$CHAIN"'"}}}' | ||||||
|
||||||
# Update verifier set | ||||||
axelard tx wasm execute "'"$PROVER_ADDRESS"'" '"update_verifier_set"' --from amplifier --gas auto --gas-adjustment 1.2 | ||||||
``` | ||||||
|
||||||
Create reward Pools and add funds to reward pools | ||||||
|
||||||
```bash | ||||||
# Create verify reward pool | ||||||
node cosmwasm/submit-proposal.js execute \ | ||||||
-c Rewards \ | ||||||
-t "Create pool for stellar in stellar voting verifier" \ | ||||||
-d "Create pool for stellar in stellar voting verifier" \ | ||||||
--runAs $RUN_AS_ACCOUNT \ | ||||||
--deposit $DEPOSIT_VALUE \ | ||||||
--msg '{ | ||||||
"create_pool": { | ||||||
"params": { | ||||||
"epoch_duration": "100", | ||||||
"participation_threshold": [ | ||||||
"8", | ||||||
"10" | ||||||
], | ||||||
"rewards_per_epoch": "100" | ||||||
Comment on lines
+99
to
+104
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these values depend on the network, so they should be stubbed out here. @RiceAndMeet Please add a simple table for params by network earlier in this doc for values that differ between networks |
||||||
}, | ||||||
"pool_id": { | ||||||
"chain_name": "'"$CHAIN"'", | ||||||
"contract": "'"$VERIFY_REWARD_POOL"'" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
isn't this just the voting verifier contract? why create a new variable? |
||||||
} | ||||||
} | ||||||
}' | ||||||
|
||||||
# Create multisig reward pool | ||||||
node cosmwasm/submit-proposal.js execute \ | ||||||
-c Rewards \ | ||||||
-t "Create pool for stellar in axelar multisig" \ | ||||||
-d "Create pool for stellar in axelar multisig" \ | ||||||
--runAs $RUN_AS_ACCOUNT \ | ||||||
--deposit $DEPOSIT_VALUE \ | ||||||
--msg '{ | ||||||
"create_pool": { | ||||||
"params": { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same |
||||||
"epoch_duration": "100", | ||||||
"participation_threshold": [ | ||||||
"8", | ||||||
"10" | ||||||
], | ||||||
"rewards_per_epoch": "100" | ||||||
}, | ||||||
"pool_id": { | ||||||
"chain_name": "'"$CHAIN"'", | ||||||
"contract": "'"$MULTISIG_REWARD_POOL"'" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same |
||||||
} | ||||||
} | ||||||
}' | ||||||
|
||||||
# Add funds to reward pools | ||||||
echo $KEYRING_PASSWORD | axelard tx wasm execute $REWARD_POOL '{"add_rewards":{"pool_id":{"chain_name":"'"$CHAIN"'","contract":"'"$MULTISIG_REWARD_POOL"'"}}}' --amount 1000000uamplifier --from validator | ||||||
|
||||||
echo $KEYRING_PASSWORD | axelard tx wasm execute $REWARD_POOL '{"add_rewards":{"pool_id":{"chain_name":"'"$CHAIN"'","contract":"'"$VERIFY_REWARD_POOL"'"}}}' --amount 1000000uamplifier --from validator | ||||||
``` | ||||||
|
||||||
## Checklist | ||||||
|
||||||
The [Stellar GMP checklist](../stellar/2025-01-GMP-v1.0.0.md) will test GMP call. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
# STELLAR GMP v1.0.0 | ||
ahramy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
| | **Owner** | | ||
| -------------- | ------------------------------------ | | ||
| **Created By** | @ahramy <[email protected]> | | ||
| **Deployment** | @RiceAndMeet <[email protected]> | | ||
|
||
| **Network** | **Deployment Status** | **Date** | | ||
| -------------------- | --------------------- | -------- | | ||
| **Devnet Amplifier** | - | TBD | | ||
| **Stagenet** | - | TBD | | ||
| **Testnet** | - | TBD | | ||
| **Mainnet** | - | TBD | | ||
|
||
- [Crates](https://crates.io/users/interoplabs-ci) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as below |
||
- [Releases](https://github.com/axelarnetwork/axelar-cgp-stellar/releases) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Link to the actual gateway v1 release? |
||
|
||
## Background | ||
|
||
Changes in the release: | ||
|
||
1. This is the v1.0.0 initial GMP release. | ||
|
||
## Deployment | ||
|
||
Create an `.env` config. | ||
|
||
```yaml | ||
PRIVATE_KEY=xyz | ||
ENV=xyz | ||
CHAIN=stellar | ||
``` | ||
|
||
Deploy Stellar Gateway | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Before deployment can be started, an initial stellar chain config needs to be added in the config. Showcase that |
||
|
||
```bash | ||
# Deploy Gateway | ||
node stellar/deploy-contract.js deploy axelar_gateway --version v1.0.0 | ||
``` | ||
|
||
- After deploying the Stellar Gateway, ensure that you [deploy CosmWasm for Stellar GMP v1.0.0](../cosmwasm/2025-01-STELLAR-GMP-v1.0.0.md). | ||
- Once all steps are completed, update ampd with the Stellar chain configuration, then follow the remaining steps. | ||
|
||
```bash | ||
# Rotate genesis verifier set on Stellar Gateway | ||
node stellar/gateway.js rotate --chain-name $CHAIN | ||
|
||
# Deploy Gas Service | ||
node stellar/deploy-contract.js deploy axelar_gas_service --version v1.0.0 | ||
|
||
# Deploy Operators | ||
node stellar/deploy-contract.js deploy axelar_operators --version v1.0.0 | ||
|
||
# Register refunder address as an operator | ||
node stellar/operators.js --action add_operator --chain-name $CHAIN -e devnet-amplifier --args $REFUNDER_ADDRESS | ||
|
||
# Deploy Example with dummy ITS address | ||
node stellar/deploy-contract.js deploy example --version v1.0.0 --use-dummy-its-address | ||
|
||
``` | ||
|
||
## Checklist | ||
|
||
The following checks should be performed after the rollout | ||
|
||
```bash | ||
alias axd='kubectl exec -it genesis-0 -n $ENV -- axelard' | ||
ahramy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ARGS=(--from amplifier --gas auto --gas-adjustment 1.4) | ||
``` | ||
|
||
- [ ] Stellar → EVM GMP call | ||
ahramy marked this conversation as resolved.
Show resolved
Hide resolved
ahramy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
```bash | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Standard amplifier GMP cmds don't need to be included here |
||
node stellar/gmp.js send avalanche 0x0FCb262571be50815627C16Eca1f5F3D342FF5a5 0x1234 CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC 1 | ||
|
||
axd tx wasm execute $GATEWAY '{"verify_messages": | ||
[{"cc_id":{ | ||
"source_chain":"'"$CHAIN"'", | ||
"message_id":"0x7b903beabbf200f7408c8c46cc4e5281396fff68f718515984ad6481f563be2b-0"}, | ||
"destination_chain":"avalanche", | ||
"destination_address":"0xba76c6980428A0b10CFC5d8ccb61949677A61233","source_address":"GALITAYSFTLEVXIBTF5FVUIV7PFVF7VF5VSZVFYCXA7PXSZ2LZMY54VG","payload_hash":"56570de287d73cd1cb6092bb8fdee6173974955fdef345ae579ee9f475ea7432"}] | ||
}' $ARGS | ||
|
||
axd tx wasm execute $GATEWAY '{"route_messages": | ||
[{"cc_id":{ | ||
"source_chain":"'"$CHAIN"'", | ||
"message_id":"0x7b903beabbf200f7408c8c46cc4e5281396fff68f718515984ad6481f563be2b-0"}, | ||
"destination_chain":"avalanche", | ||
"destination_address":"0xba76c6980428A0b10CFC5d8ccb61949677A61233","source_address":"GAIA45FE43FHCKPK5A2RYBDTYG3D3TT3F3KHFWGWX53TH7FIMBK6LRSJ","payload_hash":"56570de287d73cd1cb6092bb8fdee6173974955fdef345ae579ee9f475ea7432"}] | ||
}' $ARGS | ||
|
||
axd tx wasm execute $PROVER '"'"'{"construct_proof":[{"source_chain":"'"$CHAIN"'","message_id":"0xee9f59136fd961ff6494da0ae4fbb8a4fc973a55c4f11543ef430c6f177866ff-0"}]}'"'"' --gas auto --gas-adjustment 3 -b block --from validator | ||
|
||
node evm/gateway.js -n avalanche --action submitProof --multisigSessionId 3 | ||
|
||
node ./evm/gateway.js -n avalanche --action execute --commandID 0x934F10D2DABE8AADB12EB4D0D10CBB3D3124DAB7B4165B65AF537EBF0197402E --sourceChain avalanche --sourceAddress 0x0FCb262571be50815627C16Eca1f5F3D342FF5a5 --destination 0x0FCb262571be50815627C16Eca1f5F3D342FF5a5 --payload 0x1234 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. avoid hardcoding inputs that can change, e.g. addresses/commandID There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. destination isn't a smart contract, so you can't execute. Since destination is EVM, and we don't have a standard EVM example yet, call |
||
``` | ||
|
||
- [ ] EVM → Stellar GMP call | ||
|
||
```bash | ||
node evm/gateway.js -n avalanche --action callContract --destinationChain stellar --destination CCAZD6NDVKGZ5XE7UD3PZWJTJY45V7YY22XGPBUSUOEI7GQZLTPCXR7C --payload 0x1234 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same, don't hardcode addresses |
||
|
||
axd tx wasm execute $GATEWAY '{"verify_messages": | ||
[{"cc_id":{ | ||
"source_chain":"avalanche", "message_id":"0x4c332c321fb039d017249de35640fb9768380f9dbd741fbcf56ea7245144588f-0"}, | ||
"destination_chain":"'"$CHAIN"'", "destination_address":"CCAZD6NDVKGZ5XE7UD3PZWJTJY45V7YY22XGPBUSUOEI7GQZLTPCXR7C", | ||
"source_address":"0xba76c6980428A0b10CFC5d8ccb61949677A61233", "payload_hash":"56570de287d73cd1cb6092bb8fdee6173974955fdef345ae579ee9f475ea7432"}] | ||
}' $ARGS | ||
|
||
axd tx wasm execute $GATEWAY '{"route_messages": | ||
[{"cc_id":{ | ||
"source_chain":"avalanche", "message_id":"0x4c332c321fb039d017249de35640fb9768380f9dbd741fbcf56ea7245144588f-0"}, | ||
"destination_chain":"'"$CHAIN"'", "destination_address":"CCAZD6NDVKGZ5XE7UD3PZWJTJY45V7YY22XGPBUSUOEI7GQZLTPCXR7C", | ||
"source_address":"0xba76c6980428A0b10CFC5d8ccb61949677A61233", "payload_hash":"56570de287d73cd1cb6092bb8fdee6173974955fdef345ae579ee9f475ea7432"}] | ||
}' $ARGS | ||
|
||
axd tx wasm execute $PROVER '{"construct_proof":[{"source_chain":"avalanche","message_id":"0x4c332c321fb039d017249de35640fb9768380f9dbd741fbcf56ea7245144588f-0"}]}' $ARGS | ||
|
||
node stellar/gateway.js submit-proof 1 --chain-name $CHAIN | ||
|
||
node stellar/gmp.js execute avalanche '0x0bcbbfc9b006db6958f3fce75f11fdc306b45e8e43396211f414f40d2d6db7c5-0' 0xba76c6980428A0b10CFC5d8ccb61949677A61233 0x1234 | ||
``` |
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.
caps is only needed for abbreviations, call the file
2025-01-Stellar-GMP-v1.0.0.md
?