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

ClientFindData: always fetch peer id from chain #6807

Merged
merged 2 commits into from
Jul 21, 2021

Conversation

nonsense
Copy link
Member

This PR is fixing ClientFindData when data about peers in the local store of a node is out-dated.


If a client makes a deal with a miner, it keeps the miner's peer id in a local store. In the future if the miner changes its peer id, and the client tries to retrieve the content (datacid), ClientFindData would still be trying to reach the miner on its old peer id, ultimately failing.

This is manifested with Failed to find file error in the CLI:

➜  lotus git:(master) lotus client retrieve $datacid /tmp/file1234
Failed to find file

@nonsense nonsense changed the title fetch peer id from chain ClientFindData: always fetch peer id from chain Jul 21, 2021
@nonsense nonsense marked this pull request as ready for review July 21, 2021 09:55
@nonsense nonsense requested a review from a team as a code owner July 21, 2021 09:55
@nonsense nonsense requested a review from raulk July 21, 2021 09:56
Copy link
Contributor

@dirkmc dirkmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Member

@raulk raulk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a test for this in this PR, or an issue to track? 🙏

@magik6k magik6k merged commit c29f375 into master Jul 21, 2021
@magik6k magik6k deleted the nonsense/fetch-peerid-from-chain branch July 21, 2021 13:04
@BigLep
Copy link
Member

BigLep commented Jul 21, 2021

@nonsense : did the test get added?

@nonsense
Copy link
Member Author

@BigLep I don't think there is a test for this case.

We will have one as soon as we finish the lotus-compatibility tests part of M1 (initial PR at #6765 )

@BigLep
Copy link
Member

BigLep commented Jul 21, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants