Commit Graph

44 Commits

Author SHA1 Message Date
Jack May c95e5346a4
Boot the mut (#7926) 2020-01-22 17:54:06 -08:00
Jack May 023074650f
Allow the same account to be passed multiple times to a single instruction (#7795) 2020-01-22 09:11:56 -08:00
Dan Albert ca10cf081f
Update cargo.toml files from 0.22.0 to 0.23.0 (#7596) 2019-12-20 21:45:42 -05:00
Rob Walker a7040896f0
Update to rust 1.40.0 (#7572)
* Update to rust 1.40.0

* fixups
2019-12-19 23:27:54 -08:00
dependabot-preview[bot] 7ad64c8d45 Bump serde from 1.0.103 to 1.0.104
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.103 to 1.0.104.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.103...v1.0.104)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-16 08:50:09 -07:00
dependabot-preview[bot] 6f457292ff Bump bincode from 1.2.0 to 1.2.1
Bumps [bincode](https://github.com/servo/bincode) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/servo/bincode/releases)
- [Commits](https://github.com/servo/bincode/compare/v1.2.0...v1.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-10 10:00:56 -07:00
Greg Fitzgerald 6796b08909
Migrate to thiserror (#7177)
* Migrate to thiserror

* Discourage the use of other modules' Result alias

`io::Result` set a bad precedent. Don't import other `Result`
aliases.
2019-12-02 15:42:05 -07:00
Greg Fitzgerald 92d485dd4d
Cleanup (#7176)
* Drop serde error instances

These were no longer needed after ToPrimitive instances were
added.

* Rename last of _api crates
2019-11-29 13:50:32 -07:00
dependabot-preview[bot] 7f4feaee08 Bump serde from 1.0.102 to 1.0.103 (#7163)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.102 to 1.0.103.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.102...v1.0.103)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-27 09:10:25 -07:00
dependabot-preview[bot] c810913861 Bump serde_derive from 1.0.102 to 1.0.103 (#7141)
automerge
2019-11-26 14:44:20 -08:00
Michael Vines 294662a1ce
Bump version to 0.22.0 2019-11-25 21:34:50 -07:00
dependabot-preview[bot] 686aa3a150 Bump chrono from 0.4.9 to 0.4.10 (#7113)
automerge
2019-11-25 10:01:46 -08:00
Greg Fitzgerald 2a42ddbcbf
Don't panic if pubkeys are missing from Budget transaction (#7102) 2019-11-22 14:34:50 -07:00
Jack May d8ead57fbb
Use bs58 strings to declare IDs rather then raw bytes (#7082) 2019-11-21 16:34:40 -08:00
Jack May 3415db9739
Merge api/program into single units (#7061) 2019-11-20 16:32:19 -08:00
Greg Fitzgerald d0761f57e8 Add _program suffix to directories of crates with _program suffix 2019-03-21 16:24:06 -06:00
Greg Fitzgerald 4bb88619fd Move entrypoint boilerplate into a macro 2019-03-21 15:27:49 -06:00
Greg Fitzgerald 8d032aba9d Merge InstructionError and ProgramError
From the user's perspective, it's just an instruction error.
For program-specific errors, we still have
InstructionError::CustomError.
2019-03-18 10:39:20 -06:00
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