yarn install
yarn test
Note: this erases the DB!
./reset-db.sh
With defaults:
yarn start
Starting at an arbitrary block (only works immediately after a DB reset):
START_HEIGHT=800000 yarn start
You can run the ar.io gateway as a standalone docker container:
docker build . -t ario-node:latest
docker run -p 3000:3000 -v ario-data:/app/data ario-node:latest
To reset the db:
docker run -v $PWD/data:/app/data ario-node:latest sh reset-db.sh
To run with a specified start height (after a reset):
docker run -e START_HEIGHT=800000 -v $PWD/data/:/app/data ario-node:latest
You can also run Envoy along side an ar.io
node via Docker Compose. Envoy will proxy routes to arweave.net
not yet implemented in the ar.io node.
docker compose up --build
or:
docker-compose up --build
Once running, requests can be directed to envoy server at localhost:1984
.
- Code to interfaces.
- Separate IO from logic.
- Make processes idempotent.
- All components must be runnable in a single process.
- All components should be runnable independently.
- Seperate mutable from immutable data.
- Keep regression tests blazingly fast.
- Prefer integration over unit tests.
- Prefer in-memory implementations over mocks and stubs.
- Avoid naively trusting data when the cost to validate it is low.
- Make liberal use of metrics to aid in monitoring and debugging.
- Follow the Prometheus metrics namings recommendations.
- Commit messages should describe both the what and why of the change being made.