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

[#10195] Separate keystore dir per multiacc #10847

Merged
merged 1 commit into from
Jul 9, 2020
Merged

Conversation

rasom
Copy link
Contributor

@rasom rasom commented Jun 18, 2020

#10195

Having all keys related to specific multiacc in a separate dir will simplify removing of the multiacc.
Also it will allow adding of the same account to different multiaccs.

depends on status-im/status-go#1993

status: ready

@rasom rasom requested a review from a team as a code owner June 18, 2020 10:36
@status-im-auto
Copy link
Member

status-im-auto commented Jun 18, 2020

Jenkins Builds

Click to see older builds (56)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 5eb0811 #1 2020-06-18 10:48:01 ~11 min android-e2e 📦apk 📲
✔️ 5eb0811 #1 2020-06-18 10:48:07 ~11 min android 📦apk 📲
✔️ 5eb0811 #1 2020-06-18 10:50:41 ~14 min ios 📦ipa 📲
a29bfa0 #2 2020-06-22 12:05:46 ~4 min ios 📄log
a29bfa0 #2 2020-06-22 12:05:55 ~4 min android 📄log
a29bfa0 #2 2020-06-22 12:06:05 ~4 min android-e2e 📄log
✔️ 137a97a #4 2020-06-22 12:31:58 ~14 min ios 📦ipa 📲
✔️ 137a97a #4 2020-06-22 12:32:51 ~15 min android 📦apk 📲
✔️ 137a97a #4 2020-06-22 12:33:00 ~15 min android-e2e 📦apk 📲
✔️ 1b671a7 #6 2020-06-22 15:48:55 ~17 min android-e2e 📦apk 📲
✔️ 1b671a7 #6 2020-06-22 15:49:26 ~18 min android 📦apk 📲
✔️ 1b671a7 #6 2020-06-22 15:53:50 ~22 min ios 📦ipa 📲
✔️ a438dd1 #7 2020-06-23 15:49:19 ~12 min android-e2e 📦apk 📲
✔️ a438dd1 #7 2020-06-23 15:49:28 ~12 min android 📦apk 📲
✔️ a438dd1 #7 2020-06-23 15:55:12 ~18 min ios 📦ipa 📲
✔️ 334bd2b #8 2020-06-23 16:10:53 ~14 min android-e2e 📦apk 📲
✔️ 334bd2b #8 2020-06-23 16:10:58 ~14 min android 📦apk 📲
✔️ 334bd2b #8 2020-06-23 16:14:02 ~17 min ios 📦ipa 📲
✔️ 6264ce4 #9 2020-06-24 07:44:43 ~11 min android-e2e 📦apk 📲
✔️ 6264ce4 #9 2020-06-24 07:44:50 ~11 min android 📦apk 📲
✔️ 6264ce4 #9 2020-06-24 07:47:22 ~14 min ios 📦ipa 📲
✔️ c5837b6 #10 2020-06-24 13:20:04 ~11 min android-e2e 📦apk 📲
✔️ c5837b6 #10 2020-06-24 13:20:07 ~11 min android 📦apk 📲
✔️ c5837b6 #10 2020-06-24 13:27:26 ~19 min ios 📦ipa 📲
✔️ 8dbc55b #11 2020-06-24 14:57:23 ~8 min android 📦apk 📲
✔️ 8dbc55b #11 2020-06-24 14:58:13 ~9 min android-e2e 📦apk 📲
✔️ e807a44 #12 2020-06-24 15:14:15 ~11 min android 📦apk 📲
✔️ e807a44 #12 2020-06-24 15:15:44 ~13 min android-e2e 📦apk 📲
✔️ e807a44 #12 2020-06-24 15:19:00 ~16 min ios 📦ipa 📲
✔️ c4600f4 #13 2020-07-01 14:52:43 ~14 min android-e2e 📦apk 📲
✔️ c4600f4 #13 2020-07-01 14:52:46 ~14 min android 📦apk 📲
✔️ c4600f4 #13 2020-07-01 14:55:15 ~16 min ios 📦ipa 📲
✔️ 2d1520c #14 2020-07-02 02:11:49 ~13 min android 📦apk 📲
✔️ 2d1520c #14 2020-07-02 02:11:57 ~14 min android-e2e 📦apk 📲
✔️ 2d1520c #14 2020-07-02 02:14:16 ~16 min ios 📦ipa 📲
✔️ 5e9bdcf #15 2020-07-02 03:02:31 ~11 min android 📦apk 📲
✔️ 5e9bdcf #15 2020-07-02 03:04:13 ~13 min android-e2e 📦apk 📲
✔️ 5e9bdcf #15 2020-07-02 03:07:15 ~16 min ios 📦ipa 📲
✔️ 1f8f8d3 #16 2020-07-02 03:25:24 ~11 min android-e2e 📦apk 📲
✔️ 1f8f8d3 #16 2020-07-02 03:29:12 ~15 min android 📦apk 📲
✔️ 1f8f8d3 #16 2020-07-02 03:30:39 ~16 min ios 📦ipa 📲
✔️ a2dfae2 #17 2020-07-02 10:33:34 ~13 min ios 📦ipa 📲
✔️ a2dfae2 #17 2020-07-02 10:36:01 ~16 min android-e2e 📦apk 📲
✔️ a2dfae2 #17 2020-07-02 10:36:05 ~16 min android 📦apk 📲
✔️ 00e2380 #18 2020-07-06 09:09:30 ~8 min android 📦apk 📲
✔️ 00e2380 #18 2020-07-06 09:11:05 ~9 min android-e2e 📦apk 📲
✔️ 00e2380 #18 2020-07-06 09:15:12 ~14 min ios 📦ipa 📲
✔️ 24bc63e #19 2020-07-06 12:50:57 ~8 min android 📦apk 📲
✔️ 24bc63e #19 2020-07-06 12:51:53 ~9 min android-e2e 📦apk 📲
✔️ 24bc63e #19 2020-07-06 12:56:25 ~13 min ios 📦ipa 📲
✔️ e9de818 #20 2020-07-06 13:28:15 ~13 min android-e2e 📦apk 📲
✔️ e9de818 #20 2020-07-06 13:28:25 ~14 min android 📦apk 📲
✔️ e9de818 #20 2020-07-06 13:29:59 ~15 min ios 📦ipa 📲
✔️ eda3b12 #21 2020-07-07 15:56:19 ~12 min android 📦apk 📲
✔️ eda3b12 #21 2020-07-07 15:57:34 ~13 min android-e2e 📦apk 📲
✔️ eda3b12 #21 2020-07-07 15:57:40 ~13 min ios 📦ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ e2d1186 #22 2020-07-08 10:27:29 ~15 min ios 📦ipa 📲
✔️ e2d1186 #22 2020-07-08 10:27:44 ~16 min android 📦apk 📲
✔️ e2d1186 #22 2020-07-08 10:28:00 ~16 min android-e2e 📦apk 📲
✔️ 920bc7d #24 2020-07-09 10:28:20 ~12 min ios 📦ipa 📲
✔️ 920bc7d #24 2020-07-09 10:29:03 ~13 min android-e2e 📦apk 📲
✔️ 920bc7d #24 2020-07-09 10:29:07 ~13 min android 📦apk 📲

@hesterbruikman
Copy link
Contributor

fyi @johnlea-quiup as this relates to key management, specifically removing a 'multiaccount' (master keypair)

@rasom rasom self-assigned this Jun 22, 2020
@rasom rasom force-pushed the key-store-per-multiacc2 branch 5 times, most recently from 8dbc55b to e807a44 Compare June 24, 2020 15:02
@oskarth
Copy link
Contributor

oskarth commented Jul 1, 2020

Small request - could you please rebase to latest master so this commit b5fda12 gets included? This means we aren't running E2E tests on eth.prod cluster anymore, and since this happens on every push, the impact is quite big. This ensures we have more accurate metrics going forward from Jul 1 onward, which would be awesome. See https://discuss.status.im/t/user-growth-and-retention/1782 for more

@rasom rasom force-pushed the key-store-per-multiacc2 branch 2 times, most recently from 1f8f8d3 to a2dfae2 Compare July 2, 2020 10:19
@status-im-auto
Copy link
Member

99% of end-end tests have passed

Total executed tests: 94
Failed tests: 1
Passed tests: 93

Failed tests (1)

Click to expand
1. test_keycard_fetching_balance_after_offline

Transaction #5, amount is 0.002101327
{'blockNumber': '8212419', 'timeStamp': '1593684851', 'hash': '0xeaeccd60e83509b4626c07d52179894f60f675ce6d9707b434429e22fd16cdbf', 'nonce': '1232', 'blockHash': '0x62c47075b490b368e68dc4150cf33d07caad80ca56026ba0d160bc14e18c27af', 'from': '0xc8f8b3376814d0dfe61e4b9eaf7970697c24f6b2', 'contractAddress': '0xc55cf4b03948d7ebc8b9e8bad92643703811d162', 'to': '0xf184747445c3b85ceb147dfb136067cb93d95f1d', 'value': '2101327000000000', 'tokenName': 'Status Test Token', 'tokenSymbol': 'STT', 'tokenDecimal': '18', 'transactionIndex': '6', 'gas': '131542', 'gasPrice': '1000000000', 'gasUsed': '109619', 'cumulativeGasUsed': '614142', 'input': 'deprecated', 'confirmations': '508'}

Transaction with amount 0.002115921 is not found in list of transactions, address is f184747445c3B85CEb147DfB136067CB93d95F1D

Device sessions

Passed tests (93)

Click to expand
1. test_decline_transactions_in_1_1_chat
Device sessions

2. test_delete_chats_via_delete_button
Device sessions

3. test_can_see_all_transactions_in_history
Device sessions

4. test_install_pack_and_send_sticker
Device sessions

5. test_login_with_new_account
Device sessions

6. test_timestamp_in_chats
Device sessions

7. test_password_in_logcat_sign_in
Device sessions

8. test_logcat_recovering_account
Device sessions

9. test_public_chat_clear_history
Device sessions

10. test_need_help_section
Device sessions

11. test_send_and_open_links
Device sessions

12. test_mobile_data_usage_popup_stop_syncing
Device sessions

13. test_mobile_data_usage_settings
Device sessions

14. test_create_new_group_chat
Device sessions

15. test_sign_typed_message (TestRail link is not found)
Device sessions

16. test_user_can_switch_network
Device sessions

17. test_mobile_data_usage_popup_continue_syncing
Device sessions

18. test_home_view
Device sessions

19. test_open_google_com_via_open_dapp
Device sessions

20. test_share_contact_code_and_wallet_address
Device sessions

21. test_connection_is_secure
Device sessions

22. test_add_to_contacts
Device sessions

23. test_add_account_to_multiaccount_instance_private_key
Device sessions

24. test_refresh_button_browsing_app_webview
Device sessions

25. test_keycard_send_two_transactions_one_after_another_in_dapp
Device sessions

26. test_can_add_existing_ens
Device sessions

27. test_transaction_wrong_password_wallet
Device sessions

28. test_public_chat_messaging
Device sessions

29. test_unread_messages_counter_public_chat
Device sessions

30. test_keycard_send_eth_from_wallet_to_address
Device sessions

31. test_keycard_send_transaction_from_daap
Device sessions

32. test_text_message_1_1_chat
Device sessions

33. test_can_use_purchased_stickers_on_recovered_account
Device sessions

34. test_open_transaction_on_etherscan
Device sessions

35. test_onboarding_screen_when_requesting_tokens_for_recovered_account
Device sessions

36. test_contact_profile_view
Device sessions

37. test_offline_add_new_group_chat_member
Device sessions

38. test_logcat_backup_recovery_phrase
Device sessions

39. test_start_chat_with_ens
Device sessions

40. test_add_and_remove_contact_from_public_chat
Device sessions

41. test_add_account_to_multiaccount_instance_seed_phrase
Device sessions

42. test_open_blocked_site
Device sessions

43. test_open_chat_by_pasting_public_key
Device sessions

44. test_pair_devices_sync_one_to_one_contacts_public_chat
Device sessions

45. test_keycard_sign_message_from_daap
Device sessions

46. test_send_non_english_message_to_newly_added_contact
Device sessions

47. test_ens_username_recipient
Device sessions

48. test_fetch_more_history_in_empty_chat
Device sessions

49. test_open_public_chat_using_deep_link
Device sessions

50. test_switch_users_and_add_new_account
Device sessions

51. test_add_account_to_multiaccount_instance_generate_new
Device sessions

52. test_copy_contact_code_and_wallet_address
Device sessions

53. test_send_transaction_from_daap
Device sessions

54. test_send_two_transactions_one_after_another_in_dapp
Device sessions

55. test_image_in_one_to_one_send_save_reply
Device sessions

56. test_add_new_keycard_account_and_login
Device sessions

57. test_long_press_delete_clear_all_dapps
Device sessions

58. test_copy_and_paste_messages
Device sessions

59. test_back_forward_buttons_browsing_website
Device sessions

60. test_password_in_logcat_creating_account
Device sessions

61. test_sign_message_from_daap
Device sessions

62. test_dapps_permissions
Device sessions

63. test_request_public_key_status_test_daap
Device sessions

64. test_long_press_to_delete_chat
Device sessions

65. test_log_level_and_fleet
Device sessions

66. test_add_and_delete_watch_only_account_to_multiaccount_instance
Device sessions

67. test_recover_account_from_new_user_seedphrase
Device sessions

68. test_send_transaction_with_custom_token
Device sessions

69. test_send_eth_in_1_1_chat
Device sessions

70. test_send_two_transactions_in_batch_in_dapp
Device sessions

71. test_ens_in_public_and_1_1_chats
Device sessions

72. test_block_user_from_public_chat
Device sessions

73. test_fetching_balance_after_offline
Device sessions

74. test_offline_status
Device sessions

75. test_wallet_set_up
Device sessions

76. test_manage_assets
Device sessions

77. test_offline_messaging_1_1_chat
Device sessions

78. test_account_recovery_with_uppercase_recovery_phrase
Device sessions

79. test_send_token_with_7_decimals
Device sessions

80. test_user_can_see_all_own_assets_after_account_recovering
Device sessions

81. test_pass_phrase_validation
Device sessions

82. test_keycard_can_see_all_transactions_in_history
Device sessions

83. test_keycard_send_two_transactions_in_batch_in_dapp
Device sessions

84. test_send_emoji
Device sessions

85. test_filters_from_daap
Device sessions

86. test_redirect_to_public_chat_tapping_tag_message
Device sessions

87. test_restore_account_from_mnemonic_to_keycard
Device sessions

88. test_send_eth_to_ens_in_chat
Device sessions

89. test_send_eth_from_wallet_to_address
Device sessions

90. test_request_and_receive_stt_in_1_1_chat_offline
Device sessions

91. test_messaging_in_different_networks
Device sessions

92. test_collectible_from_wallet_opens_in_browser_view
Device sessions

93. test_insufficient_funds_wallet_positive_balance
Device sessions

@churik
Copy link
Member

churik commented Jul 3, 2020

Can't send transaction from account if it is added as separate multiaccount with keycard

Steps:

  • user A: restore multiaccount A from seed phrase A (choose keycard Storage), login
  • user B: create account > go to wallet > Add account > Enter seed phrase A > Confirm, log out
  • User A: login to multiaccount A
  • User A: try to send transaction

Expected result: can send Transaction
Actual result:
IMAGE 2020-07-03 17:36:03
Status-debug-logs.zip

@rasom
Copy link
Contributor Author

rasom commented Jul 6, 2020

user A: restore multiaccount A from seed phrase A (choose keycard Storage), login
user A: go to wallet > Add account > Enter seed phrase B > Confirm, log out

@churik is this even possible?

@churik
Copy link
Member

churik commented Jul 6, 2020

Previous issue is not reproducible with the same steps, but I've got another error:

Steps:

  1. user A: restore multiaccount A from seed phrase A (choose keycard Storage), login
  2. user B: create account > go to wallet > Add account > Enter seed phrase A > Confirm, log out
  3. User A: login to multiaccount A > send transaction > log out
  4. User B: login to multiaccount B > try to send transaction from added on 2 step account

Expected result: can send Transaction
Actual result:
IMAGE 2020-07-06 13:36:14

Logs: Status-debug-logs.zip

@churik
Copy link
Member

churik commented Jul 7, 2020

@rasom

'Cannot retrieve a valid key for a given multiaccount error' after upgrade with 2 multiaccounts

Steps:

  1. installed Status Pr for upgrade (used from Use interactive components from Quo #10686: https://status-im-prs.ams3.digitaloceanspaces.com/StatusIm-200706-103428-6df9a2-pr-universal.apk)
  2. recover multiaccount A
  3. log out
  4. create multiaccount B
  5. upgrade to PR build (https://status-im-prs.ams3.digitaloceanspaces.com/StatusIm-200706-131420-e9de81-pr-universal.apk)
  6. try to login to ordinary multiaccount

Expected result:
logged in successfully

Actual result: error Cannot retrieve a valid key for a given account: no key for given address or file"
If multiaccount A is keycard -> after login to multiaccount B/logout/login to multiaccount A, you'll see wallet/profile name of ordinary multiaccount B inside multiaccount A
Status-debug-logs.zip

@churik
Copy link
Member

churik commented Jul 8, 2020

Tested on Android 10:

  • upgrade with several multiaccounts (one of them was keycard with several accounts inside)
  • added account from seed phrase to ordinary account (already opened as keycard multiaccount)
  • checked transactions from added accounts

Tested on IOS 13:

  • "Account already exists" (when add account from seed phrase within same multiccount or adding the same account twice)
  • upgrade with several multiaccounts + enabled "Save my password"
  • added account from seed phrase to ordinary account (already opened as keycard multiaccount) and vise versa
  • checked transactions from added accounts.

Looks good to me, thank you for patience @rasom

Having all keys related to specific multiacc in a separate dir will
simplify removing of the multiacc. Also it will allow adding of the same
account to different multiaccs.
@rasom rasom merged commit 920bc7d into develop Jul 9, 2020
@rasom rasom deleted the key-store-per-multiacc2 branch July 9, 2020 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants