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

Deploy Template - Validate the existence of an Immutable Storage Section #472

Open
YaronWittenstein opened this issue Dec 21, 2021 · 0 comments
Assignees
Labels
AA Related to the Accounts Abstraction simple-coin-iteration-3 svm svm-core SVM core change

Comments

@YaronWittenstein
Copy link
Contributor

YaronWittenstein commented Dec 21, 2021

To simplify significantly the implementation of the Immutable Storage, I suggest enforcing these rules upon each Template:

  • Each Template must have Storage Layout Section #0. Its usage is to describe the Immutable Storage of each Account. If there is no Immutable Storage then the Storage Layout will be empty (but it'll still exist).

  • There'll be exactly one Storage Layout Section targeting the Immutable Storage of each future Account spawned out of this Template.

This issue extends the code under Runtime::validate_deploy to assert the above

pub fn validate_deploy(&self, message: &[u8]) -> std::result::Result<(), ValidateError> {

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AA Related to the Accounts Abstraction simple-coin-iteration-3 svm svm-core SVM core change
Projects
None yet
Development

No branches or pull requests

2 participants