diff --git a/common/protob/messages-bitcoin.proto b/common/protob/messages-bitcoin.proto index 0a9503d758..772fec1860 100644 --- a/common/protob/messages-bitcoin.proto +++ b/common/protob/messages-bitcoin.proto @@ -343,7 +343,7 @@ message TxAck { // optional uint32 block_height_bip115 = 9; // BIP-115 support dropped optional bytes orig_hash = 10; // tx_hash of the original transaction where this output was present (used when creating a replacement transaction) optional uint32 orig_index = 11; // index of the output in the original transaction (used when creating a replacement transaction) - optional uint32 payment_req_index = 12 [(experimental)=true]; // index of the PaymentRequest containing this output + optional uint32 payment_req_index = 12 [(experimental_field)=true]; // index of the PaymentRequest containing this output } } } @@ -388,7 +388,7 @@ message TxOutput { reserved 7, 8, 9; // fields which are in use, or have been in the past, in TxOutputType optional bytes orig_hash = 10; // tx_hash of the original transaction where this output was present (used when creating a replacement transaction) optional uint32 orig_index = 11; // index of the output in the original transaction (used when creating a replacement transaction) - optional uint32 payment_req_index = 12 [(experimental)=true]; // index of the PaymentRequest containing this output + optional uint32 payment_req_index = 12 [(experimental_field)=true]; // index of the PaymentRequest containing this output } /** Data type for metadata about previous transaction which contains the UTXO being spent. @@ -438,7 +438,7 @@ message PrevOutput { * @next TxRequest */ message TxAckPaymentRequest { - option (unstable) = true; + option (experimental_message) = true; optional bytes nonce = 1; // the nonce used in the signature computation required string recipient_name = 2; // merchant's name diff --git a/common/protob/messages-management.proto b/common/protob/messages-management.proto index adde7b885d..eb732fc6db 100644 --- a/common/protob/messages-management.proto +++ b/common/protob/messages-management.proto @@ -456,7 +456,7 @@ message RebootToBootloader { * @next Nonce */ message GetNonce { - option (unstable) = true; + option (experimental_message) = true; } /** @@ -464,7 +464,7 @@ message GetNonce { * @end */ message Nonce { - option (unstable) = true; + option (experimental_message) = true; required bytes nonce = 1; // a 32-byte random value generated by Trezor } diff --git a/common/protob/messages.proto b/common/protob/messages.proto index 00c19eaaa5..c0ea0ff753 100644 --- a/common/protob/messages.proto +++ b/common/protob/messages.proto @@ -54,13 +54,13 @@ extend google.protobuf.EnumOptions { /** Options for tagging message types */ extend google.protobuf.MessageOptions { - optional bool unstable = 52001; // indicate that a message is experimental, intended for development and beta testing only and its definition may change at any time + optional bool experimental_message = 52001; // indicate that a message is intended for development and beta testing only and its definition may change at any time optional uint32 wire_type = 52002; // override wire type specified in the MessageType enum } /** Options for tagging field types */ extend google.protobuf.FieldOptions { - optional bool experimental = 53001; // indicate that a field is intended for development and beta testing only + optional bool experimental_field = 53001; // indicate that a field is intended for development and beta testing only } /** Options for tagging files with protobuf definitions */ diff --git a/common/protob/pb2py b/common/protob/pb2py index cf5280bfdb..28b6ae0370 100755 --- a/common/protob/pb2py +++ b/common/protob/pb2py @@ -164,7 +164,7 @@ class ProtoField: @property def experimental(self): - return bool(self.extensions.get("experimental")) + return bool(self.extensions.get("experimental_field")) @property def is_message(self): @@ -573,7 +573,7 @@ class RustBlobRenderer: raise ValueError("Unsupported wire type") flags_and_wire_type = wire_type - if message.extensions.get("unstable"): + if message.extensions.get("experimental_message"): flags_and_wire_type |= 0x8000 return flags_and_wire_type diff --git a/core/src/trezor/wire/__init__.py b/core/src/trezor/wire/__init__.py index 5d53e0befb..d38f9087aa 100644 --- a/core/src/trezor/wire/__init__.py +++ b/core/src/trezor/wire/__init__.py @@ -87,7 +87,7 @@ if TYPE_CHECKING: ... -# If set to False protobuf messages marked with "unstable" option are rejected. +# If set to False protobuf messages marked with "experimental_message" option are rejected. experimental_enabled = False diff --git a/python/src/trezorlib/protobuf.py b/python/src/trezorlib/protobuf.py index 05cc40b011..101bfccfe1 100644 --- a/python/src/trezorlib/protobuf.py +++ b/python/src/trezorlib/protobuf.py @@ -188,7 +188,6 @@ class _MessageTypeMeta(type): class MessageType(metaclass=_MessageTypeMeta): MESSAGE_WIRE_TYPE: Optional[int] = None - UNSTABLE: bool = False FIELDS: Dict[int, Field] = {}