Release 0.18.1
This patch release fixes bugs in synchronizer that resulted in some nodes attempting to sync to hit a stackoverflow error. In addition, we also add some optimizations to the thread pool management and to the /status
query.
Optimizations and Additions:
Adds genesisBlocks entry to the
/status
checklist which signals an error if there are multiple ones and also extends it with a checklist which has some yes/no flags about conditions we can check any time for anomalies. This is a quick way for a validator to ascertain the health of the node.# Example query $ curl -s http://localhost:40403/status | jq { "version": "CasperLabs node 0.17.0 (86d8dd96f978a26a684d24522f52177fa7f5c0c2)", "ok": true, "checklist": { "database": { "ok": true, "message": null, "details": null }, "peers": { "ok": true, "message": "Standalone mode, connected to 2 peers.", "details": { "count": 2 } }, "bootstrap": { "ok": true, "message": "No bootstraps configured.", "details": { "count": 0 } }, "initialSynchronization": { "ok": true, "message": "Initial synchronization complete.", "details": null }, "lastFinalizedBlock": { "ok": true, "message": "The last finalized block was moved not too long ago.", "details": { "blockHash": "7a2db9b4583b876889a5c98502edf97e9db6a423ac38da97d76b772343cc054f", "timestamp": "2020-03-31T17:14:25.585Z", "jRank": 11 } }, "lastReceivedBlock": { "ok": true, "message": "Received a block not too long ago.", "details": null }, "lastCreatedBlock": { "ok": true, "message": "Created a block not too long ago.", "details": null }, "activeEras": { "ok": true, "message": null, "details": { "eras": [ { "keyBlockHash": "7d160b93cf9ffdc68046379c2fb056165d36fd5961519c379a3d8aa1c1ba1e24", "startTimestamp": "2020-03-31T17:12:47.265Z", "endTimestamp": "2020-03-31T17:22:47.265Z" } ] } }, "bondedEras": { "ok": true, "message": "Bonded in 1 active eras.", "details": { "eras": [ { "keyBlockHash": "7d160b93cf9ffdc68046379c2fb056165d36fd5961519c379a3d8aa1c1ba1e24", "startTimestamp": "2020-03-31T17:12:47.265Z", "endTimestamp": "2020-03-31T17:22:47.265Z" } ] } }, "genesisEra": { "ok": true, "message": null, "details": { "eras": [ { "keyBlockHash": "7d160b93cf9ffdc68046379c2fb056165d36fd5961519c379a3d8aa1c1ba1e24", "startTimestamp": "2020-03-31T17:12:47.265Z", "endTimestamp": "2020-03-31T17:22:47.265Z" } ] } } } }
Added a method to
DeployBuffer
that counts the number of deploys in each state, so that we don't have to retrieve the hashes and check the lengthDisplays the new
message_role
field on CLarity so that it's easier to tell what kind of ballot we are looking at.Separate DB thread pools: It was observed that in some cases the thread pool dedicated for awaiting database connections got full. It's not clear whether it's the
read
or thewrite
connection that gets contested so the two have been separated and made individually configurable. Also made the so-far hardcoded reader pool size configurable.
Fixes:
- Fix for stakeoverflow error by Rewrite recursion to use
tailrec
elimination
- Fix for situations wherein some validators were observed to not have cleared their state before joining the new chain, causing the others to repeatedly try and fail to sync with their multiple genesis blocks.
- Raised the
write timeout
to 60s to ensure that it does not fail writes, and named the pools, so that would show up in the message.
StashingSynchronizer
to free the stash and filter: It was noticed in VisualVM that the stash of theStashingSynchronizer
is not freed after the requests are replayed. This release also changes the way requests are replayed from parallel to sequential and also adds a filtering mechanism so that during the time of the initial synchronization only the targets that we still do not have are sent to the sources.