From 88a08e35122415521d578b459fb4ba0b55862ade Mon Sep 17 00:00:00 2001 From: Andrew Kozlik Date: Wed, 22 Dec 2021 11:31:51 +0100 Subject: [PATCH] chore(core): Increase maximum CoinJoin coordinator name length to 36 (2 lines). --- common/protob/messages-bitcoin.proto | 2 +- core/src/apps/bitcoin/authorize_coinjoin.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/common/protob/messages-bitcoin.proto b/common/protob/messages-bitcoin.proto index 2676b2925..9dce9c0a3 100644 --- a/common/protob/messages-bitcoin.proto +++ b/common/protob/messages-bitcoin.proto @@ -558,7 +558,7 @@ message OwnershipProof { message AuthorizeCoinJoin { option (unstable) = true; - required string coordinator = 1; // coordinator identifier to approve as a prefix in commitment data (max. 18 ASCII characters) + required string coordinator = 1; // coordinator identifier to approve as a prefix in commitment data (max. 36 ASCII characters) required uint64 max_total_fee = 2; // maximum total fees optional uint32 fee_per_anonymity = 3 [default=0]; // fee per anonymity set in units of 10^-9 percent repeated uint32 address_n = 4; // prefix of the BIP-32 path leading to the account (m / purpose' / coin_type' / account') diff --git a/core/src/apps/bitcoin/authorize_coinjoin.py b/core/src/apps/bitcoin/authorize_coinjoin.py index 510ee2942..4289653b8 100644 --- a/core/src/apps/bitcoin/authorize_coinjoin.py +++ b/core/src/apps/bitcoin/authorize_coinjoin.py @@ -1,7 +1,7 @@ from micropython import const from typing import TYPE_CHECKING -from trezor import ui +from trezor import ui, wire from trezor.messages import AuthorizeCoinJoin, Success from trezor.strings import format_amount from trezor.ui.layouts import confirm_action, confirm_coinjoin @@ -15,11 +15,10 @@ from .keychain import validate_path_against_script_type, with_keychain from .sign_tx.layout import format_coin_amount if TYPE_CHECKING: - from trezor import wire from apps.common.coininfo import CoinInfo from apps.common.keychain import Keychain -_MAX_COORDINATOR_LEN = const(18) +_MAX_COORDINATOR_LEN = const(36) @with_keychain