69 Commits

Author SHA1 Message Date
gusto
e38007d13e
Merge pull request #20 from kamikazebr/fix/node-api-version-drift
Parse the current node wire format; never halt ingestion on unknown op types
2026-06-15 14:50:13 +03:00
Felipe Novaes F Rocha
7e163f880f fix: /api/v1/health returned 500 on every call
It passed a pydantic model straight to JSONResponse, which cannot render
it. Dump the model first.
2026-06-12 16:23:04 -03:00
Felipe Novaes F Rocha
4ec899ec6d feat: handle unknown ops and proofs without halting ingestion
The chain contains op types the explorer has no serializer for (e.g.
ChannelSetKeys, opcode 16), and a single such transaction aborted the
entire backfill. Same approach as #19, adapted to the current tx format:
unrecognized opcodes and proof variants (e.g. the NoProof unit variant)
fall back to an UnknownOp/UnknownSignature pair that preserves the raw
data verbatim. Typed support can be added incrementally; known ops keep
their strict proof-type checks.

Also adds a typed ChannelSetKeys serializer (opcode 16), shaped from a
real op captured on the chain (fixture included) — its DB model already
existed, but with List[bytes] keys, which break the JSON column's utf-8
encoding; changed to HexBytes like every other byte field.
2026-06-12 16:23:04 -03:00
Felipe Novaes F Rocha
6945f45f4a fix: parse the current node wire format
Recent nodes changed the wire format in three ways that broke block
ingestion (serializers raised on every block, so the DB never populated):

- cryptarchia/info wraps its fields under "cryptarchia_info" and reports
  mode as an object ({"Started": "Online"}). Normalize before validating.
- Byte fields (inscriptions, Ed25519 signatures, Groth16 pi_a/pi_b/pi_c)
  arrive as hex strings instead of int arrays. Accept both encodings via
  BytesFromHexOrIntArray, since the encoding has drifted between releases.
- mantle_tx now carries its canonical hash and dropped the gas price
  fields. Prefer the node-provided hash (a locally computed JSON hash does
  not match the chain's real tx hash) and default gas prices to 0.

Tested with a real block fixture captured from a node.
2026-06-12 14:59:40 -03:00
gusto
93d8ec76f4
Merge pull request #17 from logos-blockchain/sqlite-env-path
chore: Set sqlite db path via env
2026-05-21 18:09:20 +03:00
gusto
0542f4b62e
Set sqlite db path via env 2026-05-21 17:48:33 +03:00
davidrusu
c1b57bcbbc
Merge pull request #16 from logos-blockchain/drusu/update-for-v0.1.3rc5
update schemas to v0.1.3rc5
2026-05-06 19:14:50 -04:00
David Rusu
2045b8df6f update schemas to v0.1.3rc5 2026-05-06 18:31:16 -04:00
davidrusu
3e61dc8d80
Merge pull request #14 from emnul/fix/node-http
fix(node.http): Fix node HTTP backfill reliability and performance
2026-04-28 09:48:59 +04:00
⟣ €₥ℵ∪ℓ ⟢
0d5f801a81
refactor(node): simplify batch logic using batched
Simplifies batch logic and improves readability using a more functional
approach with Python iterators
2026-04-24 14:42:29 -04:00
⟣ €₥ℵ∪ℓ ⟢
e55f7345fc
feat(node): implements batching to avoid sqlite query limits
Batches updates to sqlite db in chunks of 10k. Well within SQlite query
limits (32,766) as of v3.32.0 which is bundled with python 3.9+.

Adds cleanup code to terminate httpx client connection in node_api.

style: fmt files

style: fmt file
2026-04-24 14:39:59 -04:00
davidrusu
0d8be039a5
Merge pull request #13 from ygd58/fix/block-height-off-by-one
fix: count genesis block in height calculation
2026-04-24 20:05:24 +04:00
⟣ €₥ℵ∪ℓ ⟢
0430fe0dd9
feat(node): reuse http connection to avoid spamming connections
Adds a new class attribute to NodeHttpApi that instantiates an httpx
client to reuse during startup.

Adds respective cleanup function for client connection

Updates get_block_by_hash to use httpx client
2026-04-23 20:23:46 -04:00
⟣ €₥ℵ∪ℓ ⟢
aef4b1b876
feat(db): change function signature to avoid unpacking 2026-04-23 20:19:22 -04:00
⟣ €₥ℵ∪ℓ ⟢
2a780a4435
fix(node.http): avoid exhausting ephemeral ports in backfill logic 2026-04-23 16:47:36 -04:00
ygd58
652ed42c5e
fix: count genesis block in height calculation
Previously genesis block was assigned height=0, causing chain height
to undercount by one. Block count should equal the height of the tip.

Fix: genesis block now starts at height=1.

Fixes #12
2026-04-16 13:52:18 +02:00
davidrusu
44043b8c1a
Merge pull request #11 from logos-blockchain/drusu/update-schema-v0.1.1
update tx schema to v0.1.1
2026-04-10 07:29:14 +04:00
David Rusu
4fa63da82a update tx schema to v0.1.1 2026-04-09 23:27:30 -04:00
db76ad97f8 Add/Update License Files
Add dual MIT/Apache-2.0 license:
- LICENSE-MIT
- LICENSE-APACHE-v2
2026-03-25 11:40:32 +01:00
Alejandro Cabeza Romero
9b56a4c8d8
Lints and prettify. 2026-03-09 11:28:46 +00:00
gusto
98c56fadb7
Merge pull request #6 from logos-blockchain/docker-image
fix(ci): Fix package name for docker image
2026-02-25 13:33:01 +02:00
gusto
0d2217456a
Fix package name for docker image 2026-02-25 12:13:21 +02:00
gusto
fb5b863e42
Merge pull request #5 from logos-blockchain/docker-image
feat(docker): Docker image workflow and improvements
2026-02-25 12:07:47 +02:00
gusto
909a0fd859
Docker image name 2026-02-25 12:06:53 +02:00
gusto
6fcb6f1566
Detect base path 2026-02-25 03:00:55 +02:00
gusto
e568936c0f
publish-docker-image.yml 2026-02-24 16:44:19 +02:00
David Rusu
e60b1a114e add root to pythonpath 2026-02-22 14:48:14 +04:00
David Rusu
70c80dd850 add systemd unit file 2026-02-22 14:37:45 +04:00
David Rusu
8e5ec0647c follow chain through forks 2026-02-17 10:10:47 +04:00
David Rusu
15da0cc2aa tweaking live / pagination behaviour 2026-02-17 00:20:50 +04:00
David Rusu
b7267de0da disable live on pagination 2026-02-17 00:14:34 +04:00
David Rusu
a8d350b601 pagination in tx page 2026-02-16 23:58:06 +04:00
David Rusu
e2b61db480 query tx by fork 2026-02-16 23:46:08 +04:00
David Rusu
e6821bdbb4 remove txhash unique constraint 2026-02-16 19:14:18 +04:00
David Rusu
d0e105388d make frontend fork aware 2026-02-16 19:10:21 +04:00
David Rusu
fffa100d09 avoid having to specify PYTHONPATH when running with uv 2026-02-16 18:40:30 +04:00
David Rusu
7b4c238b86 fork tracking in db 2026-02-16 18:40:06 +04:00
David Rusu
46fa934148 support running explorer on non-root paths 2026-02-13 10:25:14 +04:00
David Rusu
36aed1ddc3 display inscriptions in block explorer 2026-02-13 01:03:47 +04:00
David Rusu
dda9e4e714 add missing info serializer 2026-02-05 22:56:46 +04:00
davidrusu
781552e2af
Merge pull request #4 from logos-blockchain/drusu/update-for-devnet
update types with latest fixes from blockchain and add a few features for devnet
2026-02-05 22:45:36 +04:00
David Rusu
cb4a40b574 use POST api for fetching blocks 2026-02-05 20:59:21 +04:00
David Rusu
7b8a2fd1ce parent-walking based backfilling 2026-02-05 19:45:42 +04:00
David Rusu
1d8c0fdec9 fix parsing for latest blockchain and add a few features for devnet 2026-02-05 12:41:42 +04:00
Petar Radovic
02658ac293
Merge pull request #2 from logos-blockchain/logos-blockchain-node-api-update
Updated logos-blockchain node api url path and deserialization
2026-01-30 13:27:04 +01:00
Petar Radovic
864ae0cc87 import 2026-01-29 20:48:49 +01:00
Petar Radovic
73bcd9cc66 Updated logos-blockchain node api url path and deserialization 2026-01-29 19:19:00 +01:00
Alejandro Cabeza Romero
6fa406f83f
Fix relative URL creation. 2025-12-19 13:04:33 +01:00
Alejandro Cabeza Romero
cafc518860
Add general solutions for URLs. 2025-12-19 12:54:26 +01:00
Alejandro Cabeza Romero
0fd630d6a4
Add authentication mechanism via env variables. 2025-12-19 12:26:12 +01:00