diff --git a/book/art/runtime.bob b/book/art/runtime.bob index a483a7d7e..b247f458b 100644 --- a/book/art/runtime.bob +++ b/book/art/runtime.bob @@ -3,7 +3,7 @@ | sigverify +--->| lock memory +--->| validate fee +--->| allocate accounts +---> `-----------` `-------------` `--------------` `--------------------` - .------------. .---------. .--------------. .--------------. ---->| load data +--->| execute +--->| commit data +-->|unlock memory | - `------------` `---------` `--------------` `--------------` + .------------. .---------. .--------. .--------------. .--------------. +--->| load data +--->| execute +--->| record +--->| commit data +-->|unlock memory | + `------------` `---------` `--------` `--------------` `--------------` diff --git a/book/src/runtime.md b/book/src/runtime.md index 1fefc7a6b..0881a5bfc 100644 --- a/book/src/runtime.md +++ b/book/src/runtime.md @@ -44,6 +44,10 @@ The runtime enforces the following rules: greater than or equal to the balances before the transaction. 4. All instructions in the transaction executed atomically. If one fails, all account modifications are discarded. +5. Before committing the accounts, the transactions are tagged with a count + from the PoH service, indicating the time transaction processing completed. + If that time falls outside the leader's allotted slot, the transactions + are discarded. Execution of the program involves mapping the program's public key to an entrypoint which takes a pointer to the transaction, and an array of loaded