Skip to main content
ALL CHAINS

Node Upgrading

How Updates Work

The node.sh script downloads pre-built binaries from Elastos's distribution servers:

MainNet: https://download.elastos.io/elastos-{chain}/elastos-{chain}-{ver}/elastos-{chain}-{ver}-{platform}.tgz
TestNet: https://download-beta.elastos.io/elastos-{chain}/elastos-{chain}-{ver}/elastos-{chain}-{ver}-{platform}.tgz

The update process:

  1. Queries download.elastos.io for the latest version
  2. Downloads the .tgz tarball
  3. Stops the running daemon
  4. Replaces binary files
  5. Restarts the daemon (unless -n flag is used)

Updating node.sh Itself

# Update the orchestrator script from GitHub master
node.sh update_script

This downloads the latest node.sh from:

https://raw.githubusercontent.com/elastos/Elastos.Node/master/build/skeleton/node.sh

The old script is replaced in-place. This is safe because node.sh loads entirely into memory before execution.

Updating Individual Components

# Update ELA with prompts
node.sh ela update

# Update ELA without prompts (auto-yes)
node.sh ela update -y

# Update ELA and purge checkpoints
node.sh ela update -p

# Update ELA but don't auto-restart
node.sh ela update -n

# Update ESC
node.sh esc update

# Update Arbiter
node.sh arbiter update

Updating All Components

# Update everything at once
node.sh update

This iterates through all installed chains and updates each one sequentially, stopping and restarting each daemon.

Recommended update procedure for supernodes:

# 1. Announce maintenance window to voters/community
# 2. Check current versions
node.sh ela status # Note current version
node.sh esc status

# 3. Backup configuration
cp ~/node/ela/config.json ~/node/ela/config.json.bak
cp ~/node/arbiter/config.json ~/node/arbiter/config.json.bak

# 4. Update node.sh first
node.sh update_script

# 5. Update all components
node.sh update

# 6. Verify everything restarted correctly
node.sh status

# 7. Verify sync is progressing
watch -n 10 'node.sh ela status'

Building from Source

For operators who need to build from source (auditing, custom patches, ARM64):

git clone https://github.com/elastos/Elastos.Node.git
cd Elastos.Node/build

# Build all components — check the latest release tags at
# https://github.com/elastos/Elastos.Node/releases before building.
# Arguments: CARRIER_VER ELA_VER DID_VER ESC_VER EID_VER ARBITER_VER
./build.sh <CARRIER_TAG> <ELA_TAG> <DID_TAG> <ESC_TAG> <EID_TAG> <ARBITER_TAG>

The build script:

  1. Clones each upstream repository at the specified tag
  2. Downloads the correct Go version for each component
  3. Compiles binaries
  4. Creates a release tarball with version.txt, commit.txt, checksum.txt

Build dependencies:

ComponentGo Version
ELACheck release notes for current requirement
DIDCheck release notes for current requirement
ESCCheck release notes for current requirement
EIDCheck release notes for current requirement
ArbiterCheck release notes for current requirement
CarrierCMake (no Go)
warning

Go versions listed above are placeholders. Always check the go.mod file in each repository for the exact Go version required by the latest release. Using an outdated Go version may cause build failures.

Version Compatibility

Components are versioned independently. Check the release notes before upgrading:

# Check current versions
cat ~/node/version.txt
cat ~/node/commit.txt

# Verify checksums
cat ~/node/checksum.txt
sha256sum ~/node/ela/ela
sha256sum ~/node/esc/esc
caution

Cross-component compatibility is maintained within the same release batch. Avoid mixing versions from different releases unless release notes explicitly state compatibility.

Rollback Procedures

If an update causes issues:

# Stop the problematic chain
node.sh ela stop

# The old binary is not automatically preserved
# If you kept a backup:
cp ~/node/ela/ela.bak ~/node/ela/ela

# If you didn't, download the previous version manually:
VERSION="v0.9.9" # Adjust to the version you need to restore
PLATFORM="linux-x86_64"
curl -O "https://download.elastos.io/elastos-ela/elastos-ela-${VERSION}/elastos-ela-${VERSION}-${PLATFORM}.tgz"
tar xzf "elastos-ela-${VERSION}-${PLATFORM}.tgz" --strip=1 -C ~/node/ela/ ela

# Restart
node.sh ela start
tip

Best practice: Always backup binaries before updating:

cp ~/node/ela/ela ~/node/ela/ela.bak-$(date +%Y%m%d)
cp ~/node/esc/esc ~/node/esc/esc.bak-$(date +%Y%m%d)