[Update] Week #46 2019 - signalling, chain generator, sync

This is an update on what I’ve been working in the past ~2 weeks.

Added protocol activated by miner signalling to HTTP /status endpoint

Implementation: PR #2982

After the new protocol is activated by miner signalling, this protocol should be returned by the HTTP /status endpoint along with the height at which it became effective.

Chain generator

Related issue: Issue #2963

This is an internal tool used for load tests. It’s possible to specify how many and what transactions are sent to a node during a predefined time interval and retrieve some statistics at the end of the test. This tool was modified so that it can also be used for chain generation and measuring how long it takes to sync the generated chain with a node started with an empty database. Right now, only spend transactions are supported.

Sync improvements

Related issues: Issue #2963, Issue #2167

There has been some work done on making the sync faster. We identified that some operations such as block and transaction validations (especially signature verification) are expensive. There is one erlang process - conductor - which controls addition of new blocks into the chain. On the other side there are multiple erlang processes (one per each peer connection) that receive blocks during the sync. Some validations done in the conductor can be moved into those peer connection processes. It would offload the conductor process making it handle more requests to add a new block and at the same time the validations can be done in parallel in the peer connection processes. This is still work in progress and a PR should be coming the next week.