-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge main branch into release/v2.x (#205)
* added github workflow for continuous deployment of contracts to Neutron testnet * Allow proposals to be posted for future rounds * Disallow previous rounds * Remove 'one round in the future' from constraints of create prop * Regenerate artifacts * added checkout icq relayer step * store hydro sc address in github env for later use * increase sleep time for txs * run ICQs setup script from github workflow- first atempt * increase sleep time betwen txs again * Make lockup schedule a variable instead of hardcoded * Regenerate and fix tests * Add changelog * fixed sed commands * fix another err, temporary disable bids&tributes creation * escape values read from the configuration file * fixing "unable to find neutrond binary" and "failed to find testnet_deployer key" errors * trying to stop ICQ relayer after 5mins of running * split instantiate and populate in two different scripts * shorten ICQ relayer run to 4 minutes and output contract addresses in the end * - fixed typos - added readme.md - removed github job to run e2e tests since they just instantiate the contracts * - don't run on every PR - have props with different deployment durations * Use struct instead of tuple vector for internal storage * Adjust calls in tests * Fix instantiation * Regenerate' * Add non-native tribute tokens for mainnet deploy * Switch date invocation based on OS * Gitignore result files from deployment runs * Ignore tx files from deployment runs * Add PR trigger for deployment workflow * Upload log files from deploy * Produce artifacts only on failure * Add script for testnet deployment * Fix Hydro contract init to work with round_lock_power_schedule * Remove workflow trigger on PR * Revoting bug fix (#195) * fixed revoting bug * added changelog entry, recompiled contracts, regenerated schema * generate changelog for v2.0.3 release (#198) (#199) * fixed instantiation msg in interchain tests (#201) * bring v2.0.4 changelog to main (#202) * Disable voting in next round with locks that were used to vote for longer deployment proposal through "auto-voting" mechanism (#203) * disable voting in next round with locks that were used to vote for longer deployment proposal through "auto-voting" mechanism * CR changes * - set new contracts version to v2.1.0 - adjust migration to v2.0.4->v2.1.0 - recompile contracts - regenerate schema * generate v2.1.0 changelog --------- Co-authored-by: Philip Offtermatt <[email protected]> Co-authored-by: Philip Offtermatt <[email protected]>
- Loading branch information
1 parent
354c254
commit de07455
Showing
46 changed files
with
1,401 additions
and
178 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
.changelog/v2.1.0/bug-fixes/203-prevent-auto-voting-workaround.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- Disable voting in next round with locks that were used in previous round to vote for longer deployment proposal through the "auto-voting" mechanism. | ||
([\#203](https://github.com/informalsystems/hydro/pull/203)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- Allow proposals to be created in future rounds. | ||
([\#193](https://github.com/informalsystems/hydro/pull/193)) |
2 changes: 2 additions & 0 deletions
2
.changelog/v2.1.0/features/194-store-lockup-schedule-as-constant.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- Store the lockup schedule as a constant to allow programmatic updates. | ||
([\#194](https://github.com/informalsystems/hydro/pull/194)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Date: December 12th, 2024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: Deploy latest contracts | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
deploy-latest-contracts: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 7 | ||
steps: | ||
# Checkout Hydro repository | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# Download specific neutrond binary and add it to the PATH so it can be used by other scripts | ||
- name: Download Neutron chain binary | ||
run: | | ||
curl -L -o neutrond https://github.com/neutron-org/neutron/releases/download/v5.0.2/neutrond-linux-amd64 | ||
chmod +x neutrond | ||
echo "$(pwd)" >> $GITHUB_PATH | ||
# Checkout Neutron ICQ relayer repository | ||
- name: Checkout Neutron ICQ relayer repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: neutron-org/neutron-query-relayer | ||
path: ./neutron-query-relayer # directory to checkout the repo into | ||
ref: 'refs/tags/v0.3.0' # tag to checkout | ||
|
||
# Run scripts to store the codes, instantiate contracts and create proposals with tributes | ||
- name: Deploy contracts | ||
env: | ||
TESTNET_MNEMONIC: ${{ secrets.E2E_TESTS_MNEMONIC }} | ||
run: | | ||
CONFIG_FILE="./tools/deployment/config_testnet.json" | ||
TX_SENDER_WALLET=$(jq -r '.tx_sender_wallet' $CONFIG_FILE) | ||
echo $TESTNET_MNEMONIC | neutrond keys add $TX_SENDER_WALLET --keyring-backend test --recover | ||
chmod +x ./tools/deployment/store_instantiate.sh | ||
chmod +x ./tools/deployment/populate_contracts.sh | ||
source ./tools/deployment/store_instantiate.sh $CONFIG_FILE true | ||
source ./tools/deployment/populate_contracts.sh $CONFIG_FILE | ||
# Run tools/script.sh to create validator ICQs in the contract and run the ICQ relayer to | ||
# get the results into the contract | ||
- name: Run ICQs setup script | ||
run: | | ||
cp ./tools/script.sh . | ||
chmod +x script.sh | ||
CONFIG_FILE="./tools/deployment/config_testnet.json" | ||
CHAIN_ID=$(echo $(jq -r '.chain_id' $CONFIG_FILE) | sed -E 's/([][\/.*?$^&|])/\\\1/g') | ||
NEUTRON_RPC_NODE=$(echo $(jq -r '.neutron_rpc_node' $CONFIG_FILE) | sed -E 's/([][\/.*?$^&|])/\\\1/g') | ||
NEUTRON_API_NODE=$(echo $(jq -r '.neutron_api_node' $CONFIG_FILE) | sed -E 's/([][\/.*?$^&|])/\\\1/g') | ||
TX_SENDER_WALLET=$(echo $(jq -r '.tx_sender_wallet' $CONFIG_FILE) | sed -E 's/([][\/.*?$^&|])/\\\1/g') | ||
HUB_CONNECTION_ID=$(echo $(jq -r '.hub_connection_id' $CONFIG_FILE) | sed -E 's/([][\/.*?$^&|])/\\\1/g') | ||
HUB_RPC_NODE=$(echo $(jq -r '.hub_rpc_node' $CONFIG_FILE) | sed -E 's/([][\/.*?$^&|])/\\\1/g') | ||
HUB_API_NODE=$(echo $(jq -r '.hub_api_node' $CONFIG_FILE) | sed -E 's/([][\/.*?$^&|])/\\\1/g') | ||
sed -i "s|^RELAYER_REPO_PATH=.*$|RELAYER_REPO_PATH=\.\/neutron-query-relayer|" ./script.sh | ||
sed -i "s/^export NEUTRON_CHAIN_ID=.*$/export NEUTRON_CHAIN_ID=$CHAIN_ID/" ./script.sh | ||
sed -i "s/^export RELAYER_NEUTRON_CHAIN_RPC_ADDR=.*$/export RELAYER_NEUTRON_CHAIN_RPC_ADDR=$NEUTRON_RPC_NODE/" ./script.sh | ||
sed -i "s/^export RELAYER_NEUTRON_CHAIN_REST_ADDR=.*$/export RELAYER_NEUTRON_CHAIN_REST_ADDR=$NEUTRON_API_NODE/" ./script.sh | ||
sed -i "s/^export RELAYER_NEUTRON_CHAIN_SIGN_KEY_NAME=.*$/export RELAYER_NEUTRON_CHAIN_SIGN_KEY_NAME=$TX_SENDER_WALLET/" ./script.sh | ||
sed -i "s/^export RELAYER_NEUTRON_CHAIN_CONNECTION_ID=.*$/export RELAYER_NEUTRON_CHAIN_CONNECTION_ID=$HUB_CONNECTION_ID/" ./script.sh | ||
sed -i "s/^export RELAYER_TARGET_CHAIN_RPC_ADDR=.*$/export RELAYER_TARGET_CHAIN_RPC_ADDR=$HUB_RPC_NODE/" ./script.sh | ||
sed -i "s/^export RELAYER_TARGET_CHAIN_API_ADDR=.*$/export RELAYER_TARGET_CHAIN_API_ADDR=$HUB_API_NODE/" ./script.sh | ||
sed -i "s/^export RELAYER_REGISTRY_ADDRESSES=.*$/export RELAYER_REGISTRY_ADDRESSES=$HYDRO_CONTRACT_ADDRESS/" ./script.sh | ||
sed -i "s/^export BATCH_SIZE=.*$/export BATCH_SIZE=5/" ./script.sh | ||
sed -i "s/^export NUM_VALIDATORS_TO_ADD=.*$/export NUM_VALIDATORS_TO_ADD=5/" ./script.sh | ||
sed -i "s/^export RELAYER_STORAGE_PATH=.*$/export RELAYER_STORAGE_PATH=\.neutron_queries_relayer\/leveldb/" ./script.sh | ||
sed -i "s|^go run main\.go.*$|go run \./tools/main\.go|" ./script.sh | ||
stop_icq_relayer() { | ||
sleep 240 | ||
killall neutron_query_relayer | ||
} | ||
stop_icq_relayer & | ||
bash ./script.sh | ||
echo 'Latest contracts are deployed and ready for testing!' | ||
echo 'Hydro contract address:' $HYDRO_CONTRACT_ADDRESS | ||
echo 'Tribute contract address:' $TRIBUTE_CONTRACT_ADDRESS | ||
- name: Archive log files | ||
uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: logs | ||
path: | | ||
*_res.json | ||
*_tx.json | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,7 @@ Cargo.toml.orig | |
|
||
# macOS specific | ||
**/.DS_Store | ||
|
||
# log files from deployments | ||
*_res.json | ||
*_tx.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
a6776a5163a701a20bd789f331e781d013755ebfc985aabf9b0306dcc106cd65 hydro.wasm | ||
c6766be58bfc7bd482e5c9e8fbdac3dfa29ee8eeebedd782e4ed49bb3f26a4ff tribute.wasm | ||
a99875e8e9fe0a9fdc4dd162f30c439594668b19fa25675c7ea27bb078fd08cd hydro.wasm | ||
de282a84a0c8179a35ddfb8aca950ade2207b235c0b2d9b7fe6bd5b23537aef0 tribute.wasm |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.