ubani / cardano-rosetta

An implementation of Rosetta for Cardano

Home Page:https://www.rosetta-api.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cardano Rosetta

CI Nightly

An implementation of Rosetta for Cardano, targeting the version defined in the OpenApi schema. Skip to run if wishing to use a pre-built image from the Docker Hub repository.

Build

Build from anywhere, optionally specifying a network name other than mainnet as a build argument, and accessing cached build layers to reduce the initialization time. You can also build with local source by replacing the GitHub link with .

mainnet
DOCKER_BUILDKIT=1 \
docker build \
    --build-arg BUILDKIT_INLINE_CACHE=1 \
    --cache-from=inputoutput/cardano-rosetta:master \
    -t inputoutput/cardano-rosetta:1.5.0 \
    https://github.com/input-output-hk/cardano-rosetta.git#1.5.0
testnet
DOCKER_BUILDKIT=1 \
docker build \
    --build-arg BUILDKIT_INLINE_CACHE=1 \
    --build-arg NETWORK=testnet \
    --cache-from=inputoutput/cardano-rosetta:master \
    -t inputoutput/cardano-rosetta:1.5.0-testnet \
    https://github.com/input-output-hk/cardano-rosetta.git#1.5.0

Run

Run the locally or pre-built images and mount a single volume into the standard storage location, map the server port to the host, and allocate a suitably-sized /dev/shm. See the complete Docker run reference for full control.

mainnet
docker run \
  --name cardano-rosetta \
  -p 8080:8080 \
  -v cardano-rosetta:/data \
  --shm-size=2g \
  inputoutput/cardano-rosetta:1.5.0
testnet
docker run \
  --name cardano-rosetta-testnet \
  -p 8081:8080 \
  -v cardano-rosetta-testnet:/data \
  --shm-size=2g \
  inputoutput/cardano-rosetta:1.5.0-testnet

Configuration

Set ENVs for optional runtime configuration

-e MODE=offline

MODE

See Rosetta docs for information on modes

  • online - default
  • offline

DEFAULT_RELATIVE_TTL

Specify the TTL without needing to access an online method. Default: 1000

LOGGER_MIN_SEVERITY

  • trace
  • debug
  • info - default
  • warn
  • error
  • fatal

PAGE_SIZE

Default: 25

Upgrading

As per the release notes, you may be required to refresh the state managed by cardano-db-sync. This can be achieved without requiring a network re-sync using the following command:

docker stop cardano-rosetta && \
docker rm cardano-rosetta && \
docker run --rm -v cardano-rosetta:/data ubuntu rm -rf /data/postgresql /data/db-sync

Now create a new container using the run instructions above. Sync progress will be logged by the new container.

Documentation

Link Audience
Construction API Documentation Users of the Cardano Rosetta Construction API
Data API Documentation Users of the Cardano Rosetta Data API
Cardano Rosetta Docs Cardano Rosetta specific documentation
Developer Core or external developers of cardano-rosetta-server
Maintainer Solution maintainer
QA Quality Assurance Engineers

About

An implementation of Rosetta for Cardano

https://www.rosetta-api.org

License:Apache License 2.0


Languages

Language:TypeScript 95.8%Language:Shell 2.0%Language:Nix 1.2%Language:Dockerfile 0.7%Language:JavaScript 0.4%