Commit graph

21 commits

Author SHA1 Message Date
Dagur Valberg Johannsson
f421327a5d
Switch to tokio and sqlx
This makes the application fully async; freeing web server threads to
handle new connections when waiting on SQL queries.

Additionally sqlx will allow easier move to a different database if
needed in the future.

Includes some SQL optimizations as well (slow queries more easliy identifiable
with sqlx).
2026-02-18 10:16:51 +01:00
Dagur Valberg Johannsson
ceb0e54dc0
Add 'bcmr' to metrics cache
This removes the need to have a BCMR connction during token search /
listing; also saving 2x lookups per token in results.
2026-02-17 14:06:16 +01:00
Dagur Valberg Johannsson
17995ea520
Shorten db lock in BCMR downloader
Don't need to hold a write lock while we wait for BCMR download.
2026-02-05 15:10:07 +01:00
Dagur Valberg Johannsson
d6fa922154
Reduce file descriptor usage
Misc changes to reduce file descriptor usage for the indexer.
2026-02-04 08:53:27 +01:00
Dagur Valberg Johannsson
beebc2c86f
bugfix: Reverse hash issues with blob 2026-02-02 11:34:18 +01:00
Dagur Valberg Johannsson
cbc2e10acb
bug: Reading TEXT as BLOB
This is a follow-up bugfix from previous "to BLOB" change.
2026-01-23 16:15:42 +01:00
Dagur Valberg Johannsson
58fd9595d7
Convert hash columns from TEXT to BLOB storage
Migrate all 32-byte hash fields from TEXT (64-char hex) to BLOB
(32 bytes) for ~50% storage savings on hash columns.

Changes:
- Add src/db/blob.rs with ToBlob/FromBlob traits for hash types
- Update all table schemas to use BLOB for hash columns
- Replace .to_hex() with .to_blob() for DB inserts
- Replace ::from_hex() with ::from_blob() for DB reads
- Use SQL hex() function where API responses need hex strings
- Bump DB_VERSION from 4 to 5

Affected tables: tx, pool, pool_history_entry, utxo_spending,
utxo_funding, user_action, auth_chain_entry, bcmr_data,
bcmr_failure, bcmr_well_known, crc20, crc20_candidates,
delphi_entry, cached_token_metrics

Fixes #1
2026-01-22 08:30:17 +01:00
Dagur Valberg Johannsson
d85bc2c9db
Update copyright headers 2026-01-21 12:37:13 +01:00
Dagur Valberg Johannsson
a6c6159eba
Add Chipnet support 2026-01-09 13:46:58 +01:00
jakobsn
8fd14cc65b Manage several entries one txid 2025-11-17 09:21:51 +00:00
jakobsn
e053d52a76 Resolve "Olando auth-header not tracked" 2025-11-07 13:53:47 +00:00
Dagur Valberg Johannsson
20f17a220a
Add test for OLANDO authchain updates 2025-10-14 09:36:03 +02:00
Dagur Valberg Johannsson
7d9352cf53
Fix clippy issues 2025-07-16 13:52:46 +02:00
Dagur Valberg Johannsson
78e391560f
Added support for delphi oracle
This allows fetching historical asset prices from the blockchain.
2025-05-21 13:33:26 +02:00
Dagur Valberg Johannsson
bb46b8e3f8
Add IPFS gateway 2025-02-15 09:15:22 +01:00
Dagur Valberg Johannsson
e4e7ec3b71
Add aggregated APY endpoint
Add an endpoint that gives a APY value across multiple micro-pools
2024-10-23 16:54:06 +02:00
Dagur Valberg Johannsson
751c1df6a7
Add CRC20 index 2024-10-21 13:35:24 +02:00
Dagur Valberg Johannsson
528cc79725
API call for latest transactions 2024-09-25 13:39:06 +02:00
Dagur Valberg Johannsson
cd6ce4d4ef
Add well-known BCMR sources
This adds additional BCMR data sources, mainly OTR.
2024-09-10 22:39:30 +02:00
Dagur Valberg Johannsson
d177f463f3
bugfix: BCMR authchain
Invalid assumption in code that authchain utxo must be spent as first
output.
2024-05-28 12:21:05 +02:00
Dagur Valberg Johannsson
e38eaaa26c
Add BCMR indexer
This adds BCMR indexer, including downloading and parsing the actual
BCMR files.
2024-05-27 11:56:35 +02:00