Commit Graph

1326 Commits

Author SHA1 Message Date
Brooks Prumo d1ba42180d
clippy for rust 1.65.0 (#28765) 2022-11-09 19:39:38 +00:00
Brooks Prumo 0a62f01cab
Removes EAH string from datapoint metric (#28724) 2022-11-02 14:14:08 -04:00
behzad nouri 17680fe837
removes feature gate code preserving rent_epoch for rent exempt accounts (#28507)
* removes feature gate code preserving rent_epoch for rent exempt accounts

* update test expected hashes

Co-authored-by: jeff washington <jeff.washington@solana.com>
2022-11-01 13:36:59 +00:00
Brooks Prumo 59bf1809fe
Uses SnapshotHash type in snapshot archive fields (#28681) 2022-10-31 14:28:35 -04:00
Brooks Prumo bfa62da29e
Renames variant to CalcAccountsHashDataSource::IndexForTests (#28623) 2022-10-29 08:55:33 -04:00
Brooks Prumo 2ebf248f47
Renames fn to Bank::update_accounts_hash() (#28619) 2022-10-28 17:31:16 -04:00
Brooks Prumo 5a3d252899
Renames fn to Bank::update_accounts_hash_for_tests() (#28620) 2022-10-28 14:33:05 -04:00
steviez 7b70aef33c
Add help text to genesis creation time assert (#28629)
If a validator starts with a snapshot from the wrong cluster, an assert
will trigger complaining about the genesis_creation_time encoded in the
snapshot differing from the genesis_creation_time embedded in
genesis.bin.

This could be a fairly easy mistake to make so add a help string to the
assertion to point operators in the right direction.
2022-10-27 18:02:36 +02:00
Brooks Prumo 27269d833c
Uses enum for data source with calc_accounts_hash() (#28584) 2022-10-26 13:04:01 -04:00
Justin Starry 2d8665d307
Record inner instruction stack height (#28430)
* Record inner instruction stack height

* fix sbf tests

* feedback
2022-10-26 10:37:44 +08:00
Brooks Prumo 1dbcb78de7
Renames fn to update_accounts_hash() (#28574) 2022-10-25 16:43:19 -04:00
Jeff Washington (jwash) 8a538f8da5
skip_rewrite skips almost all accounts with no rent (#28552) 2022-10-24 11:48:00 -07:00
Ashwin Sekar f207af765e
Split out voting and banking threads in banking stage (#27931)
* Split out voting and banking threads in banking stage

Additionally this allows us to aggressively prune the buffer for voting threads
as with the new vote state only the latest vote from each validator is
necessary.

* Update local cluster test to use new Vote ix

* Encapsulate transaction storage filtering better

* Address pr comments

* Commit cargo lock change

* clippy

* Remove unsafe impls

* pr comments

* compute_sanitized_transaction -> build_sanitized_transaction

* &Arc -> Arc

* Move test

* Refactor metrics enums

* clippy
2022-10-20 21:10:48 +00:00
Trent Nelson cb7fe87abb bank: factor accumulation out to helper on `TotalAccountsStats` 2022-10-20 10:50:51 -07:00
Alexander Meißner 5aca7df232
Bank::create_executor() (#28474)
* Moves the integration test test_bpf_loader_upgradeable_deploy_with_max_len() from the bpf_loader into the runtime.

* Adds Bank::create_executor().

* Adds a test for Bank::create_executor().
2022-10-19 22:28:57 +02:00
Jeff Washington (jwash) fd2e671861
remove slot# from account hash (#28405)
* remove slot# from account hash

* add feature

* fix tests

* constants to help clarify 'irrelevant' changes

* move to enum for enforcing irrelevancy

* ignore unsupported tests
2022-10-18 08:03:37 -07:00
Justin Starry 70445b7402
Refactor: Rename `max_invoke_depth` to `max_invoke_stack_height` (#28427)
Refactor: Rename max_invoke_depth to max_invoke_stack_height
2022-10-17 23:54:56 +08:00
Jeff Washington (jwash) 28a89a1d99
remove expected rent collection and rehashing completely (#28422) 2022-10-17 07:24:42 -07:00
Alexander Meißner 664339e239
Refactor - executor_cache (#28332)
* Renames CachedExecutors => BankExecutorCache.

* Renames TransactionExecutor => TransactionExecutorCacheEntry.

* Renames TransactionExecutorStatus => TxBankExecutorCacheDiff.

* Adds TransactionExecutorCache.

* Renames the items of TxBankExecutorCacheDiff.
2022-10-12 18:09:03 +02:00
Ian Macalinao cdf77bb824
runtime: fix typo 'transaction' (#27948) 2022-10-11 07:47:10 -07:00
Alexander Meißner 2fc8e533a2
Refactor - Move `executor_cache` to program-runtime crate (#28322)
* Moves CachedExecutors, related structs, consts and tests into the program-runtime crate.

* Moves TransactionExecutor, related enum and type defs into executor_cache mod.
2022-10-10 15:01:41 +02:00
Tao Zhu 0324573667
report additional transaction errors to metrics (#28285) 2022-10-07 10:36:22 -05:00
Jeff Washington (jwash) 435d4aded9
run initial hash calc in background, using background threads (#28239) 2022-10-05 19:42:06 -07:00
Brooks Prumo a8c6a9e5fc
Bank::freeze() waits for EAH calculation to complete (#28170) 2022-10-05 17:44:35 -04:00
Brooks Prumo 2f8f6c6a31
Send Epoch Accounts Hash requests from set_root() (#27764) 2022-09-30 14:59:41 -04:00
Jeff Washington (jwash) cfc124c825
acct idx can no longer use write cache (#28150) 2022-09-30 10:55:27 -07:00
Brooks Prumo e6b237c2e8
eah: Add log in bank (#28110) 2022-09-28 14:45:42 -04:00
Brooks Prumo 4d02292931
Use epoch_accounts_hash::calculation_stop() (#28106) 2022-09-28 09:11:18 -04:00
Alexander Meißner 71aee4fcaf
Feature: Explicitly limit `TransactionContext::instruction_trace_capacity` (#27938)
* Renames instruction_stack_capacity => instruction_stack_capacity.

* Replaces number_of_instructions_at_transaction_level by instruction_trace_capacity.

* Adds MaxInstructionTraceLengthExceeded.

* Adjusts TransactionContext::new() parameter.

* Adds feature gate limit_max_instruction_trace_length.

* Adds test_max_instruction_trace_length().
2022-09-26 10:47:16 +02:00
Alessandro Decina b9f4c8e3c0
BorrowedAccount: add set_data_from_slice(), make set_data() take owned values (#27836)
* BorrowedAccount: add set_data_from_slice(), make set_data() take owned values

set_data() used to take a slice and would force alloc+copy if the caller
has owned values (eg account creation, account lookup table).

Expose set_data_from_slice() for callers that have slices, and switch
set_data() to taking an owned Vec.

* BorrowAccount: refactor common accounts_update_delta code in helper method

* BorrowedAccount: add extend_from_slice()

This allows avoiding copies appending entries to account lookup tables.

* BorrowedAccount: remove unnecessary ifs around update_accounts_resize_delta
2022-09-24 01:37:02 +01:00
behzad nouri 9ee53e594d
patches clippy errors from new rust nightly release (#28028) 2022-09-23 20:57:27 +00:00
Michael Vines fb686cc83b Nodes with 0% commission are now included in the `getBlock` RPC method `rewards` response field. 2022-09-22 20:31:41 -07:00
behzad nouri 9a57c64f21
patches clippy errors from new rust nightly release (#27996) 2022-09-22 22:23:03 +00:00
Brooks Prumo 1ee595ca9c
remove AccountsDb::initial_blockstore_processing_complete (#27974) 2022-09-22 13:52:04 -04:00
Ian Macalinao ab8b3386a1
runtime: fix typo for 'exempt' (#27947) 2022-09-20 16:58:57 -06:00
Ian Macalinao aa52b8aec1
runtime: fix 'governed' typo (#27946) 2022-09-20 13:05:13 -06:00
Jeff Washington (jwash) f2d6a7ecea
bank.initial_blockstore_processing_complete to avoid concurrent hash calculations (#27776)
* bank.initial_blockstore_processing_complete to avoid concurrent hash calculations

* Update runtime/src/bank.rs

Co-authored-by: Brooks Prumo <brooks@prumo.org>

* Update runtime/src/bank.rs

Co-authored-by: Brooks Prumo <brooks@prumo.org>

* Rename TestValidator::set_startup_verification_complete()

* Initialize with `AtomicBool::new(false)` instead of `default()`

* snapshot tests: move where `initial_blockstore_processing_completed()` is called

* fixup bank_forks.rs calling `is_initial_blockstore_processing_complete()`

* only call initial_blockstore_processing_completed() in blockstore_processor

Co-authored-by: Brooks Prumo <brooks@prumo.org>
Co-authored-by: Brooks Prumo <brooks@solana.com>
2022-09-19 13:00:21 -07:00
Ian Macalinao c237f15295
runtime: ParitalEq -> PartialEq (#27900) 2022-09-17 21:55:29 -06:00
Ian Macalinao 8c24840247
runtime: compleleted -> completed (#27901) 2022-09-17 21:53:57 -06:00
Jeff Washington (jwash) 1db7da5c32
pass enable_rehashing to verify_bank_hash_and_lamports (#27827) 2022-09-17 06:09:06 -07:00
Justin Starry b9700244b5
Increase transaction account lock limit from 64 to 128 (#27242)
* Increase transaction account lock limit from 64 to 256

* fix bpf test

* Reduce lock limit from 256 to 128
2022-09-15 13:50:14 -04:00
Jeff Washington (jwash) 3a47dfb8e6
add bank.bank_enable_rehashing_on_accounts_hash (#27768) 2022-09-14 11:29:23 -07:00
Jeff Washington (jwash) 416b45ac0f
calculate_capitalization gets 'enable_rehashing' (#27767) 2022-09-14 06:52:18 -07:00
Jeff Washington (jwash) d242c0fc97
pass 'enable_rehashing' through all accounts hash functions (#27701) 2022-09-12 12:18:09 -07:00
Jeff Washington (jwash) 765c628546
use exit signal for acct idx bg threads (#27483) 2022-09-12 11:51:12 -07:00
Christian Kamm 90b8a3a44d
Remove KeypairInsecureClone trait and add insecure_clone() instead (#27396)
See discussion in #26248
2022-09-12 14:59:41 +00:00
Jeff Washington (jwash) abd01553d5
tests: Keypair::new().pubkey() -> pubkey::new_rand (#27705) 2022-09-10 13:56:45 -07:00
Tao Zhu ced8f6a512
Add feature gate to remove support for RequestUnitsDeprecated instruction (#27503)
* feature gate: remove support for RequestUnitsDeprecated instruction #27500

* review update: stop support deprecated ix for prioritization

* Apply suggestions from code review

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>
2022-09-09 22:24:21 +00:00
Brooks Prumo fc396f965c
Fixup log of Epoch Accounts Hash when freezing bank (#27688) 2022-09-09 16:33:12 -04:00
Jeff Washington (jwash) d3ca364e9e
reuse shared function (#27642) 2022-09-07 13:11:00 -07:00