mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-18 04:18:10 +00:00
chore(common): Rename "unstable" protobuf tag to "experimental_message".
[no changelog]
This commit is contained in:
parent
4e79eec188
commit
3d645d609a
@ -343,7 +343,7 @@ message TxAck {
|
|||||||
// optional uint32 block_height_bip115 = 9; // BIP-115 support dropped
|
// 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 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 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
|
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 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 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.
|
/** Data type for metadata about previous transaction which contains the UTXO being spent.
|
||||||
@ -438,7 +438,7 @@ message PrevOutput {
|
|||||||
* @next TxRequest
|
* @next TxRequest
|
||||||
*/
|
*/
|
||||||
message TxAckPaymentRequest {
|
message TxAckPaymentRequest {
|
||||||
option (unstable) = true;
|
option (experimental_message) = true;
|
||||||
|
|
||||||
optional bytes nonce = 1; // the nonce used in the signature computation
|
optional bytes nonce = 1; // the nonce used in the signature computation
|
||||||
required string recipient_name = 2; // merchant's name
|
required string recipient_name = 2; // merchant's name
|
||||||
|
@ -456,7 +456,7 @@ message RebootToBootloader {
|
|||||||
* @next Nonce
|
* @next Nonce
|
||||||
*/
|
*/
|
||||||
message GetNonce {
|
message GetNonce {
|
||||||
option (unstable) = true;
|
option (experimental_message) = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -464,7 +464,7 @@ message GetNonce {
|
|||||||
* @end
|
* @end
|
||||||
*/
|
*/
|
||||||
message Nonce {
|
message Nonce {
|
||||||
option (unstable) = true;
|
option (experimental_message) = true;
|
||||||
|
|
||||||
required bytes nonce = 1; // a 32-byte random value generated by Trezor
|
required bytes nonce = 1; // a 32-byte random value generated by Trezor
|
||||||
}
|
}
|
||||||
|
@ -54,13 +54,13 @@ extend google.protobuf.EnumOptions {
|
|||||||
|
|
||||||
/** Options for tagging message types */
|
/** Options for tagging message types */
|
||||||
extend google.protobuf.MessageOptions {
|
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
|
optional uint32 wire_type = 52002; // override wire type specified in the MessageType enum
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Options for tagging field types */
|
/** Options for tagging field types */
|
||||||
extend google.protobuf.FieldOptions {
|
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 */
|
/** Options for tagging files with protobuf definitions */
|
||||||
|
@ -164,7 +164,7 @@ class ProtoField:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def experimental(self):
|
def experimental(self):
|
||||||
return bool(self.extensions.get("experimental"))
|
return bool(self.extensions.get("experimental_field"))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_message(self):
|
def is_message(self):
|
||||||
@ -573,7 +573,7 @@ class RustBlobRenderer:
|
|||||||
raise ValueError("Unsupported wire type")
|
raise ValueError("Unsupported wire type")
|
||||||
|
|
||||||
flags_and_wire_type = wire_type
|
flags_and_wire_type = wire_type
|
||||||
if message.extensions.get("unstable"):
|
if message.extensions.get("experimental_message"):
|
||||||
flags_and_wire_type |= 0x8000
|
flags_and_wire_type |= 0x8000
|
||||||
|
|
||||||
return flags_and_wire_type
|
return flags_and_wire_type
|
||||||
|
@ -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
|
experimental_enabled = False
|
||||||
|
|
||||||
|
|
||||||
|
@ -188,7 +188,6 @@ class _MessageTypeMeta(type):
|
|||||||
|
|
||||||
class MessageType(metaclass=_MessageTypeMeta):
|
class MessageType(metaclass=_MessageTypeMeta):
|
||||||
MESSAGE_WIRE_TYPE: Optional[int] = None
|
MESSAGE_WIRE_TYPE: Optional[int] = None
|
||||||
UNSTABLE: bool = False
|
|
||||||
|
|
||||||
FIELDS: Dict[int, Field] = {}
|
FIELDS: Dict[int, Field] = {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user