Skip to content
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

Monero primary address discrepancy between app and device #2453

Closed
bosomt opened this issue Aug 17, 2022 · 11 comments · Fixed by #2478
Closed

Monero primary address discrepancy between app and device #2453

bosomt opened this issue Aug 17, 2022 · 11 comments · Fixed by #2478
Assignees
Labels
bug Something isn't working as expected

Comments

@bosomt
Copy link

bosomt commented Aug 17, 2022

Describe the bug
I'm not sure if its expected or not or if it's problem with moneroGUI or Trezor.
But i was not able to replicate it with 2.5.1 FW.
When i press show address on device i see completely different address.
But it belongs to same account /i just sent some Monero to that address and i still have same amount of xmr.

When you create secondary address it works as expected. Device and app address does match, looks like only Primary address is affected.

Firmware version and revision

QA NOK Device: model T 2.5.2 regular (revision 0d87b55)
QA OK Device: model T 2.5.1 regular (revision 85a26d2)

Desktop/smartphone setup (please complete the following information):

  • Wallet software: moneroGUI 0.18.1.0-release (Qt 5.12.8)
  • OS: macARM

To Reproduce
Steps to reproduce the behavior:

  1. Go to moneroGUI/Receive
  2. Click on Shonw on device
  3. Check address on device display and confirm
  4. Compare with address displayed in app

Screenshots
Screenshot 2022-08-17 at 11 04 29

image

image

@bosomt bosomt added the bug Something isn't working as expected label Aug 17, 2022
@matejcik
Copy link
Contributor

@ph4r05 please take a look.
i vaguely remember something about unified addresses, could this be it?

@ph4r05
Copy link
Contributor

ph4r05 commented Aug 18, 2022

Interesting! Thanks for the report. Unfortunately, I am quite busy till 11.9.2022 so I am not sure I will find time to take a look at this till then.

@matejcik
Copy link
Contributor

@selsta since you are involved here, anything you can tell us about this issue from a quick look?
something something integrated address?

@hynek-jina hynek-jina moved this to 🎯 To do in Firmware Aug 25, 2022
@selsta
Copy link

selsta commented Aug 25, 2022

This does not seem related to integrated addresses. The primary address is a special case, it seems the firmware simply calculated subaddress(0, 0) instead of displaying the primary address. Should be easy to fix.

@ph4r05
Copy link
Contributor

ph4r05 commented Aug 31, 2022

Thanks for the diagnosis, @selsta. Your hypothesis seems to be correct. If subaddress indices are (0, 0), primary address should be displayed.

@matejcik this code is causing it

if have_subaddress:
assert msg.account is not None
assert msg.minor is not None
pub_spend, pub_view = monero.generate_sub_address_keys(
creds.view_key_private, creds.spend_key_public, msg.account, msg.minor
)
addr = addresses.encode_addr(
net_version(msg.network_type, True, False),
crypto_helpers.encodepoint(pub_spend),
crypto_helpers.encodepoint(pub_view),
)

PR #2478 fixes it (not tested).

ph4r05 added a commit to ph4r05/trezor-firmware that referenced this issue Aug 31, 2022
ph4r05 added a commit to ph4r05/trezor-firmware that referenced this issue Aug 31, 2022
@hynek-jina hynek-jina moved this from 🎯 To do to 🔥 Priority in Firmware Sep 8, 2022
@matejcik matejcik removed the blocked Blocked by external force. Third party inputs required. label Sep 9, 2022
Repository owner moved this from 🔥 Priority to 🤝 Needs QA in Firmware Sep 9, 2022
@bosomt
Copy link
Author

bosomt commented Sep 20, 2022

@ph4r05 looks like we need new moneroGUI version to test this fix, im not able to open or create new wallet.

monero-gui-mac-x64-v0.18.1.1

2022-09-20 18:45:21.983	E Get public address exception: Call method failed
2022-09-20 18:45:21.985	E Cannot get a device address

image

@selsta
Copy link

selsta commented Sep 20, 2022

This should be a purely firmware side issue, I don't see why a new GUI version should be required here. Did you make sure the Trezor bridge is installed?

@bosomt
Copy link
Author

bosomt commented Sep 20, 2022

Yes I have but new version Version: 2.0.32, as soon i changed it to Version: 2.0.31 and disabled PIN code im able to connect to device.

@bosomt
Copy link
Author

bosomt commented Sep 20, 2022

QA OK

addresses works as expected

  • Device: model T 2.5.3 Universal (revision 4bed278)
  • Transport: bridge 2.0.31

@selsta
Copy link

selsta commented Sep 20, 2022

might make sense to look into why bridge version 2.0.32 fails, but that's for a different issue

@bosomt bosomt moved this from 🤝 Needs QA to ✅ Approved in Firmware Sep 21, 2022
@bosomt
Copy link
Author

bosomt commented Sep 21, 2022

Works as expected today with 2.0.32 🤷🏿‍♂️

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants