Replies: 3 comments 1 reply
-
This is something I've been thinking about as well - but not sure yet if it is a good idea or not. A few comments/questions:
This is not technically correct. Accounts are in fact |
Beta Was this translation helpful? Give feedback.
-
I don't have that much experience playing with the I liked having a single A potential problem too if we start defining different package types in different places is how their serialization format could start diverging. So we'd probably want to use different MAGIC strings to differentiate them. And well I don't know, I prefer them all being a "package" (similar to ELF and others) rather than their own thing albeit similar to one another. So AFAIU, the workflow you suggest is, assuming we have a serialized package:
Compared to the current workflow:
I personally prefer the current option - but then again maybe you've felt the pain of it more than I did. |
Beta Was this translation helpful? Give feedback.
-
@bitwalker What do you think? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to float the idea of splitting Miden package into multiple package types.
So far, the types of entities that we want the Miden package to hold are:
VM Program:
MastArtifact::Executable(Program)
PackageManifest
(no exports, dependencies only stdlib, VM libraries)VM Library written in MASM:
MastArtifact::Library(Library)
PackageManifest
(multiple exports, dependencies only stdlib, VM libraries)Rollup Account:
MastArtifact::Library(Library)
PackageManifest
(multiple exports, multiple dependency digests)AccountComponentMetadata
(account and storage metadata) for deploymentRollup Note Script:
MastArtifact::Executable(Program)
PackageManifest
(no exports, multiple dependency digests)Rollup Tx Script:
MastArtifact::Executable(Program)
PackageManifest
(no exports, multiple dependency digests)Although they all share some properties (MAST, exports, dependencies) we want to treat them differently. E.g. only an account can be a dependency to a script, only rollup entities can be deployed, but each has its own deployment strategy, etc. Also, each upholds different invariants: scripts have only one export, program has no exports, only account has storage metadata and WIT interface, etc.
This got me thinking if we would benefit from splitting the Miden package into multiple package types, e.g. program package, library package, rollup (account/script) package.
I'd love to hear your thoughts on this.
As a side note, I'm wondering if we should consider merging
PackageManifest
exports intoLibrary
exports, since they duplicate each other. Besides that, bothProgram
andLibrary
feel "incomplete" since the dependencies (think stdlib, tx kernel) are specified only inPackageManifest
. Keep in mind thatPackageManifest
dependencies are just name and digest. So moving dependencies to theProgram
andLibrary
might be a good idea.Beta Was this translation helpful? Give feedback.
All reactions