Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ but instead queried from bitcoind on demand.

- Extended indexes and database storage for improved performance under high load:

- A full transaction store mapping txids to raw transactions is kept in the database under the prefix `t`.
- A full transaction store mapping txids to raw transactions is kept in the database under the prefix `T`.
- An index of all spendable transaction outputs is kept under the prefix `O`.
- An index of all addresses (encoded as string) is kept under the prefix `a` to enable by-prefix address search.
- A map of blockhash to txids is kept in the database under the prefix `X`.
Expand Down
9 changes: 6 additions & 3 deletions doc/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,13 @@ Each transaction results in the following new row:

* `"T{txid}" → "{serialized-transaction}"`

Each output results in the following new rows:
Each spendable output (`OP_RETURN` outputs are skipped, and on Elements also fee outputs and other provably unspendable outputs) results in the following new row:

* `"O{txid}{vout}" → "{scriptpubkey}{value}"`
* `"a{funding-address-str}" → ""` (for prefix address search, only saved when `--address-search` is enabled)
* `"O{txid}{vout}" → "{serialized-txout}"`

When `--address-search` is enabled, each output with an address also results in the following new row:

* `"a{funding-address-str}" → ""` (for prefix address search)

When the indexer is synced up to the tip of the chain, the hash of the tip is saved as following:

Expand Down