behzad nouri
4f22ee8f9b
uses varint encoding for vote-state lockout offsets
...
The commit removes CompactVoteStateUpdate and instead reduces serialized
size of VoteStateUpdate using varint encoding for vote-state lockout
offsets.
2022-09-12 16:31:20 +00: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
Brooks Prumo
d36c5774a1
Use `.find()` instead of loop+filter+break for sending snapshot request ( #27674 )
2022-09-10 19:11:37 -04:00
Jeff Washington (jwash)
bd6177d5f2
move fn only used by tests to tests ( #27699 )
2022-09-10 13:57:52 -07:00
Jeff Washington (jwash)
92a5d27cb8
remove unused 'unref' fn ( #27698 )
2022-09-10 13:57:31 -07:00
Jeff Washington (jwash)
1811d684b5
clean race condition with extra unref ( #27682 )
...
* clean race condition with extra unref
* clarify comment
* fix test
* cleanup test
* clippy
2022-09-10 13:57:17 -07:00
Jeff Washington (jwash)
abd01553d5
tests: Keypair::new().pubkey() -> pubkey::new_rand ( #27705 )
2022-09-10 13:56:45 -07:00
Jeff Washington (jwash)
1d9d5bef04
remove outdated comment ( #27703 )
2022-09-10 13:56:08 -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
2b554560fd
Send snapshot request for correct bank in set_root() ( #27673 )
2022-09-09 17:30:37 -04:00
apfitzge
6561428278
Separate add_un_ref for easier tracing ( #27652 )
2022-09-09 16:14:55 -05: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)
1f00b468e5
add enable_rehashing to AccountsPackage ( #27644 )
2022-09-08 09:25:25 -07:00
Jeff Washington (jwash)
82d12c4dda
suppress large debug message on test ( #27646 )
2022-09-08 07:01:01 -07:00
Brooks Prumo
6a322de845
Make Accounts Background Services aware of Epoch Accounts Hash ( #27626 )
2022-09-07 20:41:40 +00:00
Jeff Washington (jwash)
d3ca364e9e
reuse shared function ( #27642 )
2022-09-07 13:11:00 -07:00
Jeff Washington (jwash)
22007a3c96
allow accounts hash calc to specify enable_rehashing ( #27615 )
2022-09-07 10:16:52 -07:00
Jeff Washington (jwash)
a31d4a597d
serialize epoch_accounts_hash ( #27516 )
2022-09-07 10:07:00 -07:00
Brooks Prumo
1cf9077d06
Include the Epoch Accounts Hash in the Bank hash ( #27541 )
2022-09-07 10:10:49 -04:00
Brooks Prumo
93a4f80a2c
Handling snapshot requests is now required ( #27537 )
2022-09-07 10:08:42 -04:00
Jeff Washington (jwash)
acd846b90e
when storing detailed debug info on accounts hash, we're ok with > 1 storage ( #27617 )
2022-09-07 06:38:57 -07:00
Jeff Washington (jwash)
ecbd5bb807
acctidx: avoid extra addref in combine ancient slots ( #27545 )
...
* acctidx: avoid extra addref in combine ancient slots
* make code common
2022-09-06 13:57:34 -07:00
Brooks Prumo
a2df1e95dc
Hold `PendingAccountsPackage` lock for both checking and submitting ( #27613 )
...
Hold package lock for both checking and submitting
2022-09-06 20:11:13 +00:00
Jeff Washington (jwash)
0d01494cf8
acctidx renames for clarity ( #27606 )
2022-09-06 12:29:45 -07:00
Jeff Washington (jwash)
f1297850b8
acctidx: use slot list len to determine if upsert remains in cache ( #27550 )
2022-09-06 10:59:54 -07:00
Jeff Washington (jwash)
72a2c02ee7
add --accounts-db-verify-refcounts for debugging ( #27504 )
2022-09-06 09:39:39 -07:00
Jeff Washington (jwash)
7bdbb18741
acctidx: factor out update_slot_list_entry ( #27546 )
2022-09-06 07:39:31 -07:00
Jeff Washington (jwash)
7b579771b0
log on acct idx derefs below 0 ( #27544 )
2022-09-06 07:34:05 -07:00
Jeff Washington (jwash)
ed132e75a9
rename get_account_maps_read_lock to get_bin since we don't use a loc… ( #27543 )
...
rename get_account_maps_read_lock to get_bin since we don't ues a lock anymore
2022-09-06 07:22:55 -07:00
Jeff Washington (jwash)
f90e70ff5a
fix some comments ( #27547 )
...
remove stray comment
2022-09-06 07:21:19 -07:00
Alexander Meißner
12d2147efa
Adds `IndexOfAccount` type ( #27599 )
...
Adds the type `IndexOfAccount`.
2022-09-06 11:31:40 +02:00
Alexander Meißner
6f2e556b16
Cleanup: `TransactionContext` ( #27595 )
...
* Lets instruction_accounts_lamport_sum() have the &InstructionContext as parameter directly.
* Updates docu comments.
* Uses accessors methods instead of accessing private properties of other structs.
* Adds #![deny(clippy::indexing_slicing)].
* Has get_signers() return a Result instead of using unwrap().
* Removes InvokeContext::get_key_of_account_at_index().
2022-09-05 16:29:02 +02:00
Alexander Meißner
0b94d5af18
Refactor: `InstructionContext::configure()` ( #27400 )
...
* Replaces InstructionContext::new() by InstructionContext::configure().
Adds TransactionContext::get_next_instruction_context().
* Switch back to using references as parameters.
* Hoists InstructionContext::configure() from TransactionContext::push() into InvokeContext::push().
* Moves InstructionContext::config() to the beginning of InvokeContext::push().
* Hoists InstructionContext::configure() from InvokeContext::push() into InvokeContext::process_instruction().
* Review feedback: Updates docu comments.
2022-09-03 10:34:57 +02:00
Tao Zhu
c0f41fe6d0
fix a flacky test ( #27572 )
2022-09-02 15:02:22 +00:00
Brooks Prumo
6684c62280
Add SnapshotUsage to SnapshotConfig ( #27508 )
2022-09-02 08:56:23 -04:00
Tyera Eulberg
9b8bed86f9
Add getRecentPrioritizationFees RPC endpoint ( #27278 )
...
* Plumb priority_fee_cache into rpc
* Add PrioritizationFeeCache api
* Add getRecentPrioritizationFees rpc endpoint
* Use MAX_TX_ACCOUNT_LOCKS to limit input keys
* Remove unused cache apis
* Map fee data by slot, and make rpc account inputs optional
* Add priority_fee_cache to rpc test framework, and add test
* Add endpoint to jsonrpc docs
* Update docs/src/developing/clients/jsonrpc-api.md
* Update docs/src/developing/clients/jsonrpc-api.md
2022-09-01 23:12:12 +00:00
Brooks Prumo
a6d737d773
Add EpochAccountsHash to AccountsDb ( #27538 )
2022-09-01 12:11:07 -04:00
Jeff Washington (jwash)
3e40fad46b
deserialize(or eof) snapshot epoch_accounts_hash ( #27513 )
...
deserialize(or eof) snapshot prior_epoch_accounts_hash
2022-09-01 08:35:52 -07:00
Jeff Washington (jwash)
0df0b94a72
randomly shrink ancient append vecs ( #27523 )
2022-09-01 08:32:43 -07:00
Haoran Yi
28c3552756
remove counter stat for clean which is already captured in clean_accounts_stats
2022-09-01 10:11:08 -05:00
Haoran Yi
a28f336eb3
add timing unit scale in field name
2022-09-01 10:11:08 -05:00
Haoran Yi
43e3545c26
add stats of dirty_slots for cleaning during hash calc
2022-09-01 10:11:08 -05:00
Haoran Yi
407717eb2a
add timing stat for account hash calc with cache
2022-09-01 10:11:08 -05:00
Jeff Washington (jwash)
874085aadc
improve performance of unrefing ancient pubkeys ( #27485 )
2022-09-01 07:34:52 -07:00
apfitzge
af971e63ab
Create all shared buffer readers before spawning threads ( #27512 )
...
* Create all shared buffer readers before spawning threads
* Allow 'needless' collect - clippy is wrong
* move clippy allow, spacing
2022-08-31 22:49:02 -05:00
Alexander Meißner
84b5a2bcf4
Refactor: `TransactionContext` ABIv2 adjustments ( #27476 )
...
* Marks methods and structs which are only to be used by the program runtime.
* Removes TransactionContext::get_keys_of_accounts().
* Adds InstructionContext::get_instruction_accounts_lamport_sum().
2022-08-31 17:47:47 +02:00
Jeff Washington (jwash)
8c1e193d5d
delay trying to flush cached upserts until far future ( #26908 )
2022-08-31 08:56:26 -05:00
Tao Zhu
8bb039d08d
collect min prioritization fees when replaying sanitized transactions ( #26709 )
...
* Collect blocks' minimum prioritization fees when replaying sanitized transactions
* Limits block min-fee metrics reporting to top 10 writable accounts
* Add service thread to asynchronously update and finalize prioritization fee cache
* Add bench test for prioritization_fee_cache
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2022-08-31 08:00:55 -05:00
Jeff Washington (jwash)
b5cca0bfa3
add tests to AccountsDb::unref_accounts ( #27474 )
2022-08-30 18:51:20 -05:00
Jeff Washington (jwash)
3d03f7b47e
remove unused acct idx::upsert_on_disk ( #27479 )
2022-08-30 15:42:46 -05:00