Commit Graph

657 Commits

Author SHA1 Message Date
Rafael Cárdenas
205b4c80bd feat: migrate ordinals api to ordhook repo (#389)
* feat: add database migration cli commands

* update cargo lock

* chore: import first api files

* test: cache first

* test: cache

* test: sats

* test: inscription show

* test: inscription transfers

* test: inscriptions index

* test: inscriptions complete

* test: counts

* test: status

* test: block counts

* test: brc20 activity

* test: brc20 holders

* ci: api tests

* ci: update nvmrc path

* ci: remove migration refs

* ci: unused exports

* ci: unused

* ci: build publish

* ci: monorepo

* fix: timestamps

* Update api/ordinals/docs/feature-guides/rate-limiting.md

Co-authored-by: ASuciuX <151519329+ASuciuX@users.noreply.github.com>

* Update api/ordinals/docs/feature-guides/rate-limiting.md

Co-authored-by: ASuciuX <151519329+ASuciuX@users.noreply.github.com>

* Update api/ordinals/docs/overview.md

Co-authored-by: ASuciuX <151519329+ASuciuX@users.noreply.github.com>

* Update api/ordinals/src/api/schemas.ts

Co-authored-by: ASuciuX <151519329+ASuciuX@users.noreply.github.com>

* Update api/ordinals/src/api/schemas.ts

Co-authored-by: ASuciuX <151519329+ASuciuX@users.noreply.github.com>

* fix: warnings

---------

Co-authored-by: ASuciuX <151519329+ASuciuX@users.noreply.github.com>
2025-02-07 13:44:21 -06:00
Rafael Cárdenas
fe842e2e77 fix(brc20): verify ordinal transfers in chunks instead of individually (#394)
* chore: group transfers

* fix: finish integration

* fix: chunk query

* chunk size

* test: indexing

* fix: comments
2025-02-05 13:14:41 -06:00
Rafael Cárdenas
3f10607ba9 fix: store inscription content as is (#391) 2025-01-29 10:51:18 -06:00
Rafael Cárdenas
4afb201006 refactor!: store inscription data in postgres instead of sqlite (#375)
* chore: new pg lib

* chore: migrations and connection code

* brc20 migrations

* connection opts

* fixed columns

* vscode configs

* transaction utils

* chain tip integration

* more progress

* progress

* models

* brc20 progress

* progress

* more

* utils

* models and isnerts

* some more inserts

* ordering support

* remove extra code

* organize

* deadpool

* chain tip

* counts

* optimize transfers table

* optimize reinscriptions

* transfers in same block

* drop blocks structure

* brc20 counts

* token minted supplies

* brc20 insert chunks

* brc20 tweaks

* tweaks

* rollback progress

* restore tests

* fix brc20 tests

* cache tests

* brc20 db tests

* pg docker compose

* fix: pg path

* fix: dockerfile

* test: inscr write

* test: rollbacks

* fix: token minted supply rollback

* fix: ordinals rollback

* chore: upgrade rust

* fix: share rocksdb conn across threads

* chore: search path support

* chore: logs cleanup

* chore: re-enable seq cursor tests

* fix: wire up rollbacks

* fix: brc20 decimal conversion

* fix: recursion parsing

* fix: remove 0x from binary content

* fix: inscription content fixed for real this time

* fix: remove null bytes before inserting

* chore: delete http api

* fix: new pg methods

* fix: all tests

* chore: add pool size config, remove http config

* style: comments
2025-01-04 17:44:58 -06:00
dependabot[bot]
30e8f7a8c4 chore(deps): bump pprof from 0.13.0 to 0.14.0 (#377)
Bumps [pprof](https://github.com/tikv/pprof-rs) from 0.13.0 to 0.14.0.
- [Changelog](https://github.com/tikv/pprof-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tikv/pprof-rs/commits)

---
updated-dependencies:
- dependency-name: pprof
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-16 11:05:12 -06:00
Rafael Cárdenas
d4b67bb6f6 feat: wait for bitcoind to be at chain tip before starting service (#364)
* feat: wait for bitcoind to be at chain tip before starting service

* fix: reset confirmations

* chore: more logs
2024-09-20 11:34:04 -06:00
Rafael Cárdenas
21fcf46fac chore: clean up db sync command (#363)
* chore: clean up db sync command

* fix: test delete db

* chore: tweak log messages
2024-09-19 19:23:39 -06:00
dependabot[bot]
f100e618ca chore(deps): bump micromatch in /components/ordhook-sdk-js (#358)
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-17 10:59:35 -06:00
Rafael Cárdenas
a0300cecc2 test: inscription indexing, parsing, sequencing and satoshi numbering (#359)
* feat: add prometheus monitoring

* chore: progress

* fix: create object

* chore: port config

* chore: set initial metrics on start

* fix: monitor predicates

* test: add

* test: inscription indexing

* test: tools and parsing start

* test: raw blocks

* test: cursor

* fix: test drop

* test: cursor more

* refactor: rocksdb separate file

* refactor: db into files

* refactor: delete ordhook config, unify use of config

* fix: consolidate db initialization

* test: full block sequencing

* test: sat numbering with cache

* test: sat coinbase fees

* test: uncached traversal

* test: non spend

* test: sat tracking post transfer

* test: burnt sat pos

* test: integration test transfeR

* fix: witness test

* test: consolidate block

* test: indexing channel

* test: archiver

* test: transfers channel

* test: brc20 augment
2024-09-17 10:54:20 -06:00
Rafael Cárdenas
f35e1d00e7 feat: add prometheus monitoring (#356)
* feat: add prometheus monitoring

* chore: progress

* fix: create object

* chore: port config

* chore: set initial metrics on start

* fix: monitor predicates

* test: add
2024-09-05 14:50:57 -06:00
Rafael Cárdenas
5692426e4b fix: only create brc-20 db connection and cache if required (#357)
* fix: unify db create

* fix: test

* fix: create on drop

* fix: build

* chore: remove warnings

* fix: add some logs

* fix: blocking thread
2024-09-04 08:59:21 -06:00
Rafael Cárdenas
7a65fdf107 feat: support a separate storage directory for observers.sqlite (#354)
* chore: observers db dir

* fix: control observers path only on db functions

* chore: test structure

* test: incorrect predicate

* fix: test predicate registration

* test: more

* fix: duplicate uuid test
2024-09-03 12:21:56 -06:00
Rafael Cárdenas
caacff7c4f feat!: support brc20 activity on scan blocks command (#350)
* fix: meta protocols for block scan

* chore: show brc20 operations on block scan

* docs: readme

* chore: generator
2024-07-31 11:37:43 -06:00
Rafael Cárdenas
39774a9f86 feat!: keep original deployed ticker for brc20 tokens (#349) 2024-07-30 10:02:18 -06:00
Rafael Cárdenas
d80388b505 fix: also check config when looking for brc20 db connection (#347) 2024-07-29 16:21:41 -06:00
Rafael Cárdenas
7ee763a263 fix: abort scan on predicate action error (#345) 2024-07-23 13:29:27 -06:00
Rafael Cárdenas
146bbcd584 chore: use try_ macros for all log messages (#342) 2024-07-22 13:00:36 -06:00
Rafael Cárdenas
b28b92ebab fix: validate and wait for bitcoind block height responses (#340)
* fix: validate and wait for bitcoind block height responses

* chore: comments
2024-07-22 10:19:51 -06:00
dependabot[bot]
54296f6c03 chore(deps): bump braces in /components/ordhook-sdk-js (#332)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 17:06:18 -06:00
Ludo Galabru
a593995e60 fix: nested readwrite connection (#327) 2024-06-26 10:14:07 -06:00
Ludo Galabru
6c9ea060ef fix: retrieving block height from inscriptions db 2024-06-18 18:03:47 -04:00
Ludo Galabru
cbb4d6db06 Merge branch 'develop' into fix/double-write 2024-06-18 13:18:27 -04:00
Ludo Galabru
eb3020b89c chore: remove undesired comments 2024-06-18 13:17:00 -04:00
Rafael Cárdenas
122bfdfd80 fix: augment brc20 tx by tx_index (#315)
* fix: augment tx by tx_index

* chore: better log
2024-06-18 11:15:05 -06:00
Ludo Galabru
f6a2a79478 refactor: delete_data_in_ordhook_db 2024-06-18 12:45:21 -04:00
Ludo Galabru
2b235d2e4e Merge pull request #312 from hirosystems/fix/reboot
fix: sequence misalignment caused in certain conditions
2024-06-11 11:00:27 -04:00
Rafael Cárdenas
26d8ed9f5c fix: consider meta protocols when switching to stream (#311)
* fix: consider meta protocols when switching to stream

* fix: write augmented block to db
2024-06-11 08:57:16 -06:00
Ludo Galabru
a76a037cf8 fix: base catchup on inscriptions db, vs blocks db 2024-06-11 10:10:59 -04:00
Ludo Galabru
1df0f7c130 chore: cargo fmt 2024-06-11 10:10:03 -04:00
Rafael Cárdenas
b31f6bdea7 fix: set is_streaming_blocks to false when scanning (#309) 2024-06-04 13:16:47 -06:00
Ludo Galabru
7a8dca53c1 fix: issue #296 (#300)
* fix: synthetic predicate

* fix: set height 0 for regtest, etc.

* fix: issue #296

* chore: update chainhook-sdk

* fix: use latest chainhook

* fix: augment block with brc20 while indexing

* fix: force input 0

---------

Co-authored-by: Rafael Cardenas <rafael@rafaelcr.com>
2024-05-24 11:36:47 -06:00
Rafael Cárdenas
729affb699 feat: add BRC-20 indexing (#284)
* feat: first version of brc20 parser

* feat: verifier

* fix: parse with tests

* test: extra parser stuff

* feat: verifier with tests, basic wiring

* test: transfer sends

* fix: add deploy op to ledger

* chore: upgrade to latest chainhook

* feat: start adapting for scan

* feat: wire up scan

* feat: self minted tokens

* feat: self mint and drop data

* fix: transaction commit and rollback

* chore: update dependencies

* chore: update rust

* chore: cascade chainhook changes in ordhook

* fix: ordinal-sdk-js build

* chore: update deps

* fix: centralize db init

* fix: check brc20 activation height

* chore: downgrade brc-20 warns to debug

* feat: cache tokens and minted supplies per block

* feat: memory cache

* feat: cache module

* feat: use LRU cache for brc20

* feat: configurable lru size

* fix: blacklist invalid transfers

* chore: block cache struct

* chore: config meta protocols

* fix: use cache across all blocks

* chore: formatting

* test: cache and utils

* fix: address balance cache miss

* fix: flush db caches on miss

* fix: check db cache length before flushing

* chore: tweak log msgs

* test: transfer full balance

* fix: cache miss on avail balance deltas

* fix: save tx_index in ledger table

* test: null bytes

* fix: remove unique index ledger

---------

Co-authored-by: Ludo Galabru <ludo@hiro.so>
Co-authored-by: Ludo Galabru <ludovic@galabru.com>
2024-05-09 11:45:22 -06:00
Ludo Galabru
d1b995b460 fix: jubilee block transition 2024-02-12 10:52:24 -05:00
Ludo Galabru
8af758e2b5 chore: update chainhook-sdk 2024-02-09 17:34:46 -05:00
Ludo Galabru
e22df72228 chore: cargo fmt 2024-02-09 14:21:10 -05:00
Ludo Galabru
80986734c8 fix: transfer tracking 2024-02-09 14:20:55 -05:00
Ludo Galabru
3256427632 feat: display git-commit 2024-02-09 14:18:58 -05:00
Ludo Galabru
9c9e2a57a5 feat: introduce stream-indexing flag 2024-02-06 21:48:25 -05:00
Ludo Galabru
1c3a5ddae4 fix: transfer offset 2024-02-06 21:48:25 -05:00
Ludo Galabru
a5fee2520c feat: confirm before deleting blocks 2024-02-06 21:48:25 -05:00
Ludo Galabru
4b81d1ebe4 fix: add unicity constraints, cascade changes 2024-02-06 21:48:25 -05:00
Ludo Galabru
fd1c87addd chore: display git hash 2024-02-06 21:48:25 -05:00
Ludo Galabru
2feb5128a1 fix: consider end_block when scanning 2024-02-05 12:36:36 -05:00
Ludo Galabru
0416cd8e50 fix: transfer duplicates 2024-02-05 12:33:06 -05:00
Ludo Galabru
306f850e7f fix: imitate overflow behavior 2024-02-02 10:18:16 -05:00
Ludo Galabru
22eb729f33 fix: satoshis computations duplicates 2024-02-01 21:59:43 -05:00
Ludo Galabru
869b17e170 fix: tests 2024-02-01 21:06:16 -05:00
Ludo Galabru
4222d46b16 fix: jubilee increment 2024-02-01 20:46:33 -05:00
Ludo Galabru
faacfc53ac fix: additional adjustments on pointers 2024-01-31 18:01:51 -05:00
Ludo Galabru
073f58206f chore: remove broken tests 2024-01-25 11:10:33 -05:00