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

feat: vm: allow raw "cbor" in state and use the new go-multicodec #11081

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Jul 17, 2023

Proposed Changes

  1. Switch to go-multicodec as the source of multicodec code information. This gives us a central, generated source of multicodec codes.
  2. Use this library inside the VM and shapshot logic to consistently allow CBOR, in addition to DagCBOR.
  3. Remove the hard-coded CBOR constant.

This doesn't add any functionality in practice, it's just a post FEVM cleanup.

Checklist

Before you mark the PR ready for review, please make sure that:

  • Commits have a clear commit message.
  • PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • Tests exist for new functionality or change in behavior
  • CI is green

@Stebalien Stebalien requested a review from a team as a code owner July 17, 2023 17:35
1. Switch to go-multicodec as the source of multicodec code information.
This gives us a central, generated source of multicodec codes.
2. Use this library inside the VM and shapshot logic to consistently
allow CBOR, in addition to DagCBOR.
3. Remove the hard-coded CBOR constant.
Copy link
Contributor

@arajasek arajasek left a comment

Choose a reason for hiding this comment

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

LGTM, gonna see if we can test out the snapshot changes somehow as part of our effort to test PRs more rigorously before landing.

@Stebalien
Copy link
Member Author

I've tested this on calibnet and snapshots appear to round-trip. I.e.:

  1. Import snapshot.
  2. Export snapshot at the same height.
  3. Check hashes and they matched.

@arajasek arajasek merged commit d40946f into master Jul 18, 2023
@arajasek arajasek deleted the steb/bare-cbor branch July 18, 2023 16:53
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