Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

[account sync] account peers got out of sync #906

Open
connectdotz opened this issue Sep 27, 2019 · 0 comments
Open

[account sync] account peers got out of sync #906

connectdotz opened this issue Sep 27, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@connectdotz
Copy link

Describe the bug
Using account sync (via textile desktop tray) to sync 3 peers (2 are active) ends up in different account names due to different account.peers order (modified timestamp):


account peers:

  • dragon-1
    the original account I want to sync from. This is a local daemon running on custom port.
  • dragon-2
    another proxy I attempted to sync almost a month ago but never did succeed, the daemon is not running anymore.
  • dragon-1-desktop
    the new account created via "textile desktop tray" that I try to sync "dragon-1" content to.

(both daemons are running on the same host, just with different ports.)

on "dragon-1-desktop" env:

$ textile account
{
    "address": "P9TL9iKwXMa2VoEwwiWZkVU5D2eggxBSv7Lwxp41HppMMJVo",
    "name": "dragon-2",
    "peers": [
        {
            "id": "12D3KooWMQJ9nhT841iLdNBiUhJN1svtn3nBkRHKqZiVftuu9iko",
            "address": "P9TL9iKwXMa2VoEwwiWZkVU5D2eggxBSv7Lwxp41HppMMJVo",
            "name": "dragon-2",
            "created": "2019-08-15T15:03:39.478803Z",
            "updated": "2019-09-26T22:50:20.548244Z"
        },
        {
            "id": "12D3KooWNfpPknzecwbhHa9q5PxjbnVjanGT8Rgns8QbRWSi4nGj",
            "address": "P9TL9iKwXMa2VoEwwiWZkVU5D2eggxBSv7Lwxp41HppMMJVo",
            "name": "dragon-1",
            "created": "2019-05-15T19:43:00.819476Z",
            "updated": "2019-09-26T22:50:20.156008Z"
        },
        {
            "id": "12D3KooWPzXfKw6ywMV2CHC9U7j1qAwtoVhE67EMpfFRwXcq9q5v",
            "address": "P9TL9iKwXMa2VoEwwiWZkVU5D2eggxBSv7Lwxp41HppMMJVo",
            "name": "dragon-1-desktop",
            "created": "2019-09-26T20:01:01.276773Z",
            "updated": "2019-09-26T20:03:41.639748Z"
        }
    ]
}

on "dragon-1" env:

$ textile account
{
    "address": "P9TL9iKwXMa2VoEwwiWZkVU5D2eggxBSv7Lwxp41HppMMJVo",
    "name": "dragon-1-desktop",
    "peers": [
        {
            "id": "12D3KooWPzXfKw6ywMV2CHC9U7j1qAwtoVhE67EMpfFRwXcq9q5v",
            "address": "P9TL9iKwXMa2VoEwwiWZkVU5D2eggxBSv7Lwxp41HppMMJVo",
            "name": "dragon-1-desktop",
            "created": "2019-09-26T20:01:01.276773Z",
            "updated": "2019-09-26T21:02:15.194242Z"
        },
        {
            "id": "12D3KooWMQJ9nhT841iLdNBiUhJN1svtn3nBkRHKqZiVftuu9iko",
            "address": "P9TL9iKwXMa2VoEwwiWZkVU5D2eggxBSv7Lwxp41HppMMJVo",
            "name": "dragon-2",
            "created": "2019-08-15T15:03:39.478803Z",
            "updated": "2019-08-15T15:51:49.893659Z"
        },
        {
            "id": "12D3KooWNfpPknzecwbhHa9q5PxjbnVjanGT8Rgns8QbRWSi4nGj",
            "address": "P9TL9iKwXMa2VoEwwiWZkVU5D2eggxBSv7Lwxp41HppMMJVo",
            "name": "dragon-1",
            "created": "2019-05-15T19:43:00.819476Z",
            "updated": "2019-05-16T20:02:21.610836Z"
        }
    ]
}

It's not clear if this happened because the first "account sync" on desktop tray is unsuccessful, due to desktop tray (go-textile?) is out of sync with the peer it is trying to sync from, followed by another sync attempt.

Also note that there was a period of time desktop tray is using the same port that was used by my other daemon (no error was reported however), not sure if that screwed up its internal state.

To Reproduce
Steps to reproduce the behavior:
(not sure if it could be reliably reproduced, note the situation mentioned above)

in textile desktop tray, sign in with the same account phrase, then hit sync (not sure if you need to simulate 2 sync attempts...)

Expected behavior

I should get the same output for textile account among all my account peers after sync completed, and they should all be "dragon-1" as that is the original account they should all be based on.

Screenshots
If applicable, add screenshots to help explain your problem. (see above)

Tray app (please complete the following information):

  • OS: macOS 10.14.6
  • Browser: chrome
  • Version: 0.3.0

Additional context
Add any other context about the problem here.
slack conversation related to this issue starting from here

@connectdotz connectdotz added the bug Something isn't working label Sep 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant