Skip to content

Instantly share code, notes, and snippets.

@wileyj
Last active August 31, 2022 21:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wileyj/379e6a4d11983e15449918732d75065a to your computer and use it in GitHub Desktop.
Save wileyj/379e6a4d11983e15449918732d75065a to your computer and use it in GitHub Desktop.

Upgrading Stacks Blockchain

Files:

Docker:

Ensure any existing stacks-node processes are stopped before proceeding

  • If running via a binary:
$ ps auxx | grep stacks-node
user      1598 41.2  6.7 4875916 515664 ?      Sl   20:48   5:21 /usr/local/bin/stacks-node start --config=/stacks-blockchain/Config.toml
$ kill 1598
  • If running via Docker:
$ docker stop stacks-blockchain
  • If running via stacks-blockchain-docker repository:
$ ./manage.sh -n mainnet -a stop

Running stacks-blockchain binary built from source:

  1. Download stacks-blockchain source archive: https://github.com/stacks-network/stacks-blockchain

  2. Extract and build the stacks-node binary from the source code

    $ git clone https://github.com/stacks-network/stacks-blockchain
    $ cd ./stacks-blockchain/testnet/stacks-node
    $ cargo build --features monitoring_prom,slog_json --release --bin stacks-node
    $ sudo cp -a ../../target/release/stacks-node /usr/local/bin/stacks-node
  1. Start the stacks-node binary normally

Running stacks-blockchain pre-built binary:

  1. Download stacks-blockchain binary archive for your system's architecture: https://github.com/stacks-network/stacks-blockchain/releases/tag/2.05.0.3.0

  2. Extract and install the stacks-node binary from the archive

$ unzip linux-x64.zip
$ sudo cp -a ./linux-x64/stacks-node /usr/local/bin/stacks-node
  1. Start the stacks-node binary normally

Running stacks-blockchain using Docker:

  1. Download stacks-blockchain Docker image: docker pull blockstack/stacks-blockchain:2.05.0.3.0

  2. Update the Docker image being launched

  • If running the stacks-blockchain container natively with Docker, simply update the image used to: blockstack/stacks-blockchain:2.05.0.3.0
    • Start the container using this image as you normally would start the stacks-blockchain container.
  • If using the stacks-blockchain-docker repository
    • edit .env so the line STACKS_BLOCKCHAIN_VERSION to use `2.05.0.3.0
  1. Start the service normally, i.e. ./manage.sh -n mainnet -a start (use the same startup command you would normally run)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment