A Delegated Resolution Environment for Warp Contracts. Docs are available here.
DRE can run in two different modes. Each of them listens on gateways notification and registers new contracts, but upcoming new interactions are handled differently.
Node fetches interactions directly from gateway in time intervals. Interaction are grouped and executed sequentially. This is the default mode.
Node listens on new interactions events and evaluates contracts immediately after every interaction. This offers a faster contract evaluation and serves the latest contract state
Update mode can be set up using env config
UPDATE_MODE='poll'
or
UPDATE_MODE='subscription'
npm run run-docker:local
- Confirm that database is running locally
docker ps -a
# should display something similar to:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f240114e69a0 postgres:14 "docker-entrypoint.s…" 11 minutes ago Up 11 minutes 0.0.0.0:21726->5432/tcp dre-postgres
c3ee9a099cda redis:7.0-alpine "docker-entrypoint.s…" 11 minutes ago Up 11 minutes 127.0.0.1:6379->6379/tcp warp-dre-node-bullmq-1
- Run database initialization script:
npm run db-setup:local
(the default password for userpostgres
ispostgres
)
TBA
npm install --force
npm install pm2 -g
cp .env.defaults .env
- Update
.env
config file.- Set
NODE_JWK_KEY
with your Arweave wallet JWK - Update
.env
passwords for your local postgres (only if you changed them!). - Optionally you can change the 'UPDATE_MODE'. By default, it is set to poll mode.
- Set
pm2 install pm2-logrotate
pm2 start src/syncer.js
pm2 start src/listener.js
hey new build