Commit Graph

2578 Commits

Author SHA1 Message Date
0e7b0597db check for rewrites skipped in closure (#24330) 2022-04-14 13:46:18 -05:00
d20b4c9958 rename function param to avoid conflict (#24342) 2022-04-14 11:56:32 -05:00
a91b0c8ea3 dashmap -> rwlock<hashmap> for rewrites (#24327) 2022-04-14 11:55:58 -05:00
e3ef0741be simplify bank drop calls (#24142)
* simplify bank drop calls

* clippy: import

* Update ledger/src/blockstore_processor.rs

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

* Update runtime/src/accounts_background_service.rs

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

* Update runtime/src/bank.rs

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

* cleanup

* format

* use msb of bank_id to indicates that we are dropping

* clippy

* restore bank id

* clippy

* revert is-serialized_with_abs flag

* assert

* clippy

* whitespace

* fix bank drop callback check

* more fix

* remove msb dropping implementation

* fix

Co-authored-by: Brooks Prumo <brooks@prumo.org>
2022-04-14 08:43:54 -05:00
255ef66a27 move feature activation log to correct fn for hash (#24326) 2022-04-13 17:43:33 -05:00
6a474f29cd default to disk index (#24251) 2022-04-13 09:24:50 -05:00
b6b8783323 add maybe_update_rent_epoch_on_load (#24294) 2022-04-13 08:55:24 -05:00
929753a11f typo (#24291) 2022-04-12 16:46:59 -05:00
69e9ad5571 update comment (#24288) 2022-04-12 12:37:46 -05:00
2d4d639635 add expected_rent_collection (#24028)
* add expected_rent_collection

* update some comments for clarity and resolve a todo

* add test for 'LeaveAloneNoRent'
2022-04-12 11:32:23 -05:00
bdbca3362e increase test timeout (#24277) 2022-04-12 09:54:57 -05:00
1bc49d219d IndexLimitMb option adds 'Unspecified' state (#24249) 2022-04-12 09:38:09 -05:00
605036c117 move test fn into its own mod (#24212)
* move test fn into its own mod

* pub
2022-04-12 09:36:05 -05:00
f3aa80d3f8 typo (#24257) 2022-04-12 09:08:35 -05:00
9b8850f99e test-validator: Add --max-compute-units flag (#24130)
* test-validator: Add `--max-compute-units` flag

* Add `RuntimeConfig` for tweaking runtime behavior

* Actually add the file

* Move RuntimeConfig to runtime
2022-04-12 02:28:10 +02:00
4fd184c131 Use Release/Acquire instead of SeqCst for is_bank_drop_callback_enabled (#24134) 2022-04-11 19:19:17 -05:00
6fbe2b936c fix comment (#24254) 2022-04-11 18:53:45 -05:00
c0019edf00 document WaitableCondvar (#24252) 2022-04-11 14:45:23 -05:00
9ac2245970 remove clone (#24244) 2022-04-11 13:15:00 -05:00
60b2155bd3 Add accounts-filler-size command line option (#23896) 2022-04-11 13:10:09 -05:00
e14933c54d move bank test fn to its test_utils mod (#24171) 2022-04-11 10:42:24 -05:00
8eef3d9713 Add tests to the blockhash queue (#24238) 2022-04-11 19:36:24 +08:00
a058f348a2 Address review comments 2022-04-08 14:37:55 -05:00
2ed29771f2 Unittest for cost tracker after process_and_record_transactions 2022-04-08 14:37:55 -05:00
924b8ea1eb Adjustments to cost_tracker updates
- don't store pending tx signatures and costs in CostTracker
- apply tx costs to global state immediately again
- go from commit_or_cancel to update_or_remove, where the cost tracker
  is either updated with the true costs for successful tx, or the costs
  of a retryable tx is removed
- move the function into qos_service and hold the cost tracker lock for
  the whole loop
2022-04-08 14:37:55 -05:00
9e07272af8 - Only commit successfully executed transactions' cost to cost_tracker;
- In-fly transactions are pended in cost_tracker until being committed
  or cancelled;
2022-04-08 14:37:55 -05:00
03ed334ebb Double the chunk size for sending the program binary data in tx 2022-04-08 09:06:40 -07:00
210f6a6fab move hash calculation out of acct bg svc (#23689)
* move hash calculation out of acct bg svc

* pr feedback
2022-04-08 10:42:03 -05:00
c27150b1a3 reserialize_bank_fields_with_hash (#23916)
* reserialize_bank_with_new_accounts_hash

* Update runtime/src/serde_snapshot.rs

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

* Update runtime/src/serde_snapshot/tests.rs

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

* Update runtime/src/serde_snapshot/tests.rs

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

* pr feedback

Co-authored-by: Brooks Prumo <brooks@prumo.org>
2022-04-07 14:05:57 -05:00
48d1af01c8 add metrics around rewards (#24160) 2022-04-07 11:44:26 -05:00
f7b2951c79 move around some index metrics to reduce locks (#24161) 2022-04-07 09:43:19 -05:00
42c094739d add test cfg attribute (#24154) 2022-04-07 09:05:20 -05:00
550ca7bf92 compare contents of serialized banks instead of exact file format (#24141)
* compare contents of serialized banks instead of exact file format

* Update runtime/src/snapshot_utils.rs

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

* Update runtime/src/snapshot_utils.rs

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

* pr feedback

* get rid of clone

* pr feedback

Co-authored-by: Brooks Prumo <brooks@prumo.org>
2022-04-06 21:55:44 -05:00
fddd162645 reserialize bank in ahv by first writing to temp file in abs (#23947) 2022-04-06 21:39:26 -05:00
c322842257 Replace channel with Mutex<Option> for AccountsPackage (#24013) 2022-04-06 05:47:19 -05:00
4ea59d8cb4 Set drop callback on first root bank (#23999) 2022-04-05 13:02:33 -05:00
4a11fa072f hash_account_with_rent_epoch (#24104) 2022-04-05 08:10:31 -05:00
6a7f6585ce persist historical_roots (#24029) 2022-04-04 13:13:11 -05:00
132f08486a remove basically duplicate function (#24107) 2022-04-04 12:55:05 -05:00
997db7637c do simple math without floats 2022-04-04 12:32:00 -05:00
f8f3edac3c update comment (#24108) 2022-04-04 11:06:01 -05:00
2820b64eb3 roots_original -> historical_roots (#24063) 2022-04-04 09:12:12 -05:00
ef3e3dce7a hides implementation details of vote-accounts from public interface (#24087) 2022-04-04 13:20:26 +00:00
fa7eb7f30c improves Stakes::activate_epoch performance (#24068)
Tested with mainnet stakes obtained from the ledger at 5 recent epoch
boundaries, this code is ~30% faster than current master.

Current code:
  epoch: 289, elapsed: 82901us
  epoch: 290, elapsed: 80525us
  epoch: 291, elapsed: 79122us
  epoch: 292, elapsed: 79961us
  epoch: 293, elapsed: 78965us

This commit:
  epoch: 289, elapsed: 61710us
  epoch: 290, elapsed: 55721us
  epoch: 291, elapsed: 55886us
  epoch: 292, elapsed: 55399us
  epoch: 293, elapsed: 56803us
2022-04-02 22:48:51 +00:00
0ca5a0ec68 prior_roots -> historical_roots (#24064) 2022-04-02 12:01:43 -05:00
ec97d6d078 rename remove_old_roots (#24059) 2022-04-02 12:01:13 -05:00
3ca4fffa78 root -> alive_root (#24062) 2022-04-02 12:00:52 -05:00
792bbf75ab Support sending versioned txs in AsyncClient (#23982) 2022-04-02 11:12:02 +08:00
1b45c509c3 Refactor: Use InstructionContext::get_instruction_data() (#24014)
* Adds transaction_context and instruction_context where invoke_context.get_keyed_accounts() is used.

* Use instruction_context.get_instruction_data() instead of an explicit parameter.

* Removes instruction_data parameter from Executor::execute().

* Removes instruction_data parameter from ProcessInstructionWithContext.
2022-04-01 15:48:05 +02:00
31997f8251 hash calc scanning takes config (#24016) 2022-03-31 14:26:37 -05:00