Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fuxingloh/oxtu
OXTU (UTXO in reverse) is a space-efficient UTXO set for Bitcoin (and bitcoin-like) blockchains.
https://github.com/fuxingloh/oxtu
api bitcoin utxo
Last synced: 22 days ago
JSON representation
OXTU (UTXO in reverse) is a space-efficient UTXO set for Bitcoin (and bitcoin-like) blockchains.
- Host: GitHub
- URL: https://github.com/fuxingloh/oxtu
- Owner: fuxingloh
- License: mit
- Created: 2024-07-12T09:40:12.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-30T11:18:33.000Z (about 2 months ago)
- Last Synced: 2024-10-11T16:40:21.403Z (about 1 month ago)
- Topics: api, bitcoin, utxo
- Language: Rust
- Homepage:
- Size: 101 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# OXTU
OXTU (UTXO in reverse) is a space-efficient UTXO set for Bitcoin (and bitcoin-like) blockchains.
It is experimental software with no warranty.## Available RPC
The RPC attempts to model the Bitcoin Core RPC as much as possible.
However, due to the nature of OXTU being wallet agnostic, the RPC will not work as the same as Bitcoin Core RPC.- `listunspent` (address=String, {minconf, maxconf, count})
- `getaddressinfo` (address=String)
- `_probe` (name=liveness|readiness|startup) for K8s.## Usage
A `compose.yml` file is provided below as an example on how to run OXTU together with a Bitcoin Core.
The Bitcoin Core will be used as the source of truth for the UTXO set.
Three `BITCOIND_RPC_*` environment variables are required to connect to the Bitcoin Core.```yaml
version: '3.8'services:
bitcoind:
image: docker.io/kylemanna/bitcoind:latest
environment:
- RPCUSER=oxtu
- RPCPASSWORD=oxtu
volumes:
- bitcoind:/bitcoin/.bitcoinoxtu:
image: ghcr.io/fuxingloh/oxtu:latest
ports:
- "3000:3000"
environment:
- BITCOIND_RPC_URL=http://bitcoind:8332
- BITCOIND_RPC_USERNAME=oxtu
- BITCOIND_RPC_PASSWORD=oxtu
volumes:
- oxtu:/oxtu/.oxtu
depends_on:
- bitcoindvolumes:
bitcoind:
oxtu:
```## OXTU Design
> [!NOTE]
> While OXTU is designed to reduce write amplification, some parts of the code aren't well-thought-out yet.
> And it is not yet optimized for performance,
> but it's fast enough to catch up with the Bitcoin Core when running in parallel.### Connecting Blocks
OXTU uses the same "connecting block" mechanism as Bitcoin Core.
The connected block is a block where `prev_hash` is the `hash` of the stored block.
Otherwise, the stored block will be forked out using `BlockUndo` to revert the changes.
JSON-RPC is used to communicate with the underlying bitcoin node.### Pruning Blocks
Every 10,000 blocks, OXTU will prune Block and BlockUndo, those are not needed anymore and are only used for reorgs.
### RocksDB
OXTU uses RocksDB as the storage engine. The data, by default is stored in the `/oxtu/.oxtu/data` directory.
This is chosen over single-file options to take advantage of layered storage.## License
MIT