From e864a21aa9a1e44e9d2faf7e58796a2d3be7a3c4 Mon Sep 17 00:00:00 2001 From: Ouziel Slama Date: Tue, 26 Nov 2024 07:29:44 +0000 Subject: [PATCH 1/2] fix detach and attach unpack --- counterparty-core/counterpartycore/lib/messages/attach.py | 4 ++-- counterparty-core/counterpartycore/lib/messages/detach.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/counterparty-core/counterpartycore/lib/messages/attach.py b/counterparty-core/counterpartycore/lib/messages/attach.py index bec202bf1f..59c89c9a5d 100644 --- a/counterparty-core/counterpartycore/lib/messages/attach.py +++ b/counterparty-core/counterpartycore/lib/messages/attach.py @@ -125,8 +125,8 @@ def unpack(message, return_dict=False): } return (asset, int(quantity), destination_vout) - except Exception as e: - raise exceptions.UnpackError(f"Cannot unpack utxo message: {e}") from e + except Exception: + return "", 0, None def pay_fee(db, tx, source, fee): diff --git a/counterparty-core/counterpartycore/lib/messages/detach.py b/counterparty-core/counterpartycore/lib/messages/detach.py index a0d77af731..457a9fabc1 100644 --- a/counterparty-core/counterpartycore/lib/messages/detach.py +++ b/counterparty-core/counterpartycore/lib/messages/detach.py @@ -54,8 +54,8 @@ def unpack(message, return_dict=False): "destination": destination, } return destination - except Exception as e: - raise exceptions.UnpackError(f"Cannot unpack utxo message: {e}") from e + except Exception: + return None def detach_assets(db, tx, source, destination=None): From 207f2f8ad59211c5851e6a3336dda0003a23f1ce Mon Sep 17 00:00:00 2001 From: Ouziel Slama Date: Tue, 26 Nov 2024 07:36:03 +0000 Subject: [PATCH 2/2] bump version --- apiary.apib | 2 +- .../counterpartycore/lib/config.py | 2 +- .../test/regtest/apidoc/blueprint-template.md | 2 +- counterparty-core/requirements.txt | 2 +- counterparty-rs/Cargo.lock | 2 +- counterparty-rs/Cargo.toml | 2 +- counterparty-wallet/requirements.txt | 2 +- docker-compose.yml | 2 +- release-notes/release-notes-v10.7.3.md | 26 +++++++++++++++++++ 9 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 release-notes/release-notes-v10.7.3.md diff --git a/apiary.apib b/apiary.apib index 478e8a0b0e..225b9b02eb 100644 --- a/apiary.apib +++ b/apiary.apib @@ -1454,7 +1454,7 @@ Returns server information and the list of documented routes in JSON format. "result": { "server_ready": true, "network": "mainnet", - "version": "10.7.2", + "version": "10.7.3", "backend_height": 850214, "counterparty_height": 850214, "documentation": "https://counterpartycore.docs.apiary.io/", diff --git a/counterparty-core/counterpartycore/lib/config.py b/counterparty-core/counterpartycore/lib/config.py index a7c5796269..88b2cd2e09 100644 --- a/counterparty-core/counterpartycore/lib/config.py +++ b/counterparty-core/counterpartycore/lib/config.py @@ -5,7 +5,7 @@ # Semantic Version -__version__ = "10.7.2" # for hatch +__version__ = "10.7.3" # for hatch VERSION_STRING = __version__ version = VERSION_STRING.split("-")[0].split(".") VERSION_MAJOR = int(version[0]) diff --git a/counterparty-core/counterpartycore/test/regtest/apidoc/blueprint-template.md b/counterparty-core/counterpartycore/test/regtest/apidoc/blueprint-template.md index ccfcbb6e5e..395c56cfa9 100644 --- a/counterparty-core/counterpartycore/test/regtest/apidoc/blueprint-template.md +++ b/counterparty-core/counterpartycore/test/regtest/apidoc/blueprint-template.md @@ -158,7 +158,7 @@ Returns server information and the list of documented routes in JSON format. "result": { "server_ready": true, "network": "mainnet", - "version": "10.7.2", + "version": "10.7.3", "backend_height": 850214, "counterparty_height": 850214, "documentation": "https://counterpartycore.docs.apiary.io/", diff --git a/counterparty-core/requirements.txt b/counterparty-core/requirements.txt index 6f814ec896..8371489a31 100644 --- a/counterparty-core/requirements.txt +++ b/counterparty-core/requirements.txt @@ -35,4 +35,4 @@ yoyo-migrations==8.2.0 gunicorn==23.0.0 waitress==3.0.1 hypothesis==6.116.0 -counterparty-rs==10.7.2 \ No newline at end of file +counterparty-rs==10.7.3 \ No newline at end of file diff --git a/counterparty-rs/Cargo.lock b/counterparty-rs/Cargo.lock index b36dc8ca99..92f7cc727e 100644 --- a/counterparty-rs/Cargo.lock +++ b/counterparty-rs/Cargo.lock @@ -394,7 +394,7 @@ checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "counterparty-rs" -version = "10.7.2" +version = "10.7.3" dependencies = [ "bip32", "bitcoin", diff --git a/counterparty-rs/Cargo.toml b/counterparty-rs/Cargo.toml index 610ca22d84..dc9fe89d7a 100644 --- a/counterparty-rs/Cargo.toml +++ b/counterparty-rs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "counterparty-rs" -version = "10.7.2" +version = "10.7.3" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/counterparty-wallet/requirements.txt b/counterparty-wallet/requirements.txt index d8045c3b86..bd356ee219 100644 --- a/counterparty-wallet/requirements.txt +++ b/counterparty-wallet/requirements.txt @@ -5,4 +5,4 @@ colorlog==6.8.0 python-dateutil==2.8.2 requests==2.32.0 termcolor==2.4.0 -counterparty-core==10.7.2 +counterparty-core==10.7.3 diff --git a/docker-compose.yml b/docker-compose.yml index 83f4b520eb..fc95976563 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,7 @@ x-addrindexrs-common: &addrindexrs-common restart: unless-stopped x-counterparty-common: &counterparty-common - image: counterparty/counterparty:v10.7.2 + image: counterparty/counterparty:v10.7.3 stop_grace_period: 1m volumes: - data:/root/.bitcoin diff --git a/release-notes/release-notes-v10.7.3.md b/release-notes/release-notes-v10.7.3.md new file mode 100644 index 0000000000..ae7c0bc269 --- /dev/null +++ b/release-notes/release-notes-v10.7.3.md @@ -0,0 +1,26 @@ +# 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 +