Commit Graph

2588 Commits

Author SHA1 Message Date
Tao Zhu 578d59c802 Remove the code that handles cost update for separate pr 2022-04-17 19:26:24 -05:00
Tao Zhu 85281de981 move number utility functions to sdk; log error if cost adjust overflows i64 2022-04-17 19:26:24 -05:00
Tao Zhu 9dadfb2e2c Add checked_add_signed() to apply cost adjustment to cost_tracker 2022-04-17 19:26:24 -05:00
Tao Zhu 094da35b91 Address review comments:
1. use was_executed to correctly identify transactions requires cost adjustment;
2. add function to specifically handle executino cost adjustment without have to copy accounts
2022-04-17 19:26:24 -05:00
Tao Zhu 29ca21ed78 undo transaction cost from cost_tracker if it was not executed successfully 2022-04-17 19:26:24 -05:00
Brooks Prumo f33ad34531
Add feature_set_override parameter to mock_process_instruction() (#24386) 2022-04-15 13:43:04 -05:00
Jeff Washington (jwash) b4fd9124bf
log secondary index contents on startup (#24348) 2022-04-15 13:30:03 -05:00
Jeff Washington (jwash) 8c9430359e
add early exit in get_corrected_rent_epoch_on_load (#24331) 2022-04-15 13:28:16 -05:00
Jeff Washington (jwash) ba7a2efa66
SlotInfoInEpoch (#24332) 2022-04-15 13:27:41 -05:00
Justin Starry 4ed647d8ec
Test that tick slot hashes update the recent blockhash queue (#24242) 2022-04-16 00:30:20 +08:00
Jeff Washington (jwash) 0e7b0597db
check for rewrites skipped in closure (#24330) 2022-04-14 13:46:18 -05:00
Jeff Washington (jwash) d20b4c9958
rename function param to avoid conflict (#24342) 2022-04-14 11:56:32 -05:00
Jeff Washington (jwash) a91b0c8ea3
dashmap -> rwlock<hashmap> for rewrites (#24327) 2022-04-14 11:55:58 -05:00
HaoranYi 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
Jeff Washington (jwash) 255ef66a27
move feature activation log to correct fn for hash (#24326) 2022-04-13 17:43:33 -05:00
Jeff Washington (jwash) 6a474f29cd
default to disk index (#24251) 2022-04-13 09:24:50 -05:00
Jeff Washington (jwash) b6b8783323
add maybe_update_rent_epoch_on_load (#24294) 2022-04-13 08:55:24 -05:00
HaoranYi 929753a11f
typo (#24291) 2022-04-12 16:46:59 -05:00
Jeff Washington (jwash) 69e9ad5571
update comment (#24288) 2022-04-12 12:37:46 -05:00
Jeff Washington (jwash) 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
Jeff Washington (jwash) bdbca3362e
increase test timeout (#24277) 2022-04-12 09:54:57 -05:00
Jeff Washington (jwash) 1bc49d219d
IndexLimitMb option adds 'Unspecified' state (#24249) 2022-04-12 09:38:09 -05:00
HaoranYi 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
HaoranYi f3aa80d3f8
typo (#24257) 2022-04-12 09:08:35 -05:00
Jon Cinque 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
Brooks Prumo 4fd184c131
Use Release/Acquire instead of SeqCst for is_bank_drop_callback_enabled (#24134) 2022-04-11 19:19:17 -05:00
Jeff Washington (jwash) 6fbe2b936c
fix comment (#24254) 2022-04-11 18:53:45 -05:00
Jeff Washington (jwash) c0019edf00
document WaitableCondvar (#24252) 2022-04-11 14:45:23 -05:00
Jeff Washington (jwash) 9ac2245970
remove clone (#24244) 2022-04-11 13:15:00 -05:00
Giorgio Gambino 60b2155bd3
Add accounts-filler-size command line option (#23896) 2022-04-11 13:10:09 -05:00
HaoranYi e14933c54d
move bank test fn to its test_utils mod (#24171) 2022-04-11 10:42:24 -05:00
Justin Starry 8eef3d9713
Add tests to the blockhash queue (#24238) 2022-04-11 19:36:24 +08:00
Christian Kamm a058f348a2 Address review comments 2022-04-08 14:37:55 -05:00
Christian Kamm 2ed29771f2 Unittest for cost tracker after process_and_record_transactions 2022-04-08 14:37:55 -05:00
Christian Kamm 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
Tao Zhu 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
Dmitri Makarov 03ed334ebb Double the chunk size for sending the program binary data in tx 2022-04-08 09:06:40 -07:00
Jeff Washington (jwash) 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
Jeff Washington (jwash) 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
Jeff Washington (jwash) 48d1af01c8
add metrics around rewards (#24160) 2022-04-07 11:44:26 -05:00
Jeff Washington (jwash) f7b2951c79
move around some index metrics to reduce locks (#24161) 2022-04-07 09:43:19 -05:00
HaoranYi 42c094739d
add test cfg attribute (#24154) 2022-04-07 09:05:20 -05:00
Jeff Washington (jwash) 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
Jeff Washington (jwash) fddd162645
reserialize bank in ahv by first writing to temp file in abs (#23947) 2022-04-06 21:39:26 -05:00
Brooks Prumo c322842257
Replace channel with Mutex<Option> for AccountsPackage (#24013) 2022-04-06 05:47:19 -05:00
carllin 4ea59d8cb4
Set drop callback on first root bank (#23999) 2022-04-05 13:02:33 -05:00
Jeff Washington (jwash) 4a11fa072f
hash_account_with_rent_epoch (#24104) 2022-04-05 08:10:31 -05:00
Jeff Washington (jwash) 6a7f6585ce
persist historical_roots (#24029) 2022-04-04 13:13:11 -05:00
Jeff Washington (jwash) 132f08486a
remove basically duplicate function (#24107) 2022-04-04 12:55:05 -05:00
Tao Zhu 997db7637c do simple math without floats 2022-04-04 12:32:00 -05:00