-
-
Notifications
You must be signed in to change notification settings - Fork 680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XMR: HP15 support, implement BulletproofPlus, refactor and cleanup #2232
XMR: HP15 support, implement BulletproofPlus, refactor and cleanup #2232
Conversation
795c06a
to
206e0b7
Compare
- implement BulletProof plus verifier and prover - use bulletproof exception to signalize proof generation failed and should be tried again. More robust, fixes bug that was not triggered yet (return tuple did not work properly in all situations) - precomputed 2**i vector is removed as it can be easily computed - BP code cleanup, minor optimizations, comments
206e0b7
to
b3b3d31
Compare
When I tried to install firmware with this new BP+ version the image was too big to fit to the flash memory. For now I removed upper 4096B from old |
Interestingly, after device starts, I get HP internal error with "please, unplug the device" error message. Ideas how to diagnose it? The same bug is also on the branch 5b2ab09, so I presume it is a problem of #2219. Can you pls try building it and running on a real device to check if we can replicate it? Thanks! :) What is worrying is that after the device prints that error, it starts sending random keypresses to the connected PC, mostly moving cursor around and scrolling. Does it behave like USB keyboard? This looks quite funny / suspicious. UPDATE: Once I rebased this branch on master, problem was fixed. |
7793246
to
c78ee86
Compare
Another thing - I need to update protobuf defs in order to support new HF. But it needs to be merged so I can open Monero Wallet PR. Any ideas on a timeframe for the PR being merged? :) |
Sometime next week. Probably after the freeze on Tuesday. |
c78ee86
to
ff13988
Compare
OK update - I've implemented HF15 support now. All required changes are pushed in this PR, no protobuf change is required for Monero Wallet to work. Update: I have to test BP verification on 16 inputs on a real device, there is a small memory problem here. |
1c0dd59
to
bc94e3c
Compare
OK I solved it. Monero wallet related changes: monero-project/monero#8299 Device tests pass on a real device in max setting, HF13 (now) and HF15 (july, BP+). I will build trezor_tests blob soon. |
- old BP GI, HI constants are shortened to reduce firmware size
f98a2c7
to
67f52b3
Compare
Thank you so much for all of the hard work on this, @ph4r05! Great to see such top-notch support for Monero on Trezor. |
Thanks @sethforprivacy! It was really fun implementing Bulletproof+ for Trezor :) Also thanks for pinging us ahead of time |
@matejcik new testing binary blob that is able to test both HF13 and HF15 https://github.com/ph4r05/monero/releases/tag/v0.17.3.2-dev-tests-u18.04-01 It would be awesome if we could also fix this for a next release #2217. It also slows down tx sign procedure if there are more UTXOs. |
67f52b3
to
d8876f8
Compare
Another thing, I hard-coded to the monero wallet that firmware version 2.5.1 supports HF15. Should a new firmware with the PR included have higher version, pls let me know so I change it in the monero PR. thanks! |
💩 didn't notice this one. |
@ph4r05 Is there anything that can/need to be tested on our side for 2.5.2 or discovery/send/receive of TX is enough ?
|
it will be enough, but afer HF15 activates on Aug 13 https://www.getmonero.org/2022/04/20/network-upgrade-july-2022.html |
QA OK
|
Please open another issue for this |
Changes:
Based on PR #2219
A new hardfork is being prepared, part of which is a new Bulletproof+ protocol.
Other related info:
Technical note
I had to add new BP+
GI
,HI
constants. This increases firmware memory footprint by 16kB, TWO vector was removed, so total 14 kB increase. Until the new hard-fork is activated, we have to keep both old and new constants to make computation possible. If there is a problem with memory, we can shorten older BP constants by half (which causes longer generation times as the rest has to be costly computed on-the-fly). In that case the total extra size would be 6144 B.