Commit Graph

93 Commits

Author SHA1 Message Date
Andrew Fitzgerald 18309ba8da
TransactionScheduler: Schedule Filter (#34252) 2023-11-30 14:41:11 -08:00
Andrew Fitzgerald e949ef9daa
Trailing _us for scheduler time metrics (#34263) 2023-11-29 13:18:56 -08:00
Andrew Fitzgerald df8893772e
TransactionScheduler: Clean already processed or old transactions from container (#34233) 2023-11-28 16:25:12 -08:00
Andrew Fitzgerald 656ec4bdf0
Bump prio-graph to 0.2.0 (#34235) 2023-11-28 08:23:06 -08:00
Andrew Fitzgerald 449d375565
Add metric for number of unschedulable transactions (#34230) 2023-11-28 08:20:53 -08:00
Andrew Fitzgerald 005c825b5c
Validate account locks on buffering (#34229) 2023-11-27 11:21:10 -08:00
Ikko Eltociear Ashimine c6451e9441
Fix typo in multi_iterator_scanner.rs (#34215)
targetting -> targeting
2023-11-24 23:12:57 -06:00
Andrew Fitzgerald 8a298f1628
TransactionScheduler: detailed consume worker metrics (#33895) 2023-11-20 10:46:04 -08:00
Andrew Fitzgerald 9bb82a3901
TransactionScheduler: Scheduler Count and Timing metrics (#33893) 2023-11-17 10:18:58 -08:00
Brooks 725ab37bf4
clippy: Replaces .get(0) with .first() (#34048) 2023-11-13 17:22:17 -05:00
Andrew Fitzgerald 81a007b3c8
TransactionScheduler: CLI and hookup for central-scheduler (#33890) 2023-11-13 22:18:54 +08:00
Andrew Fitzgerald ba112a021a
TransactionScheduler: SchedulerController (#33825) 2023-10-27 09:30:51 +08:00
Andrew Fitzgerald b0dcaf29e3
TransactionScheduler: Consume Scheduler w/ PrioGraph (#33612) 2023-10-24 11:33:04 +08:00
Pankaj Garg 9d42cd7efe
Initialize fork graph in program cache during bank_forks creation (#33810)
* Initialize fork graph in program cache during bank_forks creation

* rename BankForks::new to BankForks::new_rw_arc

* fix compilation

* no need to set fork_graph on insert()

* fix partition tests
2023-10-23 09:32:41 -07:00
Ryo Onodera 2f090a5882
Define PohRecorder set_bank related test helper methods (#33626)
Define PohRecorder set_bank related test methods
2023-10-11 10:34:39 +09:00
Andrew Fitzgerald 2a17be0eea
Bugfix: MultiIterator batch priority guard (#33454) 2023-10-05 09:20:24 -07:00
Andrew Fitzgerald e3cd13e49d
Add new received forwarded packets metric to banking stage (#33414) 2023-09-28 09:25:10 -07:00
Tao Zhu a41c15e47e
Separate vote cost (#33230)
* Separate simple-vote transaction cost from non-vote transaction cost

* remove is_simple_vote flag from transaction UsageCostDetails

* update test and comment

* set static usage cost for SimpleVote transaction
2023-09-25 15:02:08 -05:00
Pankaj Garg f50342a790
Split vote related code from runtime to its own crate (#32882)
* Move vote related code to its own crate

* Update imports in code and tests

* update programs/sbf/Cargo.lock

* fix check errors

* update abi_digest

* rebase fixes

* fixes after rebase
2023-09-19 10:46:37 -07:00
Andrew Fitzgerald 22338f5472
TransactionScheduler: InFlightTracker (#33206) 2023-09-19 09:08:42 -07:00
Andrew Fitzgerald 86dd18bfb5
TransactionScheduler: Id Generators (#33207) 2023-09-18 10:07:40 -07:00
Alexander Meißner bbb57be0a5
Refactor - Move interfaces of address-lookup-table into the program SDK (#33165)
* Adds a module `address_lookup_table` to the SDK.

* Adds a module `address_lookup_table::instruction` to the SDK.

* Adds a module `address_lookup_table::error` to the SDK.

* Adds a module `address_lookup_table::state` to the SDK.

* Moves AddressLookupTable into SDK as well.

* Moves AddressLookupTableAccount into address_lookup_table.

* Adds deprecation messages.

* Disentangles dependencies across cargo files.
2023-09-11 21:10:40 +02:00
Andrew Fitzgerald 297ffad797
set_forwarded needs mut ref (#33203) 2023-09-11 09:34:48 -07:00
Andrew Fitzgerald 527a4bbf00
TransactionScheduler: TransactionStateContainer (#33002)
Co-authored-by: Tao Zhu <82401714+taozhu-chicago@users.noreply.github.com>
2023-09-09 09:51:23 -07:00
Andrew Fitzgerald f8d304c610
Drop poh_service to avoid unwanted ticking (#33150) 2023-09-05 16:08:48 -07:00
behzad nouri 4ec5ea6f7b
replaces assert!(matches!(...)) with assert_matches!(...) (#33068)
assert_matches!(...) provides more informative error message when it
fails and it is part of nightly rust:
https://doc.rust-lang.org/std/assert_matches/macro.assert_matches.html
2023-08-30 13:48:27 -04:00
Trent Nelson b8dc5daedb
preliminaries for bumping nightly to 2023-08-25 (#33047)
* remove unnecessary hashes around raw string literals

* remove unncessary literal `unwrap()`s

* remove panicking `unwrap()`

* remove unnecessary `unwrap()`

* use `[]` instead of `vec![]` where applicable

* remove (more) unnecessary explicit `into_iter()` calls

* remove redundant pattern matching

* don't cast to same type and constness

* do not `cfg(any(...` a single item

* remove needless pass by `&mut`

* prefer `or_default()` to `or_insert_with(T::default())`

* `filter_map()` better written as `filter()`

* incorrect `PartialOrd` impl on `Ord` type

* replace "slow zero-filled `Vec` initializations"

* remove redundant local bindings

* add required lifetime to associated constant
2023-08-29 23:05:35 +00:00
Jon Cinque 0fe902ced7
Bump rand to 0.8, rand_chacha to 0.3, getrandom to 0.2 (#32871)
* sdk: Add concurrent support for rand 0.7 and 0.8

* Update rand, rand_chacha, and getrandom versions

* Run command to replace `gen_range`

Run `git grep -l gen_range | xargs sed -i'' -e 's/gen_range(\(\S*\), /gen_range(\1../'

* sdk: Fix users of older `gen_range`

* Replace `hash::new_rand` with `hash::new_with_thread_rng`

Run:
```
git grep -l hash::new_rand | xargs sed -i'' -e 's/hash::new_rand([^)]*/hash::new_with_thread_rng(/'
```

* perf: Use `Keypair::new()` instead of `generate`

* Use older rand version in zk-token-sdk

* program-runtime: Inline random key generation

* bloom: Fix clippy warnings in tests

* streamer: Scope rng usage correctly

* perf: Fix clippy warning

* accounts-db: Map to char to generate a random string

* Remove `from_secret_key_bytes`, it's just `keypair_from_seed`

* ledger: Generate keypairs by hand

* ed25519-tests: Use new rand

* runtime: Use new rand in all tests

* gossip: Clean up clippy and inline keypair generators

* core: Inline keypair generation for tests

* Push sbf lockfile change

* sdk: Sort dependencies correctly

* Remove `hash::new_with_thread_rng`, use `Hash::new_unique()`

* Use Keypair::new where chacha isn't used

* sdk: Fix build by marking rand 0.7 optional

* Hardcode secret key length, add static assertion

* Unify `getrandom` crate usage to fix linking errors

* bloom: Fix tests that require a random hash

* Remove some dependencies, try to unify others

* Remove unnecessary uses of rand and rand_core

* Update lockfiles

* Add back some dependencies to reduce rebuilds

* Increase max rebuilds from 14 to 15

* frozen-abi: Remove `getrandom`

* Bump rebuilds to 17

* Remove getrandom from zk-token-proof
2023-08-21 19:11:21 +02:00
steviez a4c8cc3ce0
Remove improper uses of &Arc<Bank> (#32802)
In most cases, either a &Bank or an Arc<Bank> is more proper.
- &Bank is used if the function only needs a momentary reference
- Arc<Bank> is used if the function needs its' own copy

This PR leaves several instances of &Arc<Bank> around; these instances
are situations where a clone may only happen conditionally.
2023-08-18 16:46:34 -05:00
Pankaj Garg f4287d70bb
Move accounts-db code to its own crate (#32766) 2023-08-09 13:03:36 -07:00
Andrew Fitzgerald 727cca5d20
QosService inline metrics reporting (#32670) 2023-08-01 10:19:02 -07:00
Andrew Fitzgerald fad52dff34
DecisionMaker: Add more tests (#32505) 2023-07-21 14:10:00 -07:00
Andrew Fitzgerald 0b5421f5ca
Bugfix: would_be_leader_shortly_fn period set to 1 slot instead of 20 (#32468) 2023-07-12 16:54:40 -07:00
Pankaj Garg 4674b0099f
Move CostModel and CostTracker to its own crate (#32354)
* Move CostModel and CostTracker to its own crate

* compile new crate and update imports

* update sbf Cargo.lock

* fix AbiExample

* fix cargo sort

* Fix AbiExample
2023-07-06 10:08:18 -07:00
Pankaj Garg b060f62004
Move transaction results data structures out of bank.rs (#32386)
* Move transaction results data structures out of bank.rs

* Fix CI check failures
2023-07-06 09:45:01 -07:00
Andrew Fitzgerald 06e5482ff6
move ThreadAwareAccountLocks into scheduler module (#32298) 2023-07-05 09:44:18 -07:00
buffalu 5dee2e4d0c
Ensure that uncommitted transactions are always removed from QoS (#32285)
Co-authored-by: Tao Zhu <82401714+taozhu-chicago@users.noreply.github.com>
2023-06-28 13:44:58 -07:00
Andrew Fitzgerald 450e7c2395
rename MAX_NUM_TRANSACTIONS_PER_BATCH (#32023) 2023-06-09 15:05:28 -07:00
steviez 843d6ed34a
Move BankingStage impl modules into banking_stage directory (#31864)
The core/src/ directory is already pretty crowded, and moving these
items into the subdirectory more clearly identifies that they are tied
to banking_stage.
2023-06-07 13:54:05 -05:00
Alexander Meißner ee2c2ef6c7
Cleanup - require_static_program_ids_in_transaction (#31767)
require_static_program_ids_in_transaction
2023-06-07 17:12:41 +02:00
Illia Bobyr 4353ac6797
Pass Arc<AtomicBool> by value, not by reference. (#31916)
`Arc` is already a reference internally, so it does not seem to be
beneficial to pass a reference to it.  Just adds an extra layer of
indirection.

Functions that need to be able to increment `Arc` reference count need
to take `Arc<AtomicBool>`, but those that just want to read the
`AtomicBool` value can accept `&AtomicBool`, making them a bit more
generic.

This change focuses specifically on `Arc<AtomicBool>`.  There are other
uses of `&Arc<T>` in the code base that could be converted in a similar
manner.  But it would make the change even larger.
2023-06-01 17:25:48 -07:00
Andrew Fitzgerald 5fde26fe6f
Fix merge issues: Arc::clone and ConnectionCache construction (#31825) 2023-05-25 11:30:05 -07:00
Andrew Fitzgerald 75954dc061
Banking worker (#30970) 2023-05-25 10:16:04 -07:00
behzad nouri 9281ab7d97
separates out connection-cache metrics for different protocols (#31803) 2023-05-25 14:48:22 +00:00
Andrew Fitzgerald 02ac8a46d6
set_bank takes owned Arc<Bank> (#31717) 2023-05-23 09:41:27 -07:00
Tao Zhu e84613b54c
update test for both feature gate status (#31708) 2023-05-18 12:37:58 -05:00
Tao Zhu 039991e780
update comment for clarification (#31700) 2023-05-18 12:37:09 -05:00
Tao Zhu 692e1f261a
disable qos adjustment logic when feature apply_cost_tracker_during_replay is activated (#31671)
* disable qos adjustment logic when feature apply_cost_tracker_during_replay is activated
2023-05-17 11:24:59 -05:00
Andrew Fitzgerald d2bd6c72aa
Keep signal_receiver in scope (#31625) 2023-05-15 08:56:57 -07:00
behzad nouri 4e34abbf3d
specifies protocol in contact-info get-socket api (#31602) 2023-05-12 16:16:20 +00:00