Giter VIP home page Giter VIP logo

docker-ord's Introduction

Dockerized Ordinals

This repo demonstrate an attempt to use Ordinals in containerized environment.

Example is based on Docker Compose

Considerations:

  1. ord is connecting to bitcoind via RPC URL, but its current implementation expects the RPC authentication configured on bitcoind side
  2. To generate unique user and password RPC Auth see the ./scripts/rpcauth, update the bitcoin.conf afterwards and set Environment variables (via .env file) for ord
  3. bitcoind should be started first and fully synced before ord can start indexing
  4. bitcoind should be launched with flag txindex=1.

Quick Start

Run bitcoind:

docker compose up -d bitcoind

Check logs

docker compose logs bitcoind -f --tail 100

Once bitcoind fully synced

docker compose up -d ord

Requirements

Bitcoin Transaction Database Index

If txindex is set to true (1), Bitcoin Core maintains an index of all transactions that have ever happened, which you can query using the remote procedure call (RPC) method getrawtransaction or the RESTful API call get-tx.

Can be verified in container:

docker compose exec bitcoind bitcoin-cli getindexinfo

Expecting "synced": true.

Get details of the first Transaction should return without error:

docker compose exec bitcoind bitcoin-cli getrawtransaction "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16 true

Or via JSON-RPC interface

curl --user foo --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getrawtransaction", "params": ["f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16", true]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

Bitcoin config generator

https://jlopp.github.io/bitcoin-core-config-generator/

Ordinals

When starting ord the Bitcoin Block Index loading should be completed (usually few minutes), otherwise the following error:

ord  | error: JSON-RPC error: RPC error response: RpcError { code: -28, message: "Loading block index…", data: None }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.