From 125a9ce6497f187750f9042aaabc57a2c8228b2b Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 28 Aug 2023 14:12:22 -0700 Subject: [PATCH] docs: how to add an upgrade layer --- packages/deployment/upgrade-test/Readme.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/deployment/upgrade-test/Readme.md b/packages/deployment/upgrade-test/Readme.md index 3b3e233ecb41..bbee33ed594b 100644 --- a/packages/deployment/upgrade-test/Readme.md +++ b/packages/deployment/upgrade-test/Readme.md @@ -102,6 +102,21 @@ docker exec -it sweet_edison bash To make the wallet ui talk to your local chain, set the network config to `https://local.agoric.net/network-config` +## To add an upgrade + +1. Update the upgrade handler in app.go +2. Duplicate the last pair of UPGRADE and TEST blocks +3. Update their number from the UPGRADE / DEST block at the end +4. Make directory for tests (e.g. `agoric-upgrade-12`) +4. Make directory for ugprade (e.g. `agoric-upgrade-11-to-12` with a `.keep`) +5. Update the UPGRADE/DEST pair to be your new upgrade (THIS_NAME matching the upgrade handler string in app.go) +6. Update the `Makefile` + - the two targets to `Makefile` (e.g. `agoric-upgrade-11-to-12` and `agoric-upgrade-12`) + - set the default TARGET (e.g. `agoric-upgrade-12`) + - add the DEST target to the `.phony` in `Makefile` +7. Test with `make local_sdk build run` + + ## Development You can iterate on a particular upgrade by targeting. When you exit and run again, it will be a fresh state.