chore: Change precision of CoinJoin fee rate percentage from 8 to 6 decimal digits.

pull/2581/head
Andrew Kozlik 2 years ago committed by Andrew Kozlik
parent 0d042421c3
commit c7fb908146

@ -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

@ -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:

@ -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,
):

@ -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",

@ -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",

Loading…
Cancel
Save