Skip to content
forked from ar-io/ar-io-node

A scalable and modular gateway built for the permaweb atop the Arweave permanent data storage network.

License

Notifications You must be signed in to change notification settings

TimTim012/timtim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AR.IO Gateway Node

Dev Workflow

Install dependencies

yarn install

Run tests

yarn test

Initialize/reset the Sqlite DB

Note: this erases the DB!

./reset-db.sh

Run the service

With defaults:

yarn start

Starting at an arbitrary block (only works immediately after a DB reset):

START_HEIGHT=800000 yarn start

Docker

Standalone AR.IO Node

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

Envoy & AR.IO Node

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.

Design Principles

  1. Code to interfaces.
  2. Separate IO from logic.
  3. Make processes idempotent.
  4. All components must be runnable in a single process.
  5. All components should be runnable independently.
  6. Seperate mutable from immutable data.
  7. Keep regression tests blazingly fast.
  8. Prefer integration over unit tests.
  9. Prefer in-memory implementations over mocks and stubs.
  10. Avoid naively trusting data when the cost to validate it is low.
  11. Make liberal use of metrics to aid in monitoring and debugging.
  12. Follow the Prometheus metrics namings recommendations.
  13. Commit messages should describe both the what and why of the change being made.

About

A scalable and modular gateway built for the permaweb atop the Arweave permanent data storage network.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 96.9%
  • Shell 2.4%
  • Other 0.7%