Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Design persist/restore interface between VM2 and its client, e.g. Rusk #319

Closed
miloszm opened this issue Apr 29, 2022 · 1 comment · Fixed by #378 · May be fixed by #370
Closed

Design persist/restore interface between VM2 and its client, e.g. Rusk #319

miloszm opened this issue Apr 29, 2022 · 1 comment · Fixed by #378 · May be fixed by #370
Assignees
Labels
mark:next Strategic issues related to next versions of Testnet and mid/long term plans team:Core Low Level Core Development Team (Rust) type:feature implementing a new feature

Comments

@miloszm
Copy link
Contributor

miloszm commented Apr 29, 2022

Describe what you want implemented
As backend ctor is gone in VM2 and there is a need for an in-place update of state storage, persist/restore interface between Rusk and VM2 needs to be redesigned.

Describe "Why" this is needed
This is needed for the following reasons:

  • function BackendCtor<DiskBackend> is no longer supported
  • disk backend needs to convey enough information to make VM2 persistence able to replace store "in place" (this applies to the current design of VM2 rather than VM)
  • current restore mechanism is asymmetrical - does not carry disk backend at all - it relies on the VM implicit memory - this applies to Rusk as VM2 has this feature already

Describe alternatives you've considered
Alternative would be to leave the state of the interface as is but it has the disadvantage that it is not possible to shrink storage size as VM2 does not have enough information to access disk storage directly.

Additional context
This issue is related to issue 318 about storing VM2 state as-is.

@miloszm miloszm added type:feature implementing a new feature team:Core Low Level Core Development Team (Rust) labels Apr 29, 2022
@miloszm miloszm self-assigned this Apr 29, 2022
@autholykos autholykos added the mark:next Strategic issues related to next versions of Testnet and mid/long term plans label May 9, 2022
@miloszm miloszm linked a pull request Jun 6, 2022 that will close this issue
@miloszm
Copy link
Contributor Author

miloszm commented Jun 14, 2022

As issue #318 has core implementation done in branch vm2-compacting-2, it makes sense to tackle this issue first and then enrich the implementation of #318 with the results of this issue.

@miloszm miloszm linked a pull request Jun 14, 2022 that will close this issue
@miloszm miloszm changed the title Design persist/restore interface between VM2 and Rusk Design persist/restore interface between VM2 and its client, e.g. Rusk Jun 15, 2022
@ureeves ureeves assigned ureeves and unassigned miloszm Jul 1, 2022
ureeves added a commit that referenced this issue Jul 1, 2022
- Add `NetworkState::store`
- Add `NetworkState::builder`
- Change `NetworkState::persist` to require no arguments
- Remove `NetworkState::restore_from_disk` and `NetworkState::restore`
- Remove `NetworkState::persist_to_disk`
- Remove `NetworkState::with_config`

Resolves #319
ureeves added a commit that referenced this issue Jul 1, 2022
- Add `NetworkState::store`
- Add `NetworkState::builder`
- Change `NetworkState::persist` to require no arguments
- Remove `NetworkState::restore_from_disk` and `NetworkState::restore`
- Remove `NetworkState::persist_to_disk`
- Remove `NetworkState::with_config`

Resolves #319
ureeves added a commit that referenced this issue Jul 4, 2022
- Add `NetworkState::store`
- Add `NetworkState::builder`
- Change `NetworkState::persist` to require no arguments
- Remove `NetworkState::restore_from_disk` and `NetworkState::restore`
- Remove `NetworkState::persist_to_disk`
- Remove `NetworkState::with_config`

Resolves #319
ureeves added a commit that referenced this issue Jul 5, 2022
- Add `NetworkState::store`
- Add `NetworkState::builder`
- Change `NetworkState::persist` to require no arguments
- Remove `NetworkState::restore_from_disk` and `NetworkState::restore`
- Remove `NetworkState::persist_to_disk`
- Remove `NetworkState::with_config`

Resolves #319
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
mark:next Strategic issues related to next versions of Testnet and mid/long term plans team:Core Low Level Core Development Team (Rust) type:feature implementing a new feature
Projects
None yet
3 participants