Skip to content

Releases: CounterpartyXCP/counterparty-core

v11.0.3

27 Oct 08:10
c580587

Choose a tag to compare

Release Notes - Counterparty Core v11.0.3 (2025-10-27)

This is a minor release that addresses three bugs in Counterparty Core: one in the caching of issuance transactions which can lead to mismatches in consensus hashes across nodes, and two bugs in the API (including another one also related to caching). All users should upgrade as soon as possible.

Upgrading

Upgrade Instructions:

To upgrade, download the latest version of counterparty-core and restart counterparty-server. An reparse to block 911,955 to correct the transaction cache will occur automatically.

With Docker Compose:

cd counterparty-core
git pull
docker compose stop counterparty-core
docker compose --profile mainnet up -d

or use ctrl-c to interrupt the server:

cd counterparty-core
git pull
cd counterparty-rs
pip install -e .
cd ../counterparty-core
pip install -e .
counterparty-server start

ChangeLog

Bugfixes

  • Fix get events by addresses endpoint
  • Exclude /v2/addresses/mempool from cache
  • Don't cache invalid issuances

Codebase

API

CLI

Credits

  • Ouziel Slama
  • Adam Krellenstein

v11.0.2

28 Aug 07:30
2edbf1a

Choose a tag to compare

Release Notes - Counterparty Core v11.0.2 (2025-08-28)

This version is a small-ish release. Most importantly, it fixed a regression in transaction handling where empty descriptions could be incorrectly encoded into issuance transactions of various types (including locking, e.g.) and addressed a bug whereby using the verbose=true parameter could cause the node API to hang. This version also introduces a transaction validity flag and new API filters, improving clarity and queryability; it (finally) adds Bitcoin Core cookie authentication (which is now the recommended method) and updates the official Docker image to use Alpine rather than Ubuntu, which reduces the image size from 1.1 GB to 126 MB.

Upgrading

NOTE: A full database rebuild is required iff you would like to use the new valid parameter to retrieve transactions with the API. Existing databases will show valid=null for historical transactions until re-parsed.

NOTE: There was another accidental regression in v11.01: API booleans divisible, locked, reset, and callable have been returning integers instead of proper JSON booleans (true/false). This regression has been reverted in v11.0.2.

Upgrade Instructions:

To upgrade, download the latest version of counterparty-core and restart counterparty-server.

With Docker Compose:

cd counterparty-core
git pull
docker compose stop counterparty-core
docker compose --profile mainnet up -d

or use ctrl-c to interrupt the server:

cd counterparty-core
git pull
cd counterparty-rs
pip install -e .
cd ../counterparty-core
pip install -e .
counterparty-server start

ChangeLog

Bugfixes

  • Fix regression in issuance handling where empty descriptions could be incorrectly encoded
  • Fix mime_type field in assets_info table
  • Fix API issue when unpacking old transactions
  • Fix a typo in `docker-compose.yml
  • Fix give/get_price in orders API
  • Fix bootstrap: exit with error when a subprocess fails
  • Fix UTXOBalancesCache initialization: restore also invalid attach
  • Remove unnecessary logger.error calls from Enhanced Send unpacking
  • Disable Taproot encoding for legacy sources

Codebase

  • Add current_commit tag in Sentry reports and JSON logs
  • Add transactions_status table filled by the parse() functions of each contract
  • Update the testnet4, signet and mainnet checkpoints

API

  • Fix boolean fields in issuances API
  • Add current_commit field in API root endpoint
  • Add valid parameter for transactions endpoints
  • Optimize the Get Balances by Addresses endpoint

CLI

  • Use Alpine Linux instead of Ubuntu for Docker image and employ a multi-stage build
  • Throw a cleaner error on an unknown CLI argument
  • Report when Bitcoin Core has not yet reached the first Counterparty block
  • Add --backend-cookie-file flag to connect to Bitcoin Core with cookie (recommended)
  • Improve bootstrap and subprocess error handling

Credits

  • Ouziel Slama
  • Adam Krellenstein

v11.0.1

11 Jun 19:47
26b8473

Choose a tag to compare

Release Notes - Counterparty Core v11.0.1 (2025-06-11)

This release is a patch on the v11.0.0 protocol upgrade with the same activation block (902,000). It allows for backwards-compatibility in the transaction encoding format so that CBOR is no longer required for transaction data packing. It also adds support for Bitcoin signet and fixes a few bugs---including one critical bug in the new issuance decoding logic.

NOTE: If a CBOR transaction is incorrectly constructed so that it is invalid, it will be parsed automatically with the original transaction decoding logic, which may lead to unpredictable results.

Upgrading

Upgrade Instructions:

This release is a protocol upgrade. All nodes must upgrade by block 902000.

To upgrade, download the latest version of counterparty-core and restart counterparty-server.

With Docker Compose:

cd counterparty-core
git pull
docker compose stop counterparty-core
docker compose --profile mainnet up -d

or use ctrl-c to interrupt the server:

cd counterparty-core
git pull
cd counterparty-rs
pip install -e .
cd ../counterparty-core
pip install -e .
counterparty-server start

ChangeLog

Protocol

  • Add backward-compatibility to CBOR format (Enhanced Send, Sweep, Fairminter, Fairmint, Issuance and Broadcast)

Bugfixes

  • No Taproot encoding for legacy inputs
  • Handle unpack error for issuances correctly

Codebase

  • Add signet Support

API

CLI

Credits

  • Ouziel Slama
  • Adam Krellenstein

v11.0.0

27 May 14:11
cfe5baf

Choose a tag to compare

Release Notes - Counterparty Core v11.0.0 (2025-05-27)

Counterparty Core v11.0.0 is a large release with numerous protocol upgrades and many miscellaneous improvements to the API, CLI and codebase, including significantly increased test coverage.

Protocol Upgrades:

  • Fix Bech32 address handling—now support P2WSH and P2TR
  • Support for Taproot envelope data encoding, which will significantly reduce transaction fees for larger transactions (and removal of support for P2SH data encoding, which is strictly worse than Taproot)
  • Support for Ordinals Inscription creation when composing an Issuance, Fairminter or Broadcast (API parameters: inscription, mime_type)
  • Allow soft_cap to be equal to hard_cap with Fairminters
  • Add max_mint_per_address parameter to Fairminters (API parameter: max_mint_per_address)

Upgrading

This release is a protocol upgrade. All nodes must upgrade by block 902000.

Upgrade Instructions:
To upgrade, download the latest version of counterparty-core and restart counterparty-server.

With Docker Compose:

cd counterparty-core
git pull
docker compose stop counterparty-core
docker compose --profile mainnet up -d

or use ctrl-c to interrupt the server:

cd counterparty-core
git pull
cd counterparty-rs
pip install -e .
cd ../counterparty-core
pip install -e .
counterparty-server start

ChangeLog

Protocol

  • Fix Bech32 address support
  • Use CBOR encoding format for Sweep, Enhanced Send, Fairminter, Fairmint, Issuance and Broadcast
  • Allow soft_cap to be equal to hard_cap with Fairminters
  • Add max_mint_per_address parameter to Fairminters
  • Ensure Fairminter hard cap is a multiple of the lot size
  • Use asset ID instead of asset name in Fairminter and Fairmint messages
  • Add Taproot envelope data encoding support (disabled for transactions with a destination output and detach)
  • Add support for Taproot change address
  • Remove P2SH data encoding support
  • Use an envelope script compatible with Ordinals when the description/text of a Fairminter, Issuance or Broadcast is not empty

Bugfixes

  • Fix API verbose flag when unpacking fails
  • Fix API verbose flag for the Get Transactions endpoints
  • Handle DatabaseError correctly in API calls
  • Fix is_cachable() function in API v2
  • Fix ledger_state field in API root endpoint
  • Disable Taproot addresses for MPMA sends and dispenser oracles
  • Fix composer for Taproot addresses
  • Fix script_to_address function's handling of taproot addresses
  • Fix testnet4 bootstrap with custom URL
  • Fix address.pack and address.unpack functions' handling of Taproot addresses
  • Make APSWConnectionPool thread-safe
  • Fix typo in composer parameters: mutlisig_pubkey -> multisig_pubkey
  • Fix price_normalized in Fairminters endpoints
  • Fix event name: BET_MATCH_RESOLUTON -> BET_MATCH_RESOLUTION
  • Fix is_segwit value in get_vin_info
  • Fix apsw.IOError when using --rebuild-state-db flag
  • Fix round error in inputs values when composing transaction
  • Fix Fairminter validation
  • Fix SIGHASH collecting
  • Fix create dispenser using subasset name

Codebase

  • Improve test coverage by 10% (from ~78% to ~88%)
  • Clean up hard-coded protocol changes throughout codebase
  • Optimize APSWConnectionPool
  • Add mime_type to issuances, fairminters and broadcasts tables

API

  • When using an Ordinals envelope script, add a dust output for the source address
  • Add asset as an optional parameter to the Get Balances by Addresses endpoint
  • The encoding parameter now accepts a taproot value
  • Ensure that Fairminter's start_block and end_block are greater than the current block
  • In Compose Fairminter, rename price -> lot_price and quantity_by_price -> lot_size
  • In Compose Fairmint, ensure that quantity is a multiple of lot_size
  • Ensure that Fairminter's hard_cap is greater than the sum of premint_quantity and soft_cap
  • POST URL-encoded parameters are now accepted when composing a transaction
  • Add mime_type parameter to compose_issuance, compose_fairminter and compose_broadcast endpoints
  • Remove mandatory fields for broadcast: fee_fraction, value, timestamp
  • Add inscription parameter to the compose API
  • Add category field to functions and arguments in /v2/routes endpoint response

CLI

  • Add support for the SLACK_HOOK environment variable containing a webhook URL called after a rebuild
  • The --profile flag now generates a report every 15 minutes instead of just once at shutdown
  • Add URGENT log level displayed even with --quiet flag
  • Add --enable-all-protocol-changes flag for testing purposes
  • Remove mempoolfullrbf=1 from docker-compose.yml

Credits

  • Ouziel Slama
  • Adam Krellenstein

v11.0.0-beta.1

18 Apr 16:18
a926b9f

Choose a tag to compare

v11.0.0-beta.1 Pre-release
Pre-release

Release Notes - Counterparty Core v11.0.0 (2025-03-??)

Counterparty Core v11.0.0 is a large release with numerous protocol upgrades and many miscellaneous improvements to the API, CLI and codebase, including significantly increased test coverage.

Protocol Upgrades:

  • Fix Bech32 address handling—now support P2WSH and P2TR
  • Support for Taproot envelope data encoding, which will significantly reduce transaction fees for larger transactions (and removal of support for P2SH data encoding, which is strictly worse than Taproot)
  • Support for Ordinals Inscription creation when composing an Issuance, Fairminter or Broadcast (API parameters: inscription, mime_type)
  • Allow soft_cap to be equal to hard_cap with Fairminters
  • Add max_mint_per_address parameter to Fairminters (API parameter: max_mint_per_address)

Upgrading

This release is a protocol upgrade. All nodes must upgrade by block .

Upgrade Instructions:
To upgrade, download the latest version of counterparty-core and restart counterparty-server.

With Docker Compose:

cd counterparty-core
git pull
docker compose stop counterparty-core
docker compose --profile mainnet up -d

or use ctrl-c to interrupt the server:

cd counterparty-core
git pull
cd counterparty-rs
pip install -e .
cd ../counterparty-core
pip install -e .
counterparty-server start

ChangeLog

Protocol

  • Fix Bech32 address support
  • Use CBOR encoding format for Sweep, Enhanced Send, Fairminter, Fairmint, Issuance and Broadcast
  • Allow soft_cap to be equal to hard_cap with Fairminters
  • Add max_mint_per_address parameter to Fairminters
  • Ensure Fairminter hard cap is a multiple of the lot size
  • Use asset ID instead of asset name in Fairminter and Fairmint messages
  • Add Taproot envelope data encoding support
  • Remove P2SH data encoding support
  • Use an envelope script compatible with Ordinals when the description/text of a Fairminter, Issuance or Broadcast is not empty

Bugfixes

  • Fix API verbose flag when unpacking fails
  • Fix API verbose flag for the Get Transactions endpoints
  • Handle DatabaseError correctly in API calls
  • Fix is_cachable() function in API v2
  • Fix ledger_state field in API root endpoint
  • Disable Taproot addresses for MPMA sends and dispenser oracles
  • Fix composer for Taproot addresses
  • Fix script_to_address function's handling of taproot addresses
  • Fix testnet4 bootstrap with custom URL
  • Fix address.pack and address.unpack functions' handling of Taproot addresses
  • Make APSWConnectionPool thread-safe
  • Fix typo in composer parameters: mutlisig_pubkey -> multisig_pubkey
  • Fix price_normalized in Fairminters endpoints
  • Fix event name: BET_MATCH_RESOLUTON -> BET_MATCH_RESOLUTION
  • Fix is_segwit value in get_vin_info
  • Fix apsw.IOError when using --rebuild-state-db flag

Codebase

  • Improve test coverage by 10% (from ~78% to ~88%)
  • Update ledger-hash checkpoints using truncated addresses
  • Clean up hard-coded protocol changes throughout codebase
  • Optimize APSWConnectionPool
  • Add mime_type to issuances, fairminters and broadcasts tables

API

  • When using an Ordinals envelope script, add a dust output for the source address
  • Add asset as an optional parameter to the Get Balances by Addresses endpoint
  • The encoding parameter now accepts a taproot value
  • Ensure that Fairminter's start_block and end_block are greater than the current block
  • In Compose Fairminter, rename price -> lot_price and quantity_by_price -> lot_size
  • In Compose Fairmint, ensure that quantity is a multiple of lot_size
  • Ensure that Fairminter's hard_cap is greater than the sum of premint_quantity and soft_cap
  • POST URL-encoded parameters are now accepted when composing a transaction
  • Add mime_type parameter to compose_issuance, compose_fairminter and compose_broadcast endpoints
  • Remove mandatory fields for broadcast: fee_fraction, value, timestamp
  • Add inscription parameter to the compose API
  • Add category field to functions and arguments in /v2/routes endpoint response

CLI

  • Add support for the SLACK_HOOK environment variable containing a webhook URL called after a rebuild
  • The --profile flag now generates a report every 15 minutes instead of just once at shutdown
  • Add URGENT log level displayed even with --quiet flag
  • Add --enable-all-protocol-changes flag for testing purposes

Credits

  • Ouziel Slama
  • Adam Krellenstein

v10.10.1

03 Mar 17:27
18de91c

Choose a tag to compare

Release Notes - Counterparty Core v10.10.1 (2025-03-03)

This release includes two major improvements to the Counterparty Core codebase: (1) faster and more reliable node shutdown, (2) ~50% faster initial node catchup. It also includes a number of usability improvements to the API and CLI, as well as bugfixes.

Upgrading

Breaking Changes:
The commands get_asset_names and get_asset_longnames have been removed from API v1, as they are buggy and extremely non-performant. If you have been using these endpoints, you should migrate to /v2/assets.

Upgrade Instructions:
To upgrade, download the latest version of counterparty-core and restart counterparty-server.

With Docker Compose:

cd counterparty-core
git pull
docker compose stop counterparty-core
docker compose --profile mainnet up -d

or use ctrl-c to interrupt the server:

cd counterparty-core
git pull
cd counterparty-rs
pip install -e .
cd ../counterparty-core
pip install -e .
counterparty-server start

ChangeLog

Bugfixes

  • Handle subprocess errors correctly when bootstrapping
  • Fix getrawtransaction_batch() for batches greater than config.MAX_RPC_BATCH_SIZE
  • Improve error handling for when a port in use
  • Fix ungraceful ZeroMQ failure
  • Fix Conservation Check failing ungracefully
  • Implement cleaner Gunicorn shutdown
  • Fix ungraceful Waitress shutdown
  • Handle RSFetcher version mismatch error correctly
  • Handle Counterparty Server version checking errors correctly
  • Fix the handling of TypeError in API calls

Codebase

  • Tweak logging during Bitcoin Core catch up
  • Batch getrawtransaction for get_vin_info()
  • Create events indexes after catch up rather than before
  • Make RPC calls to get transaction input info with RSFetcher
  • Make RSFetcher compatible with HTTPS
  • Fix all code scanner alerts (Bandit, CodeQL, Pylint)
  • Only print debug messages about Counterparty being behind Bitcoin Core every 10 seconds
  • Add missing indexes to the sends table

API

  • Check balances when composing detach transaction
  • Add a show_unconfirmed parameter for Get Transactions endpoints
  • Add a count_confirmed parameter for Get Transactions Count endpoints
  • Add a X-LEDGER-STATE header to all API responses
  • Add a ledger_state field in API v2 root endpoint
  • Remove get_asset_names and get_asset_longnames commands from API v1

CLI

  • Accept --catch-up flag before the command
  • Add Locust runner to test local node performance (python3 counterpartycore/test/integration/locustrunner.py will start the Locust web UI on http://localhost:8089/)
  • Add --profile flag that enables cProfile during catchup and dumps results to the console when complete
  • Add --rebuild command to re-sync from scratch and then stop the server
  • Add memory database cache for address_events table

Credits

  • Ouziel Slama
  • Adam Krellenstein

v10.10.0

14 Feb 20:35
93e6550

Choose a tag to compare

Release Notes - Counterparty Core v10.10.0 (2025-02-14)

This release includes a complete rewrite of the entire test harness for Counterparty Core, as well as both restored and all-new integration tests and GitHub workflows for continuous integration. This release also adds support for Python 3.12 and 3.13, which means significantly improved performance overall. There are of course a number of bugfixes, especially for node stability when Bitcoin Core is overloaded.

Upgrading

This upgrade does not include a protocol change and is not mandatory. User-facing changes to the API include a decrease in the default output value for attach and move transactions to 546 satoshis and renaming the --testnet flag to --testnet3.

IMPORTANT

  • If you are running a version lower than 10.9.0, you must first update to 10.9.0 and only then install v10.10.0.

Download the latest version of counterparty-core and restart counterparty-server.

With Docker Compose:

cd counterparty-core
git pull
docker compose stop counterparty-core
docker compose --profile mainnet up -d

or use ctrl-c to interrupt the server:

cd counterparty-core
git pull
cd counterparty-rs
pip install -e .
cd ../counterpaty-core
pip install -e .
counterparty-server start

ChangeLog

Protocol Changes

Bugfixes

  • Don't retry RPC calls in safe_get_utxo_address()
  • Fix error handling in safe_rpc()
  • Raise ValueError instead of PanicException when an error occurs in Rust deserialization
  • Return 400 error on TypeError when composing a transaction
  • Fix bitcoind.search_pubkey_in_transactions()
  • Don't force the existence of a change output
  • Fix heavy HealthZ check
  • Fix search pubkey for SegWit addresses that have never been used
  • Fix Gunicorn shutdown
  • Use the same logfile for all Gunicorn processes
  • Fix duplicate log entries in the API Access file
  • Don't call getblockcount from each API thread or process
  • Reset all caches on rollback and reparse
  • Fix RSFetcher restart on failure
  • Fix the extended_tx_info param in API v1
  • Correctly handle RPC responses with simple strings or with string in error

Codebase

  • Completely rewrite the test suite. See comments in test/mocks/conftest.py.
  • Completely rewrite the GitHub Workflow files
  • Add support for Python 3.12 and 3.13
  • Rename testnet to testnet3 everywhere
  • Add testnet4 and regtest profiles to docker-compose.yaml
  • Restore Docker Compose, Compare Hashes and testnet4 Reparse tests
  • Refactor required actions for automatic upgrades

API

  • Change default value for attach and move to 546 satoshis
  • Add block_index filter for Get Order Matches endpoints
  • Add block_index filter for Get Dispenses by Asset endpoint
  • Add Get Dispense By Hash endpoint
  • Add owner field in assets info

CLI

  • Rename --testnet flag to --testnet3
  • Add testnet4 bootstrap database
  • Add --api-only flag

Credits

  • Ouziel Slama
  • Adam Krellenstein

v10.9.1

24 Jan 07:34
c655347

Choose a tag to compare

Release Notes - Counterparty Core v10.9.1 (2025-01-24)

This is a small release that includes numerous bug and stability fixes, as well as a major refactor of the codebase in the name of improving testability. In particular, there was a bug in the Bitcoin fee calculation algorithm released as part of v10.9.0 which causes detach and move transactions composed with the API to have a higher fee than they should.

Upgrading

This release is not a protocol change and upgrading is not mandatory, but it is highly recommended.

IMPORTANT:

  • If you are running a version lower than 10.9.0, you must first update to 10.9.0 and only then install v10.9.1.
  • If you are running a testnet4 node, you need to rollback to block 64492 manually before starting the server process

ChangeLog

Protocol Changes

Bugfixes

  • Fix ignored deprecated parameters in Compose API
  • Fix Get Mempool Events By Addresses endpoint for attach, detach and UTXO move
  • Retry ten times on telemetry request errors
  • Return "not implemented" error when trying to get info about RPS transactions
  • Fix typo in `protocol_changes.json' for testnet4
  • Fix incorrect fee calculation for detach and move
  • Don't retry to get vin info when parsing the mempool, which can cause nodes to lock up

Codebase

  • Remove all counterparty-wallet functionality
  • Split up the test vectors file
  • Move Python tests from counterparty-rs to counterparty-core
  • Reorganize files and functions; split too-big files; delete all unused functions
  • Remove globals in lib/util.py and ledger.py
  • Use yoyo migrations to update the database
  • Add stacktrace when warning because of Bitcoin Core errors

API

  • Add the no_dispense parameter to allow API clients to bypass the dispense transaction creation even when the destination is a dispenser
  • Add the event_name parameter to Get Mempool Events By Addresses endpoint
  • Have sat_per_vbyte parameter accept a float
  • Check addresses and hashes format in parameters

CLI

Credits

  • Ouziel Slama
  • Adam Krellenstein

v10.9.0

15 Jan 15:13
9464d07

Choose a tag to compare

Release Notes - Counterparty Core v10.9.0 (2025-01-15)

This release represents a major technical milestone in the development of Counterparty Core: Counterparty no longer has AddrIndexRs as an external dependency. Originally, AddrIndexRs was used for transaction construction, and at the end of 2023 it was accidentally turned into a consensus-critical dependency (causing a number of subsequent consensus breaks and reliability issues). As of today, the only external dependency for a Counterparty node is Bitcoin Core itself.

Counterparty Core will rely on Bitcoin Core by default to provide all of the information it needs for transaction construction (which is not consensus-critical). However this operation will only succeed if the source address for the transaction is present in the Bitcoin Core wallet. If it isn't, then Counterparty Core will use some service (either local or remote) which implements the Electrum server API to gather the information it needs. If the address isn't in Bitcoin Core, Counterparty will by default connect to the Blockstream public API. This server is configurable using the --electrs-url CLI argument, however, and users can run their own instance of this service locally if they like. A public instance of Electrs is also available at https://api.counterparty.io:3000. This service does not need to be trusted in any way, and no private information is ever sent to it.

As a consequence of the removal of the AddrIndexRs dependency, the node storage requirements have effectively decreased from ~300 GB to ~30 GB, dramatically decreasing the cost of node operation. Nodes should also be more reliable and performant generally.

This upgrade notably includes support for testnet4, since testnet3 is no longer usable for testing purposes. A public server is available at https://testnet4.counterparty.io:44000.

Finally, this upgrade includes a completely rewritten transaction composition module in preparation for future testing work. The new composer API is fully backwards-compatible, but it now includes additional parameters which make constructing a transaction much more natural. Transactions composed with the new API will use a version byte of 2 instead of 1.

Upgrading

This upgrade does not include a protocol change and is not mandatory. After upgrading you can simply delete AddrIndexRs and shrink your disk.

The following transaction construction parameters have been deprecated (but remain functional for now): fee_per_kb, fee_provided, dust_return_pubkey, return_psbt, regular_dust_size, multisig_dust_size, extended_tx_info, old_style_api, p2sh_pretx_txid, segwit, unspent_tx_hash. These parameters have been superceded by change_address, more_outputs, use_all_inputs_set, sat_per_vbyte, max_fee, verbose, multisig_pubkey.

ChangeLog

Protocol Changes

Bugfixes

  • Catch errors correctly when composing MPMA sends
  • Fix fee calculation for SegWit transactions.
  • Fix consensus hashes calculation after a blockchain reorg
  • Fix query to fill issuances.asset_events field
  • Fix assets_info.supply field
  • Fix verbose=True when give_asset or get_asset contains asset_longname
  • Don't put null values in API cache
  • Fix the Get Sends By Address endpoint, return also detach and move
  • Fix transactions.transaction_type field when destination is 1CounterpartyXXXXXXXXXXXXXXXUWLpVr
  • Catch OverflowError on API calls
  • Fix the dispensers table in State DB: include dispensers with same the source and asset but a different tx_hash
  • Fix endpoint to get info from raw transaction when block index is not provided
  • Fix issue where composed transactions contained script_pubkey (lock script) where the script_sig (unlock script) should be
  • Fix bootstrap when using --bootstrap-url flag and don't clean other networks files
  • Fix logic for blockchain reorgs of several blocks
  • Have the node terminate when the follow loop raises an error
  • Don't stop the server on "No such mempool or blockchain" error
  • Handle correctly RPC call errors from the API
  • Don't clean mempool on catchup
  • Retry 5 times when getting invalid Json with status 200 from Bitcoin Core

Codebase

  • Remove the AddrIndexRs dependency
  • Replace transaction.py and transaction_helper/* with composer.py
  • Use the bitcoin-utils library for generating transactions
  • No longer block the follow process on mempool parsing
  • Add a timeout when parsing mempool transaction from ZMQ
  • Add a cache for unsupported transactions when parsing raw mempool transactions
  • Refactor and optimize bootstrap process, use zstd instead of gzip
  • Trigger State DB refreshes automatically on version bumps
  • Use only Rust to deserialize blocks and transactions
  • Add testnet4 support
  • Repeat the RPC call to Bitcoin Core indefinitely until it succeeds
  • Raise a specific BlockOutOfRange error when querying an unknown block
  • Add mainnet checkpoint for block 879058 and testnet4 checkpoint for block 64493

API

  • Add the following parameters to the transaction composition API:
    • change_address: allows defining the change address
    • more_outputs: allows adding an arbitrary number of outputs in the form <value>:<address> or <value>:<script_pubkey>
    • use_all_inputs_set: forces the use of all UTXOs provided with inputs_set
    • sat_per_vbyte: allows defining transaction fees
    • max_fee: defines the maximum fees to be paid
    • verbose: includes transaction details, notably data and psbt
    • multisig_pubkey: public key allowing the redemption of multisig data outputs
  • With verbose=true with the transaction constuction API, return a lock_scripts field that contains the script_pubkey of the UTXOs used by the transaction
  • Use the adjusted virtual size to calculate transaction fees
  • Do not endlessly retry RPC calls to Bitcoin Core that return an error---immediately return the error to the user
  • Throw an error if the BTC quantity in a dispense isn't enough to trigger the dispenser
  • Add get_asset and give_asset parameters for the Get Orders by Asset endpoint
  • Add forward_asset and backward_asset parameters for the Get Order Matches by Asset endpoint
  • Add forward_price and backward_price to order matches results
  • Add parameter exclude_with_oracle for the Get Dispensers routes
  • Add send_type field to the sends table
  • Use satoshirate_normalized and give_quantity_normalized to calculate price_normalized
  • Add a parameter utxo_value to the attach.compose() and move.compose() functions
  • Add source_address and destination_address in sends table
  • Add the following routes:
    • /v2/addresses/<address>/compose/dividend/estimatexcpfees
    • /v2/addresses/<address>/compose/sweep/estimatexcpfees
    • /v2/addresses/<address>/compose/attach/estimatexcpfees (alias of /v2/compose/attach/estimatexcpfees)
    • /v2/destructions
    • /v2/addresses/<address>/destructions
    • /v2/assets/<asset>/destructions
  • Error messages for UTXOs now contain the reason for the error in parentheses: invalid UTXOs: <utxo(s)> (<reason>)

CLI

  • Add --cache-dir flag
  • Add severity field to JSON logs for compatibility
  • Add --refresh-state-db and --rebuild-state-db flags to the start command
  • Add --testnet4 flag
  • Add the --electrs-url parameter for transaction construction
  • Temporarily remove --testcoin and --customnet flags

Credits

  • Ouziel Slama
  • Warren Puffet
  • Adam Krellenstein

v10.9.0-rc.1

09 Jan 19:19
ad16168

Choose a tag to compare

v10.9.0-rc.1 Pre-release
Pre-release

Release Notes - Counterparty Core v10.9.0-rc.1 (2025-01-09)

This release represents a major technical milestone in the development of Counterparty Core: Counterparty no longer has AddrIndexRs as an external dependency. Originally, AddrIndexRs was used for transaction construction, and at the end of 2023 it was accidentally turned into a consensus-critical dependency (causing a number of subsequent consensus breaks and reliability issues). As of today, the only external dependency for a Counterparty node is Bitcoin Core itself.

Counterparty Core will rely on Bitcoin Core by default to provide all of the information it needs for transaction construction (which is not consensus-critical). However this operation will only succeed if the source address for the transaction is present in the Bitcoin Core wallet. If it isn't, then Counterparty Core will use some service (either local or remote) which implements the Electrum server API to gather the information it needs. If the address isn't in Bitcoin Core, Counterparty will by default connect to the Blockstream public API. This server is configurable using the --electrs-url CLI argument, however, and users can run their own instance of this service locally if they like. A public instance of Electrs is also available at https://api.counterparty.io:3000. This service does not need to be trusted in any way, and no private information is ever sent to it.

As a consequence of the removal of the AddrIndexRs dependency, the node storage requirements have effectively decreased from ~300 GB to ~30 GB, dramatically decreasing the cost of node operation. Nodes should also be more reliable and performant generally.

This upgrade notably includes support for testnet4, since testnet3 is no longer usable for testing purposes. A public server is available at https://testnet4.counterparty.io:44000.

Finally, this upgrade includes a completely rewritten transaction composition module in preparation for future testing work. The new composer API is fully backwards-compatible, but it now includes additional parameters which make constructing a transaction much more natural. Transactions composed with the new API will use a version byte of 2 instead of 1.

Upgrading

This upgrade does not include a protocol change and is not mandatory. After upgrading you can simply delete AddrIndexRs and shrink your disk.

The following transaction construction parameters have been deprecated (but remain functional for now): fee_per_kb, fee_provided, dust_return_pubkey, return_psbt, regular_dust_size, multisig_dust_size, extended_tx_info, old_style_api, p2sh_pretx_txid, segwit, unspent_tx_hash. These parameters have been superceded by change_address, more_outputs, use_all_inputs_set, sat_per_vbyte, max_fee, verbose, multisig_pubkey.

ChangeLog

Protocol Changes

Bugfixes

  • Catch errors correctly when composing MPMA sends
  • Fix fee calculation for SegWit transactions.
  • Fix consensus hashes calculation after a blockchain reorg
  • Fix query to fill issuances.asset_events field
  • Fix assets_info.supply field
  • Fix verbose=True when give_asset or get_asset contains asset_longname
  • Don't put null values in API cache
  • Fix the Get Sends By Address endpoint, return also detach and move
  • Fix transactions.transaction_type field when destination is 1CounterpartyXXXXXXXXXXXXXXXUWLpVr
  • Catch OverflowError on API calls
  • Fix the dispensers table in State DB: include dispensers with same the source and asset but a different tx_hash
  • Fix endpoint to get info from raw transaction when block index is not provided
  • Fix issue where composed transactions contained script_pubkey (lock script) where the script_sig (unlock script) should be

Codebase

  • Remove the AddrIndexRs dependency
  • Replacement of transaction.py and transaction_helper/* with composer.py
  • Use the bitcoin-utils library for generating transactions
  • No longer block the follow process on mempool parsing
  • Add a timeout when parsing mempool transaction from ZMQ
  • Add a cache for unsupported transactions when parsing raw mempool transactions
  • Refactor and optimize bootstrap process, use zstd instead of gzip
  • Trigger State DB refreshes automatically on version bumps
  • Use only Rust to deserialize blocks and transactions
  • Add testnet4 support

API

  • Add the following parameters to the transaction composition API:
    • change_address: allows defining the change address
    • more_outputs: allows adding an arbitrary number of outputs in the form <value>:<address> or <value>:<script_pubkey>
    • use_all_inputs_set: forces the use of all UTXOs provided with inputs_set
    • sat_per_vbyte: allows defining transaction fees
    • max_fee: defines the maximum fees to be paid
    • verbose: includes transaction details, notably data and psbt
    • multisig_pubkey: public key allowing the redemption of multisig data outputs
  • With verbose=true with the transaction constuction API, return a lock_scripts field that contains the script_pubkey of the UTXOs used by the transaction
  • Use the adjusted virtual size to calculate transaction fees
  • Do not endlessly retry RPC calls to Bitcoin Core that return an error---immediately return the error to the user
  • Throw an error if the BTC quantity in a dispense isn't enough to trigger the dispenser
  • Add get_asset and give_asset parameters for the Get Orders by Asset endpoint
  • Add forward_asset and backward_asset parameters for the Get Order Matches by Asset endpoint
  • Add forward_price and backward_price to order matches results
  • Add parameter exclude_with_oracle for the Get Dispensers routes
  • Add send_type field to the sends table
  • Use satoshirate_normalized and give_quantity_normalized to calculate price_normalized
  • Add a parameter utxo_value to the attach.compose() and move.compose() functions
  • Add source_address and destination_address in sends table
  • Add the following routes:
    • /v2/addresses/<address>/compose/dividend/estimatexcpfees
    • /v2/addresses/<address>/compose/sweep/estimatexcpfees
    • /v2/addresses/<address>/compose/attach/estimatexcpfees (alias of /v2/compose/attach/estimatexcpfees)
    • /v2/destructions
    • /v2/addresses/<address>/destructions
    • /v2/assets/<asset>/destructions
  • Error messages for UTXOs now contain the reason for the error in parentheses: invalid UTXOs: <utxo(s)> (<reason>)

CLI

  • Add --cache-dir flag
  • Add severity field to JSON logs for compatibility
  • Add --refresh-state-db and --rebuild-state-db flags to the start command
  • Add --testnet4 flag
  • Add the --electrs-url parameter for transaction construction
  • Temporarily remove --testcoin and --customnet flags

Credits

  • Ouziel Slama
  • Warren Puffet
  • Adam Krellenstein