Open mhofman opened 3 months ago
Note, we should avoid modifying the profile when automatically installing NVM : PROFILE=/dev/null
. see https://github.com/nvm-sh/nvm?tab=readme-ov-file#additional-notes
The script also needs to handle corepack if enabled, see #10009
Testing likely involves integration a matrix of environment with different deps installed or not
During upgrade-17, it's possible a validator got confused by the message At least golang/cosmos/x/swingset/module.go is newer than golang/cosmos/build/agd
, and thought it was an error. Their node didn't seem to start. They may not have left time for the build to complete, or the build actually failed. We should provide a clearer message (e.g. say something about a build about to start), and make sure missing go or other go errors are raised correctly.
What is the Problem Being Solved?
Manage dependencies automatically for validators
Use cases:
DAEMON_ALLOW_DOWNLOAD_BINARIES=true
to automatically download and start on upgradeDAEMON_ALLOW_DOWNLOAD_BINARIES=true
and building in advancebuilding in advance and running environment might be different users, and different PATH and other environment
Cosmovisor defined a
DEAMON_HOME
with the following structure:With auto-download, it automatically extracts agoric-sdk in
$DAEMON_HOME/cosmovisor/upgrades/<name>
and invokescurrent/bin/agd
. That should automatically install required dependencies.Without auto-download, validators using cosmovisor should extract the sdk themselves under
$DAEMON_HOME/cosmovisor/upgrades/<name>
, then build according to release instructions. Note that some community instructions checkout agoric-sdk in$HOME/<name>
, install & build (using old instructions), and then symlink$DAEMON_HOME/cosmovisor/upgrades/<name>/bin/agd
to$HOME/<name>/bin/agd
, which may be a problem for the currentagd
script because of nested symlinks resolution.Our release notes should provide simple and robust build instructions, and make it clear that they are opting into automatically downloading dependencies. We should support a mode to avoid this auto download.
Docker image and cosmovisor without auto-download should not attempt to rebuild or download anything
Description of the Design
INSTALL_DEPS=true agd build
oragd build --install-deps
// to be bikeshed (deps, or build tools, ?)nvm
andgvm
in a directory relative toagoric-sdk
nvm
andgvm
to install the required version (unique) of node and golang (repoconfig.sh)agd build
without install dep option (including implicit build byagd start
) depends on cosmovisor autodownload envNODE_MODULE_VERSION
alongside stamps. Remember the full node version that we observed, including path, for diagnostics.agd start
agd build
(without install deps), unless we're in cosmovisor mode without auto-download, or usingNO_BUILD
agd build
agd build --force
(which should doyarn install --force
, but doesn't currently)Work with validator community to update cosmovisor instructions
Update release instructions script
Security Considerations
Scaling Considerations
Test Plan
Cosmovisor automated test Automated test checking out new agoric-sdk without git clean on top of previous release, and running
agd start
and/oragd build
.Upgrade Considerations
Deployed as part of a new chain software upgrade (affects the
bin/agd
script)