We’ve just released btcd version 0.11.0 beta! This release contains quite a few enhancements and is a required update.
In addition to announcing the new release, the purpose of this blog is to discuss a few points of the release in more detail. For those of you who are simply looking for the release notes and updated Windows binaries, they are located here.
While it certainly doesn’t cover everything in the release, the main topics this blog will cover are:
- Required update
- Transaction malleability reduction (BIP0062)
- Support for a limited RPC user
- Enhanced peer control
- Upcoming changes
As part of this release, we have performed a thorough audit of the script engine to find any conditions which could potentially be used by malicious actors to fork the network. The results of the audit discovered some cases in which non-standard transactions could have been used to cause btcd to fork. Therefore, an update is required to pick up the fixes in this release.
On the positive side, there are several benefits that came from this work as well:
- The proactive nature of the work means the issues have been fixed before any forks happened
- We discovered an error in relation to minimal data encoding requirements in the Bitcoin Core tests which could have potentially led to unintended consequences in the future (#6074)
- We identified several branch conditions that the Bitcoin Core script and transaction testing data was not exercising and submitted tests upstream to improve the test quality for the entire Bitcoin ecosystem (#6075, #6112)
- The script engine has been optimized and made easier to follow and compare behavior
Transaction Malleability Reduction (BIP0062)
This release implements the remaining rules for BIP0062 which are aimed at reducing transaction malleability. This means that, as of version 0.11.0, btcd is fully compliant with BIP0062 and will not allow non-conforming transactions into the transaction memory pool nor relay them.
RPC Server Support for Limited User
The RPC server now provides the ‘rpclimituser‘ and ‘rpclimitpass‘ options which can be used to enable a limited user who is not allowed to perform admin-specific RPCs. This means organizations which are using websockets for their chain services and/or load balancing across multiple btcd and btcwallet instances can access the data they require without needing to provide credentials which could be used maliciously.
Enhanced Peer Control
A new RPC command named ‘node‘ has been added which allows greater peer control for the admin RPC user. For example, using the standard Bitcoin Core RPCs with which btcd is compatible, it was not possible to disconnect non-persistent nodes and required different calls for managing them. The new ‘node‘ command provides the ability to add, connect, disconnect, and remove all peers regardless of them being persistent or not. It is also a unified command versus the legacy commands which are split out.
The main goals for the next major release of btcd are:
- Large infrastructure changes related to the database and spend tracking which will offer significant speed optimizations
We have been keeping a close eye on the performance characteristics of btcd and noticed some areas, particularly in regards to the database, that aren’t scaling as well as we would like. Our goal is to eliminate these bottlenecks.
- Add support for concurrent syncing
Currently, all initial block syncing makes use of a single peer. This can lead to wild variance in sync time when the selected sync peer is stalled and/or slow. By making use of multiple peers, the initial sync time can be significantly reduced and other issues related to only having a single sync peer will be eliminated.
- Improvements to headers-first syncing
While btcd has already supported headers-first syncing since version 0.5.0-alpha, it currently only uses that mode up until the final checkpoint. Our goal for the next version is to extend this capability beyond the final checkpoint.
Also, there has been a lot of significant work going on with btcwallet.