# Syncing Up on Mainnet

To run a node on the agoric-3 network from scratch, please follow the steps below.

If you wish to restore from a recent community snapshot, please follow the instructions under Current Community Snapshot below.

Current Upgrade Name Upgrade Height Git Hash Repo Docker Tag
agoric-3.1 (genesis) 2,115,669 a2ebcdb21418bb157f9c747a042b2a859b2a5986 ag0 agoric/ag0:agoric-upgrade-3.1
agoric-upgrade-5 3,565,000 a2ebcdb21418bb157f9c747a042b2a859b2a5986 ag0 agoric/ag0:agoric-upgrade-5
agoric-upgrade-6 5,901,622 31c78ba3aa872b54c4de448763c5b8044b8f950c ag0 agoric/ag0:agoric-upgrade-6
agoric-upgrade-7-2 6,263,783 f4759c9f15b869c453f847a63ba734cacb9a991a ag0 agoric/ag0:agoric-upgrade-7-2
agoric-upgrade-8 7,179,262 2c812d22161cd297587979b262eab6e2cc76e23d agd agoric/agoric-sdk:29
Current agoric-upgrade-8-1 7,179,262 08ca9d4fd8413da59b73d53e12851fe00583ddc1 agd agoric/agoric-sdk:30

# A note on syncing from genesis

Syncing from genesis requires a significant amount of time (upwards of a week). If you desire to start up a node quicker than that, however without all transaction history, consider using a snapshot from the community. e.g. from dsrv (opens new window), polkachu (opens new window), or others.

# agoric-3.1

  1. git clone https://github.com/Agoric/ag0.git && cd ag0

  2. git checkout tags/agoric-3.1

  3. make install

  4. ag0 init follow --chain-id agoric-3

  5. curl https://main.rpc.agoric.net/genesis | jq .result.genesis > $HOME/.agoric/config/genesis.json

  6. ag0 start

    chain will halt at 3,565,000

# agoric-upgrade-5

  1. git clone https://github.com/Agoric/ag0.git; cd ag0 && git checkout tags/agoric-upgrade-5

  2. make install

  3. ag0 start

    chain will halt at 5,901,622

# agoric-upgrade-6

  1. git clone https://github.com/Agoric/ag0.git; cd ag0 && git checkout tags/agoric-upgrade-6

  2. make install

  3. ag0 start

    chain will halt at 6,263,783

# agoric-upgrade-7-2

agoric-upgrade-7-2 is a agoric-upgrade-7 compatible soft-patch, and can be used in place of agoric-upgrade-7. This soft-patch includes the dragonberry security updates.

  1. git clone https://github.com/Agoric/ag0.git; cd ag0 && git checkout tags/agoric-upgrade-7-2

  2. make install

  3. ag0 start

    chain will halt at 7,179,262

# note about ag0 -> agd

The agd upgrade starts now, and you need to ensure you have nodejs 16+ LTS installed, along with any dependencies mentioned in https://github.com/Agoric/agoric-sdk/blob/master/README.md

This guide assumes you've git cloned the agoric-sdk from https://github.com/Agoric/agoric-sdk/ to a folder named agoric-sdk and you've installed the required dependencies noted in the readme.

# agoric-upgrade-8

  1. git clone https://github.com/agoric/agoric-sdk.git; cd agoric-sdk && git checkout tags/agoric-upgrade-8
  2. yarn install && yarn build
  3. agd start

After more than 10 blocks have successfully synced, stop the agd process and update to agoric-upgrade-8-1, a soft upgrade. This soft upgrade includes logic to handle a memory condition that may lead to your node falling out of consensus. It is recommended to upgrade to agoric-upgrade-8-1 as soon as you have successfully produced a handful of blocks with the agoric-upgrade-8 upgrade.

# agoric-upgrade-8-1

# Current Community Snapshot

  1. git clone https://github.com/agoric/agoric-sdk.git; agoric-sdk && git checkout tags/agoric-upgrade-8-1
  2. yarn install && yarn build
  3. agd start