-
Notifications
You must be signed in to change notification settings - Fork 17
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
V2 revised #349
V2 revised #349
Conversation
channels/channels_fsm.go
Outdated
@@ -160,57 +160,65 @@ var ChannelEvents = fsm.Events{ | |||
return nil | |||
}), | |||
|
|||
// TODO: There are four states from which the request can be "paused": request, queued, awaiting acceptance | |||
// and ongoing. There four states of being |
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.
'there are 4 states of being paused' ?
// RequiresFinalization indicates at the end of the transfer, the channel should | ||
// be left open for a final settlement | ||
RequiresFinalization bool | ||
// Stages traces the execution fo a data transfer. |
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.
'of'
if err != nil { | ||
return err | ||
} | ||
chst, err := m.channels.GetByID(context.TODO(), chid) |
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.
shouldn't need .TODO()
?
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.
This is a long standing issue but we really don't have a context for the the data transfer manager and we don't use the context passed to OpenDataTransferChannel well. Will fix seperately.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #349 +/- ##
==========================================
+ Coverage 65.97% 67.79% +1.82%
==========================================
Files 29 22 -7
Lines 3436 2826 -610
==========================================
- Hits 2267 1916 -351
+ Misses 816 694 -122
+ Partials 353 216 -137
|
@rvagg can I get an OK to merge from you? |
go.mod
Outdated
github.com/ipfs/go-ipld-format v0.2.0 | ||
github.com/ipfs/go-log/v2 v2.5.1 | ||
github.com/ipfs/go-merkledag v0.5.1 | ||
github.com/ipfs/go-unixfs v0.3.1 | ||
github.com/ipld/go-ipld-prime v0.16.0 | ||
github.com/ipld/go-ipld-prime v0.17.1-0.20220624062450-534ccf82237d |
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.
we have an 0.18 we should be using now
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.
yeah, ok, a big dose of 🤞 from me but it's time to get this all merged and exercised.
the fsm stuff around the new paused states are a bit fuzzy for me, there's quite a bit of extra complexity being introduced when those states flow through the system
given the expected breaking changes, it's time to setup the v2 release BREAKING CHANGE: v2 modules
* feat(revalidators): initial refactor refactor revalidation process -- removing independent revalidations, making validations results more clear * refactor(rename): RevalidateToComplete -> RequiresFinalization * refactor(datatransfer): enhance validator comments * refactor(message): revert message response changes * refactor(impl): comment and refactor on events add comments to event processing and also extract functions for receiving requests to a new file * refactor(message): s/IsVoucherResult/IsValidationResult rename the IsVoucherResult to is 'IsValidationResult' also add a method for generating messages from validation results * feat(events): only dispatch events on change Only dispatch Pause, Resume, SetDataLimit, and RequiresFinalization on change * style(imports): fix imports * feat(events): add DataLimitExceeded event * Update channels/channel_state.go Co-authored-by: dirkmc <dirkmdev@gmail.com> * Update manager.go Co-authored-by: dirkmc <dirkmdev@gmail.com> * Update manager.go Co-authored-by: dirkmc <dirkmdev@gmail.com> * Update statuses.go Co-authored-by: Rod Vagg <rod@vagg.org> Co-authored-by: dirkmc <dirkmdev@gmail.com> Co-authored-by: Rod Vagg <rod@vagg.org>
* refactor(validators): remove revalidation move to all revalidation being asynchronous * feat(validators): implied pauses causes datalimit exceeded and requires finalization to leave request paused, regardless of where LeaveRequestPaused is set * refactor(events): reorder events reorder validation events so all get record when transfer finishes * Update impl/impl.go Co-authored-by: Rod Vagg <rod@vagg.org> Co-authored-by: Rod Vagg <rod@vagg.org>
* feat(ipld): vouchers as plain ipld.Node * feat: add ValidationResult#Equals() utility * feat(ipld): introduce TypedVoucher tuple type * chore(ipld): ipld.Node -> datamodel.Node * chore: remove RegisterVoucherResultType * fix: minor staticcheck fixes
use cborgencomptaiblenode to simply channelstate interface
* chore(deps): update libp2p v0.19.4 (#341) * feat(ipld): use bindnode/registry Co-authored-by: Hannah Howard <hannah@hannahhoward.net>
Ports state machine and graphsync changes without the big transport refactor
also upgrades graphsync and removes go-libp2p-core paths
ffaafed
to
aa4d634
Compare
Goals
Get a scoped down version of v2 revised without the transport refactor that is compatible with graphsync master
Implementation
Essentially, this PR starts from the point in v2 where I began doing transport refactors.
The transport refactor was huge, and speculative from the beginning because we never got a second transport. I did a lot of changes, but never had confidence in the ultimate result, and more importantly, I still haven't succcessfully run the go-fil-markets integration tests with that branch. This is despite multiple attempts at it.
This PR drops the transport refactor part of data transfer v2, but ports over compatibility with graphsync and various quality of life improvements to the data transfer codebase. I have confirmed that it passes integration tests in go-fil-markets.
The path from here to shipping go-data-transfer v2 is:
I think I can get these remaining tasks done quickly if this gets the ok.