diff --git a/common/protob/messages-bitcoin.proto b/common/protob/messages-bitcoin.proto index 6831e6d9e..c08a2a8bb 100644 --- a/common/protob/messages-bitcoin.proto +++ b/common/protob/messages-bitcoin.proto @@ -204,7 +204,7 @@ message SignTx { * Signing request for a CoinJoin transaction. */ message CoinJoinRequest { - required uint32 fee_rate = 1; // coordination fee rate in units of 10^-8 percent + required uint32 fee_rate = 1; // coordination fee rate in units of 10^-6 percent required uint64 no_fee_threshold = 2; // PlebsDontPayThreshold in Wasabi, the input amount above which the fee rate applies required uint64 min_registrable_amount = 3; // minimum registrable output amount required bytes mask_public_key = 4; // ephemeral secp256k1 public key used for masking coinjoin_flags, 33 bytes in compressed form @@ -615,7 +615,7 @@ message AuthorizeCoinJoin { required string coordinator = 1; // coordinator identifier to approve as a prefix in commitment data (max. 36 ASCII characters) required uint64 max_rounds = 2; // maximum number of rounds that Trezor is authorized to take part in - required uint32 max_coordinator_fee_rate = 3; // maximum coordination fee rate in units of 10^-8 percent + required uint32 max_coordinator_fee_rate = 3; // maximum coordination fee rate in units of 10^-6 percent required uint32 max_fee_per_kvbyte = 4; // maximum mining fee rate in units of satoshis per 1000 vbytes repeated uint32 address_n = 5; // prefix of the BIP-32 path leading to the account (m / purpose' / coin_type' / account') optional string coin_name = 6 [default='Bitcoin']; // coin to use diff --git a/core/src/apps/bitcoin/authorization.py b/core/src/apps/bitcoin/authorization.py index b1b0fb365..7678c159c 100644 --- a/core/src/apps/bitcoin/authorization.py +++ b/core/src/apps/bitcoin/authorization.py @@ -19,7 +19,7 @@ if TYPE_CHECKING: from apps.common.coininfo import CoinInfo -FEE_RATE_DECIMALS = const(8) +FEE_RATE_DECIMALS = const(6) class CoinJoinAuthorization: diff --git a/tests/device_tests/bitcoin/payment_req.py b/tests/device_tests/bitcoin/payment_req.py index f14ab0bb9..9ab2d4dad 100644 --- a/tests/device_tests/bitcoin/payment_req.py +++ b/tests/device_tests/bitcoin/payment_req.py @@ -113,7 +113,7 @@ def make_coinjoin_request( outputs, output_script_pubkeys, no_fee_indices, - fee_rate=50_000_000, # 0.5 % + fee_rate=500_000, # 0.5 % no_fee_threshold=1_000_000, min_registrable_amount=5_000, ): diff --git a/tests/device_tests/bitcoin/test_authorize_coinjoin.py b/tests/device_tests/bitcoin/test_authorize_coinjoin.py index bd86ec259..9f9413a8d 100644 --- a/tests/device_tests/bitcoin/test_authorize_coinjoin.py +++ b/tests/device_tests/bitcoin/test_authorize_coinjoin.py @@ -58,7 +58,7 @@ def test_sign_tx(client: Client): client, coordinator="www.example.com", max_rounds=2, - max_coordinator_fee_rate=50_000_000, # 0.5 % + max_coordinator_fee_rate=500_000, # 0.5 % max_fee_per_kvbyte=3500, n=parse_path("m/10025h/1h/0h/1h"), coin_name="Testnet", @@ -268,7 +268,7 @@ def test_sign_tx_large(client: Client): client, coordinator="www.example.com", max_rounds=2, - max_coordinator_fee_rate=50_000_000, # 0.5 % + max_coordinator_fee_rate=500_000, # 0.5 % max_fee_per_kvbyte=3500, n=parse_path("m/10025h/1h/0h/1h"), coin_name="Testnet", @@ -478,7 +478,7 @@ def test_wrong_coordinator(client: Client): client, coordinator="www.example.com", max_rounds=10, - max_coordinator_fee_rate=50_000_000, # 0.5 % + max_coordinator_fee_rate=500_000, # 0.5 % max_fee_per_kvbyte=3500, n=parse_path("m/10025h/1h/0h/1h"), coin_name="Testnet", @@ -502,7 +502,7 @@ def test_wrong_account_type(client: Client): "client": client, "coordinator": "www.example.com", "max_rounds": 10, - "max_coordinator_fee_rate": 50_000_000, # 0.5 % + "max_coordinator_fee_rate": 500_000, # 0.5 % "max_fee_per_kvbyte": 3500, "coin_name": "Testnet", } @@ -530,7 +530,7 @@ def test_cancel_authorization(client: Client): client, coordinator="www.example.com", max_rounds=10, - max_coordinator_fee_rate=50_000_000, # 0.5 % + max_coordinator_fee_rate=500_000, # 0.5 % max_fee_per_kvbyte=3500, n=parse_path("m/10025h/1h/0h/1h"), coin_name="Testnet", @@ -693,7 +693,7 @@ def test_multisession_authorization(client: Client): client, coordinator="www.example1.com", max_rounds=10, - max_coordinator_fee_rate=50_000_000, # 0.5 % + max_coordinator_fee_rate=500_000, # 0.5 % max_fee_per_kvbyte=3500, n=parse_path("m/10025h/1h/0h/1h"), coin_name="Testnet", @@ -709,7 +709,7 @@ def test_multisession_authorization(client: Client): client, coordinator="www.example2.com", max_rounds=10, - max_coordinator_fee_rate=50_000_000, # 0.5 % + max_coordinator_fee_rate=500_000, # 0.5 % max_fee_per_kvbyte=3500, n=parse_path("m/10025h/1h/0h/1h"), coin_name="Testnet", diff --git a/tests/device_tests/test_msg_applysettings.py b/tests/device_tests/test_msg_applysettings.py index c7c8a269d..818ea0672 100644 --- a/tests/device_tests/test_msg_applysettings.py +++ b/tests/device_tests/test_msg_applysettings.py @@ -230,7 +230,7 @@ def test_experimental_features(client: Client): client, coordinator="www.example.com", max_rounds=10, - max_coordinator_fee_rate=50_000_000, # 0.5 % + max_coordinator_fee_rate=500_000, # 0.5 % max_fee_per_kvbyte=3500, n=parse_path("m/10025h/1h/0h/1h"), coin_name="Testnet",