Support chunked addresses in SignTX flow for Solana#6545
Conversation
7392411 to
c0c075e
Compare
c0c075e to
6f4d660
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds chunkify support to SolanaSignTx, matching the existing behavior in SolanaGetAddress. When enabled, recipient addresses are displayed in 4-character chunks on the device screen during the sign transaction confirmation flow.
Changes:
- Added
optional bool chunkify = 5field toSolanaSignTxprotobuf message and regenerated all message class bindings (Python, Rust) - Propagated the
chunkifyparameter through the predefined transaction confirmation call chain:sign_tx→try_confirm_predefined_transaction→confirm_system_transfer/confirm_token_transfer→confirm_solana_recipient→confirm_value - Added the
chunkifyparam toconfirm_solana_recipientin all four layout implementations (bolt, caesar, delizia, eckhart), plus a Caesar-specific fix to useconfirm_addresswith chunking in place ofconfirm_with_infowhenchunkify=Trueand info items are present; updated the Rustconfirm_addressbackend to callFlow::new(pages).with_menu(info_button)for debug tracing
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
common/protob/messages-solana.proto |
Adds optional bool chunkify = 5 to SolanaSignTx |
core/src/trezor/messages.py |
Adds chunkify field to core Python SolanaSignTx class |
python/src/trezorlib/messages.py |
Adds chunkify field to trezorlib Python SolanaSignTx class |
rust/trezor-client/src/protos/generated/messages_solana.rs |
Adds chunkify field to Rust SolanaSignTx struct with full getter/setter support |
python/src/trezorlib/solana.py |
Adds chunkify param to sign_tx() and forwards it to the message |
core/src/apps/solana/sign_tx.py |
Passes msg.chunkify to try_confirm_predefined_transaction |
core/src/apps/solana/predefined_transaction.py |
Propagates chunkify through predefined-transaction confirm helpers |
core/src/apps/solana/layout.py |
Passes bool(chunkify) to confirm_solana_recipient from both confirm_system_transfer and confirm_token_transfer |
core/src/trezor/ui/layouts/bolt/__init__.py |
Adds chunkify param to confirm_solana_recipient |
core/src/trezor/ui/layouts/caesar/__init__.py |
Adds chunkify param; uses confirm_address (with chunking) instead of confirm_with_info when chunkify=True and info_items present |
core/src/trezor/ui/layouts/delizia/__init__.py |
Adds chunkify param to confirm_solana_recipient |
core/src/trezor/ui/layouts/eckhart/__init__.py |
Adds chunkify param to confirm_solana_recipient |
core/embed/rust/src/ui/layout_caesar/ui_firmware.rs |
Adds .with_menu(info_button) to Flow in confirm_address (debug build only) |
tests/device_tests/solana/test_sign_tx.py |
Passes chunkify from fixture params to sign_tx() |
common/tests/fixtures/solana/sign_tx.predefined_transactions.json |
Adds chunkify: false/true variants to token transfer test cases |
common/tests/fixtures/solana/sign_tx.compute_budget_program.json |
Adds chunkify: true to two multi-instruction test cases |
core/.changelog.d/3446.fixed |
Adds changelog entry for the new feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6f4d660 to
e4c9cf2
Compare
|
Fixtures updated with the caveat that the Solana tests using This is acceptable for now as other tests where
|
e4c9cf2 to
c1e0a32
Compare
PrisionMike
left a comment
There was a problem hiding this comment.
Chunkification missing in a lot of places. Please re-visit.
|
@coderabbitai make me a similar issue for Tron as that too does not have chunkification as an argument for signing transactions. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain
The issue has been assigned to you. I'll post the link once the script runs. Let me know if you'd like to adjust the title, description, or assignee! 🏁 Script executed: Length of output: 53
Support chunked addresses in SignTx flow for Tron — #6730 It covers all the required changes (proto, message classes, trezorlib, core flow, layouts, and tests), with this PR ( |
69fef03 to
4f21ea3
Compare
|
@PrisionMike I had to rebase the PR because it was too old. I addressed your points. The only problem stays with visiting the menus in Caesar. |
PrisionMike
left a comment
There was a problem hiding this comment.
LGTM. Tiny questions and suggestions.
| @@ -0,0 +1 @@ | |||
| Allow chunkified recipient address in Solana transactions. | |||
There was a problem hiding this comment.
| Allow chunkified recipient address in Solana transactions. | |
| Allow chunkified addresses in Solana transactions. |
| chunkify=chunkify, | ||
| ) | ||
| else: | ||
| main = trezorui_api.confirm_with_info( |
There was a problem hiding this comment.
Why not use the same confirm_address function?
f1a9fd1 to
6cbe6f0
Compare





























































































































































Adds
chunkifysupport toSolanaSignTx, matching the existing pattern inSolanaGetAddress. The flag is propagated through the predefined transaction confirmation path toconfirm_value.Changes
optional bool chunkify = 5toSolanaSignTxinmessages-solana.prototrezorlib/messages.py,core/trezor/messages.py) and Rust (messages_solana.rs) message definitionschunkifyparam tosolana.sign_tx()sign_tx→try_confirm_predefined_transaction→confirm_system_transfer/try_confirm_token_transfer_transaction→confirm_token_transfer→confirm_solana_recipient→confirm_value(chunkify=...)chunkifyparam toconfirm_solana_recipientin all 4 layout variants (bolt, caesar, delizia, eckhart)test_solana_sign_tx_with_chunked_addressesexercisingchunkify=Trueagainst predefined transaction fixturesOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.