Commit Graph

26 Commits

Author SHA1 Message Date
Greg Fitzgerald
dbd4176b97 Move script constructors into a separate module 2019-03-18 08:22:54 -07:00
Greg Fitzgerald
122c7bc2ef Rename TransactionCompiler to Script and use it to replace the type alias 2019-03-18 08:22:54 -07:00
Greg Fitzgerald
0c0716abfb Move Bank-based tests into unit-tests 2019-03-18 08:22:54 -07:00
Greg Fitzgerald
c09accb685 Rename StaticEntrypoint to ProcessInstruction 2019-03-18 08:22:54 -07:00
Greg Fitzgerald
ae4d14a2ad Introducing Scripts
A sequence of instructions. A client compiles the script and then uses
the compiled script to construction a transaction. Then it adds a
adds a blockhash, signs the transaction, and sends it off for
processing.
2019-03-18 08:22:54 -07:00
Greg Fitzgerald
55cdbedb52 Allow tests to add instruction processors
Make runtime a private module again.
2019-03-18 08:22:54 -07:00
Greg Fitzgerald
ee39f31d81 Add Runtime object. Allow any number of static loaders. 2019-03-18 08:22:54 -07:00
Greg Fitzgerald
70b45de012 Get access to runtime errors in Budget unit-tests 2019-03-18 08:22:54 -07:00
Greg Fitzgerald
e091aa87ea More precise constructor names 2019-03-15 14:46:44 -06:00
Greg Fitzgerald
c1eec0290e Rename userdata to data (#3282)
* Rename userdata to data

Instead of saying "userdata", which is ambiguous and imprecise,
say "instruction data" or "account data".

Also, add `ProgramError::InvalidInstructionData`

Fixes #2761
2019-03-14 10:48:27 -06:00
Michael Vines
6899bd7099 0.13.0 2019-03-11 16:21:19 -07:00
Tyera Eulberg
fe1676bc3a Review comments 2019-03-11 16:58:43 -06:00
Tyera Eulberg
1a9ef37251 Update programs using simple error mapping to use CustomError 2019-03-11 16:58:43 -06:00
Rob Walker
195a880576 pass Pubkeys as refs, copy only where values needed (#3213)
* pass Pubkeys as refs, copy only where values needed

* Pubkey is pervasive

* fixup
2019-03-09 19:28:43 -08:00
Greg Fitzgerald
3dc22e7323 Simulate auto-creation of system accounts 2019-03-07 19:18:53 -07:00
Greg Fitzgerald
17dcd1f62a Resurrect the tests 2019-03-07 19:18:53 -07:00
Greg Fitzgerald
a277f3e816 Migrate to TransactionBuilder
This code wasn't updated after we started batching instructions.
The current code does allocations instead of using CreateAccount.
The runtime shouldn't allow that, so getting this code out of the
way before we lock down the runtime.
2019-03-07 19:18:53 -07:00
Greg Fitzgerald
505f77b108 Move a more generic process_transaction to runtime.rs 2019-03-07 12:42:13 -07:00
Greg Fitzgerald
5b672f8921 Generalize Budget tests to work on multi-ix txs 2019-03-07 12:42:13 -07:00
Michael Vines
3129e299e4 Rename tokens to lamports in programs/ 2019-03-05 17:56:44 -08:00
Michael Vines
53f09c44f3 Rename tokens to lamports in sdk/ 2019-03-05 17:28:06 -08:00
Greg Fitzgerald
2ec9bc9f05 Revive payments via Budget 2019-03-03 17:29:13 -07:00
Greg Fitzgerald
e8ae603a01 Add failing test for a Budget payment 2019-03-03 17:29:13 -07:00
Greg Fitzgerald
8ec10d4de9 Simplify Budget's serialize 2019-03-03 14:24:53 -08:00
Greg Fitzgerald
baca3e6b6b Cleanup Budget
* BudgetProgram -> BudgetState
* Instruction -> BudgetInstruction
* Move BudgetState into its own module
* BudgetInstruction::NewBudget -> BudgetInstruction::InitializeAccount
* BudgetInstruction::new_budget -> BudgetInstruction::new_initialize_account
2019-03-03 14:49:35 -07:00
Greg Fitzgerald
037fcf6b3d Bump all native programs up a level
Don't categorize programs by a single backend.
2019-03-02 22:11:48 -08:00