-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
107 changed files
with
8,157 additions
and
11,679 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ components/chainhook-types-js/dist | |
*.tar.gz | ||
*.zip | ||
*.rdb | ||
Ordhook.toml | ||
/Ordhook.toml | ||
|
||
cache/ | ||
./tests | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug unit tests in library 'chainhook-postgres'", | ||
"cargo": { | ||
"args": ["test", "--no-run", "--lib", "--package=chainhook-postgres"], | ||
"filter": { | ||
"name": "chainhook-postgres", | ||
"kind": "lib" | ||
} | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "run: ordhook service", | ||
"cargo": { | ||
"args": ["build", "--bin=ordhook", "--package=ordhook-cli"], | ||
"filter": { | ||
"name": "ordhook", | ||
"kind": "bin" | ||
} | ||
}, | ||
"args": [ | ||
"service", | ||
"start", | ||
"--config-path=${workspaceFolder}/.vscode/ordhook.toml", | ||
], | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug unit tests in executable 'ordhook'", | ||
"cargo": { | ||
"args": ["test", "--no-run", "--bin=ordhook", "--package=ordhook-cli"], | ||
"filter": { | ||
"name": "ordhook", | ||
"kind": "bin" | ||
} | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug unit tests in library 'ordhook'", | ||
"cargo": { | ||
"args": ["test", "--no-run", "--lib", "--package=ordhook"], | ||
"filter": { | ||
"name": "ordhook", | ||
"kind": "lib" | ||
} | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
[storage] | ||
working_dir = "tmp" | ||
observers_working_dir = "tmp" | ||
|
||
[ordinals_db] | ||
database = "ordinals" | ||
host = "localhost" | ||
port = 5432 | ||
username = "postgres" | ||
password = "postgres" | ||
|
||
[brc20_db] | ||
database = "brc20" | ||
host = "localhost" | ||
port = 5432 | ||
username = "postgres" | ||
password = "postgres" | ||
|
||
# The Http Api allows you to register / deregister | ||
# dynamically predicates. | ||
# Disable by default. | ||
# | ||
# [http_api] | ||
# http_port = 20456 | ||
|
||
[network] | ||
mode = "mainnet" | ||
bitcoind_rpc_url = "http://localhost:8332" | ||
bitcoind_rpc_username = "rafaelcr" | ||
bitcoind_rpc_password = "developer" | ||
bitcoind_zmq_url = "tcp://0.0.0.0:18543" | ||
|
||
[resources] | ||
ulimit = 2048 | ||
cpu_core_available = 6 | ||
memory_available = 16 | ||
bitcoind_rpc_threads = 2 | ||
bitcoind_rpc_timeout = 15 | ||
expected_observers_count = 1 | ||
|
||
[logs] | ||
ordinals_internals = true | ||
chainhook_internals = true | ||
|
||
[meta_protocols] | ||
brc20 = true |
Oops, something went wrong.