mysteriumnetwork / mysterium-vpn-mobile

Mobile client for Mysterium Network
GNU General Public License v3.0
210 stars 48 forks source link

Mainnet mobile app doesn't tries/retries identity registration on mainnet #468

Open Snawoot opened 2 years ago

Snawoot commented 2 years ago

Mobile app (Android, 1.1.5 mainnet build) doesn't tries/retries identity registration on mainnet.

Steps to reproduce

  1. identity 0xbc141d514d4520ba0dcf8a7956777b3f845d27a4 was registered on mobile app version 1.1.3
    [17:40:16] dt1:~> curl -s https://testnet3-transactor.mysterium.network/api/v1/identity/0xbc141d514d4520ba0dcf8a7956777b3f845d27a4/status | jq .
    [
    {
    "identity_id": "0xbC141d514D4520bA0dcf8A7956777B3f845d27a4",
    "status": "succeed",
    "tx_hash": "0xc76a95c6d2a2a7f83a83ddc52ecffa05b2c533ab2a890f3cf345899638482557",
    "created_at": "2021-11-16T15:39:16.415Z",
    "updated_at": "2021-11-16T15:39:16.415Z",
    "bounty_amount": 1e+18,
    "chain_id": 80001
    }
    ]
  2. app was upgraded to 1.1.5 mainnet release
  3. account was topped up via ETH with real MYST on mainnet
  4. I tried to connect to nodes, but traffic was not coming after connection was established. Most likely because app wasn't able to sign first payment promise required right after connection start.
  5. I exported identity, imported it into node CLI and manually issued registration request. Registration result:
    [17:40:19] dt1:~> curl -s https://transactor.mysterium.network/api/v1/identity/0xbc141d514d4520ba0dcf8a7956777b3f845d27a4/status | jq .
    [
    {
    "identity_id": "0xbC141d514D4520bA0dcf8A7956777B3f845d27a4",
    "status": "succeed",
    "tx_hash": "0x774e0c4b58de9c62b8d8ac9f6dc0e4fde549b1be6107e0ff1ed86a7685061982",
    "created_at": "2021-11-17T15:20:53.047Z",
    "updated_at": "2021-11-17T15:20:53.047Z",
    "bounty_amount": 998575652174050000,
    "chain_id": 137
    }
    ]
  6. After that app started working OK on mobile.

Output (5) indicates that registration attempt I made manually is the only attempt was taken in mainnet. So app didn't even tried.

Proposed solution

It seems proper migration of registration status is required on update to mainnet app version. Registration in testnet3 doesn't mean registration in mainnet. Another way is to handle errors from API which indicate identity is not registered or check registration each time at startup.

isaackielma commented 2 years ago

Is this still an ongoing issue? @ArtemHryhorovGeniusee

ArtemHryhorovGeniusee commented 2 years ago

Is this still an ongoing issue? @ArtemHryhorovGeniusee

Pull request merged, so I think this issue is resolved