NodeCore 0.4.9 ReleaseNotes
See: ReleaseNotes
Contents
New or updated wiki pages
NodeCore
TODO
NodeCore CLI
TODO
VeriBlock PoP Miner
Stability
- Fixed a bug that allowed multiple BTC endorsement transactions to be created at once and caused the BTC wallet to be unstable. Only one BTC endorsement will be broadcasted concurrently now.
- Each PoP Mining operation has been divided into substeps.
- Each PoP Mining operation substep will be reattempted up to 10 times when they have an error from which they can recover.
- Each PoP Mining operation substep has a timeout set, giving us the guarantee that there will never be operations stuck in the RUNNING state forever.
- Each PoP Mining operation substep has its own description and attached data, so that the `listoperations` and `getoperation` commands and the operation-related HTTP API endpoints will now offer more meaningful data.
- Fixed multiple bitcoinJ thread-context warnings
Clarity
- Payout detection implemented. From now the PoP miner will tell you whether or not each of your Mining Operations has been paid out and how many VBKs were rewarded for their endorsement.
- Fixed memory leak in the new payout detection feature
- More meaningful logging. There's less noise and more valuable information such as the BTC transaction fees.
- Added extra log file containing only error-level logs.
Configuration Rework
- Flexible format, supporting old .properties format up to HOCON/JSON (https://github.com/lightbend/config/blob/master/HOCON.md)
- For the sake of stability, the `setconfig` command and the PUT config HTTP API endpoint no longer alter the current runtime state, they will only modify the config file. A PoP miner restart is needed for the changes to apply. However:
- Added getautomine, setautomine <1/2/3/4> <true/false>, getmaxfee, setmaxfee <amount>, getfeeperkb and setfeeperkb <amount> commands. These commands change the runtime values, but not the configuration file.
- Added GET/PUT `/api/config/automine` and GET/PUT `/api/config/btc-fee` HTTP API endpoints. These endpoints change the runtime values, but not the configuration file.
- The next environment variable are now usable to configure the miner: NODECORE_IP, NODECORE_PORT, NODECORE_NETWORK
- From now 'application-default.conf' will be included on the package by default
New commands and endpoints
- Added the command: 'getoperationlogs <id> <log-level (optional)>'
- Added the endpoint: operations/<id>/logs
- This command/endpoint can be used to retrieve all the logs for the supplied operation
- The APIs are now using swagger, all the API documentation will be displayed on the API url (http://localhost:8080/api by default)
- Added the command 'canceloperation <id>'
- Added the endpoint 'operations/<id>/cancel'
- This command/endpoint cancels the operation for the supplied operation
Code
The amount of actual code has been reduced greatly and overall it has become easier to understand, welcoming more open-source community collaboration.
We have also added a /metrics endpoint in the HTTP API, so that you can collect metrics from your mining sessions. Some of the included metrics are:
- Started operations count
- Completed operations count
- Failed operations count
- Spent fees count
- Mining rewards count
- Total time in each mining stage
How to Update Your VeriBlock PoP Miner Installations
Update Your Config to Match the New Names
The configuration property names have changed, as well as the configuration file name. 'ncpop.properties' is no longer used; the new configuration file name is 'application.conf'. Sample new config in the known format:
vpm.nodeCoreRpc.host = 127.0.0.1 vpm.nodeCoreRpc.port = 10500 vpm.nodeCoreRpc.ssl = false vpm.bitcoin.network = mainnet vpm.bitcoin.maxFee = 8000 vpm.bitcoin.feePerKB = 20000 vpm.bitcoin.enableMinRelayFee = true vpm.bitcoin.useLocalhostPeer = false vpm.httpApiPort = 8080 vpm.autoMine.round1 = false vpm.autoMine.round2 = false vpm.autoMine.round3 = false vpm.autoMine.round4 = false
Same sample config in the modern format:
vpm { nodeCoreRpc { host = 127.0.0.1 port = 10500 ssl = false } bitcoin { network = mainnet maxFee = 8000 feePerKB = 20000 enableMinRelayFee = true useLocalhostPeer = false } httpApiPort = 8080 autoMine { round1 = false round2 = false round3 = false round4 = false } }
Both formats are allowed, or even a mix of them in the same file. It is up to each user's preferences.
Update your scripts
If your scripts relied on setting to config for changing the fees or the automine settings on runtime, that will no longer work. Instead, you should use the new commands/endpoints described in the Template:Section link section.
Example to enable automine round 4:
- Command:
setautomine 4 true
- HTTP API:
PUT <host>:<port>/api/config/automine with body: '{"round1":"false","round2":"false","round3":"false","round4": "true"}'
Example to set max fee:
- Command:
setmaxfee 3000
- HTTP API:
PUT <host>:<port>/api/config/btc-fee with body: '{"maxFee":"3000","feePerKB":"10000"}'
These calls will not alter the contents of your configuration file, only the runtime values. This way, each setting is more clearly handled on runtime and we're leaving more clarity on which settings had no runtime edit support.