Eth stream#1739
Merged
benma merged 7 commits intoBitBoxSwiss:masterfrom Feb 14, 2026
Merged
Conversation
8976b36 to
9671437
Compare
benma
requested changes
Jan 27, 2026
benma
reviewed
Jan 29, 2026
benma
reviewed
Jan 29, 2026
benma
requested changes
Feb 2, 2026
b5a3f42 to
e89eafa
Compare
benma
requested changes
Feb 9, 2026
benma
reviewed
Feb 9, 2026
97aad1e to
56eee94
Compare
benma
requested changes
Feb 12, 2026
benma
reviewed
Feb 12, 2026
56eee94 to
90a4df3
Compare
So it can handle ETH transactions with very large data fields that can't be sent by the host in one USB packet. The Go code to produce the tests has been adjusted to work with the updated go-ethereum package, and to output the data using the `SimpleProducer`.
update existing tests to include the new data length field Adds new protobuf fields to support streaming large transaction data: - data_length: Indicates total data size (triggers streaming mode if > 6144) - EthSignDataRequestChunkResponse: Request for a data chunk at offset/length - EthSignDataResponseChunkRequest: Response containing the requested chunk Regenerates all protobuf files (Python, Rust, C) from the updated .proto. Updates existing tests to populate the new data_length field (set to 0 for traditional mode where all data is sent inline).
90a4df3 to
cfef931
Compare
cfef931 to
e443e85
Compare
Implements the DataProducer trait with two implementations: - SimpleProducer: Returns all data in one call (for small data) - ChunkingProducer: Fetches data in 4096-byte chunks via IPC (for large data) Updates DataProducer::next() to return Result<Option<Vec<u8>>, Error> instead of Option<Vec<u8>> for proper error handling. Updates sighash computation functions (compute_legacy, compute_eip1559) to: - Accept DataProducer via RefCell for async access - Propagate errors through the call chain - Use the Write trait to stream data into the hasher Updates sign.rs hash functions to use ChunkingProducer when data_length > 0, otherwise use SimpleProducer with inline data.
Adds _handle_eth_chunking() method to BitBox02 class to handle the chunk request/response loop for ETH transactions with large data fields. Updates eth_sign() and eth_sign_eip1559() to: - Set data_length field when data exceeds 6144 bytes - Call _handle_eth_chunking() to process chunk requests - Use empty data field when streaming (data is sent incrementally) Updates send_message.py with a streaming test case for validation.
extracts the go scripts that generate eth sighash test data into a standalone go script and commits generate json data
Adds transactions with large data (about 20% of total txs) to the sighash go script to unit test the chunking producer - test sign.rs to test that new streaming mode produces same signatures as non-streaming - test that streaming large data produces signatures of expected size eth: prepare tests for eth sighash streaming prepares initial unit tests for simple and chunking producer for data streaming tests generated by Claude Code
e443e85 to
22fd96b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.