This repository has been archived by the owner on Aug 14, 2023. It is now read-only.
Extend the AccountStorage
to support Immutable Storage
#471
Labels
Depends on: #469 #470
As explained at #470, We'll implement the
Self-Spawn
feature only in theSimple Coin Integration #4
.The
Account Immutable Data
is given in theimmutable_data
field of theSpawn Transaction
(see issue: #469).The
Immutable Data
interpretation is specified in theStorage Section
.It's part of the
Deploy Template Sections
(theData Section
).When we want to read an
Account Immutable Storage
, we need to ask theAccountStorage
to do so for us.This issue extends the
AccuontStorage
to beImmutable Storage Aware
.There is one exception calling
verify
of aSelf-Spawn.
Right now, we panic. For more info, see the description of #470
Here is a draft of how the
AccountStorage
should be modified for supportingImmutable Storage
.Note that the storage host functions should stay intact. They continue to delegate read and write
operations that have been granted permissions back to the
AccountStorage
.Also: this proposed implementation put the whole
Immutable Data
of anAccount
to sit under one key under the underlying key-value store. That will make creating newsAccounts
faster since we can take theimmutable_data
given in theSpawn Transaction
and store it in one bulk under theAccountStorage
(without caring about theImmutable Storage Layout
).The text was updated successfully, but these errors were encountered: