chore(ethereum): remove unused container paths
What changed, and why it matters
This commit removes two unused symbolic labels, TO and CHAIN_ID, from an internal Ethereum clear-signing data-format definition. It is a cleanup change with no functional code logic altered and no security relevance.
No security action required; treat as routine cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change deletes enum values TO=3 and CHAIN_ID=4 from EthereumERC7730ContainerPath across the protobuf definition and its generated bindings in Python, Rust, and Trezor core. The clear_signing.py module also drops the same constants. No parsing, validation, or signing logic is modified; the values were reportedly unused.
Changed components
common/protob/messages-definitions.protocore/src/apps/ethereum/clear_signing.pycore/src/trezor/enums/EthereumERC7730ContainerPath.pycore/src/trezor/enums/__init__.pypython/src/trezorlib/messages.pyrust/trezor-client/src/protos/generated/messages_definitions.rsInspect captured patch +3 / −26
diff --git a/common/protob/messages-definitions.proto b/common/protob/messages-definitions.proto
index 55c8f620..8788ea5d 100644
--- a/common/protob/messages-definitions.proto
+++ b/common/protob/messages-definitions.proto
@@ -136,8 +136,6 @@ enum EthereumERC7730FieldFormatterType {
enum EthereumERC7730ContainerPath {
FROM = 1;
VALUE = 2;
- TO = 3;
- CHAIN_ID = 4;
}
/**
diff --git a/core/src/apps/ethereum/clear_signing.py b/core/src/apps/ethereum/clear_signing.py
index fa078508..eb5fd0c0 100644
--- a/core/src/apps/ethereum/clear_signing.py
+++ b/core/src/apps/ethereum/clear_signing.py
@@ -549,8 +549,6 @@ class Array(ABIValue):
class ContainerPath:
From = 1
Value = 2
- To = 3
- ChainID = 4
class FieldDefinition:
diff --git a/core/src/trezor/enums/EthereumERC7730ContainerPath.py b/core/src/trezor/enums/EthereumERC7730ContainerPath.py
index 5bafd164..2ddcb86c 100644
--- a/core/src/trezor/enums/EthereumERC7730ContainerPath.py
+++ b/core/src/trezor/enums/EthereumERC7730ContainerPath.py
@@ -4,5 +4,3 @@
FROM = 1
VALUE = 2
-TO = 3
-CHAIN_ID = 4
diff --git a/core/src/trezor/enums/__init__.py b/core/src/trezor/enums/__init__.py
index 7db5742a..5ad21cb7 100644
--- a/core/src/trezor/enums/__init__.py
+++ b/core/src/trezor/enums/__init__.py
@@ -321,8 +321,6 @@ if TYPE_CHECKING:
class EthereumERC7730ContainerPath(IntEnum):
FROM = 1
VALUE = 2
- TO = 3
- CHAIN_ID = 4
class EthereumDataType(IntEnum):
UINT = 1
diff --git a/python/src/trezorlib/messages.py b/python/src/trezorlib/messages.py
index 6fc59135..d59e30ec 100644
--- a/python/src/trezorlib/messages.py
+++ b/python/src/trezorlib/messages.py
@@ -364,8 +364,6 @@ class EthereumERC7730FieldFormatterType(IntEnum):
class EthereumERC7730ContainerPath(IntEnum):
FROM = 1
VALUE = 2
- TO = 3
- CHAIN_ID = 4
class EthereumDataType(IntEnum):
diff --git a/rust/trezor-client/src/protos/generated/messages_definitions.rs b/rust/trezor-client/src/protos/generated/messages_definitions.rs
index 83208a36..8ff7c144 100644
--- a/rust/trezor-client/src/protos/generated/messages_definitions.rs
+++ b/rust/trezor-client/src/protos/generated/messages_definitions.rs
@@ -2635,10 +2635,6 @@ pub enum EthereumERC7730ContainerPath {
FROM = 1,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.definitions.EthereumERC7730ContainerPath.VALUE)
VALUE = 2,
- // @@protoc_insertion_point(enum_value:hw.trezor.messages.definitions.EthereumERC7730ContainerPath.TO)
- TO = 3,
- // @@protoc_insertion_point(enum_value:hw.trezor.messages.definitions.EthereumERC7730ContainerPath.CHAIN_ID)
- CHAIN_ID = 4,
}
impl ::protobuf::Enum for EthereumERC7730ContainerPath {
@@ -2652,8 +2648,6 @@ impl ::protobuf::Enum for EthereumERC7730ContainerPath {
match value {
1 => ::std::option::Option::Some(EthereumERC7730ContainerPath::FROM),
2 => ::std::option::Option::Some(EthereumERC7730ContainerPath::VALUE),
- 3 => ::std::option::Option::Some(EthereumERC7730ContainerPath::TO),
- 4 => ::std::option::Option::Some(EthereumERC7730ContainerPath::CHAIN_ID),
_ => ::std::option::Option::None
}
}
@@ -2662,8 +2656,6 @@ impl ::protobuf::Enum for EthereumERC7730ContainerPath {
match str {
"FROM" => ::std::option::Option::Some(EthereumERC7730ContainerPath::FROM),
"VALUE" => ::std::option::Option::Some(EthereumERC7730ContainerPath::VALUE),
- "TO" => ::std::option::Option::Some(EthereumERC7730ContainerPath::TO),
- "CHAIN_ID" => ::std::option::Option::Some(EthereumERC7730ContainerPath::CHAIN_ID),
_ => ::std::option::Option::None
}
}
@@ -2671,8 +2663,6 @@ impl ::protobuf::Enum for EthereumERC7730ContainerPath {
const VALUES: &'static [EthereumERC7730ContainerPath] = &[
EthereumERC7730ContainerPath::FROM,
EthereumERC7730ContainerPath::VALUE,
- EthereumERC7730ContainerPath::TO,
- EthereumERC7730ContainerPath::CHAIN_ID,
];
}
@@ -2686,8 +2676,6 @@ impl ::protobuf::EnumFull for EthereumERC7730ContainerPath {
let index = match self {
EthereumERC7730ContainerPath::FROM => 0,
EthereumERC7730ContainerPath::VALUE => 1,
- EthereumERC7730ContainerPath::TO => 2,
- EthereumERC7730ContainerPath::CHAIN_ID => 3,
};
Self::enum_descriptor().value_by_index(index)
}
@@ -2759,10 +2747,9 @@ static file_descriptor_proto_data: &'static [u8] = b"\
\x12\x0e\n\nABI_STRING\x10\x15*\x85\x01\n!EthereumERC7730FieldFormatterT\
ype\x12\x1a\n\x16FORMATTER_ADDRESS_NAME\x10\0\x12\x14\n\x10FORMATTER_AMO\
UNT\x10\x01\x12\x1a\n\x16FORMATTER_TOKEN_AMOUNT\x10\x02\x12\x12\n\x0eFOR\
- MATTER_UNIT\x10\x03*I\n\x1cEthereumERC7730ContainerPath\x12\x08\n\x04FRO\
- M\x10\x01\x12\t\n\x05VALUE\x10\x02\x12\x06\n\x02TO\x10\x03\x12\x0c\n\x08\
- CHAIN_ID\x10\x04B?\n#com.satoshilabs.trezor.lib.protobufB\x18TrezorMessa\
- geDefinitions\
+ MATTER_UNIT\x10\x03*3\n\x1cEthereumERC7730ContainerPath\x12\x08\n\x04FRO\
+ M\x10\x01\x12\t\n\x05VALUE\x10\x02B?\n#com.satoshilabs.trezor.lib.protob\
+ ufB\x18TrezorMessageDefinitions\
";
/// `FileDescriptorProto` object which was a source for this generated file
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.