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

Use CborGenCompatibleNode #336

Merged
merged 1 commit into from
Jun 16, 2022
Merged

Use CborGenCompatibleNode #336

merged 1 commit into from
Jun 16, 2022

Conversation

hannahhoward
Copy link
Collaborator

Goals

While working transport changes I discovered why I think is a pretty easy improvement to how we serialize channel state, by copying @rvagg 's CborGenCompatibleNode from filecoin-project/go-fil-markets#713

Implementation

  • replace cbg.Deferred's from internal channel state with CborGenCompatibleNode
  • this allows to immediately deserialize to datamodel.Node with basicnode.
  • this means we can drop all the error returns from the channelState interface
  • I think this makes sense, as it moves errors to the deserialization step, IMHO where they belong.

use cborgencomptaiblenode to simply channelstate interface
@hannahhoward hannahhoward requested a review from rvagg June 16, 2022 00:33
Copy link
Member

@rvagg rvagg left a comment

Choose a reason for hiding this comment

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

yeah, nice, removing those errors is good

@hannahhoward hannahhoward merged commit c833220 into v2 Jun 16, 2022
hannahhoward added a commit that referenced this pull request Oct 7, 2022
use cborgencomptaiblenode to simply channelstate interface
hannahhoward added a commit that referenced this pull request Oct 8, 2022
* chore(v2): setup the v2 release

given the expected breaking changes, it's time to setup the v2 release

BREAKING CHANGE: v2 modules

* Refactor revalidators (#308)

* 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 revalidators v2 (#322)

* 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>

* chore(message): delete old message format code (#330)

* feat(ipld): vouchers as plain ipld.Node (#325)

* 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

* refactor(channelstate): use cborgencompatiblenode (#336)

use cborgencomptaiblenode to simply channelstate interface

* feat(ipld): use bindnode/registry (#340)

* chore(deps): update libp2p v0.19.4 (#341)

* feat(ipld): use bindnode/registry

Co-authored-by: Hannah Howard <hannah@hannahhoward.net>

* refactor(v2): port graphsync w/o transport refactor

Ports state machine and graphsync changes without the big transport refactor

* fix(pr): respond to pr comments

* chore(deps): upgrade libp2p v0.22

also upgrades graphsync and removes go-libp2p-core paths

* fix(deps): use tagged go-ipld-prime

Co-authored-by: dirkmc <dirkmdev@gmail.com>
Co-authored-by: Rod Vagg <rod@vagg.org>
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.

2 participants