Releases: CounterpartyXCP/counterparty-core
v10.8.0
Release Notes - Counterparty Core v10.8.0 (2024-12-15)
This release includes some significant architectural changes to the codebase to improve node stability and performance. Most notably, the data storage requirements of the Counterparty database have been reduced from ~50 GB to ~25 GB. Numerous bugs have been fixed, and all node hosts are recommended to upgrade ASAP.
Upgrading
This upgrade requires a mandatory, automatic rollback from block 871780.
ChangeLog
Protocol Changes
Bugfixes
- Set
issuances.reset
andissuances.locked
default values toFalse
rather thanNone
- Fix
get_price
andgive_price
fields: return0
rather thannull
- Store
utxo_address
in theaddress_events
table - Fix order of results during dividend distribution to UTXOs
- Fix XCP price calculation for fair mints
- Handle RSFetcher version mismatches correctly
- Improve shutdown process and correctly close the Ledger DB and State DB
- Always include all outputs in transactions decoded by RSFetcher
- Fix UTXO balances cache: don't cache
detach
; add cache forattach
; clean the cache when the balance is empty
Codebase
- Fix
block.close_block_index
field type - Eliminate unnecessary database indexes
- Don't rollback or reparse to a block index higher than current block index
- Remove the lockfile for the RSFetcher process
- Replace
counterparty.api.db
withstate.db
- Rollback State DB from Ledger DB rather than rolling back event-by-event
- Remove duplicate tables from State DB
- Add
issuances.asset_events
,dispenses.btc_amount
andmempool.addresses
field to the Ledger DB - Add version checking for State DB: launch a rollback when a reparse or a rollback is necessary for the Ledger DB
- Refactor functions to refresh
util.CURRENT_BLOCK_INDEX
inwsgi.py
- Remove
compose_utxo()
function and clean upcompose_attach()
andcompose_detach
- Add
transaction_type
field to thetransactions
table - Refactor
block.parse_tx()
- Include only one
TRANSACTION_PARSED
event for eachNEW_TRANSACTION
event - Fix API Watcher reorg checks
- Use
multiprocessing.Event
to stop API process when the Ledger process dies - Catch up with RPC when ZMQ is late
- Restart RSFetcher when it returns
None
too many times - Exclude transactions by
SIGHASH
- Be able to trigger a rollback on a minor version change
- Add several new checkpoints
- Parse raw mempool by batch before following
- Set
BACKEND_RAW_TRANSACTIONS_CACHE_SIZE
to 1000
API
- Exclude zero balances when retreiving balances by address and asset
- Add
description_locked
to theasset_info
field - Add
transaction_type
parameter forGet Transactions
endpoints - Add
transaction_types_count
table to the State DB - Add the following routes:
/v2/transactions/counts
/v2/blocks/<int:block_index>/transactions/counts
/v2/addresses/<address>/transactions/counts
- Add sortable field
asset_longname
to thebalances
table - Add the ability to retrieve balances by asset longname
- When composing an attach / move, use 10,000 sats for the value, rather than 546
- Add the
send_type
filter forsends
table (send
,attach
,move
ordetach
) - Add
events
field to transactions results whenverbose=true
CLI
- Have
rollback
andreparse
commands trigger a re-build of the State DB - Add current process name and current thread name to log messages
- Add
--log-exclude-filters
and--log-include-filters
flags
Credits
- Ouziel Slama
- Warren Puffet
- Adam Krellenstein
v10.8.0-rc.2
Release Notes - Counterparty Core v10.8.0-rc.2 (2024-12-12)
This release includes some significant architectural changes to the codebase to improve node stability and performance. Most notably, the data storage requirements of the Counterparty database have been reduced from ~50 GB to ~25 GB. Numerous bugs have been fixed, and all node hosts are recommended to upgrade ASAP.
Upgrading
This upgrade requires a mandatory, automatic reparse from block 871780.
ChangeLog
Protocol Changes
Bugfixes
- Set
issuances.reset
andissuances.locked
default values toFalse
rather thanNone
- Fix
get_price
andgive_price
fields: return0
rather thannull
- Store
utxo_address
in theaddress_events
table - Fix order of results during dividend distribution to UTXOs
- Fix XCP price calculation for fair mints
- Handle RSFetcher version mismatches correctly
- Improve shutdown process and correctly close the Ledger DB and State DB
- Always include all outputs in transactions decoded by RSFetcher
- Fix UTXO balances cache: don't cache
detach
; add cache forattach
; clean the cache when the balance is empty
Codebase
- Fix
block.close_block_index
field type - Eliminate unnecessary database indexes
- Don't rollback or reparse to a block index higher than current block index
- Remove the lockfile for the RSFetcher process
- Replace
counterparty.api.db
withstate.db
- Rollback State DB from Ledger DB rather than rolling back event-by-event
- Remove duplicate tables from State DB
- Add
issuances.asset_events
,dispenses.btc_amount
andmempool.addresses
field to the Ledger DB - Add version checking for State DB: launch a rollback when a reparse or a rollback is necessary for the Ledger DB
- Refactor functions to refresh
util.CURRENT_BLOCK_INDEX
inwsgi.py
- Remove
compose_utxo()
function and clean upcompose_attach()
andcompose_detach
- Add
transaction_type
field to thetransactions
table - Refactor
block.parse_tx()
- Include only one
TRANSACTION_PARSED
event for eachNEW_TRANSACTION
event - Fix API Watcher reorg checks
- Use
multiprocessing.Event
to stop API process when the Ledger process dies - Catch up with RPC when ZMQ is late
- Restart RSFetcher when it returns
None
too many times - Exclude transactions by
SIGHASH
- Be able to trigger a rollback on a minor version change
- Add several new checkpoints
API
- Exclude zero balances when retreiving balances by address and asset
- Add
description_locked
to theasset_info
field - Add
transaction_type
parameter forGet Transactions
endpoints - Add
transaction_types_count
table to the State DB - Add the following routes:
/v2/transactions/counts
/v2/blocks/<int:block_index>/transactions/counts
/v2/addresses/<address>/transactions/counts
- Add sortable field
asset_longname
to thebalances
table - Add the ability to retrieve balances by asset longname
- When composing an attach / move, use 10,000 sats for the value, rather than 546
- Add the
send_type
filter forsends
table (send
,attach
,move
ordetach
) - Add
events
field to transactions results whenverbose=true
CLI
- Have
rollback
andreparse
commands trigger a re-build of the State DB - Add current process name and current thread name to log messages
- Add
--log-exclude-filters
and--log-include-filters
flags
Credits
- Ouziel Slama
- Warren Puffet
- Adam Krellenstein
v10.8.0-rc.1
Release Notes - Counterparty Core v10.8.0-rc.1 (2024-12-12)
This release includes some significant architectural changes to the codebase to improve node stability and performance. Most notably, the data storage requirements of the Counterparty database have been reduced from ~50 GB to ~25 GB. Numerous bugs have been fixed, and all node hosts are recommended to upgrade ASAP.
Upgrading
This upgrade requires a mandatory, automatic reparse from block 871780.
ChangeLog
Protocol Changes
Bugfixes
- Set
issuances.reset
andissuances.locked
default values toFalse
rather thanNone
- Fix
get_price
andgive_price
fields: return0
rather thannull
- Store
utxo_address
in theaddress_events
table - Fix order of results during dividend distribution to UTXOs
- Fix XCP price calculation for fair mints
- Handle RSFetcher version mismatches correctly
- Improve shutdown process and correctly close the Ledger DB and State DB
- Always include all outputs in transactions decoded by RSFetcher
- Fix UTXO balances cache: don't cache
detach
; add cache forattach
; clean the cache when the balance is empty
Codebase
- Fix
block.close_block_index
field type - Eliminate unnecessary database indexes
- Don't rollback or reparse to a block index higher than current block index
- Remove the lockfile for the RSFetcher process
- Replace
counterparty.api.db
withstate.db
- Rollback State DB from Ledger DB rather than rolling back event-by-event
- Remove duplicate tables from State DB
- Add
issuances.asset_events
,dispenses.btc_amount
andmempool.addresses
field to the Ledger DB - Add version checking for State DB: launch a rollback when a reparse or a rollback is necessary for the Ledger DB
- Refactor functions to refresh
util.CURRENT_BLOCK_INDEX
inwsgi.py
- Remove
compose_utxo()
function and clean upcompose_attach()
andcompose_detach
- Add
transaction_type
field to thetransactions
table - Refactor
block.parse_tx()
- Include only one
TRANSACTION_PARSED
event for eachNEW_TRANSACTION
event - Fix API Watcher reorg checks
- Use
multiprocessing.Event
to stop API process when the Ledger process dies - Catch up with RPC when ZMQ is late
- Restart RSFetcher when it returns
None
too many times
API
- Exclude zero balances when retreiving balances by address and asset
- Add
description_locked
to theasset_info
field - Add
transaction_type
parameter forGet Transactions
endpoints - Add
transaction_types_count
table to the State DB - Add the following routes:
/v2/transactions/counts
/v2/blocks/<int:block_index>/transactions/counts
/v2/addresses/<address>/transactions/counts
- Add sortable field
asset_longname
to thebalances
table - Add the ability to retrieve balances by asset longname
- When composing an attach / move, use 10,000 sats for the value, rather than 546
- Add the
send_type
filter forsends
table (send
,attach
,move
ordetach
) - Add
events
field to transactions results whenverbose=true
CLI
- Have
rollback
andreparse
commands trigger a re-build of the State DB - Add current process name and current thread name to log messages
- Add
--log-exclude-filters
and--log-include-filters
flags
Credits
- Ouziel Slama
- Warren Puffet
- Adam Krellenstein
v10.7.4
Release Notes - Counterparty Core v10.7.4 (2024-12-09)
This is a hotfix release that addresses a deterministic node crash due to the fact that Enhanced Sends and MPMAs weren't setting the msg_index
value correctly. This bug was triggered by a UTXO send and an Enhanced Send being combined in a single Bitcoin transaction. All node operators should upgrade immediately.
Upgrading
This upgrade is required to address a critical protocol-level bug. No reparse is necessary.
ChangeLog
Protocol Changes
Bugfixes
- Ensure
msg_index
value is set for Enhanced Send - Ensure
msg_index
is unique for MPMA
Codebase
API
CLI
Credits
- Ouziel Slama
v10.7.3
Release Notes - Counterparty Core v10.7.3 (2024-11-26)
This is a hotfix release that must be installed immediately. It fixes a bug in the parsing of Attach and Detach transactions that crashes the server.
Upgrading
ChangeLog
Protocol Changes
Bugfixes
- Don't raise error on unpack exceptions
Codebase
API
CLI
Credits
- Ouziel Slama
v10.7.2
Release Notes - Counterparty Core v10.7.2 (2024-11-24)
This is a minor release with a large number of bugfixes and quality-of-life improvements.
Upgrading
This upgrade is not a protocol change and does not require an automatic reparse.
ChangeLog
Protocol Changes
Bugfixes
- Fix CORS headers for
OPTIONS
requests - Fix rounding error on normalized quantity
- Use
null
instead of''
forasset_longname
andasset_parent
fields - Correctly catch
ValueError
in unpack endpoint - Correctly catch
InvalidBase58Error
in compose endpoints - Correctly catch
BitcoindRPCError
in get transaction info endpoint - Fix typo in dispenser error messages (
has
->have
) - Fix get balances endpoint when using
sort=asset
- Catch all errors when using unpack endpoint with invalid data
- Restart RSFetcher when it returns
None
- Clean up blocks without ledger hash before starting catch-up
- Don't inject details before publishing events with ZMQ
- Populate
address_events
also with UTXO events (attach, detach and move) - Fix
compose_movetoutxo
documentation - Fix error message when trying to compose a dispense with the dispenser address as the source
Codebase
API
- Add
sort
parameter for the get holders endpoint (sortable fields:quantity
,holding_type
, andstatus
) - Exclude blocks that are not finished being parsed
- Optimize events counts endpoints with
events_count
table - Add route
/v2/utxos/withbalances
to check if utxos have balances - Add
type
parameter for get balances endpoints (all
,utxo
oraddress
)
CLI
- Support the
SENTRY_SAMPLE_RATE
environment variable to set the Sentry sample rate - Show help if no actions are provided
- Fix and rename
--check-asset-conservation
flag to--skip-asset-conservation-check
Credits
- droplister
- Ouziel Slama
- Adam Krellenstein
v10.7.2-alpha.1
Release Notes - Counterparty Core v10.7.2-alpha.1 (2024-11-19)
Upgrading
ChangeLog
Protocol Changes
Bugfixes
- Fix CORS headers for OPTIONS requests
- Fix rounding error on normalized quantity
- Use
null
instead of''
forasset_longname
andasset_parent
fields - Correctly catch
ValueError
in unpack endpoint - Correctly catch
InvalidBase58Error
in compose endpoints - Correctly catch
BitcoindRPCError
in get transaction info endpoint - Fix typo in dispenser error messages (
has
->have
) - Fix get balances endpoint when using
sort=asset
- Catch all errors when using unpack endpoint with invalid data
- Restart RSFetcher when it returns
None
- Clean up blocks without ledger hash before starting catch-up
- Don't inject details before publishing events with ZMQ
Codebase
API
- Add
sort
parameter for the get holders endpoint (sortable fields:quantity
,holding_type
, andstatus
) - Exclude blocks that are not finished being parsed
- Optimize events counts endpoints with
events_count
table - Add route
/v2/utxos/withbalances
to check if utxos have balances - Add
type
parameter for get balances endpoints (all
,utxo
oraddress
)
CLI
- Support the
SENTRY_SAMPLE_RATE
environment variable to set the Sentry sample rate - Show help if no actions are provided
- Fix and rename
--check-asset-conservation
flag to--skip-asset-conservation-check
Credits
- droplister
- Ouziel Slama
- Adam Krellenstein
v10.7.1
Release Notes - Counterparty Core v10.7.1 (2024-11-19)
This is a hotfix release that must be installed immediately. It fixes a bug in the parsing of Fairminters transactions that crashes the server.
Upgrading
ChangeLog
Protocol Changes
Bugfixes
- Don't raise error on unpack exceptions
Codebase
API
CLI
Credits
- Ouziel Slama
v10.7.0
Release Notes - Counterparty Core v10.7.0 (2024-11-11)
This is a protocol upgrade that includes a refactor of the UTXO Support feature that fixes some bugs in the original design and simplifies the implementation significantly. It also includes bugfixes for the fair minting functionality in addition to the usual set of miscellaneous improvements to the node API.
Upgrading
This upgrade is mandatory and must be performed before block 871,900 (around November 25th).
A reparse from the block 869,900 block is mandatory and will be performed automatically.
Composition functions for attach
and detach
transactions are disabled between block 871,888 and 871,900.
ChangeLog
Protocol Changes
UTXO Support
This update includes significant changes to the UTXO Support feature, and in particular to address a vulnerability where an atomic swap could be frontrun by a detach
transaction. Further feedback from the community, in particular the OpenStamps team and DerpHerpenstein, have allowed us to simplify the implementation of this feature significantly. With this protocol change, messages with ID 100 will be disabled at the same block that messages with IDs 101 and 102 are enabled. 12 blocks before this activation block, the functions compose_attach
and compose_detach
will be deactivated to avoid having transactions with ID 100 confirmed after activation. The protocol and API have changed as follows:
- The
attach
function no longer accepts adestination
parameter. It now accepts an optionaldestination_vout
parameter (by default the first non-OP_RETURN
output). This parameter allows one to designate the index of the output to use as the destination. The transaction is invalid ifdestination_vout
does not exist or if it is anOP_RETURN
. - The
destination
parameter of thedetach
function is now optional. If not provided, the default destination is the address corresponding to the UTXO. - The
detach
function no longer acceptsasset
andquantity
parameters. Thedetach
function detaches all assets attached to all transaction inputs every time.
In addition to resolving the above frontrunning vulnerability, this update brings a number of improvements:
- It is now cheaper and easier to construct
attach
anddetach
transactions. The size of messages is always less than 80 bytes, so anOP_RETURN
output can store all of the necessary data. - It is possible to execute several
detach
operations in a single transaction to save fees. - It is no longer possible to make a
detach
and a UTXOmove
in the same transaction. - A UTXO move with a transaction that contains only a single
OP_RETURN
output behaves like adetach
- Correct the gas calculation for
attach
operations
Fairminter
-
When there are fewer tokens remaining than
max_mint_per_tx
in a free Fair Minter with a hard cap, the last mint receives whatever remains instead of triggering an error. -
Fixed a bug that prevents updating an asset's description after a fairminter's automatic closure.
Bugfixes
- Take Rust fetcher's
rollback_height
into account in the block-height ordering check - Fix subasset name handling when creating a Fair Minter by preserving the
asset_longname
field whenasset=<subasset_name>
is specified andasset_parent
is not specified - Fix
disable_utxo_locks
parameter in compose API - Fix
gas.get_transaction_count_for_last_period()
- Fix
update_assets_info()
when a fairmint is parsed into the mempool before the corresponding fairminter - Fix asset cache initialization
- Takes into account the commission to check if the hard cap is reached
- Soft cap deadline block must be greater than start block
- Fix
legder.get_fairmint_quantities()
function - Fix `fee_paid`` field when closing fairminter
- Fix
premint_quantity
checking when no hardcap - Fix
premint_quantity
destruction when soft cap is not reached - Add an index on
(utxo, asset)
fields in thebalances
tables
Codebase
- Have
transactions.compose()
accept atx_info
that contains a source in the form of a UTXO instead of an address. When a UTXO is used, this UTXO must be spent in the corresponding transaction. - Refactor
compose_moveutxo()
to use this newtransactions.compose()
feature - Have the Rust fetcher now only store entries in its database required for Bitcoin reorganization checks. This greatly reduces the size of the database and significantly increases the speed of the catch-up process.
- Support Bitcoin Core 28.0, having updated the Rust Bitcoin dependencies (bitcoin 0.32.4 and bitcoincore-rpc 0.19.0)
API
- Make the
destination
,asset
andquantity
parameters tocompose_detach()
optional (asset
andquantity
will be ignored after the protocol change) - Add a
destination_vout
parameter to thecompose_attach()
endpoint (thedestination
parameter will be ignored after protocol change) - Add the
validate
argument to compose API - Add sortable
get_price
andgive_price
fields for orders - Add sortable
price
field for dispensers - Fix
locked
inasset_info
field - Add
/v2/bitcoin/transaction/decode
route to proxy bitcoindecoderawtransaction
method inputs_set
now supports UTXOs in the format<txid>:<vout>:<amount>:<script_pub_key>
- Skip transaction sanity check when
validate=false
- Take
asset_longname
into consideration when sorting onasset
field
CLI
Credits
- OpenStamp
- DerpHerpenstein
- Ouziel Slama
- Wilfred Denton
- Adam Krellenstein
v10.6.1
Release Notes - Counterparty Core v10.6.1 (2024-10-28)
This is a minor release to address a few small bugs in the v2 API, especially for MPMA, and to fill out API support for the management of assets attached to UTXOs.
Upgrading
This upgrade is not a protocol change and no automatic reparse is necessary.
ChangeLog
Protocol Changes
Bugfixes
- Fix heavy
healthz
check - Raise a
ComposeError
inmpma.compose()
ifmemo
is not a string or ifmemo_is_hex
is not a boolean - Send API v2 log messages to the
config.API_LOG
logfile - Create a dust output when attaching an asset to a UTXO without a destination address
Codebase
API
- Add
memos
andmemos_are_hex
parameters to the MPMA compose API. When using MPMA sends, one memo must be provided for each destination if these parameters are used. - Add the
/v2/utxos/<utxo>/balances
route - Exclude UTXOs containing balances by default when composing transactions
- Add
use_utxos_with_balances
andexclude_utxos_with_balances
parameters to the compose API
CLI
Credits
- Ouziel Slama
- Adam Krellenstein