Skip to content
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

Upgrade plan v0.8.1 #371

Merged
merged 4 commits into from
Mar 22, 2023
Merged

Upgrade plan v0.8.1 #371

merged 4 commits into from
Mar 22, 2023

Conversation

orenl-lava
Copy link
Contributor

@orenl-lava orenl-lava commented Mar 22, 2023

Upgrade plan from v0.7.1 to v0.8.1.

In v0.8.1 the StoreKey of module Projects changed from "projects" to "project". The store upgrade handler deletes the old storage and adds the new one. (Note that as of cosmos-sdk 0.45.11 the "Renamed" method for store upgrade did not work properly).

Disable the attempt for v0.8.0 (which left out the above change), because it led to a corrupt store state, and could not be easily re-upgraded to a working state.

How to test:

  1. Checkout/compile lavad-v0.7.1, install the lavad binary
  2. Start the server with ignite: ignite chain server
  3. Run scripts/init_chain_commands.sh (should succeed as is)
  4. Test the following commands:
curl http://127.0.0.1:3333/1/ --request POST --header "Content-Type: application/json" --data '{ "jsonrpc":"2.0", "method":"eth_blockNumber","params":[],"id":1}'
lavad query pairing clients ETH1
# notice the address of the staked client from the output, and use it below (replace the variable):
lavad query pairing get-pairing ETH1 $STAKED_CLIENT_ADDRESS
  1. Submit proposal for upgrade:
    (note: adjust the "--upgrade-height 800" to use a block height not yet reached)
lavad tx gov submit-proposal software-upgrade v0.8.1 --title "v0.8.1" --upgrade-height 800 --upgrade-info '{"binaries":{"linux/amd64":"NONE"}}' --gas "auto" --from alice --description "lala1" --keyring-backend "test" --gas-prices "0.000000001ulava" --gas-adjustment "1.5" --deposit 10000000ulava --yes && lavad tx gov vote 5 yes -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices "0.000000001ulava"
  1. Wait until the chain reached the desired block height (800 in this example)
  2. Kill all lavad: pkill lavad
  3. Checkout/compile lavad-v0.8.1, install the lavad binary
  4. Start the server again: lavad start
  5. Confirm that the "get-pairing" works:
lavad query pairing get-pairing ETH1 $STAKED_CLIENT_ADDRESS
  1. Re-run scripts/init_chain_commands.sh (the proposals should fail)
  2. Re-run the tests again:
curl http://127.0.0.1:3333/1/ --request POST --header "Content-Type: application/json" --data '{ "jsonrpc":"2.0", "method":"eth_blockNumber","params":[],"id":1}'
lavad query pairing get-pairing ETH1 $STAKED_CLIENT_ADDRESS
  1. Adjust the proposal id in the vote tx in scripts/init_subscription_commands.sh (should probably be 10,11,12 instead of 1, 2, 3)
  2. Run scripts/init_subscription_commands.sh (should succeed as is)
  3. Re-run the tests once more:
curl http://127.0.0.1:3333/1/ --request POST --header "Content-Type: application/json" --data '{ "jsonrpc":"2.0", "method":"eth_blockNumber","params":[],"id":1}'
lavad query pairing get-pairing ETH1 $STAKED_CLIENT_ADDRESS

In v0.8.1 the StoreKey of module Projects changed from "projects" to "project".
The store upgrade handler deletes the old storage and adds the new one.

(Note that as of cosmos-sdk 0.45.11 the "Renamed" method for store upgrade did
not work properly).

Disable the attempt for v0.8.0 (which left out the above change), because it
led to a corrupt store state, and could not be easily re-upgraded to a working
state.
@orenl-lava orenl-lava force-pushed the upgrade-plan-v0.8.1 branch from db22ffe to f9e334c Compare March 22, 2023 04:09
@omerlavanet omerlavanet self-requested a review March 22, 2023 06:17
@omerlavanet omerlavanet merged commit 910bfdf into main Mar 22, 2023
@omerlavanet omerlavanet deleted the upgrade-plan-v0.8.1 branch March 22, 2023 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants