2497 Commits

Author SHA1 Message Date
c8a52337c8 AcctIdx: remove unused function (#21546) 2021-12-01 17:14:49 -06:00
1fae3d24de bank: reuse last hash/fees helper to instatiate InvokeContext 2021-12-01 12:59:20 -07:00
91c6a10cda bank: get hash and fee rate from the same source when storing accounts 2021-12-01 12:59:20 -07:00
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
1eefdeba85 AcctIdx: cleanup trait (#21522) 2021-12-01 12:19:06 -06:00
4a1ef12bd9 Refactor fns that calculate stake and voter balances (#21529) 2021-12-01 10:29:24 -06:00
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
cb368e6554 Pass Epoch by value in StakeHistory::get() (#21523) 2021-12-01 08:57:29 -06:00
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
e922c2da9d Update to Rust 1.56.1 2021-11-30 23:28:07 -08:00
dd12d90eac Upgrade to Rust 2021 2021-11-30 20:43:46 -08:00
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
d8fb7ce511 AcctIdx: upsert avoids unnecessary allocation (#21488) 2021-11-30 11:36:46 -06:00
7ec88226ee AcctIdx: stats are usize (#21493)
* AcctIdx: stats are usize

* rename test function
2021-11-30 11:35:21 -06:00
2be859d304 add test for aborting index scan (#21487) 2021-11-29 16:13:39 -06:00
ba9dfa0d22 Remove frozen account support 2021-11-29 08:38:11 -08:00
41cc7af7cd bank: TransactionLogCollector - only push address mappings after pushing a log message 2021-11-25 04:50:51 +00:00
e558ad4c71 bank: don't panic when getting logs from malformed TransactionLogCollector 2021-11-25 04:50:51 +00:00
dafdc15dfe bank: Add failing test for TransactionLogCollector::get_logs_for_address() 2021-11-25 04:50:51 +00:00
efedb55705 bank: factor tx log getter out to method on TransactionLogCollector 2021-11-25 04:50:51 +00:00
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
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
b87ebf9e58 AcctIdx: PreAllocatedAccountMapEntry does not make unnecessary Arc (#21364) 2021-11-22 15:52:45 -06:00
a762066310 AcctIdx: don't log disk stats when disk isn't enabled (#21371) 2021-11-22 15:26:25 -06:00
c4d68063c7 Add timing for accounts add_root (#21379) 2021-11-22 18:29:45 +01:00
cd6f931223 Add timing metrics to bank creation and rewards calculation (#21066) 2021-11-21 15:11:02 +01:00
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
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
0bb059185c Add lamports_in_rent_paying_accounts to TotalAccountsStats (#21368) 2021-11-19 17:02:23 -06:00
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
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
c24e30f689 Constrain memory ordering on AccountsDb::next_id (#21311) 2021-11-18 20:34:37 -06:00
f7152c889c Constrain memory ordering on AppendVec::id (#21310) 2021-11-18 20:34:20 -06:00
5788973153 Constrain memory ordering on AccountStorageEntry::alive_bytes (#21309) 2021-11-18 20:34:08 -06:00
03c36d240a Nonce naming cleanup (#21336) 2021-11-18 16:07:17 -08:00
b30c94ce55 ClusterInfoVoteListener send only missing votes to BankingStage (#20873) 2021-11-18 15:20:41 -08:00
a272e19f8d AcctIdx: report on partial progress during flushing (#21306) 2021-11-18 11:01:19 -06:00
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
9cb74e8421 remove store_cached stall (#21326) 2021-11-17 18:30:40 -06:00
83de2f7376 fix initial massive metrics spike (#21304) 2021-11-17 17:16:48 -06:00
0f69a14247 Add ability to abort scan (#21314) 2021-11-17 13:10:29 -06:00
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
c3e5927d16 Constrain memory ordering on AccountsDb::write_version (#21312) 2021-11-17 07:11:16 -06:00
cb0bb5bd1e Nonce accounts must be writeable (#21260)
* Nonce accounts must be writeable

* feedback

* feedback
2021-11-16 23:01:00 +00:00
ae497715cc HashCalc: Perf: use refs for hashes (#21280) 2021-11-16 10:30:55 -06:00
398af132a5 More set_root metrics (#21286) 2021-11-15 16:28:18 -07:00
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
39340ed25b throttle store_cached when cache size is too large (#21188)
* throttle store_cached when cache size is too large

* reduce max delay

* 100ms max

* 10ms max delay
2021-11-13 14:00:37 -06:00
f8dcb2f38b report mem stats (#21258) 2021-11-13 00:59:41 +00:00
778b5d736c Load nonce with fixed root (#21248) 2021-11-12 14:12:34 -08:00