Difference between revisions of "HowTo Setup vBFI"
VeriBlockTim (talk | contribs) |
VeriBlockTim (talk | contribs) |
||
Line 73: | Line 73: | ||
<instance>/api/chains | <instance>/api/chains | ||
</pre> | </pre> | ||
+ | |||
+ | == Docker setup == | ||
+ | |||
+ | <pre> | ||
+ | |||
+ | version: '3' | ||
+ | services: | ||
+ | nodecore: | ||
+ | container_name: nodecore | ||
+ | image: docker-internal.veriblock.com/nodecore:0.4.13-rc.8 | ||
+ | expose: | ||
+ | - 7500 # p2p | ||
+ | - 10500 # rpc | ||
+ | - 10600 # api | ||
+ | - 4567 # bfi | ||
+ | ports: | ||
+ | - "7501:7501" | ||
+ | - "10500:10500" | ||
+ | - "127.0.0.1:10600:10600" | ||
+ | - "127.0.0.1:4567:4567" | ||
+ | volumes: | ||
+ | - /root/VeriBlock:/data:Z | ||
+ | environment: | ||
+ | - NODECORE_LOG_PATH=/data/logs/ | ||
+ | - NODECORE_LOG_LEVEL=INFO | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | ^ In the above case configuration needs to be placed in /root/VeriBlock | ||
== Useful links == | == Useful links == |
Revision as of 20:52, 29 November 2021
See: Main_Page
Contents
Background
vBFI provides the equivalent number of bitcoin confirmations that a VeriBlock block has.
How to set up
vBFI is contained within NodeCore. It is an optional plugin, not run by default (to conserve resources).
It is available with 0.4.13-rc8 and later (TODO - this is a pre-release)
- Run a full nodecore instance: NodeCore_QuickStart
- Open up port 4567 for bfi
- Add file bfi.conf
- In nodecore.properties, set bfi.enabled=true
If you run getdiagnosticinfo, you will see this flag enabled.
bfi.conf
bfi { blockChainNetwork = mainnet nodeCoreRpcHost = "127.0.0.1:10500" httpApiBindPort = 4567 httpApiNotificationsTest = true forkThreatThreshold = 2 forkThreatRatioThreshold = 0.8 }
nodecore.properties
# Enable BFI bfi.enabled=true
Get results
bitcoinConfirmations for each transaction
This is available per transaction via the bitcoinConfirmations field:
gettransactions 2AB3811FD0EDE3B3F89A50926B15AA4C0C2370A4467E6670635A19E5A1CD3AF3 5000 ... "bitcoinConfirmations": 4, ...
There is also a JavaScript sample to call the http api for gettransactions:
https://github.com/VeriBlock/nodecore-js/blob/master/packages/core/example/3_get_bfi_score.js
API results
Two supported APIs are:
#Summary ping that <instance>/api/ping #detailed chain data <instance>/api/chains
Docker setup
version: '3' services: nodecore: container_name: nodecore image: docker-internal.veriblock.com/nodecore:0.4.13-rc.8 expose: - 7500 # p2p - 10500 # rpc - 10600 # api - 4567 # bfi ports: - "7501:7501" - "10500:10500" - "127.0.0.1:10600:10600" - "127.0.0.1:4567:4567" volumes: - /root/VeriBlock:/data:Z environment: - NODECORE_LOG_PATH=/data/logs/ - NODECORE_LOG_LEVEL=INFO
^ In the above case configuration needs to be placed in /root/VeriBlock
Useful links
- https://veriblock.org/vbfi - official home page
- https://vbfi.veriblock.org/ - live UI control for vBFI (this link may change, and will be integrated into the explorer)
- How_VeriBlock_PoP_vBFI_Protects_Altchains - explanation