Commit Graph

2550 Commits

Author SHA1 Message Date
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
Brooks Prumo
c24e30f689 Constrain memory ordering on AccountsDb::next_id (#21311) 2021-11-18 20:34:37 -06:00
Brooks Prumo
f7152c889c Constrain memory ordering on AppendVec::id (#21310) 2021-11-18 20:34:20 -06:00
Brooks Prumo
5788973153 Constrain memory ordering on AccountStorageEntry::alive_bytes (#21309) 2021-11-18 20:34:08 -06:00
Jack May
03c36d240a Nonce naming cleanup (#21336) 2021-11-18 16:07:17 -08:00
carllin
b30c94ce55 ClusterInfoVoteListener send only missing votes to BankingStage (#20873) 2021-11-18 15:20:41 -08:00
Jeff Washington (jwash)
a272e19f8d AcctIdx: report on partial progress during flushing (#21306) 2021-11-18 11:01:19 -06:00
Lijun Wang
89c45a57f8 Refactor slot status notification to decouple from accounts notifications (#21308)
Problem

Slot status can be used of in other scenarios in addition to account information such as transactions, blocks. The current implementation is too tightly coupled.

Summary of Changes

Decouple the slot status notification from accounts notification. Created a new slot status notification module.
2021-11-17 17:11:38 -08:00
Jeff Washington (jwash)
9cb74e8421 remove store_cached stall (#21326) 2021-11-17 18:30:40 -06:00
Jeff Washington (jwash)
83de2f7376 fix initial massive metrics spike (#21304) 2021-11-17 17:16:48 -06:00
Jeff Washington (jwash)
0f69a14247 Add ability to abort scan (#21314) 2021-11-17 13:10:29 -06:00
Alexander Meißner
e540b1cf3c Refactor: Move sdk::process_instruction in program-runtime-crate (#21180)
* Moves the Executor dyn Trait to instruction_processor.rs

* Moves the Logger dyn Trait as well as the ic_msg and ic_logger_msg macros to log_collector.rs,
and moves the stable_log to stable_log.rs

* Moves the ComputeMeter dyn Trait to invoke_context.rs

* Moves the InvokeContext dyn Trait and the ProcessInstructionWithContext type to invoke_context.rs

* Updates cargo files.

* Re-export InvokeContext in program-test

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2021-11-17 19:35:07 +01:00
Brooks Prumo
c3e5927d16 Constrain memory ordering on AccountsDb::write_version (#21312) 2021-11-17 07:11:16 -06:00
Jack May
cb0bb5bd1e Nonce accounts must be writeable (#21260)
* Nonce accounts must be writeable

* feedback

* feedback
2021-11-16 23:01:00 +00:00
Jeff Washington (jwash)
ae497715cc HashCalc: Perf: use refs for hashes (#21280) 2021-11-16 10:30:55 -06:00
sakridge
398af132a5 More set_root metrics (#21286) 2021-11-15 16:28:18 -07:00
Ivan Mironov
9b1bf98aa2 Accept only decimal digits in file names inside snapshot (#21213)
This also should make snapshot validation a bit faster.
2021-11-15 17:02:15 +00:00