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

Markets 0.7.0 with updated data stores #4089

Merged
merged 1 commit into from
Sep 30, 2020
Merged

Conversation

hannahhoward
Copy link
Contributor

Goals

Upgrade to markets 0.7.0, which moves all datastores and protocols to CBOR map-encoding, in a legacy compatible way

Implementation

  • a few things have moved around in markets
  • we now need to make sure the PieceStore and local record of peers we stored data with are migrated
  • probably the most "controversial" change is that ClientQueryAsk now returns StorageAsk instead of SignedStorageAsk -- the signature is valid internally to markets. However, the other peer may have send a legacy version of the ask, and while we can the validate the signature of the legacy ask, it isn't the correct signature when we convert it back to the current ask.

storedAsk, err := storedask.NewStoredAsk(namespace.Wrap(ds, datastore.NewKey("/deals/provider")), datastore.NewKey("latest-ask"), spn, address.Address(minerAddress))
providerDs := namespace.Wrap(ds, datastore.NewKey("/deals/provider"))
// legacy this was mistake where this key was place -- so we move the legacy key if need be
err = shared.MoveKey(providerDs, "/latest-ask", "/storage-ask/latest")
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to run this every time?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I mean it's a no-op unless it hasn't already been moved. We'll remove the code once everyone is no 0.8.1 or 0.9.0

Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

(ran successfully on my node)

@magik6k magik6k merged commit feecee3 into master Sep 30, 2020
@magik6k magik6k deleted the feat/update-markets-0.7.0 branch September 30, 2020 19:49
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.

None yet

4 participants