Jeff Washington (jwash)
396b49a7c1
Start saving/loading prior_roots(_with_hash) to snapshot ( #23844 )
...
* Start saving/loading prior_roots(_with_hash) to snapshot
* Update runtime/src/accounts_index.rs
Co-authored-by: Michael Vines <mvines@gmail.com>
* Update runtime/src/accounts_index.rs
Co-authored-by: Michael Vines <mvines@gmail.com>
* update comment
Co-authored-by: Michael Vines <mvines@gmail.com>
2022-03-24 10:06:24 -05:00
Alexander Meißner
91c2729856
Replaces keyed_account get_signers() by InstructionContext::get_signers(). ( #23863 )
2022-03-24 12:57:51 +01:00
Jack May
3d7c8442c7
add size check for from_raw_parts ( #23781 )
2022-03-22 15:20:39 -07:00
Jon Cinque
7af48465fa
transaction-status: Add return data to meta ( #23688 )
...
* transaction-status: Add return data to meta
* Add return data to simulation results
* Use pretty-hex for printing return data
* Update arg name, make TransactionRecord struct
* Rename TransactionRecord -> ExecutionRecord
2022-03-22 23:17:05 +01:00
Justin Starry
15357480ec
Refactor instruction compilation and update message account key ordering ( #23729 )
...
* Refactor: Make instruction compilation usable for other message versions
* apply trents feedback
* Fix tests
* Fix bpf compatiblity
2022-03-21 20:53:32 +08:00
Jack May
1f052c6234
disable deprecated BPF loader deploys ( #23757 )
2022-03-18 14:29:49 -07:00
HaoranYi
f54e746fc5
Support u8 slice digester in frozen abi struct. ( #23726 )
...
* support u8 slice in frozen abi digester
* use slice in account struct
* add bpf cargo lock file
* no need to pass account.data to serializer
* fix comments
2022-03-18 09:31:07 -05:00
Tao Zhu
fd515097d8
leader qos part 2: add stage to find sender stake, set to packet meta
2022-03-17 19:31:28 -05:00
Stephen Akridge
976b138e76
Add tx weighting stage
2022-03-17 19:31:28 -05:00
Jeff Washington (jwash)
342f1ab1cb
clean up/add comments ( #23727 )
2022-03-17 14:23:08 -05:00
Jeff Washington (jwash)
bb9f9c8dd5
AccountSharedData::serialize ( #23685 )
2022-03-17 09:29:49 -05:00
Justin Starry
b4350a2522
Make solana-address-lookup-table-program crate bpf compatible ( #23700 )
2022-03-17 08:21:07 +08:00
Tyera Eulberg
410463fb72
Update InvalidRentPayingAccount error ( #23680 )
2022-03-15 21:41:16 -06:00
Jeff Washington (jwash)
b5a99b9b09
avoid data copies in writing to cache ( #23674 )
2022-03-15 16:42:26 -05:00
Justin Starry
8c8f9694e0
Refactor: Sanitized transaction creation ( #23558 )
...
* Refactor: SanitizedTransaction::try_create optionally computes hash
* Refactor: Add SimpleAddressLoader
2022-03-15 12:02:22 +08:00
Jack May
c369f8b871
limit secp256k1 recover id ( #23621 )
2022-03-14 09:34:43 -07:00
Brooks Prumo
7758c32035
Banking Stage drops transactions that'll exceed the total account data size limit ( #23537 )
2022-03-13 15:58:57 +00:00
Jack May
ead8cc4366
Check for physical region overlap ( #23568 )
2022-03-10 11:48:09 -08:00
ryleung-solana
17b00ad3a4
Add quic-client module ( #23166 )
...
* Add quic-client module to send transactions via quic, abstracted behind the TpuConnection trait (along with a legacy UDP implementation of TpuConnection) and change thin-client to use TpuConnection
2022-03-09 21:33:05 -05:00
Jack May
c2ec294401
featurize loader sat math ( #23516 )
2022-03-08 11:48:22 -08:00
Justin Starry
3114c199bd
Add RPC support for versioned transactions ( #22530 )
...
* Add RPC support for versioned transactions
* fix doc tests
* Add rpc test for versioned txs
* Switch to preflight bank
2022-03-08 15:20:34 +08:00
Jack May
97d40ba3da
Resized accounts must be rent exempt
2022-03-02 13:02:02 -08:00
Trent Nelson
5e0086c1ee
followup safety checks for #23295
2022-02-24 17:50:58 -07:00
Justin Starry
bcda74f42f
Fix builtin handling on epoch boundaries ( #23256 )
2022-02-22 20:54:08 +08:00
buffalu
70ebab2c82
Add rustfmt.toml and `cargo fmt` ( #23238 )
...
* fmt
* formatted
Co-authored-by: Lucas B <buffalu@jito.network>
2022-02-19 13:32:29 +08:00
Alexander Meißner
ee7e411d68
Replaces `KeyedAccount` by `BorrowedAccount` in `system_instruction_processor`. ( #23217 )
...
* Adds InstructionContext::check_number_of_instruction_accounts() and InstructionContext::get_instruction_account_key().
Bases check_sysvar_account() on instuction account indices.
* Adds instruction_account_indices enums to system_instruction_processor.
* Reorders parameters and adds InstructionContext.
* Replaces KeyedAccount by BorrowedAccount in system_instruction_processor (part 1).
* Replaces KeyedAccount by BorrowedAccount in system_instruction_processor (part 2).
* Replaces KeyedAccount by BorrowedAccount in system_instruction_processor (part 3).
* Replaces KeyedAccount by BorrowedAccount in system_instruction_processor (part 4).
* Replaces KeyedAccount by BorrowedAccount in system_instruction_processor (part 5).
* Code cleanup
2022-02-19 02:06:33 +01:00
Alexander Meißner
1a68f81f89
Replaces `KeyedAccount` by `BorrowedAccount` in `nonce_keyed_account`. ( #23214 )
...
* Adds get_sysvar_with_account_check2 for ABIv2.
* Replaces get_signers() and get_sysvar_with_account_check() in system_instruction_processor.
* Replaces KeyedAccount by BorrowedAccount in nonce_keyed_account.
2022-02-17 17:36:55 +01:00
Alexander Meißner
da00b39f4f
Cleanup: get_program_key() and get_loader_key() in TransactionContext ( #23191 )
...
* Moves TransactionContext::get_program_key() to InstructionContext::get_program_key().
* Removes TransactionContext::get_loader_key().
* Test full program and loader executable account chain in BPF loader.
2022-02-17 10:16:28 +01:00
Justin Starry
813725dfec
Fix ed25519 builtin program handling ( #23182 )
...
* Fix ed25519 builtin program handling
* Fix tests
* Add integration tests for processing transactions with ed25519 ixs
* Fix another test
* fix formatting
2022-02-16 18:48:55 +00:00
Michael Vines
817f47d970
Bump QUIC_PORT_OFFSET to 6 to avoid jostling around other ports
2022-02-11 17:00:31 -08:00
Jack May
3d9874b95a
Add fees to tx-wide caps ( #22081 )
2022-02-11 16:23:16 -08:00
Alexander Meißner
226a71f073
Refactor: Use instruction_trace instead of instruction_context_stack ( #22988 )
...
* Moves stack_height of the instruction_trace into InstructionContext.
* Uses nesting_level instead of stack_height internally in transaction_context.rs
* Uses the instruction_trace instead of the instruction_context_stack internally.
* Adds feature gate: record_instruction_in_transaction_context_push.
2022-02-09 20:04:49 +01:00
Justin Starry
ba215e94f6
Refactor: Add AccountKeys struct for static and dynamic message keys ( #22960 )
2022-02-05 20:00:31 +08:00
Alexander Meißner
96c88d1a5e
Bumps solana_rbpf to version v0.2.22 ( #22923 )
...
* Bumps solana_rbpf to v0.2.22
* Adjusts vm::Config and feature gates.
2022-02-04 21:17:49 +01:00
sakridge
5a230f418d
Add quic port for accepting transactions ( #22753 )
...
using quinn library
streamer: Sign TLS cert with validator identity key
Handle multiple incoming chunks
2022-02-04 15:27:09 +01:00
Alexander Meißner
660f6981c6
Cleanup: TransactionContext ( #22910 )
...
* Adds BorrowedAccount::check_sysvar().
* Adds BorrowedAccount::get_data_mut().
* Implements account resizing in BorrowedAccount.
* Exposes is_signer() and is_writable() in InstructionContext.
* Removes AccountMeta and get_instruction_accounts_metas().
* Makes throwing errors in BorrowedAccount optional.
* Removes result return values from BorrowedAccount.
2022-02-03 17:19:42 +01:00
Alexander Meißner
c16cf9cf8a
Refactor: Use `SysvarCache` in all builtin programs ( #22864 )
...
* Replaces from_keyed_account() by SysvarCache in stake instruction.
* Replaces from_keyed_account() by SysvarCache in system instruction processor.
* Removes from_keyed_account().
Moves check_sysvar_keyed_account() into sysvar_cache.rs
* Removes tests which test for incorrectly serialized sysvars.
2022-02-03 13:03:50 +01:00
Justin Starry
60af1a4cce
Refactor: Add trait for loading addresses ( #22903 )
2022-02-03 11:00:12 +00:00
Jack May
cc94a93b56
Safer invoke context ( #22898 )
...
* Safer invoke context
* feedback and rebase with master
2022-02-03 02:34:51 -08:00
carllin
bd1850df25
Return actual committed transactions from process_transactions() ( #22802 )
2022-02-03 03:56:36 -05:00
Jack May
ab02dba96f
Add get_processed_sibling_instruction syscall ( #22859 )
2022-02-02 16:45:57 -08:00
Will Hickey
75563f6c7b
Reject close of active vote accounts ( #22651 )
...
* 10461 Reject close of vote accounts unless it earned no credits in the previous epoch. This is checked by comparing current epoch (from clock sysvar) with the most recent epoch with credits in vote state.
2022-02-02 14:16:24 -06:00
Sean Young
c1b543c74d
test_ed25519 fails if we randomly select index 1
2022-01-27 11:11:37 +00:00
Jon Cinque
1192e760a4
sdk: Maybe fix build for the future with import ( #22731 )
2022-01-25 19:29:42 +01:00
Jon Cinque
fc21af4e6e
spl-associated-token-account: Add feature for new program ( #22648 )
...
* spl-associated-token-account: Add feature for new program
* Address feedback
2022-01-24 22:54:41 +01:00
Michael Vines
6d5bbca630
Pacify clippy
2022-01-21 19:12:57 -08:00
Brian Anderson
8dd62854fa
Document transaction module ( #22440 )
...
* Document transaction module
* example_mocks is only for feature = full
2022-01-21 18:30:12 -07:00
Brooks Prumo
a7f2fff219
Remove active features stake program v3 and v4 ( #22612 )
...
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2022-01-21 19:27:53 -06:00
Justin Starry
7f20c6149e
Refactor: move simple vote parsing to runtime ( #22537 )
2022-01-20 10:39:21 +08:00
Alexander Meißner
b448472037
Refactor: Move `InstructionRecorder` into `TransactionContext` ( #22578 )
...
* Moves InstructionRecorder into TransactionContext.
* Adds assertions for number_of_instructions_at_transaction_level.
2022-01-19 22:40:09 +01:00