mergify[bot]
ef970bb14a
- Implicitly fixes invoke_context.return_data not being reset between instructions in process_message. ( #21671 ) ( #21684 )
...
- Lets InvokeContext::process_cross_program_instruction() handle the first invocation depth too.
- Marks InvokeContext::verify(), InvokeContext::verify_and_update() and InvokeContext::process_executable_chain() private.
- Renames InvokeContext::process_cross_program_instruction() to InvokeContext::process_instruction().
- Removes InvokeContext::new_mock_with_sysvars().
(cherry picked from commit 1df88837c8d11c40bcdf2800ecc4606493bbfd67)
Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
2021-12-08 10:48:49 +00:00
mergify[bot]
46935c022e
Ensure that StakeDelegations and StakeHistory serde ( #21640 ) ( #21653 )
...
Add tests to StakeDelegations and StakeHistory to ensure that the outer
types serialize and deserialize correctly to/from the inner types.
(cherry picked from commit da4015a959e1ae318092d95933300d7fab356175)
Co-authored-by: Brooks Prumo <brooks@solana.com>
2021-12-07 01:44:49 +00:00
mergify[bot]
8a7106bc08
Remove activated feature for filtering invalid stakes from rewards ( #21641 ) ( #21651 )
...
(cherry picked from commit a1adcb23b6d62c5fc0b08193a2d2c8106448c87f)
Co-authored-by: Justin Starry <justin@solana.com>
2021-12-07 00:58:31 +00:00
mergify[bot]
b3fa1e4550
Move transaction error code into new module ( #21635 ) ( #21638 )
...
(cherry picked from commit 3dab1e711d7ae92e30cee4d05a0231397dae4475)
Co-authored-by: Justin Starry <justin@solana.com>
2021-12-06 20:11:20 +00:00
Brooks Prumo
46fe56171b
Make StakeHistory clone-on-write ( #21573 )
2021-12-03 12:10:29 -06:00
Justin Starry
1430b58a6d
Remove deprecated slow epoch boundary methods ( #21568 )
2021-12-03 17:59:10 +00:00
Michael Vines
b8837c04ec
Reformat imports to a consistent style for imports
...
rustfmt.toml configuration:
imports_granularity = "One"
group_imports = "One"
2021-12-03 09:19:13 -08:00
Brooks Prumo
0ef1b25e4b
Make StakeDelegations clone-on-write ( #21542 )
2021-12-03 08:54:38 -06:00
Alexander Meißner
1a4a039913
Adds feature reject_empty_instruction_without_program. ( #21591 )
2021-12-03 15:47:18 +01:00
Alexander Meißner
a9d5ef2055
Cleanup: InvokeContext accessors ( #21574 )
...
* Removes blockhash accessors from InvokeContext.
* Removes lamports_per_signature accessors from InvokeContext.
* Removes return_data accessors from InvokeContext.
* Removes feature_set accessor from InvokeContext.
* Removes instruction_recorders and instruction_index accessors from InvokeContext.
* Moves get_sysvars() into InvokeContext.
* Removes compute_meter parameter from InvokeContext::new().
* Removes InvokeContext::new_mock_with_sysvars_and_features().
* Removes InvokeContext::update_timing().
2021-12-03 12:15:22 +01:00
Brooks Prumo
bdc33ba0a1
Remove unnecessary Option ( #21569 )
2021-12-02 20:19:22 +00:00
Tao Zhu
bf5b7f5d7f
report compute units without tx_wide_compute_cap feature enabled ( #21421 )
2021-12-02 12:14:57 -06:00
Jeff Washington (jwash)
f0b32b75ab
AcctIdx: use ZeroLamport trait ( #21552 )
2021-12-02 12:10:11 -06:00
Jeff Washington (jwash)
314605e149
AcctIdx: test cleanup ( #21550 )
2021-12-02 12:09:37 -06:00
Jack May
976eb81d4f
Cleanup the bank's use of nonces ( #21246 )
2021-12-02 09:57:05 -08:00
Alexander Meißner
bfdb775ffc
Unifies ThisInvokeContext and dyn trait InvokeContext. ( #21563 )
2021-12-02 18:47:16 +01:00
Jeff Washington (jwash)
8dfa83c579
AcctIdx: minor code cleanup ( #21547 )
2021-12-02 11:05:54 -06:00
Anton Lazarev
6bb884836c
address review feedback - use u64 instead of usize
2021-12-02 08:12:30 -08:00
Anton Lazarev
adbf31b98c
avoid usize overflow for MAXIMUM_APPEND_VEC_FILE_SIZE on 32-bit platforms
2021-12-02 08:12:30 -08:00
Jeff Washington (jwash)
c8a52337c8
AcctIdx: remove unused function ( #21546 )
2021-12-01 17:14:49 -06:00
Trent Nelson
1fae3d24de
bank: reuse last hash/fees helper to instatiate InvokeContext
2021-12-01 12:59:20 -07:00
Trent Nelson
91c6a10cda
bank: get hash and fee rate from the same source when storing accounts
2021-12-01 12:59:20 -07:00
Jeff Washington (jwash)
308d7d40d0
aggressively flush cache based on cache size ( #21332 )
...
* aggressively flush cache based on cache size
* find_older_frozen_slots -> cached_frozen_slots
* remove 'WRITE_CACHE_LIMIT_BYTES_DEFAULT'
* tweaks to stats
* fix tests
2021-12-01 13:10:48 -06:00
Jeff Washington (jwash)
1eefdeba85
AcctIdx: cleanup trait ( #21522 )
2021-12-01 12:19:06 -06:00
Brooks Prumo
4a1ef12bd9
Refactor fns that calculate stake and voter balances ( #21529 )
2021-12-01 10:29:24 -06:00
Jeff Washington (jwash)
b108d7ddaa
AcctIdx: insert goes directly to disk to avoid unnecessary allocations ( #21490 )
...
* AcctIdx: upsert avoids unnecessary allocation (during startup)
* feedback
2021-12-01 10:21:01 -06:00
Brooks Prumo
cb368e6554
Pass Epoch by value in StakeHistory::get() ( #21523 )
2021-12-01 08:57:29 -06:00
Alexander Meißner
b78f5b6032
Refactor: Cleanup InstructionProcessor ( #21404 )
...
* Moves create_message(), native_invoke() and process_cross_program_instruction()
from the InstructionProcessor to the InvokeContext so that they can have a useful "self" parameter.
* Moves InstructionProcessor into InvokeContext and Bank.
* Moves ExecuteDetailsTimings into its own file.
* Moves Executor into invoke_context.rs
* Moves PreAccount into its own file.
* impl AbiExample for BuiltinPrograms
2021-12-01 08:54:42 +01:00
Michael Vines
e922c2da9d
Update to Rust 1.56.1
2021-11-30 23:28:07 -08:00
Michael Vines
dd12d90eac
Upgrade to Rust 2021
2021-11-30 20:43:46 -08:00
ryleung-solana
8cf36e5cb0
Add GPU sigverify for verify path ( #20851 )
...
Allows the use of GPU acceleration in verifying the signatures in Entry's after deserialization in the replay stage
Co-authored-by: Stephen Akridge <sakridge@gmail.com>
Co-authored-by: Ryan Leung <ryan.leung@solana.com>
2021-11-30 21:16:13 -05:00
Jeff Washington (jwash)
d8fb7ce511
AcctIdx: upsert avoids unnecessary allocation ( #21488 )
2021-11-30 11:36:46 -06:00
Jeff Washington (jwash)
7ec88226ee
AcctIdx: stats are usize ( #21493 )
...
* AcctIdx: stats are usize
* rename test function
2021-11-30 11:35:21 -06:00
Jeff Washington (jwash)
2be859d304
add test for aborting index scan ( #21487 )
2021-11-29 16:13:39 -06:00
Michael Vines
ba9dfa0d22
Remove frozen account support
2021-11-29 08:38:11 -08:00
Trent Nelson
41cc7af7cd
bank: TransactionLogCollector
- only push address mappings after pushing a log message
2021-11-25 04:50:51 +00:00
Trent Nelson
e558ad4c71
bank: don't panic when getting logs from malformed TransactionLogCollector
2021-11-25 04:50:51 +00:00
Trent Nelson
dafdc15dfe
bank: Add failing test for TransactionLogCollector::get_logs_for_address()
2021-11-25 04:50:51 +00:00
Trent Nelson
efedb55705
bank: factor tx log getter out to method on TransactionLogCollector
2021-11-25 04:50:51 +00:00
Tao Zhu
9edfc5936d
Refactor accounts.rs with Justin's comments to improve lock accounts ( #21406 )
...
with results code path.
- fix a bug that could unlock accounts that weren't locked
- add test to the refactored function
- skip enumerating transaction accounts if qos results is an error
- add #[must_use] annotation
- avoid clone error in results
- add qos error code to unlock_accounts match statement
- remove unnecessary AbiExample
2021-11-23 21:17:55 +00:00
Alexander Meißner
22a2537aac
Refactor: Cleanup program-runtime dyn Traits ( #21395 )
...
* Unifies dyn Trait ComputeMeter, ThisComputeMeter and TransactionComputeMeter.
* Unifies dyn Trait Logger and ThisLogger.
* Moves Logger to log_collector.rs
* Unifies Logger and LogCollector.
* Removes inner RefCell from LogCollector.
* Adds the log::debug!() message to ic_logger_msg!() again.
2021-11-23 13:23:40 +01:00
Jeff Washington (jwash)
b87ebf9e58
AcctIdx: PreAllocatedAccountMapEntry does not make unnecessary Arc ( #21364 )
2021-11-22 15:52:45 -06:00
Jeff Washington (jwash)
a762066310
AcctIdx: don't log disk stats when disk isn't enabled ( #21371 )
2021-11-22 15:26:25 -06:00
sakridge
c4d68063c7
Add timing for accounts add_root ( #21379 )
2021-11-22 18:29:45 +01:00
sakridge
cd6f931223
Add timing metrics to bank creation and rewards calculation ( #21066 )
2021-11-21 15:11:02 +01:00
Jon Cinque
02bc4e3fc1
spl-token: New program feature flag ( #21354 )
...
* spl-token: Add feature flag for new release
* Remove all spl token version declarations
2021-11-21 14:27:03 +01:00
Jeff Washington (jwash)
ebea3297f9
AcctIdx: generate index inserts/updates directly to disk ( #21363 )
...
* when initially creating account index, write directly to disk
* AcctIdx: generate index inserts/updates directly to disk
2021-11-19 17:17:07 -06:00
Brooks Prumo
0bb059185c
Add lamports_in_rent_paying_accounts to TotalAccountsStats ( #21368 )
2021-11-19 17:02:23 -06:00
Alexander Meißner
8a50b6302f
Fix #21346 ( #21362 )
...
Fixes the empty transaction bug in ThisInvokeContext::push() and adds a test for it to the bank.
2021-11-19 20:43:42 +01:00
Jeff Washington (jwash)
79d21d6805
add --accounts-index-scan-results-limit-mb to allow scans to abort ( #21327 )
...
* ScanConfig -> &ScanConfig
* add --accounts-index-scan-results-limit-mb to allow scans to abort
* feedback
2021-11-19 09:00:19 -06:00