Unless -chronik is specified, Chronik now will not be started.
-chronikbind tells Chronik to bind its HTTP server to the given addresses. Currently, this only logs, in a future diff this will be parsed and listened to.
Details
- Reviewers
Fabien - Group Reviewers
Restricted Project - Commits
- rABC96e618e6ab3c: [Chronik] Add `-chronik` and `-chronikbind` command line options
- ninja
- ./src/bitcoind -regtest -> No Chronik log
- ./src/bitcoind -regtest -chronik -> Starting Chronik bound to [127.0.0.1:18442, [::1]:18442]
- ./src/bitcoind -regtest -chronik -chronikbind=0.0.0.0:1234 -> Starting Chronik bound to [0.0.0.0:1234]
- ./src/bitcoind -regtest -chronik -chronikbind=1.2.3.4 -chronikbind=\[::5\]:6789 -> Starting Chronik bound to [1.2.3.4:18442, [::0.0.0.5]:6789]
- ./src/bitcoind -regtest -chronik -chronikbind=invalid -> Error: Invalid Chronik host address "invalid": invalid IP address syntax
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- chronik-args
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 21223 Build 42098: Build Diff lint-circular-dependencies · build-without-wallet · build-diff · build-debug · build-chronik · build-clang-tidy · build-clang Build 42097: arc lint + arc unit
Event Timeline
chronik/chronik-cpp/chronik.cpp | ||
---|---|---|
20 | Why is the default 127.0.0.1 and not 0.0.0.0 ? | |
src/init.cpp | ||
629 | If the category is hidden, no need to state it's experimental, and this doc will not need to change when it's ready to deploy | |
632 | ||
635 | Dito | |
637 | Please define and mention the default value. | |
638 | I suppose we can run Chronik on testnet as well ? If so you probably don't want the same port, hence make it a network only option (as opposed to a global option) | |
src/util/system.h | ||
132 | Move the category below HIDDEN for now, it will prevent it from appearing to the user. so we can make it visible only when it's stable enough (see D11912). | |
src/validation.h | ||
93 | This has nothing to do in validation.h |
Refactor setup_chronik, add init_error and return an error if chronikbind is not a valid host address
chronik/chronik-lib/src/bridge.rs | ||
---|---|---|
55 ↗ | (On Diff #36966) | I think you're missing the point here. You're basically duplicating (with less features) what already exists in the node and is used for the other -bind options. You should reuse the code that already exists in the node to check the ip:port entries and have consistent error message, then pass the processed content to chronik. |
./src/bitcoind -regtest -rpcbind=invalid doesn't return with an error.
My code actually does validation; rpcbind just defaults to localhost if it doesnt parse. Plus, IP parsing is in the stdlib in Rust and the code looks much cleaner to me this way.