Today is the one year anniversary of the Counterparty project! We’ll write about that in a separate post today, but first it’s time for our usual weekly development update.
counterpartyd v9.49.3
The new version of counterpartyd published this week contains a lot of code improvements and bug fixes. The biggest change is the improved logging system and allowing for providing public keys manually through the API and CLI.
Here’s a list of all API changes:
- PubkeyHashes may everywhere be replaced by pubkeys (or the latter may be provided either as a string or a list via the optional pubkey parameter).
- The API Status Poller now starts correctly.
- The API will no longer search the local wallet for pubkeys, so they must be passed to the API manually if being used for the first time. Otherwise, you may get a “
not published in blockchain” error.
More about this release can be found in our Release Document.
counterblockd v1.0.0
Currently undergoing final testing, there were a lot of changes implemented in counterblockd this week which has been completely reorganized, with many improvements. counterblockd now allows developers to write custom plugins for it, which are loaded dynamically and allows them to extend counterblockd with new parsing functionality, write gateways to other currencies or services, and much more. For more information on this, see the Modules document. (We will have open source, real-world examples of this in use, soon.)
Due to this change, counterblockd can now be seen as a separate and full-fledged component of the Counterparty software lineup, instead of what it was largely before (a software product that provided advanced functionality that Counterwallet required, but not much else). As such, it will be receiving its own version number, independent from Counterwallet.
We will be completing our final testing of this new version of counterblockd in the upcoming days, and promoting it to master.
Migrating to New Wiki
As announced in our community update post, we have shut down the old Counterparty Wiki (https://wiki.counterparty.io) and moved all of its content to the new Wiki hosted at GitHub in order to consolidate documentation for greater ease of use. As with the old wiki, everyone (with a GitHub account) is welcomed to contribute to the development of new content or updating of existing content. Please note that some links on the sidebar, such as the Technology and Developers Guide, link to the OfficialWiki repository restricted to Counterparty team members. The rest of the content is hosted on the CommunityWiki repository and is open to public contribution.
Announcing the Removal of Ubuntu 12.04 and 13.10 Support
On February 28th, we will remove the support for old versions of Ubuntu from the code. Versions 12.04 and 13.10 have been a challenge to support from the very beginning, and since Ubuntu 14.04 is the new official LTS release we decided not to provide support for old versions anymore.
We are giving everyone enough time to prepare for the switch (2 months time) and will be making additional announcements before we remove the code on February 28th. However, please don’t wait till the last minute. If you’re using Ubuntu 12.04 or 13.10 best thing to do would be to upgrade to 14.04 immediately and avoid any issues when the support for older versions is removed.
Ruby Gem For Communicating With Counterparty API server
Chris Derose, Counterparty Foundation community director, made a Ruby gem and enabled everyone to use Counterparty in their ruby and/or ruby on rails app.
The gem is hosted on GitHub and open for everyone to use. It is designed to abstract communications with the counterpartyd api server in an ActiveRecord-esque object model.
Chris also listed some examples to help you get started, while the documentation on the objects is available via counterparty_ruby’s rubydoc and the Counterparty official API guide.
Changes and Fixes Across Our Repositories
Once again, our developers have made significant progress in terms of code refactoring, unit testing and bug stomping. Let’s look at the most important changes implemented this week across all our repositories.
counterpartyd
- Implemented accepting multisig addresses that are lists of public keys (instead of pubkeyhashes) for both source and destination (#570).
- Implemented asking for pubkey in CLI only if not in wallet and not in blockchain (by search) since users don’t know if their addresses have been used before
- Implemented Sanity Checking on Public Keys
- Abstracted away sanity check
- Placed check in CLI and API
- Implemented better abstraction in API’s Compose Function
- Extract pubkeys from address and convert address to pubkeyhash‐form
separately.
- Extract pubkeys from address and convert address to pubkeyhash‐form
- Fixed bug in
cli()
:address_name
->address
- Moved Functions Requiring Proxy to
backend.py
- Updated API Docs about PubkeyHash->Pubkey Option and v9.49.3 changes
- Implemented better abstraction in CLI
get_pubkey()
- Updated docstring documentation for testing suite
- Implemented using SQL SUM instead Python sum() to calculate XCP supply
- Implemented better cache for unconfirmed_transaction(): Removed query by batch and added preparing cache for each transaction during the mempool initialization in blocks.py. The cache is really effective after the mempool is initialised in blocks.follow()
- Put
rpcthreads=1000
rpctimeout=300
in README - Added a missing
import
statement in counterparty-cli - Fixed logging for counterparty-cli
- Removed extraneous
--force
option in counterparty-cli - Implemented version check before adding blocks to the database (#586)
- Moved version check from API Status Poller to two places in
blocks.follow()
. - Moved version check on startup to
reparse()
. - Removed old backwards‐compatibility code from
check.version
. - Moved logging of version check and forced skipping of version check to
inside version check function. - Have logger handle logging of failed version check.
- Listed correct reason for protocol change in version check exception.
- Moved version check from API Status Poller to two places in
Counterwallet
- Implemented manually providing pubkeys for multisig addresses
- In ‘Create multisig address’ dialog box, there is now one field for each address that composes the multisig address. For each field, when an address is entered, CW searches the pubkey in the wallet and in the blockchain. If CW can not find the pubkey, a new field appears and users have to manually provide it.
- In ‘Send’ dialog box, when the destination is a multisig address, CW searches the pubkeys in the wallet and in the blockchain. If CW can not find them, a new field appears for each missing pubkey.
- Fixed signature issue for multisig transaction
- Fixed sweeping issue (in case of timeouts, wait 1 min and retry)
- Added removal of the last normal address from Counterwallet
- Removed BTC Pay notification (#623)
- Replaced counterpartyd
get_asset_info()
with counterblockdget_assets_info()
counterblockd
Beyond the code reorganization itself, here’s a list of all changes:
- Increased JSON API request timeout to 120 seconds
- Implemented support for new order_match id format
- Implemented always trying/retrying for RPC calls
- Removed Callback and RPS
- Modularized Counterblockd functionality & plugin interface for third-party modules
- Optimized blockfeeds.py
- Fixed the difference of one satoshi between BTC balances returned by counterpartyd and counterblockd
- Implemented an alternative for counterpartyd api get_asset_info() method to speed up the login in counterwallet for wallet with a lot of assets
- Updated versions of deps (fixes issue with fetching SSL urls)
- Fixed the issue with passing JSON data in POST requests
- Added rollback command line argument and RollbackProcessor
counterpartyd_build
- Clarified use of sudo sv start counterpartyd
- Updated mongo to current
- Fixed issues with Federated Note setup script
That covers our development updates for this week. If you have any questions regarding recent or upcoming changes you can contact us via our support channel, forum or github.