diff --git a/book/src/programs.md b/book/src/programs.md index 666a2c55ce..da06cc59e2 100644 --- a/book/src/programs.md +++ b/book/src/programs.md @@ -1,12 +1,12 @@ # Programming Model -The Solana *runtime* can execute untrusted on-chain programs written in any -programming language that can target the Berkley Packet Filter (BPF) safe -execution environment. The Solana SDK offers the best support for C programs, -which is compiled to BPF using the [LLVM compiler -infrastructure](https://llvm.org). Alternatively, a client might choose to -bypass LLVM and use Python, Lua or C++ to generate BPF directly via the [BPF -Compiler Collection](https://github.com/iovisor/bcc) (BCC). +A client interacts with a Solana cluster by sending it *transactions* with one +or more *instructions*. The Solana *runtime* passes those instructions to +user-contributed *programs*. An instruction might, for example, tell a program +to move *tokens* from one *account* to another or create an interactive +contract that governs how tokens are moved. Instructions are executed +atomically. If any instruction is invalid, any changes made within the +transaction are discarded. ## Deploying Programs to a Cluster @@ -18,13 +18,12 @@ The cluster stores the program locally and makes it available to clients via a *program ID*. The program ID is a *public key* generated by the client and is used to reference the program in subsequent transactions. -## Interacting with On-chain Programs - -After a program has been deployed, a client utilizes it by sending transactions -to the Solana cluster. A transaction contains one or more *instructions*. Each -instruction references the program ID that corresponds to the program that the -runtime should use to execute it. Instructions are executed atomically. If any -instruction is invalid, any changes made within the transaction are discarded. +A program may be written in any programming language that can target the +Berkley Packet Filter (BPF) safe execution environment. The Solana SDK offers +the best support for C programs, which is compiled to BPF using the [LLVM +compiler infrastructure](https://llvm.org). Alternatively, a client might +choose to bypass LLVM and use Python, Lua or C++ to generate BPF directly via +the [BPF Compiler Collection](https://github.com/iovisor/bcc) (BCC). ## Storing State between Transactions