From 97a32236633fed482ac1c24c145ded042bcde660 Mon Sep 17 00:00:00 2001 From: Andrew Kozlik Date: Wed, 17 Mar 2021 21:33:15 +0100 Subject: [PATCH] fix(legacy): Skip unused messages in nanopb. --- legacy/firmware/protob/Makefile | 2 +- .../firmware/protob/messages-bitcoin.options | 26 ++++++------------- legacy/firmware/protob/messages-debug.options | 17 ++++++------ 3 files changed, 17 insertions(+), 28 deletions(-) diff --git a/legacy/firmware/protob/Makefile b/legacy/firmware/protob/Makefile index 79ab9d0a5..33f3e5d0a 100644 --- a/legacy/firmware/protob/Makefile +++ b/legacy/firmware/protob/Makefile @@ -5,7 +5,7 @@ endif SKIPPED_MESSAGES := Binance Cardano DebugMonero Eos Monero Ontology Ripple SdProtect Tezos WebAuthn \ DebugLinkRecordScreen DebugLinkReseedRandom DebugLinkShowText DebugLinkEraseSdCard DebugLinkWatchLayout \ GetOwnershipProof OwnershipProof GetOwnershipId OwnershipId AuthorizeCoinJoin DoPreauthorized \ - CancelAuthorization \ + CancelAuthorization DebugLinkLayout \ TxAckInput TxAckOutput TxAckPrev ifeq ($(BITCOIN_ONLY), 1) diff --git a/legacy/firmware/protob/messages-bitcoin.options b/legacy/firmware/protob/messages-bitcoin.options index 311553bc9..815e25633 100644 --- a/legacy/firmware/protob/messages-bitcoin.options +++ b/legacy/firmware/protob/messages-bitcoin.options @@ -55,23 +55,6 @@ MultisigRedeemScriptType.address_n max_count:8 HDNodePathType.address_n max_count:8 -GetOwnershipProof.address_n max_count:8 -GetOwnershipProof.coin_name max_size:21 -GetOwnershipProof.ownership_ids max_count:15 max_size:32 -GetOwnershipProof.commitment_data max_size:32 - -OwnershipProof.ownership_proof max_size:171 -OwnershipProof.signature max_size:65 - -GetOwnershipId.address_n max_count:8 -GetOwnershipId.coin_name max_size:21 - -OwnershipId.ownership_id max_size:32 - -AuthorizeCoinJoin.coordinator max_size:18 -AuthorizeCoinJoin.address_n max_count:8 -AuthorizeCoinJoin.coin_name max_size:21 - TxInput.address_n max_count:8 TxInput.prev_hash max_size:32 TxInput.script_sig max_size:1650 @@ -90,4 +73,11 @@ PrevInput.script_sig max_size:1650 PrevOutput.script_pubkey max_size:520 -TxAckPrevExtraDataWrapper.extra_data_chunk max_size:1024 +TxAckPrevExtraDataWrapper.extra_data_chunk type:FT_IGNORE + +# Unused messages. +AuthorizeCoinJoin skip_message:true +GetOwnershipId skip_message:true +OwnershipId skip_message:true +GetOwnershipProof skip_message:true +OwnershipProof skip_message:true diff --git a/legacy/firmware/protob/messages-debug.options b/legacy/firmware/protob/messages-debug.options index fc7e915ea..4e6b56e71 100644 --- a/legacy/firmware/protob/messages-debug.options +++ b/legacy/firmware/protob/messages-debug.options @@ -1,4 +1,6 @@ DebugLinkDecision.input max_size:33 +DebugLinkDecision.x type:FT_IGNORE +DebugLinkDecision.y type:FT_IGNORE DebugLinkState.layout max_size:1024 DebugLinkState.pin max_size:10 @@ -7,6 +9,7 @@ DebugLinkState.mnemonic_secret max_size:240 DebugLinkState.reset_word max_size:12 DebugLinkState.reset_entropy max_size:128 DebugLinkState.recovery_fake_word max_size:12 +DebugLinkState.layout_lines type:FT_IGNORE DebugLinkLog.bucket max_size:33 DebugLinkLog.text max_size:256 @@ -14,12 +17,8 @@ DebugLinkLog.text max_size:256 DebugLinkMemory.memory max_size:1024 DebugLinkMemoryWrite.memory max_size:1024 -# unused fields -DebugLinkState.layout_lines max_count:10 max_size:30 -DebugLinkLayout.lines max_count:10 max_size:30 -DebugLinkRecordScreen.target_directory max_size:1 -DebugLinkShowText.header_text max_size:1 -DebugLinkShowText.body_text max_count:1 -DebugLinkShowText.header_icon max_size:1 -DebugLinkShowText.icon_color max_size:1 -DebugLinkShowTextItem.content max_size:1 +# Unused messages. +DebugLinkLayout skip_message:true +DebugLinkRecordScreen skip_message:true +DebugLinkShowText skip_message:true +DebugLinkShowTextItem skip_message:true