Files
stacks-puppet-node/migration-verification
Gregory Coppola d4db962635 merge: develop -> next (#2828)
* fix: clarify difference between stx-transfer? and (n)ft-transfer?

* build: add Clarity workspace member (#2744)

* build: add libvm workspace member

* chore: skip lib-clarity-vm in circleci

* refactor: address pavi's comment

* refactor: naming

* fix: update lib name

* refactor: rename, drop the lib suffix

* refactor: address Greg's comments

* style: rustfmt

Co-authored-by: Aaron Blankstein <aaron@blockstack.com>

* build: buster -> bullseye in rust testing dockerfiles

* added blank line to restart github tests

* fixed the rstest/clarity interaction

* removed extra line

Co-authored-by: Friedger Müffke <mail@friedger.de>
Co-authored-by: Aaron Blankstein <aaron@blockstack.com>
Co-authored-by: Reed Rosenbluth <331327+reedrosenbluth@users.noreply.github.com>
2021-09-03 16:40:58 -05:00
..
2020-12-30 15:51:46 +01:00
2021-09-03 16:40:58 -05:00

This directory contains a Dockerfile that performs automated validation of the migration process from Stacks 1.0 to Stacks 2.0.

A sampling of STX balances and lockup schedules are tested.

The following steps are automatically performed:

  1. Checkout and install Stacks 1.0.
  2. Run a Stacks 1.0 fast-sync to get caught up to the latest chain state (as of the latest hosted snapshot).
  3. Trigger a fast-sync-dump similar to how it will be triggered from the name threshold.
  4. Perform the chainstate export step from the fast-sync-dump.
  5. Checkout the Stacks 2.0 source, and copy over the newly exported chainstate.txt, and build.
  6. Query the Stacks 1.0 db for 1000 address balances, and ~1000 lockup schedules.
  7. Spin up both a Stacks 1.0 and Stacks 2.0 node, and validate the address balances match using the account RPC endpoints:
    • Stacks 1.0: /v1/accounts/{address}/STACKS/balance
    • Stacks 2.0: /v2/accounts/{address-in-testnet-format}
  8. Validate lockup schedules in Stacks 2.0 match the samples dumped from the Stacks 1.0, using a contract map lookup:
    • /v2/map_entry/ST000000000000000000002AMW42H/lockup/lockups

Running

This is a resources intensive process and can take upwards of an hour.

Ensure Docker is allocated at least 70GB disk size and 4GB memory.

Run the docker build:

cd migration-verification
DOCKER_BUILDKIT=1 BUILDKIT_PROGRESS=plain docker build --build-arg STACKS_V2_BRANCH=<branch or tag> .