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

Make extension snapshotter interface safer to use #11824

Closed
4 tasks
yihuang opened this issue Apr 29, 2022 · 0 comments · Fixed by #11825
Closed
4 tasks

Make extension snapshotter interface safer to use #11824

yihuang opened this issue Apr 29, 2022 · 0 comments · Fixed by #11825
Assignees

Comments

@yihuang
Copy link
Collaborator

yihuang commented Apr 29, 2022

Summary

CosmWasm/wasmd#816 (comment)
When implementing wasm extension snapshotter, we found that "a plugin can break another one without knowing" with current interface.

Problem Definition

The Restore api expects the extension to return the last parsed item if it's not an extension payload message, because that could be the extension boundary, extension implementer may not be aware of such contract, better to enforce it with the API design.

Proposal

Create SnapshotExtension and RestoreExtension methods for ExtensionSnapshotter, which will handle payload stream specifically.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@yihuang yihuang assigned yihuang and yaruwangway and unassigned yaruwangway Apr 29, 2022
yihuang added a commit to yihuang/cosmos-sdk that referenced this issue Apr 29, 2022
Closes: cosmos#11824
Solution:
- Use new methods `SnapshotExtension`/`RestoreExtension` to handle payload stream specifically.
- Improve unit tests.
tac0turtle pushed a commit that referenced this issue Aug 18, 2022
* Make extension snapshotter interface safer to use

Closes: #11824
Solution:
- Use new methods `SnapshotExtension`/`RestoreExtension` to handle payload stream specifically.
- Improve unit tests.

* update changelog

* Update snapshots/types/util.go

* changelog

* go linter

* Update CHANGELOG.md

Co-authored-by: Aleksandr Bezobchuk <[email protected]>
ryanchristo pushed a commit to regen-network/cosmos-sdk that referenced this issue Dec 16, 2022
* Make extension snapshotter interface safer to use

Closes: cosmos#11824
Solution:
- Use new methods `SnapshotExtension`/`RestoreExtension` to handle payload stream specifically.
- Improve unit tests.

* update changelog

* Update snapshots/types/util.go

* changelog

* go linter

* Update CHANGELOG.md

Co-authored-by: Aleksandr Bezobchuk <[email protected]>
mhofman pushed a commit to agoric-labs/cosmos-sdk that referenced this issue Feb 24, 2023
* Make extension snapshotter interface safer to use

Closes: cosmos#11824
Solution:
- Use new methods `SnapshotExtension`/`RestoreExtension` to handle payload stream specifically.
- Improve unit tests.

* update changelog

* Update snapshots/types/util.go

* changelog

* go linter

* Update CHANGELOG.md

Co-authored-by: Aleksandr Bezobchuk <[email protected]>

(cherry picked from commit e397434)
mhofman pushed a commit to agoric-labs/cosmos-sdk that referenced this issue Mar 8, 2023
* Make extension snapshotter interface safer to use

Closes: cosmos#11824
Solution:
- Use new methods `SnapshotExtension`/`RestoreExtension` to handle payload stream specifically.
- Improve unit tests.

* update changelog

* Update snapshots/types/util.go

* changelog

* go linter

* Update CHANGELOG.md

Co-authored-by: Aleksandr Bezobchuk <[email protected]>

(cherry picked from commit e397434)
mhofman pushed a commit to agoric-labs/cosmos-sdk that referenced this issue Mar 14, 2023
* Make extension snapshotter interface safer to use

Closes: cosmos#11824
Solution:
- Use new methods `SnapshotExtension`/`RestoreExtension` to handle payload stream specifically.
- Improve unit tests.

* update changelog

* Update snapshots/types/util.go

* changelog

* go linter

* Update CHANGELOG.md

Co-authored-by: Aleksandr Bezobchuk <[email protected]>

(cherry picked from commit e397434)
mhofman pushed a commit to agoric-labs/cosmos-sdk that referenced this issue Mar 23, 2023
* Make extension snapshotter interface safer to use

Closes: cosmos#11824
Solution:
- Use new methods `SnapshotExtension`/`RestoreExtension` to handle payload stream specifically.
- Improve unit tests.

* update changelog

* Update snapshots/types/util.go

* changelog

* go linter

* Update CHANGELOG.md

Co-authored-by: Aleksandr Bezobchuk <[email protected]>

(cherry picked from commit e397434)
JeancarloBarrios pushed a commit to agoric-labs/cosmos-sdk that referenced this issue Sep 28, 2024
* Make extension snapshotter interface safer to use

Closes: cosmos#11824
Solution:
- Use new methods `SnapshotExtension`/`RestoreExtension` to handle payload stream specifically.
- Improve unit tests.

* update changelog

* Update snapshots/types/util.go

* changelog

* go linter

* Update CHANGELOG.md

Co-authored-by: Aleksandr Bezobchuk <[email protected]>

(cherry picked from commit e397434)
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 a pull request may close this issue.

2 participants