When trying to scan Stacks predicates, chainhook predicates scan fails when looking for a non-existent stacks_signers.sqlite database file.
$ chainhook predicates scan stx-transfer.json --mainnet
Jul 09 14:22:42.326 INFO A Stacks chainstate already exists, skipping TSV chainstante import
Jul 09 14:22:42.329 CRIT could not find /Users/ryanwaits/Code/hiro/cache/stacks_signers.sqlite
Observations
1. New Database Requirement: In v1.9.0 chainhook added support for Stacks signer messages, which requires a SQLite database at {cache_dir}/stacks_signers.sqlite to store signer message data.
2. Missing Initialization Logic: The scan command expects this database to already exist but doesn't create it automatically. The code at at
|
destination_path.push("stacks_signers.sqlite"); |
tries to open an existing database connection without first ensuring the database exists.
Reproduction Steps
- Fresh installation:
brew install chainhook
- Create a basic Stacks predicate JSON file
- Run:
chainhook predicates scan predicate.json --mainnet
- Error: CRIT could not find /path/to/cache/stacks_signers.sqlite
When trying to scan Stacks predicates,
chainhook predicates scanfails when looking for a non-existentstacks_signers.sqlitedatabase file.Observations
1. New Database Requirement: In v1.9.0 chainhook added support for Stacks signer messages, which requires a SQLite database at
{cache_dir}/stacks_signers.sqliteto store signer message data.2. Missing Initialization Logic: The scan command expects this database to already exist but doesn't create it automatically. The code at at
chainhook/components/chainhook-cli/src/storage/signers.rs
Line 20 in cd77197
Reproduction Steps
brew install chainhookchainhook predicates scan predicate.json --mainnet