Open tomt1664 opened 3 weeks ago
For the enclave, configure DB connection string for a postgres database in: https://github.com/commerceblock/mercurylayer/tree/dev/enclave
Set enclave_port
to expose on one instance.
Set replication_server_url
to a second instance.
Run 2 instances in sim mode using docker: https://github.com/commerceblock/mercurylayer/blob/dev/enclave/Dockerfiles/SIM/Dockerfile
This will automatically initialse both instances. This first (with enclave_port
set) can be configured with lockbox = "http://0.0.0.0:18080"
in the mercury server config.
The server should be run with network="testnet"
config.
Then to go though sample mercury operations (e.g deposit, transfer), follow this guide with one of the standalone clients: https://github.com/commerceblock/mercurylayer/blob/testnet_guide/docs/testnet_guide.md
(do not set tor proxy, just set statechain_entity = "http://127.0.0.1:8000"
location).
When server is in testnet mode, can generate token IDs for deposit using deposit/get_token
Current integration test workflow: https://github.com/commerceblock/mercurylayer/blob/dev/clients/nodejs/test_basic_workflow.js
Aim: a fully automated system that can set-up and run the series of tests - and can add to CI/github actions. For full reproducibility we need enclave+server and DB, as well as a bitcoin regtest node and electrum server.
Components:
docker pull postgres Run DB:
docker run --name some-postgres -e POSTGRES_PASSWORD=pgpassword -p 5432:5432 -d postgres