Repository navigation
General refact, and removing dead calls - #930
joaozinhom wants to merge 5 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #930 +/- ##
========================================
Coverage 97.60% 97.61%
========================================
Files 84 85 +1
Lines 10994 11007 +13
========================================
+ Hits 10731 10744 +13
Misses 263 263 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
LGTM.
I think it's a reasonable PR and i share some thouhgts on that like the imports and naming the try function on kef (so @jdlcdl eyes). It need some check on codecov report too since some untouched missing lines -- IDK if it's related.
Since this touches a important module i will just share some thoughts on docsstrings nits for now an a doubt about the sha256d name (althought the code explains by itself IMO).:
|
Something I don't think is worth changing in a refactor: 985f059 silently moves several hashes from software to K210 hardware SHA This is labeled chore: refact, but it is a real on-device behavior change, not a no-op. bip39.entropy_checksum, key.py:349, capture_entropy.capture, dice_rolls, sign_message_ui, and encryption.MnemonicStorage._deprecated_decrypt previously used MaixPy's software hashlib (a full implementation, port/src/uhashlib/hashlib.c); they now route through uhashlib_hw, the hardware accelerator. |
Good catch! I'll fix |
e93c922 to
0d37eba
Compare
qlrd
left a comment
There was a problem hiding this comment.
3rd round :)
Wen running without rebase, all went well:
gh pr checkout 930
git submodule update --recursive
uv sync --frozen --reinstall-package=uUR
uv run poe pre-commitBut due to recent updates, also did:
git reset --hard cleanup/dependencies_and_dead_code
git rebase origin/developAnd got some conflicts locally but easy to resolve (i think).
i will take a look |
|
@qlrd you thinki should rebase to develop and change the base here on PR? iv already made it in other branch and everithing looks fine joaozinhom#6 |
i think would be good. I noted now that is pointed to |
0d37eba to
3177fd7
Compare
qlrd
left a comment
There was a problem hiding this comment.
some nit, i think this will reduce diff while keep functionality, wdyt?
3177fd7 to
e407917
Compare
601ae94 to
38f7fb6
Compare
notTanveer
left a comment
There was a problem hiding this comment.
i can still see changes in firmware/MaixPy and vendor/embit. this branch is not properly rebased. can you do a proper rebase on develop.
also there's a new file disclaimer.py which needs to be updated.
38f7fb6 to
b091561
Compare
b091561 to
f1026b8
Compare
notTanveer
left a comment
There was a problem hiding this comment.
i can still see the old relative imports here:
- src/krux/camera.py:88 from .display import display, SPLASH
- tests/pages/test_disclaimer.py:2,53,77,99 from . import create_ctx / from ..shared_mocks
- tests/pages/test_mnemonic_loader.py:3 from . import create_ctx
f1026b8 to
489b1b6
Compare
qlrd
left a comment
There was a problem hiding this comment.
some nits, idk yet if blockable or not:
489b1b6 to
479ccaa
Compare
qlrd
left a comment
There was a problem hiding this comment.
Overall good! just a doubt now that need better understanding of mine:
8fda859 to
94dc14c
Compare
qlrd
left a comment
There was a problem hiding this comment.
Nice, almost look good! just a last nit:
94dc14c to
ffcdb7a
Compare
|
Host-side Tested ACK on ffcdb7a, compared with 2937a29. Full suites: base 1,194 passed / 1 xfailed; PR 1,199 passed / 1 xfailed. Native SegWit, Taproot and Taproot Miniscript fixtures produced identical recipient/amount/change/fee review messages and exported signed PSBTs. Message signing, cancellation/retry and legacy ECB/CBC decryption also matched. Checked hash vectors and backend routing. The new tests caught four injected routing/truncation faults. No blocking findings. Tested on CPython 3.12.14 with native secp256k1 and uUR. Hardware hashing was mocked; no firmware build, physical K210/ktool boot test or live regtest run. |
There was a problem hiding this comment.
this PR needs a rebase. because we now pin 3.11.17 and 3.12.15
There was a problem hiding this comment.
@notTanveer good catch, but the pinning is not in develop yet, it only landed on main (e1961d0, merged via #967). I think we forgot to sync develop with main.
@jdlcdl I think the correct fix is to merge main into develop first (as done before in 0cf754d), which brings the python pinning and the CCA keys leak release lock, and then I re-rebase this PR on the updated develop. On my side I will drop or rewrite the "bump python minimals" commit, since it relaxed the pins to 3.11/3.12 and main now pins exact 3.11.17/3.12.15, so it will conflict and is likely superseded by main's CI changes.
wdyt?
There was a problem hiding this comment.
Quick check before I clean things up: is the diff in kkdao#4 (suggestions with translations) still useful for this PR? If it's not relevant anymore, I'll close the sub-PR.
ACK
There was a problem hiding this comment.
I'm just seeing this now, merging main into develop creates conflicts.
will look at pr967, already in main, to see how best to get it's changes into develop.
I've created a "develop_two" branch in my fork of Krux, can see the changes that would go to "develop" before I actually push it. develop...jdlcdl:develop_two
pr977, submitted Nov 15th are the 2 commits already merged into main from pr967.
What is this PR for?
This Pr intention is to solve a lot of minor nits that i notice reading the krux codebase.
Changes made to:
Did you build the code and tested on device?
What is the purpose of this pull request?