After a month of refactoring, testing and code reorganization, we’ve released new versions of counterparty-lib
v.9.49.4 and counterparty-cli
v.1.0.0. (previously referred to as counterpartyd
), accompanied with new versions of counterblock
v1.1.0 and federatednode_build
v1.1.0 (previously called counterpartyd_build
). These upgrades are non-mandatory and contain no protocol changes.
counterparty-lib
has been completely re-architectured, making v9.49.4 a major upgrade (although non-mandatory). counterparty-lib
is now a ‘pure’ Python library and a PyPi package, with no wallet functionality or command-line interface. The command-line interface has been abstracted into a separate package called counterparty-cli
which today received its first version release v1.0.0. Wallet functionalities are still being developed under counterparty-gui
and will become available soon. counterblock
has been updated to work with the new architecture of counterparty 9.49.4
The purpose of this reorganization was to separate responsibilities, improve the dependency management and simplify the installation process. In addition, these changes make it easier to run counterparty server and client on a variety of operating systems.
Although we’ve tried to make the upgrade procedure as smooth as possible, there might be some edge cases we haven’t been able to test which may result in some upgrades from previous versions to be accompanied with temporary issues. Should you run into any problems while migrating from earlier releases, please contact us at Gitter/Technical, Skype/Developers or open a support ticket at support.counterparty.io.
Also note that, because this new version includes no changes to the core protocol, upgrades may proceed at a relatively leisurely pace.
Below we list all of the changes implemented in the new release, together with new component architecture and upgrade instructions.
Implementation Changes
- Re-architected counterpartyd as a library
- Moved CLI to new repository: counterparty-cli
- Removed all signing and broadcast functionality
- Signing functionality has been moved to CLI. Before v9.49.4, the counterpartyd API provided an interface to Bitcoin Core’s signing functionality through the
do_*
,sign_tx
andbroadcast_tx
methods, which have all since been removed. - The process of making a transaction, from start to finish, depends somewhat on the wallet software used. Examples of how one might use a wallet to sign and broadcast an unsigned Counterparty transaction can be found here
- Signing functionality has been moved to CLI. Before v9.49.4, the counterpartyd API provided an interface to Bitcoin Core’s signing functionality through the
- Created
setup.py
build script - Returned to using
requests
for handling connections to backend - Introduced global variable
CURRENT_BLOCK_INDEX
- Prepared version check for repository rename to
counterparty-lib
- Improved test coverage
- Misc. bug fixes
- Removed option of using
Insight
,Blockr
andSoChain
as a backend - Added option of using
btcd
as a backend - Moved API docs to Counterparty Documentation
Interface Changes
- Renamed configuration parameters:
jmcorgan -> addrindex, BACKEND_RPC_* -> BACKEND_*,BLOCKCHAIN_SERVICE_NAME -> BACKEND_NAME
. counterpartyd.py server
has been changed tocounterparty-server start
(CLI)- Paths to all configuration files, database files and log files have been changed. Their default locations are displayed when counterparty-server is run with
--verbose
. - Removed signing and broadcast functionality from API (
do_*
,sign_tx
,broadcast_tx
calls). The API documentation contains a guide to wallet integration.
Installation Procedure
counterparty-lib
can now be installed by running $ pip3 install counterparty-lib
, and counterparty-cli
by running $ pip3 install counterparty-cli
.
Upgrade Procedure
- The migration of the configuration files and database files to their new paths is handled automatically by the setup script:
python3 setup.py install
. - The names of some configuration parameters have changed (see above).
- If you were using Insight, SoChain or Blockr for block explorer functionality, you must now switch to using a Patched Bitcoin Core or btcd as the backend.
- Federated node users can upgrade by following these steps:
- BACKUP all data, and do a complete rebuild
BRANCH=develop 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.
- Full installation instructions can be found here.
- BACKUP all data, and do a complete rebuild
Additional Information
Individual documentation for these components can be found on cointerparty.io/doc:
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.