From 0245847ea8df6ce9534bb80e21bd530271d86cfa Mon Sep 17 00:00:00 2001 From: Rob Walker Date: Thu, 19 Dec 2019 13:11:43 -0800 Subject: [PATCH] Update runtime.md (#7568) --- book/src/validator/runtime.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/book/src/validator/runtime.md b/book/src/validator/runtime.md index a126b07f38..5c4dc1c073 100644 --- a/book/src/validator/runtime.md +++ b/book/src/validator/runtime.md @@ -38,6 +38,10 @@ Execution of the program involves mapping the program's public key to an entrypo The interface is best described by the `Instruction::data` that the user encodes. * `CreateAccount` - This allows the user to create an account with an allocated data array and assign it to a Program. +* `CreateAccountWithSeed` - Same as `CreateAccount`, but the new account's address is derived from + - the funding account's pubkey, + - a mnemonic string (seed), and + - the pubkey of the Program * `Assign` - Allows the user to assign an existing account to a program. * `Transfer` - Transfers lamports between accounts. @@ -51,6 +55,7 @@ To pass messages between programs, the receiving program must accept the message * There is no dynamic memory allocation. Client's need to use `CreateAccount` instructions to create memory before passing it to another program. This instruction can be composed into a single transaction with the call to the program itself. * `CreateAccount` and `Assign` guarantee that when account is assigned to the program, the Account's data is zero initialized. +* Transactions that assign an account to a program or allocate space must be signed by the Account address' private key unless the Account is being created by `CreateAccountWithSeed`, in which case there is no corresponding private key for the account's address/pubkey. * Once assigned to program an Account cannot be reassigned. * Runtime guarantees that a program's code is the only code that can modify Account data that the Account is assigned to. * Runtime guarantees that the program can only spend lamports that are in accounts that are assigned to it.