Commit Graph

24 Commits

Author SHA1 Message Date
Jack May 88cb0c6ae3
Add offline signing support to CLI (#7104) 2019-11-25 21:09:57 -08:00
Tyera Eulberg 716caeb17c Use camelCase (#7050)
automerge
2019-11-19 14:55:32 -08:00
Justin Starry 3acd84d9c0 Allow creating an vote program ix where the withdrawer is also the "to" account (#6992)
automerge
2019-11-18 12:43:47 -08:00
Jack May cd5ec8cd35
Fix blind keyed_account indexing in BPF and Move loader (#6810) 2019-11-08 09:19:19 -08:00
Tyera Eulberg c6931dcb07
Remove credit-only account handling (#6726)
* Renaming
- credit-only/credit-debit to read-only/read-write
- debitable to writable

* Remove credit handling, making credit-only accounts read-only

* Update programs to remove deprecated credit-only account designation

* Use readonly and writable instead of underscored types
2019-11-05 09:38:35 -07:00
Jack May 1fd84cb52b
Enforce only system program can allocate accounts (#6386) 2019-10-16 10:47:45 -07:00
Greg Fitzgerald eca56eb87d
Add next_keyed_account() to instruction_processor_utils (#6309)
* Cleanup KeyedArguments traversal

* Better error message

* Fix clippy warning

* Rename next_arg to next_keyed_account

* Fix clippy warning

* Shorter
2019-10-10 06:30:42 -06:00
Justin Starry 81c36699c4
Add support for BPF program custom errors (#5743)
* Add support for BPF program custom errors

* Rename SOL_SUCCESS -> SUCCESS
2019-09-06 16:05:01 -07:00
Rob Walker e2ecacc141
runtime checks for rent_epoch (#5629)
* runtime checks for rent_epoch

* add actual test

* bigger timeout

* backout 90 min timeout

* new noop
2019-08-26 11:04:20 -07:00
Rob Walker 50a991fdf9
add executable checks to verify_instruction (#5326) 2019-07-29 15:29:20 -07:00
TristanDebrunner 091999a17e
fix Instruction and CompiledInstruction field names (#4895)
* s/program_ids_index/program_id for Instruction

* s/program_ids_index/program_id_index for CompiledInstruction
2019-07-01 18:34:22 -06:00
Tyera Eulberg 807c69d97c
Slimmer implementation of credit-only accounts (#4592)
* Add credit-only debit/data check to verify_instruction

* Store credits and pass to accounts_db

* Add InstructionErrors and tests

* Relax account locks for credit-only accounts

* Collect credit-only account credits before passing to accounts_db to store properly

* Convert System Transfer  accounts to credit-only, and fixup test

* Functionalize collect_accounts to unit test

* Review comments

* Rebase
2019-06-10 20:50:02 -06:00
Rob Walker a18c0e34f4
add activate_stake to stake_api (#4600) 2019-06-10 12:17:29 -07:00
Tyera Eulberg 943cd0a24a
Add credit-only info to AccountMetadata (#4405)
* Add credit-only flag to AccountMeta, default to false

* Sort keys by is_credit_only within signed/unsigned groupings

* Process and de-dupe program keys along with other account keys

* Add message helper functions

* Fix test

* Improve comment

* s/is_credit_only/is_debitable

* Add InstructionKeys helper struct, and simplify program_position method
2019-05-23 18:19:53 -04:00
Tyera Eulberg 99d2428041
Transaction format changes toward Credit-Only accounts (#4386)
* Add num_readonly_accounts slice

* Impl programs in account_keys

* Emulate current account-loading functionality using program-account_keys (breaks exchange_program_api tests)

* Fix test

* Add temporary exchange faucet id

* Update chacha golden

* Split num_credit_only_accounts into separate fields

* Improve readability

* Move message field constants into Message

* Add MessageHeader struct and fixup comments
2019-05-22 18:23:16 -04:00
Tyera Eulberg d31989f878 CustomError from Vec->u32 2019-04-11 13:59:48 -07:00
Tyera Eulberg 90c1300bb6 Plumb TransactionError through Rpc 2019-04-05 22:09:29 -06:00
Greg Fitzgerald 4c0bc1fd88 Add program_ids() methods
Added CompiledInstruction::program_id() so that we don't need to pass
around instruction indexes just for Message::program_id().

Also added Message.program_ids() that returns a slice so that we
can move those pubkeys into Message::account_keys.
2019-04-02 19:00:35 -06:00
Greg Fitzgerald 7896e8288d Replace Transaction::fee with a FeeCalculator 2019-03-29 19:21:51 -06:00
Greg Fitzgerald c4bc710d3a Use Serde's `with` attribute to shorten length encodings in Transaction 2019-03-29 08:25:56 -06:00
Sathish Ambley 857dc2ba47 Remove custom serialization 2019-03-29 08:25:56 -06:00
Greg Fitzgerald 4bca60861e Specialize GenericInstruction 2019-03-28 05:45:46 -06:00
Greg Fitzgerald df333e8b6e Move new_move_many to SystemInstruction 2019-03-26 09:22:29 -07:00
Greg Fitzgerald acedf4ca5a Move Instruction into its own module 2019-03-23 20:31:55 -07:00