Replies: 1 comment 2 replies
-
I've rethought the transaction processing pipeline a bit. Now I think it could look more like this: To briefly describe the process:
Both |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Transaction object is perhaps one of the more complicated objects in the rollup. The main reason is that there are actually several different ways to look at is depending on the context. So, before writing any code, I wanted to lay out my thoughts about all these variations in this note.
Overall, there are 3 different contexts for transactions objects:
Below I'll describe each of these 3 contexts in more detail.
Proven transactions
This variant is perhaps the simplest one to describe. A proven transaction consists of the following components:
(nullifier, script_root)
for all notes consumed by the transaction.The above info should be enough to verify that the transaction was executed correctly and to update Account DB, Note DB, and Nullifer DB accordingly. However, if the involved account/notes are stored on-chain, we need to include additional info. Specifically:
00
or01
), we also need to include full note details (i.e., contents of note vault, root of note script etc.). This is one of the reasons why it is important to be able to determine if a note details are to be stored on chain by examining solely the note's hash.Stateless transactions
As mentioned previously, this variant contains the minimum info required to execute and prove a transaction. A stateless transaction consists of the following components:
(nullifier, note_script)
for all notes consumed by the transaction.The key component in the above is the "advice transcript". This will contain all the data that will be requested by the VM during transaction execution from the advice provider, but nothing more than that. An advice transcript may include the following info:
To execute a stateless transaction, we would need to do the following:
The output of the above process would be the proven transaction object described previously.
Similarly to the proven transaction object, stateless transaction would need to include additional data when the account and/or created notes are stored on-chain.
Prepared transactions
TODO
Beta Was this translation helpful? Give feedback.
All reactions