Skip to content

Commit 604cfc0

Browse files
committed
merge: sync fork master with upstream keepkey/master
Brings in the 16 upstream commits the fork lacked: the 7.14.1 release, DylibTransport for in-process libkkemu testing, the EIP-1559 chunked-data regression test, message-signing bindings and the Copilot review workflow. Three conflicts, resolved on their merits: device-protocol -> b22fd8530 (the freshly-synced FORK master), NOT upstream's d637b782. The two pins are diverged and upstream's is missing messages-hive.proto and messages-near.proto, which this fork's own tests import; b22fd8530 verifiably contains BOTH pins and all four protos. client.py -> kept the fork file, dropped only the duplicated solana_sign_offchain_message. Taking upstream's file wholesale looked tempting and would have silently deleted five fork-only methods (hive_get_public_key/_keys, hive_sign_account_create/_update, hive_sign_tx). Verified after resolution: no method from EITHER side is missing, exactly one solana_sign_offchain_message remains, file parses. transport_dylib.py -> upstream's memset init, which replaces unpacking a FLASH_SIZE-element list as varargs. Same result, no argument-count risk.
2 parents 3a72308 + 075a719 commit 604cfc0

4 files changed

Lines changed: 33 additions & 12 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Request Copilot Review
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, ready_for_review, synchronize]
6+
7+
jobs:
8+
request-copilot-review:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
pull-requests: write
12+
steps:
13+
- name: Request Copilot review
14+
env:
15+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
run: |
17+
gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/requested_reviewers \
18+
-X POST \
19+
--field 'reviewers[]=Copilot'

keepkeylib/client.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,17 +1639,18 @@ def solana_sign_message(self, address_n, message, show_display=False):
16391639
)
16401640

16411641
@expect(solana_proto.SolanaOffchainMessageSignature)
1642-
def solana_sign_offchain_message(self, address_n, message, message_format,
1642+
def solana_sign_offchain_message(self, address_n, message, message_format=None,
16431643
version=0, show_display=False):
1644-
return self.call(
1645-
solana_proto.SolanaSignOffchainMessage(
1646-
address_n=address_n,
1647-
version=version,
1648-
message_format=message_format,
1649-
message=message,
1650-
show_display=show_display,
1651-
)
1652-
)
1644+
kwargs = {
1645+
"address_n": address_n,
1646+
"version": version,
1647+
"message": message,
1648+
"show_display": show_display,
1649+
}
1650+
if message_format is not None:
1651+
kwargs["message_format"] = message_format
1652+
1653+
return self.call(solana_proto.SolanaSignOffchainMessage(**kwargs))
16531654

16541655
# ── Tron ───────────────────────────────────────────────────
16551656
@expect(tron_proto.TronAddress)

keepkeylib/transport_dylib.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ def __init__(self, dylib_path):
9696

9797
# Allocate flash as 0xFF (erased NOR state). Held by the singleton so
9898
# GC doesn't free it underneath the firmware's still-live mlock.
99-
self.flash = (ctypes.c_uint8 * FLASH_SIZE)(*([0xFF] * FLASH_SIZE))
99+
self.flash = (ctypes.c_uint8 * FLASH_SIZE)()
100+
ctypes.memset(self.flash, 0xFF, FLASH_SIZE)
100101

101102
rc = self.lib.kkemu_init(ctypes.cast(self.flash, ctypes.c_void_p), FLASH_SIZE)
102103
if rc != 0:

0 commit comments

Comments
 (0)