d31989f878
CustomError from Vec->u32
2019-04-11 13:59:48 -07:00
a28c3b0e9a
Consume Bank in BankClient
...
This will allow BankClient to spin up a thread to use the Bank.
It'll also ease the transaction from BankClient to ThinClient since
it won't let you depend on Bank.
Drawback, you the transition from Bank to BankClient will be harder
because the Bank methods are inaccessible.
2019-04-11 12:16:33 -07:00
d0f46d6a8a
Cleanup client traits and create super trait ( #3728 )
2019-04-11 00:25:14 -07:00
7295a84d69
Bump bincode from 1.1.2 to 1.1.3 ( #3672 )
...
Bumps [bincode](https://github.com/TyOverby/bincode ) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/TyOverby/bincode/releases )
- [Commits](https://github.com/TyOverby/bincode/compare/v1.1.2...v1.1.3 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2019-04-08 12:55:18 -07:00
1598a02a7a
Wrap all client errors with TransportError
2019-04-04 12:00:19 -06:00
167f5bdc58
Add get_balance() and get_account_data() to SyncClient
...
Migrate tests to use them.
2019-04-04 12:00:19 -06:00
5cd7bccdf3
Add SyncClient and use from BankClient
2019-04-04 12:00:19 -06:00
f97f0c4758
Bump serde_derive from 1.0.89 to 1.0.90
...
Bumps [serde_derive](https://github.com/serde-rs/serde ) from 1.0.89 to 1.0.90.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.89...v1.0.90 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2019-04-03 19:54:50 -07:00
e6ac5bc546
Bump serde from 1.0.89 to 1.0.90
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.89 to 1.0.90.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.89...v1.0.90 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2019-04-03 20:26:48 -06:00
35298e01a8
Remove Instruction wrapper structs and name functions after enum fields
2019-04-03 13:34:27 -07:00
43bb813cbe
Rename 'new_account' to 'new_user_account'
...
And 'new_program_account' to 'new_account'
2019-04-02 21:24:42 -06:00
fcef54d062
Add a constructor to generate random pubkeys
2019-03-31 16:23:18 -06:00
3fc09fb23f
Remove keypairs from BankClient
...
Bring its interface closer to the other clients.
2019-03-27 09:37:19 -06:00
0ac865f08c
Remove BankClient::process_instructions
2019-03-27 08:51:10 -06:00
55115d0eeb
Add process_message() to BankClient
2019-03-27 08:51:10 -06:00
8c69c40834
Make space for a new Transaction::new
2019-03-26 20:06:05 -06:00
b61aed7250
Minor cleanup
2019-03-25 20:31:13 -07:00
6286947697
Inline payment_plan
...
This module predates Accounts. That was a separate module because
it used to be part of Bank and those types could be sent to any
smart contract. Now each instruction processor defines for itself
what instructions it accepts.
2019-03-24 14:52:06 -06:00
33972ef89e
Boot BudgetTransaction
2019-03-24 14:52:06 -06:00
b53cbdd9e6
Punt on the Script abstraction
...
Low ROI
2019-03-24 14:52:06 -06:00
acedf4ca5a
Move Instruction into its own module
2019-03-23 20:31:55 -07:00
38fdbbba3f
Reduce remaining program crates to boilerplate crates
2019-03-22 06:46:44 -07:00
045af04784
Reduce budget_program and config_program into boilerplate crates
2019-03-21 16:53:08 -06:00
94b5835738
Make AccountMeta a traditional struct instead of a tuple struct
2019-03-19 17:22:39 -06:00
a4652a9aaf
Label tuple with AccountMeta
2019-03-19 17:22:39 -06:00
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
a54854abc7
Do Budget verification in BudgetScript
2019-03-18 08:22:54 -07:00
ce6257a069
Delete misplaced unit-tests
...
These tests were from back in the day when Bank(then-called Accountant)
would call `verify_plan()` on all transactions. Nowadays `verify_plan`
is only useful to the client. At can be used to ensure a transaction
won't trigger runtime errors.
2019-03-18 08:22:54 -07:00
7b28d3a231
Move Budget's verify_plan() into tests
...
This functionality is supposed to be the the interpreter
2019-03-18 08:22:54 -07:00
ea01ff2aab
Add pubkey to BudgetExpr::new_cancelable_future_payment for wallet
2019-03-18 08:22:54 -07:00
3369019943
Add BudgetExpr::new_cancelable_authorized_payment
2019-03-18 08:22:54 -07:00
dbd4176b97
Move script constructors into a separate module
2019-03-18 08:22:54 -07:00
122c7bc2ef
Rename TransactionCompiler to Script and use it to replace the type alias
2019-03-18 08:22:54 -07:00
99671472d1
Migrate config tests to Bank
2019-03-18 08:22:54 -07:00
0c0716abfb
Move Bank-based tests into unit-tests
2019-03-18 08:22:54 -07:00
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
70b45de012
Get access to runtime errors in Budget unit-tests
2019-03-18 08:22:54 -07:00
24d9138067
Abandon Builder pattern
2019-03-15 14:46:44 -06:00
aca739b800
Boot fees from TransactionBuilder
2019-03-15 14:46:44 -06:00
968022a1b0
Instruction name swap
...
* Instruction -> GenericInstruction
* Instruction<u8, u8> -> CompiledInstruction
* Instruction<Pubkey, (Pubkey, bool)> -> Instruction
2019-03-15 14:46:44 -06:00
4d53be8350
Make it unappealing to build and sign transactions at the same time
...
Use a client to sign transactions. It'll need that keypair anyway
to resign new blockhashes on retries.
2019-03-15 09:06:54 -06:00
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
6899bd7099
0.13.0
2019-03-11 16:21:19 -07:00
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
7a4ccc8719
Fix Budget's payment_with_fee test
...
Fee is now independent of the contract.
2019-03-07 19:18:53 -07:00
17dcd1f62a
Resurrect the tests
2019-03-07 19:18:53 -07:00
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
10b16753af
Remove 'new' constructor
2019-03-07 19:18:53 -07:00
3129e299e4
Rename tokens to lamports in programs/
2019-03-05 17:56:44 -08:00
53f09c44f3
Rename tokens to lamports in sdk/
2019-03-05 17:28:06 -08:00