-
Notifications
You must be signed in to change notification settings - Fork 58
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
remove wrong peer check in push deal validation #585
Conversation
Not sure if this is a flaky test or what:
Failed in CI, but passes locally. |
(just making sure there's no attack surface here, this change is definitely correct in principle). |
@Stebalien yeah, failed data transfers have no bearing on the deal itself. And this doesnt let any random peer send data for my transfer, they could just start their own transfer for the same data/deal If we are both sending data for the same deal, the first one to succeed will trigger the deal machinery to move forward, the second one seems like it will send a TransferCompleted event to the fsm, which will throw an error message and ignore the event because thats not a valid transition from the state that it will be in at that time. |
Hrm... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems correct, the explanation what happens on clashing transfers sounds reasonable
@whyrusleeping nit: fix the comments on top of the validators to match new reality
Codecov Report
@@ Coverage Diff @@
## master #585 +/- ##
==========================================
- Coverage 66.77% 66.55% -0.22%
==========================================
Files 56 56
Lines 4227 4223 -4
==========================================
- Hits 2822 2810 -12
- Misses 1155 1163 +8
Partials 250 250
Continue to review full report at Codecov.
|
* remove wrong peer check in push deal validation (#585) * remove wrong peer check in push deal validation * kill the pull side of peer id checking as well * fixup comments * Do not hex-encode CIDs in logs (#561) * On overloaded CI 10 seconds just isn't enough (#587) * support padding out smaller files (#536) * support padding out smaller files * Actually write out the padding - AP depends on it Co-authored-by: Peter Rabbitson <ribasushi@protocol.ai> Co-authored-by: Whyrusleeping <why@ipfs.io> Co-authored-by: Raúl Kripalani <raul@protocol.ai>
We should not have this check, restricting data transfer to only the specific peer who made the deal cuts out a lot of potential architectures (and is silly anyways given the ephemeral nature of libp2p peer IDs). Knowledge of the proposal CID and the miners desire of the data being pushed in the first place should be validation enough.