Update runtime.md (#7568)
This commit is contained in:
parent
54f16ca2bf
commit
0245847ea8
|
@ -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.
|
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.
|
* `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.
|
* `Assign` - Allows the user to assign an existing account to a program.
|
||||||
* `Transfer` - Transfers lamports between accounts.
|
* `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.
|
* 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.
|
* `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.
|
* 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 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.
|
* Runtime guarantees that the program can only spend lamports that are in accounts that are assigned to it.
|
||||||
|
|
Loading…
Reference in New Issue