-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Docs]: Update Accounts
section
#1012
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. To me its clearer now.
I think, we can get rid of even more details:
- the bits of an account ID. We can simply say, type and storage mode are encoded in the ID
- that the Account Vault is represented as sparse Merkle tree
I left comments for those.
We can think about having deep dives for those implementation details in a different section.
docs/architecture/accounts.md
Outdated
|
||
# increments the nonce (anyone should be able to call that function) | ||
push.1 exec.account::incr_nonce | ||
Assets are stored in a sparse Merkle tree, allowing for efficient, cryptographically secure proofs of ownership and state: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to explain that they are stored in a sparse Merkle tree?
I know I also had it in my version, but maybe its better to stick to the protocol and not the implementation.
So we could say how big the vault is and that it can hold fungible and non-fungible assets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it to something shorter and less implementation focused.
docs/architecture/accounts.md
Outdated
|
||
## Account design | ||
In Miden, an `Account` represents an entity capable of holding assets, storing data, and executing custom code. Each `Account` is essentially a specialized smart contract providing a programmable interface for interacting with its state and managed assets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add here the "Why" as well?
In Miden, we have accounts as entities because we want expressive smart contracts.
For payments only we could do the UTXO model alone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like the documentation should explain what and not really why. I don't think that it's relevant for the user / builder to understand our choice. It's more something that we would put in a blog post imo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I can see that argument. For me, at the beginning of the chapter, especially in a design / yellow paper section, we can have one paragraph of the why.
In this PR I propose to update the
Accounts
section of the Miden documentation: