From d19b58c1ab3b409df6482049eedfe999f131e025 Mon Sep 17 00:00:00 2001 From: M1nd3r Date: Wed, 4 Dec 2024 16:33:47 +0100 Subject: [PATCH] refactor(common): remove pairing_in/out and channel_in/out proto options [no changelog] --- common/protob/messages-thp.proto | 36 ++++++------ common/protob/options.proto | 4 -- .../src/protos/generated/messages_thp.rs | 56 +++++++++---------- .../src/protos/generated/options.rs | 40 +++++-------- 4 files changed, 57 insertions(+), 79 deletions(-) diff --git a/common/protob/messages-thp.proto b/common/protob/messages-thp.proto index 5fb24d055c..041f3bf482 100644 --- a/common/protob/messages-thp.proto +++ b/common/protob/messages-thp.proto @@ -15,24 +15,24 @@ option (include_in_bitcoin_only) = true; enum ThpMessageType { reserved 0 to 999; // Values reserved by other messages, see messages.proto - ThpMessageType_ThpCreateNewSession = 1000[(bitcoin_only)=true, (channel_in) = true]; - ThpMessageType_ThpNewSession = 1001[(bitcoin_only)=true, (channel_out) = true]; - ThpMessageType_ThpStartPairingRequest = 1008 [(bitcoin_only) = true, (pairing_in) = true]; - ThpMessageType_ThpPairingPreparationsFinished = 1009 [(bitcoin_only) = true, (pairing_out) = true]; - ThpMessageType_ThpCredentialRequest = 1010 [(bitcoin_only) = true, (pairing_in) = true]; - ThpMessageType_ThpCredentialResponse = 1011 [(bitcoin_only) = true, (pairing_out) = true]; - ThpMessageType_ThpEndRequest = 1012 [(bitcoin_only) = true, (pairing_in) = true]; - ThpMessageType_ThpEndResponse = 1013[(bitcoin_only) = true, (pairing_out) = true]; - ThpMessageType_ThpCodeEntryCommitment = 1016[(bitcoin_only)=true, (pairing_out) = true]; - ThpMessageType_ThpCodeEntryChallenge = 1017[(bitcoin_only)=true, (pairing_in) = true]; - ThpMessageType_ThpCodeEntryCpaceHost = 1018[(bitcoin_only)=true, (pairing_in) = true]; - ThpMessageType_ThpCodeEntryCpaceTrezor = 1019[(bitcoin_only)=true, (pairing_out) = true]; - ThpMessageType_ThpCodeEntryTag = 1020[(bitcoin_only)=true, (pairing_in) = true]; - ThpMessageType_ThpCodeEntrySecret = 1021[(bitcoin_only)=true, (pairing_out) = true]; - ThpMessageType_ThpQrCodeTag = 1024[(bitcoin_only)=true, (pairing_in) = true]; - ThpMessageType_ThpQrCodeSecret = 1025[(bitcoin_only)=true, (pairing_out) = true]; - ThpMessageType_ThpNfcUnidirectionalTag = 1032[(bitcoin_only)=true, (pairing_in) = true]; - ThpMessageType_ThpNfcUnidirectionalSecret = 1033[(bitcoin_only)=true, (pairing_in) = true]; + ThpMessageType_ThpCreateNewSession = 1000[(bitcoin_only)=true]; + ThpMessageType_ThpNewSession = 1001[(bitcoin_only)=true]; + ThpMessageType_ThpStartPairingRequest = 1008 [(bitcoin_only) = true]; + ThpMessageType_ThpPairingPreparationsFinished = 1009 [(bitcoin_only) = true]; + ThpMessageType_ThpCredentialRequest = 1010 [(bitcoin_only) = true]; + ThpMessageType_ThpCredentialResponse = 1011 [(bitcoin_only) = true]; + ThpMessageType_ThpEndRequest = 1012 [(bitcoin_only) = true]; + ThpMessageType_ThpEndResponse = 1013[(bitcoin_only) = true]; + ThpMessageType_ThpCodeEntryCommitment = 1016[(bitcoin_only)=true]; + ThpMessageType_ThpCodeEntryChallenge = 1017[(bitcoin_only)=true]; + ThpMessageType_ThpCodeEntryCpaceHost = 1018[(bitcoin_only)=true]; + ThpMessageType_ThpCodeEntryCpaceTrezor = 1019[(bitcoin_only)=true]; + ThpMessageType_ThpCodeEntryTag = 1020[(bitcoin_only)=true]; + ThpMessageType_ThpCodeEntrySecret = 1021[(bitcoin_only)=true]; + ThpMessageType_ThpQrCodeTag = 1024[(bitcoin_only)=true]; + ThpMessageType_ThpQrCodeSecret = 1025[(bitcoin_only)=true]; + ThpMessageType_ThpNfcUnidirectionalTag = 1032[(bitcoin_only)=true]; + ThpMessageType_ThpNfcUnidirectionalSecret = 1033[(bitcoin_only)=true]; reserved 1100 to 2147483647; // Values reserved by other messages, see messages.proto } diff --git a/common/protob/options.proto b/common/protob/options.proto index f4559a4499..6919d93ab5 100644 --- a/common/protob/options.proto +++ b/common/protob/options.proto @@ -37,10 +37,6 @@ The convention to achieve this is as follows: optional bool wire_tiny = 50006; // message is handled by Trezor when the USB stack is in tiny mode optional bool wire_bootloader = 50007; // message is only handled by Trezor Bootloader optional bool wire_no_fsm = 50008; // message is not handled by Trezor unless the USB stack is in tiny mode - optional bool channel_in = 50009; - optional bool channel_out = 50010; - optional bool pairing_in = 50011; - optional bool pairing_out = 50012; optional bool bitcoin_only = 60000; // enum value is available on BITCOIN_ONLY build // (messages not marked bitcoin_only will be EXCLUDED) diff --git a/rust/trezor-client/src/protos/generated/messages_thp.rs b/rust/trezor-client/src/protos/generated/messages_thp.rs index b449bb30da..9bd5e40d3d 100644 --- a/rust/trezor-client/src/protos/generated/messages_thp.rs +++ b/rust/trezor-client/src/protos/generated/messages_thp.rs @@ -4076,36 +4076,32 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x98\xb2\x19\x01\"\xa8\x01\n\x1eThpAuthenticatedCredentialData\x12,\n\ \x12host_static_pubkey\x18\x01\x20\x01(\x0cR\x10hostStaticPubkey\x12R\n\ \rcred_metadata\x18\x02\x20\x01(\x0b2-.hw.trezor.messages.thp.ThpCredent\ - ialMetadataR\x0ccredMetadata:\x04\x98\xb2\x19\x01*\xbe\x07\n\x0eThpMessa\ - geType\x121\n\"ThpMessageType_ThpCreateNewSession\x10\xe8\x07\x1a\x08\ - \x80\xa6\x1d\x01\xc8\xb5\x18\x01\x12+\n\x1cThpMessageType_ThpNewSession\ - \x10\xe9\x07\x1a\x08\x80\xa6\x1d\x01\xd0\xb5\x18\x01\x124\n%ThpMessageTy\ - pe_ThpStartPairingRequest\x10\xf0\x07\x1a\x08\x80\xa6\x1d\x01\xd8\xb5\ - \x18\x01\x12<\n-ThpMessageType_ThpPairingPreparationsFinished\x10\xf1\ - \x07\x1a\x08\x80\xa6\x1d\x01\xe0\xb5\x18\x01\x122\n#ThpMessageType_ThpCr\ - edentialRequest\x10\xf2\x07\x1a\x08\x80\xa6\x1d\x01\xd8\xb5\x18\x01\x123\ - \n$ThpMessageType_ThpCredentialResponse\x10\xf3\x07\x1a\x08\x80\xa6\x1d\ - \x01\xe0\xb5\x18\x01\x12+\n\x1cThpMessageType_ThpEndRequest\x10\xf4\x07\ - \x1a\x08\x80\xa6\x1d\x01\xd8\xb5\x18\x01\x12,\n\x1dThpMessageType_ThpEnd\ - Response\x10\xf5\x07\x1a\x08\x80\xa6\x1d\x01\xe0\xb5\x18\x01\x124\n%ThpM\ - essageType_ThpCodeEntryCommitment\x10\xf8\x07\x1a\x08\x80\xa6\x1d\x01\ - \xe0\xb5\x18\x01\x123\n$ThpMessageType_ThpCodeEntryChallenge\x10\xf9\x07\ - \x1a\x08\x80\xa6\x1d\x01\xd8\xb5\x18\x01\x123\n$ThpMessageType_ThpCodeEn\ - tryCpaceHost\x10\xfa\x07\x1a\x08\x80\xa6\x1d\x01\xd8\xb5\x18\x01\x125\n&\ - ThpMessageType_ThpCodeEntryCpaceTrezor\x10\xfb\x07\x1a\x08\x80\xa6\x1d\ - \x01\xe0\xb5\x18\x01\x12-\n\x1eThpMessageType_ThpCodeEntryTag\x10\xfc\ - \x07\x1a\x08\x80\xa6\x1d\x01\xd8\xb5\x18\x01\x120\n!ThpMessageType_ThpCo\ - deEntrySecret\x10\xfd\x07\x1a\x08\x80\xa6\x1d\x01\xe0\xb5\x18\x01\x12*\n\ - \x1bThpMessageType_ThpQrCodeTag\x10\x80\x08\x1a\x08\x80\xa6\x1d\x01\xd8\ - \xb5\x18\x01\x12-\n\x1eThpMessageType_ThpQrCodeSecret\x10\x81\x08\x1a\ - \x08\x80\xa6\x1d\x01\xe0\xb5\x18\x01\x125\n&ThpMessageType_ThpNfcUnidire\ - ctionalTag\x10\x88\x08\x1a\x08\x80\xa6\x1d\x01\xd8\xb5\x18\x01\x128\n)Th\ - pMessageType_ThpNfcUnidirectionalSecret\x10\x89\x08\x1a\x08\x80\xa6\x1d\ - \x01\xd8\xb5\x18\x01\"\x05\x08\0\x10\xe7\x07\"\t\x08\xcc\x08\x10\xff\xff\ - \xff\xff\x07*S\n\x10ThpPairingMethod\x12\x0c\n\x08NoMethod\x10\x01\x12\r\ - \n\tCodeEntry\x10\x02\x12\n\n\x06QrCode\x10\x03\x12\x16\n\x12NFC_Unidire\ - ctional\x10\x04B;\n#com.satoshilabs.trezor.lib.protobufB\x10TrezorMessag\ - eThp\x80\xa6\x1d\x01\ + ialMetadataR\x0ccredMetadata:\x04\x98\xb2\x19\x01*\xf6\x06\n\x0eThpMessa\ + geType\x12-\n\"ThpMessageType_ThpCreateNewSession\x10\xe8\x07\x1a\x04\ + \x80\xa6\x1d\x01\x12'\n\x1cThpMessageType_ThpNewSession\x10\xe9\x07\x1a\ + \x04\x80\xa6\x1d\x01\x120\n%ThpMessageType_ThpStartPairingRequest\x10\ + \xf0\x07\x1a\x04\x80\xa6\x1d\x01\x128\n-ThpMessageType_ThpPairingPrepara\ + tionsFinished\x10\xf1\x07\x1a\x04\x80\xa6\x1d\x01\x12.\n#ThpMessageType_\ + ThpCredentialRequest\x10\xf2\x07\x1a\x04\x80\xa6\x1d\x01\x12/\n$ThpMessa\ + geType_ThpCredentialResponse\x10\xf3\x07\x1a\x04\x80\xa6\x1d\x01\x12'\n\ + \x1cThpMessageType_ThpEndRequest\x10\xf4\x07\x1a\x04\x80\xa6\x1d\x01\x12\ + (\n\x1dThpMessageType_ThpEndResponse\x10\xf5\x07\x1a\x04\x80\xa6\x1d\x01\ + \x120\n%ThpMessageType_ThpCodeEntryCommitment\x10\xf8\x07\x1a\x04\x80\ + \xa6\x1d\x01\x12/\n$ThpMessageType_ThpCodeEntryChallenge\x10\xf9\x07\x1a\ + \x04\x80\xa6\x1d\x01\x12/\n$ThpMessageType_ThpCodeEntryCpaceHost\x10\xfa\ + \x07\x1a\x04\x80\xa6\x1d\x01\x121\n&ThpMessageType_ThpCodeEntryCpaceTrez\ + or\x10\xfb\x07\x1a\x04\x80\xa6\x1d\x01\x12)\n\x1eThpMessageType_ThpCodeE\ + ntryTag\x10\xfc\x07\x1a\x04\x80\xa6\x1d\x01\x12,\n!ThpMessageType_ThpCod\ + eEntrySecret\x10\xfd\x07\x1a\x04\x80\xa6\x1d\x01\x12&\n\x1bThpMessageTyp\ + e_ThpQrCodeTag\x10\x80\x08\x1a\x04\x80\xa6\x1d\x01\x12)\n\x1eThpMessageT\ + ype_ThpQrCodeSecret\x10\x81\x08\x1a\x04\x80\xa6\x1d\x01\x121\n&ThpMessag\ + eType_ThpNfcUnidirectionalTag\x10\x88\x08\x1a\x04\x80\xa6\x1d\x01\x124\n\ + )ThpMessageType_ThpNfcUnidirectionalSecret\x10\x89\x08\x1a\x04\x80\xa6\ + \x1d\x01\"\x05\x08\0\x10\xe7\x07\"\t\x08\xcc\x08\x10\xff\xff\xff\xff\x07\ + *S\n\x10ThpPairingMethod\x12\x0c\n\x08NoMethod\x10\x01\x12\r\n\tCodeEntr\ + y\x10\x02\x12\n\n\x06QrCode\x10\x03\x12\x16\n\x12NFC_Unidirectional\x10\ + \x04B;\n#com.satoshilabs.trezor.lib.protobufB\x10TrezorMessageThp\x80\ + \xa6\x1d\x01\ "; /// `FileDescriptorProto` object which was a source for this generated file diff --git a/rust/trezor-client/src/protos/generated/options.rs b/rust/trezor-client/src/protos/generated/options.rs index 5d96704fd9..79bcf5e347 100644 --- a/rust/trezor-client/src/protos/generated/options.rs +++ b/rust/trezor-client/src/protos/generated/options.rs @@ -42,14 +42,6 @@ pub mod exts { pub const wire_no_fsm: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(50008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - pub const channel_in: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(50009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const channel_out: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(50010, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const pairing_in: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(50011, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const pairing_out: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(50012, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - pub const bitcoin_only: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(60000, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); pub const has_bitcoin_only_values: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(51001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); @@ -76,25 +68,19 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x86\x03\x20\x01(\x08\x12!.google.protobuf.EnumValueOptionsR\x08wireTiny\ :L\n\x0fwire_bootloader\x18\xd7\x86\x03\x20\x01(\x08\x12!.google.protobu\ f.EnumValueOptionsR\x0ewireBootloader:C\n\x0bwire_no_fsm\x18\xd8\x86\x03\ - \x20\x01(\x08\x12!.google.protobuf.EnumValueOptionsR\twireNoFsm:B\n\ncha\ - nnel_in\x18\xd9\x86\x03\x20\x01(\x08\x12!.google.protobuf.EnumValueOptio\ - nsR\tchannelIn:D\n\x0bchannel_out\x18\xda\x86\x03\x20\x01(\x08\x12!.goog\ - le.protobuf.EnumValueOptionsR\nchannelOut:B\n\npairing_in\x18\xdb\x86\ - \x03\x20\x01(\x08\x12!.google.protobuf.EnumValueOptionsR\tpairingIn:D\n\ - \x0bpairing_out\x18\xdc\x86\x03\x20\x01(\x08\x12!.google.protobuf.EnumVa\ - lueOptionsR\npairingOut:F\n\x0cbitcoin_only\x18\xe0\xd4\x03\x20\x01(\x08\ - \x12!.google.protobuf.EnumValueOptionsR\x0bbitcoinOnly:U\n\x17has_bitcoi\ - n_only_values\x18\xb9\x8e\x03\x20\x01(\x08\x12\x1c.google.protobuf.EnumO\ - ptionsR\x14hasBitcoinOnlyValues:T\n\x14experimental_message\x18\xa1\x96\ - \x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x13experimenta\ - lMessage:>\n\twire_type\x18\xa2\x96\x03\x20\x01(\r\x12\x1f.google.protob\ - uf.MessageOptionsR\x08wireType:F\n\rinternal_only\x18\xa3\x96\x03\x20\ - \x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0cinternalOnly:N\n\ - \x12experimental_field\x18\x89\x9e\x03\x20\x01(\x08\x12\x1d.google.proto\ - buf.FieldOptionsR\x11experimentalField:U\n\x17include_in_bitcoin_only\ - \x18\xe0\xd4\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x14in\ - cludeInBitcoinOnlyB4\n#com.satoshilabs.trezor.lib.protobufB\rTrezorOptio\ - ns\ + \x20\x01(\x08\x12!.google.protobuf.EnumValueOptionsR\twireNoFsm:F\n\x0cb\ + itcoin_only\x18\xe0\xd4\x03\x20\x01(\x08\x12!.google.protobuf.EnumValueO\ + ptionsR\x0bbitcoinOnly:U\n\x17has_bitcoin_only_values\x18\xb9\x8e\x03\ + \x20\x01(\x08\x12\x1c.google.protobuf.EnumOptionsR\x14hasBitcoinOnlyValu\ + es:T\n\x14experimental_message\x18\xa1\x96\x03\x20\x01(\x08\x12\x1f.goog\ + le.protobuf.MessageOptionsR\x13experimentalMessage:>\n\twire_type\x18\ + \xa2\x96\x03\x20\x01(\r\x12\x1f.google.protobuf.MessageOptionsR\x08wireT\ + ype:F\n\rinternal_only\x18\xa3\x96\x03\x20\x01(\x08\x12\x1f.google.proto\ + buf.MessageOptionsR\x0cinternalOnly:N\n\x12experimental_field\x18\x89\ + \x9e\x03\x20\x01(\x08\x12\x1d.google.protobuf.FieldOptionsR\x11experimen\ + talField:U\n\x17include_in_bitcoin_only\x18\xe0\xd4\x03\x20\x01(\x08\x12\ + \x1c.google.protobuf.FileOptionsR\x14includeInBitcoinOnlyB4\n#com.satosh\ + ilabs.trezor.lib.protobufB\rTrezorOptions\ "; /// `FileDescriptorProto` object which was a source for this generated file