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

Port VM1 contract code behind link to VM2 and add state behind link in VM2 contract #333

Closed
miloszm opened this issue May 11, 2022 · 0 comments · Fixed by #369
Closed

Port VM1 contract code behind link to VM2 and add state behind link in VM2 contract #333

miloszm opened this issue May 11, 2022 · 0 comments · Fixed by #369
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)
Projects

Comments

@miloszm
Copy link
Contributor

miloszm commented May 11, 2022

Describe what you want implemented
Contract code was put behind link in VM1, this needs to be ported to VM2. Also, it is beneficial to put contract state behind link as well.

Describe "Why" this is needed
When state changes, contract code does not need to be rewritten when re-serialising the state. State behind link allows contracts to share same state, e.g., in a hamt node.

Describe alternatives you've considered
We could keep contract code and state without links, but this is less efficient as every change in state causes code to be rewritten.

Additional context
Not having a link also causes a storage size bloat. That's why it was introduced in VM1.

@miloszm miloszm self-assigned this May 11, 2022
@miloszm miloszm added mark:next Strategic issues related to next versions of Testnet and mid/long term plans team:Core Low Level Core Development Team (Rust) labels May 11, 2022
@miloszm miloszm added this to To do in VM2 via automation May 11, 2022
@miloszm miloszm linked a pull request May 12, 2022 that will close this issue
ureeves added a commit that referenced this issue Jun 13, 2022
ureeves added a commit that referenced this issue Jun 14, 2022
VM2 automation moved this from To do to Done Jun 14, 2022
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)
Projects
VM2
Done
1 participant