top of page

Counterparty Update, Feb 13: New Newsletter Format, New Tutorials, Dev Updates & More

This week we decided to try out a different newsletter format and combine our community and development updates into a comprehensive weekly blog post. Instead of publishing two posts per week, we’ll share all relevant Counterparty news in a single update - every Friday.

From the Team

Once again, our team has been working hard on developing new tutorials, updating existing documentation and resolving emerging issues with new product versions. We have several new Counterwallet tutorials listed on our site, with more to come:

As announced in the last community update, we’re in the process of migrating our forum to Discourse. Current forum will remain available during the migration and all posts and comments submitted will be migrated to the new platform.

Finally, we’d like to address what seems to be a common question among the community lately: What are our main goals for the following months? After reviewing the current situation in the Counterparty community and the Bitcoin ecosystem, on the last board meeting, the Counterparty Foundation Directors decided on the following goals to be fulfilled in the next six months:

  1. Finish the development of Smart Contracts, prepare for the official launch on mainnet, and drive global awareness.

  2. Finish the development of the desktop wallet.

  3. Pursue mobile wallet integration.

  4. Work with exchanges on XCP integration.

  5. Start preparing Counterparty events and educational courses.

As we stated previously, we are marching confidently forward with big plans and a clear vision: to make Counterparty the best, most secure and most advanced platform for smart contracts on the Bitcoin blockchain, and we continue to work hard every day on fulfilling that vision.

Development Updates

With the recent changes in our codebase and the complete reorganization of our components, we’ve made a significant step forward in making Counterparty the standard framework for developing Bitcoin 2.0 applications. Today we have a clear distinction between block explorer and wallet dependencies, as well as a clear distinction between applications and the library. Developers can now easily build an alternative CLI or GUI just by using counterparty-lib as an ordinary Python library. In addition, the development of  light wallets will now be much easier, enabling the use of a distant block explorer and a local light wallet.

Moving forward, our focus will remain on thorough testing and quality assurance, making sure all emerging issues are adequately and timely addressed, and that the documentation is updated with new information and useful examples.

Once again, to monitor our daily progress watch our GitHub repositories:

  1. counterparty-lib – Reference implementation of the Counterparty protocol

  2. counterparty-cli – Command-line interface for counterparty-lib

  3. counterparty-gui – Counterparty GUI (OS X and Windows)

  4. Counterwallet – Web wallet

  5. counterblock – Provides extended API services to Counterwallet, as well as Counterparty 3rd-party applications

  6. federatednode_build – Federated Node Build System

When it comes to changes implemented this week, here is a list of the most relevant ones:

federatednode_build

This week we released a new v1.1.0 version of the Federated Node build system (previously called counterpartyd_build), with major updates to the build system, to coincide with the structural changes made to counterpartyd (now counterparty-lib and counterparty-cli) and counterblockd (now counterblock)

  1. Revamped and refactored build system: Build system is for federated node only, given that counterparty and counterblock both have their own setuptools setup.py files now.

  2. Renamed repo from counterparty_build to federatednode_build

  3. Removed Windows and Ubuntu 12.04/13.10 support.

  4. Service name changes: counterpartyd service changed to counterparty, counterblockd service changed to counterblock. bitcoind service changed to bitcoin

  5. Bitcoin-testnet data-dir location changed: moved from ~xcp/.bitcoin-testnet to ~xcp/.bitcoin/testnet3

  6. All configuration file locations changed:

  7. counterparty: From ~xcp/.config/counterpartyd/counterparty.conf to ~xcp/.config/counterparty/server.conf

  8. counterparty-testnet: From ~xcp/.config/counterpartyd-testnet/counterpartyd.conf to ~xcp/.config/counterparty/server-testnet.conf

  9. counterblock: From ~xcp/.config/counterblockd/counterblockd.conf to ~xcp/.config/counterblock/server.conf

  10. counterblock-testnet: From ~xcp/.config/counterblockd-testnet/counterblockd.conf to ~xcp/.config/counterblock/server-testnet.conf

  11. Log and data directories changed as well (please see counterparty and counterblock release notes for more information, as well as the federated node document’s troubleshooting section for the new paths with federated nodes).

  12. Updated the setup guide for federated nodes for new paths, service names, and more, located at: https://counterparty.io/docs/federated_node/

When updating to this new version, please BACKUP all data, and do a complete rebuild.

BRANCH=master
wget -q -O /tmp/fednode_run.py https://raw.github.com/CounterpartyXCP/federatednode_build/${BRANCH}/run.py
sudo python3 /tmp/fednode_run.py

When prompted, choose rebuild (‘r’), and then answer the other questions as appropriate. This rebuild should not delete your existing data, but does automatically build out everything for the new configuration files and paths.

counterparty-cli

  1. Implemented refactoring measures to make counterparty-cli usable by counterparty-gui

  2. Refactored messages commands - Introduced counterpartycli.messages module, continued preparation for counterparty-gui.

  3. Added getrows command

  4. Examples:

counterparty-client --unconfirmed --testnet getrows --table balances --filter 'address' '=' 'muQjaj46wghHprjSjpgU7D55JxKyK5dJtZ' 
counterparty-client --unconfirmed --testnet getrows --table balances --filter 'address' '=' 'muQjaj46wghHprjSjpgU7D55JxKyK5dJtZ' --filter 'asset' '=' 'UTXO'
  1. Removed market command

  2. Currently there are three categories of commands: commands to compose transactions, commands to get data related to addresses in the wallet (wallet, balances, pending etc..), commands to get arbitrary data (getrows)

  3. The market command is a mix of the second and the third category which displays a lot of information of little or no use. For this reason the market command has been removed. Open orders, open bets and feeds can now be accessed with the getrows commands:

  4. open orders:

counterparty-client getrows --table orders --filter status = open --filter give_asset = XCP
  1. open bets:

counterparty-client getrows --table bets --filter status = open
  1. feeds:

counterparty-client getrows --table broadcasts --filter status = valid --order-by=timestamp --order-dir=DESC
  1. Introduced the clientapi module - Unified function to call Wallet and Counterparty API methods. Should be used by applications like counterparty-gui

import counterpartycli.clientapiclientapi.initialize(...)unsigned_hex = clientapi.call('create_send', {...})signed_hex =  clientapi.call('sign_raw_transaction', unsigned_hex)tx_hash = clientapi.call('send_raw_transaction', signed_hex)
  1. Specified minimum version for requests

counterparty-lib

  1. Cleaned-up API

  2. removed get_asset_info(assets)

  3. replaced get_xcp_supply() with get_supply(asset)

  4. Removed version number in setup.py

  5. Removed major version for the database file name

  6. Moved protocol_changes.json to countepartylib folder

  7. Added support of BTCD for the backend

  8. Added tests for database version checking

  9. Refactored database version checking

Bitcoin Core with addrindex patch v0.10.0

Another important development update this week is the new version of Bitcoin Core with addrindex patch - v0.10.0. The release has been tagged as stable and it is recommended for everyone running the patched version to upgrade to this new release. Downloads are available here.

Support Updates

Here are some news and common issues and workarounds:

  1. counterparty-lib (stand-alone install via pip3)

  2. 3rd party package requirement issues: in case of problems with outdated packages, use pip3 to upgrade them manually or install from develop branch as per this workaround.

  3. Users of stand-alone counterpartyd 9.49.<1-3> considering an upgrade to counterparty-lib 9.49.4 can check out this post (or, once the forums have been migrated, you can search the forums for “counterparty-lib cheat sheet”) for a single-page overview of main configuration and other files.

  4. Federated Node Build System

  5. counterparty-client configuration file(s) is/are missing. This is a known issue (see here) and a quick workaround is to create client.conf (and/or client.testnet.conf) after Federated Node install has completed. To do that, create the file in the default location (same as server.conf) and give it the same permissions and ownership (chmod, chown) as for other files in that directory

  6. On Federated Node 1.1.0, counterparty-lib and counterparty-cli are not visible in pip3 list output, but it is not necessary to install them manually. Apart from the missing client configuration file (above), everything else is installed by the Federated Node Build script.

  7. One of noteworthy changes in Federated Node v1.1.0 (release notes can be found here) is that build time has been somewhat shortened because Bitcoin Core is installed from a deterministically built binary package (see run.py). Federated Node users interested in security and other aspects of the deterministic build process used for these binaries can read more about it here: https://github.com/devrandom/gitian-builder.

That concludes our update for this week. If you have any questions regarding recent or upcoming changes you can contact us via our support channel, gitter, forum or github.

Don’t forget to follow us on social media and subscribe to our newsletter to receive weekly updates via email.

Comments


bottom of page