monero icon indicating copy to clipboard operation
monero copied to clipboard

feat(trezor): add HF15 support, BP+

Open ph4r05 opened this issue 2 years ago • 29 comments

  • HP15 changes implemented to the Trezor client in Monero wallet
  • BP+ support added for Trezor
  • old Trezor firmware version support removed, code cleanup

Trezor firmware changes: https://github.com/trezor/trezor-firmware/pull/2232

ph4r05 avatar Apr 27 '22 16:04 ph4r05

Pinging @sethforprivacy that we have all code ready in PRs to support HF15

ph4r05 avatar Apr 28 '22 09:04 ph4r05

Pinging @sethforprivacy that we have all code ready in PRs to support HF15

Wow, that was quick, thank you! Will forward this on and update the checklist.

sethforprivacy avatar Apr 28 '22 13:04 sethforprivacy

Just pinging that Trezor PRs were merged

  • https://github.com/trezor/trezor-firmware/pull/2232
  • https://github.com/trezor/trezor-firmware/pull/2219

ph4r05 avatar May 26 '22 10:05 ph4r05

Thanks, @ph4r05, I pinged the Monero dev channel that this should be ready for review etc. yesterday, and will be sure we get it in ASAP.

Thank you for all of the hard work on this!

sethforprivacy avatar May 26 '22 12:05 sethforprivacy

Just to confirm, does the have the inv-8 reversion? https://github.com/monero-project/monero/pull/8277 (only merged 17 days ago)

I remember hearing that concern. The only branch with a commit since then (besides a version bump on the same day, present in this branch) is the "hackathon results" which seems to be cleaning up.

Any test on the current master which confirms TXs work would be sufficient to confirm :)

kayabaNerve avatar May 28 '22 00:05 kayabaNerve

@kayabaNerve thats a good point, let me check

ph4r05 avatar May 31 '22 18:05 ph4r05

@kayabaNerve you were right, I've incorporated the #8277 change. Trezor firmware needs the change as well, I will create the PR now.

ph4r05 avatar May 31 '22 19:05 ph4r05

Thanks, and sorry you're only hearing about this now after Trezor already did a merge. Happy we're catching it though, and thanks again for working on this :)

kayabaNerve avatar May 31 '22 20:05 kayabaNerve

No problem @kayabaNerve! I am glad we caught it before release! :)

ph4r05 avatar May 31 '22 20:05 ph4r05

hello @moneromooo-monero, if you pls find a minute, I would be grateful for PR review for upcoming HF upgrade, thanks a lot! :)

ph4r05 avatar Jun 13 '22 19:06 ph4r05

We will have a second release before the HF that will include this patch.

selsta avatar Jun 13 '22 19:06 selsta

@ph4r05 Just for completeness, did you test this on the current testnet? Are view tags working correctly in addition to BP+? Also is the firmware already out so that I can test this myself? If not, any approx release date?

selsta avatar Jun 20 '22 14:06 selsta

@selsta

  • ad testnet - I never test it on testnet. Trezor-tests are passing, they generate a synthetic blockchain, sign several transactions and daemon validates them with full node logic. So PR should work properly (this approach worked perfectly so far)
  • I have no clue what view tags are - have to look into it more
  • ad trezor release date: @matejcik

ph4r05 avatar Jun 20 '22 14:06 ph4r05

View tags: https://github.com/monero-project/monero/pull/8061

selsta avatar Jun 20 '22 14:06 selsta

There is definitely no view tags support added in Trezor. I will check it out this week and figure out required changes.

ph4r05 avatar Jun 20 '22 14:06 ph4r05

I asked @j-berman and he said

16:19 <jberman[m]> AFAICT trezor should be fine because they lean on the default `generate_output_ephemeral_keys` which handles view tags, but I'd need to test to know for sure and I don't have a trezor

but he only took a quick look himself. I think the easiest way would be to make a transaction on testnet, or change the fork height locally and try to construct a transaction.

selsta avatar Jun 20 '22 14:06 selsta

thanks @selsta for the ping! I've added view tag support to the trezor firmware: https://github.com/trezor/trezor-firmware/pull/2345. This PR is also updated. As wallet is using view_key to derive view tags, tx receiving code on the wallet side does not require changes.

trezor_tests are passing so I am pretty confident view_tags will work also on testnet / mainnet when HF15 is activated.

ph4r05 avatar Jun 20 '22 18:06 ph4r05

@matejcik It would be good to have a date for the Trezor firmware release as it's something that has to be done before we hardfork.

The current HF date is 2022-07-16, but we will likely push it back 2 weeks to around 2022-08-01. Is that enough time for Trezor to release a firmware update?

selsta avatar Jun 22 '22 18:06 selsta

@selsta We will not be releasing firmware sooner than August 17-ish. Does that mean breakage in the interim?

matejcik avatar Jun 27 '22 09:06 matejcik

@selsta are pls HF15 changes enforced on activation or is it still possible to send HF14 transactions to the network (normal Bulletproofs) for some time after HF15 activation?

If HF15 rules are enforced, Trezor won't be able to sign new transactions until new trezor-firmware update.

ph4r05 avatar Jun 27 '22 09:06 ph4r05

I believe there will be a 24 hour interim period where both transaction types are valid. After those 24 hours, only the new ones will be.

kayabaNerve avatar Jun 27 '22 12:06 kayabaNerve

@matejcik Would it be possible to split the firmware update in two? One for monero and one for the other planned changes? If not we will have to ask the monero community if they prefer to delay the hardfork or if they are okay with leaving Trezor users unable to transact for about 2 weeks. Both are not ideal :/

selsta avatar Jun 28 '22 20:06 selsta

@selsta thing is, there are no other planned changes right now .) but good news is, we considered this and decided to go ahead with July release. So the new firmware should be out by July 20.

matejcik avatar Jun 30 '22 12:06 matejcik

Bad news everyone. We will not be able to do a firmware release this month. The originally announced date, August 17, is back in the game. I've seen that you pushed back HF activation to August 13, so that is only four days of service disruption.

matejcik avatar Jul 04 '22 12:07 matejcik

Thank you for the update, four days shouldn't be too bad.

@ph4r05 Is there a way for me to install the firmware before the update is out? A nightly firmware build or something similar? I want to do some additional testing on testnet.

selsta avatar Jul 06 '22 02:07 selsta

@selsta you should be able to pick a firmware image from our CI pick a pipeline, the task you're looking for is core fw regular build, then browse the artifacts. here is latest master build

matejcik avatar Jul 08 '22 11:07 matejcik

Did some testing with the firmware image from CI, tx creation and receiving worked well on testnet.

selsta avatar Aug 03 '22 19:08 selsta

@ph4r05 please also open against release-v0.18

selsta avatar Aug 03 '22 19:08 selsta

@ph4r05 please also open against release-v0.18

Done @selsta: https://github.com/monero-project/monero/pull/8299 :) thanks!

ph4r05 avatar Aug 05 '22 12:08 ph4r05