Tyera Eulberg
e189603d17
Make test less brittle ( #24803 )
2022-04-28 12:09:01 -06:00
Brooks Prumo
7b6880f652
Make test_bank_cloned_stake_delegations() aware of stake minimum delegation ( #24753 )
2022-04-28 09:35:07 -05:00
Jeff Washington (jwash)
f22738fd7b
fix test_rent_eager_collect_rent_in_partition ( #24722 )
2022-04-26 23:06:57 -05:00
Ryo Onodera
412a5a0d33
Credits auto rewind on vote recreation ( #22546 )
...
* Credits auto rewind on vote recreation
* Update comment
* Improve comments and tests
* Recommended fn rename
* Restore old feature, and replace new feature key
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2022-04-26 15:49:35 -06:00
Steven Luscher
3007f233f4
Log subscription for `All` no longer clobbers `Some` subscription for pubkey ( #24215 )
...
* fix: subscribing for all logs no longer clobbers pubkey-specific subscriptions
* test: write tests to cover logsSubscribe
2022-04-26 10:31:11 -07:00
Jeff Washington (jwash)
534a666153
hookup 'just_rewrites' ( #24662 )
2022-04-26 12:14:25 -05:00
Justin Starry
b6bc5d2fa1
Aggregate executor update timing metrics
2022-04-26 23:15:22 +08:00
Michael Vines
533eadd024
Remove StakeState::get_rent_exempt_reserve()
2022-04-25 21:43:04 -07:00
HaoranYi
9044cd7179
Check insert optimization for bank_forks ( #24641 )
...
* check insert optimization
* clippy suggested simplification
2022-04-25 19:17:21 -05:00
Jeff Washington (jwash)
099258e4eb
some cleanup ( #24568 )
2022-04-25 13:17:30 -05:00
Jeff Washington (jwash)
5231855261
add state for squash ancient ( #24552 )
2022-04-25 09:05:37 -05:00
behzad nouri
be0bdd2261
explicitly ignores struct fields which do not impact PartialEq impl ( #24624 )
...
Unless struct fields are explicitly ignored in PartialEq implementation,
there are no compile-time checks that if more fields are added to the
struct, PartialEq implementation is accordingly updated.
2022-04-24 14:33:42 +00:00
carllin
8a062273de
Move error counters to be reported by leader only at end of slot ( #24581 )
...
* Add error counters to leader metrics only
* Add dependencies
2022-04-23 18:10:47 -05:00
Jeff Washington (jwash)
8bfde0940f
cleanup ( #24598 )
...
* cleanup
* cargo
2022-04-23 08:28:49 -05:00
Jeff Washington (jwash)
14ee36a2af
cleanup in vote/stake accounts ( #24608 )
...
* cleanup in vote/stake accounts
* reorder comparisons in accounts_equal
2022-04-23 08:28:21 -05:00
Michael Vines
84e3342612
Process blockstore after starting the TVU
2022-04-22 21:17:49 -07:00
Michael Vines
83e041299a
Run real snapshot packager while processing blockstore at validator startup
2022-04-22 21:17:49 -07:00
dependabot[bot]
b101e00ffa
chore: bump bytemuck from 1.8.0 to 1.9.1 ( #24604 )
...
* chore: bump bytemuck from 1.8.0 to 1.9.1
Bumps [bytemuck](https://github.com/Lokathor/bytemuck ) from 1.8.0 to 1.9.1.
- [Release notes](https://github.com/Lokathor/bytemuck/releases )
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md )
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.8.0...v1.9.1 )
---
updated-dependencies:
- dependency-name: bytemuck
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-04-22 20:50:47 -06:00
Jeff Washington (jwash)
ce7d2964c9
metrics on ancient slots ( #24596 )
2022-04-22 15:01:51 -05:00
dependabot[bot]
08627e3f67
chore: bump ouroboros from 0.14.2 to 0.15.0 ( #24575 )
...
* chore: bump ouroboros from 0.14.2 to 0.15.0
Bumps [ouroboros](https://github.com/joshua-maros/ouroboros ) from 0.14.2 to 0.15.0.
- [Release notes](https://github.com/joshua-maros/ouroboros/releases )
- [Commits](https://github.com/joshua-maros/ouroboros/compare/0.14.2...0.15.0 )
---
updated-dependencies:
- dependency-name: ouroboros
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <you@example.com>
2022-04-22 13:56:20 -06:00
Jon Cinque
0d51596224
sim: Override slot hashes account on simulation bank ( #24543 )
...
* sim: Override slot hashes during simulation
* Add simulation test program
* Address feedback
* Add AccountOverrides explicit type
* Cargo fmt
2022-04-22 12:32:31 +02:00
Jeff Washington (jwash)
a0c4be8cd7
add StorableAccountsMovingSlots ( #24555 )
2022-04-21 15:48:20 -05:00
Jeff Washington (jwash)
25e9199397
cleanup FlushStats ( #24556 )
2022-04-21 14:05:01 -05:00
Jeff Washington (jwash)
3f7b8d3d2c
provide default impl of 'is_empty' ( #24554 )
2022-04-21 12:49:44 -05:00
behzad nouri
d524ae293f
collects metrics for cached vote/stake accounts consistency
...
Tracking mismatches between cached vote/stake accounts and accounts-db
in preparation of activating feature for updating rewards at
epoch-boundary using cached vote/stake accounts.
2022-04-21 15:28:41 +00:00
behzad nouri
108aa23d90
enforces type-safety in Stakes<StakeAccount> using phantom data
...
StakeAccount<Delegation> can only wrap a stake-state which is a
Delegation; whereas StakeAccount<()> wraps any account with stake state.
As a result, StakeAccount::<Delegation>::delegation() will return
Delegation instead of Option<Delegation>.
2022-04-21 15:28:41 +00:00
behzad nouri
f937fcbd95
updates rewards at epoch boundary using cached accounts
...
Loading vote and stake accounts from accounts-db takes a significant
portion of time updating rewards at epoch boundary.
This commit bypasses accounts-db and instead uses vote and stake
accounts cached in bank stakes:
https://github.com/solana-labs/solana/blob/d2702201c/runtime/src/stakes.rs#L148-L152
These cached accounts are synchronized with accounts-db after each
transaction, and so there should not be any change in the resulting
computation:
https://github.com/solana-labs/solana/blob/d2702201c/runtime/src/bank.rs#L4526
Nevertheless, to avoid any chances of introducing a consensus issue, the
switch to cached account is feature gated.
2022-04-21 15:28:41 +00:00
behzad nouri
b4491ff4ba
adds StakesEnum type representing Stakes<StakeAccount|Delegation>
...
For backward compatibility, we can only serialize and deserialize
Stakes<Delegation>. However Bank caches Stakes<StakeAccount>. This type
mismatch incurs a conversion cost at epoch boundary when updating
EpochStakes.
This commit adds StakesEnum which allows EpochStakes to include either a
Stakes<StakeAccount> or Stakes<Delegation> and so bypass the conversion
cost between the two at the epoch boundary.
2022-04-21 15:28:41 +00:00
behzad nouri
454ef38e43
caches StakeAccount instead of Delegation in Stakes
...
The commit makes values in stake_delegations map in Stakes struct
generic. Stakes<Delegation> is equivalent to the old code and is used
for backward compatibility in BankFieldsTo{Serialize,Deserialize}.
But banks cache Stakes<StakeAccount> which includes the entire stake
account and StakeState deserialized from account. Doing so, will remove
the need to load stake account from accounts-db when working with
stake-delegations.
2022-04-21 15:28:41 +00:00
behzad nouri
8c4d6357fe
adds StakeAccount type embodying an Account and a StakeState
...
The added type does sanity checks on the Account and stores deserialized
StakeState. Following commits will use this type instead of Delegation
in Stakes.
2022-04-21 15:28:41 +00:00
Justin Starry
d5127abf46
Only add hashes for completed blocks to recent blockhashes ( #24389 )
...
* Only add hashes for completed blocks to recent blockhashes
* feedback
2022-04-21 21:05:29 +08:00
Tao Zhu
a21fc3f303
Apply transaction actual execution units to cost_tracker ( #24311 )
...
* Pass the sum of consumed compute units to cost_tracker
* cost model tracks builtins and bpf programs separately, enabling adjust block cost by actual bpf programs execution costs
* Copied nightly-only experimental `checked_add_(un)signed` implementation to sdk
* Add function to update cost tracker with execution cost adjustment
* Review suggestion - using enum instead of struct for CommitTransactionDetails
Co-authored-by: Justin Starry <justin.m.starry@gmail.com>
* review - rename variable to distinguish accumulated_consumed_units from individual compute_units_consumed
* not to use signed integer operations
* Review - using saturating_add_assign!(), and checked_*().unwrap_or()
* Review - using Ordering enum to cmp
* replace checked_ with saturating_
* review - remove unnecessary Option<>
* Review - add function to report number of non-zero units account to metrics
2022-04-21 07:38:07 +00:00
Justin Starry
79923c3b58
Refactor: Rename BlockhashQueue fields and methods for clarity ( #24426 )
2022-04-21 11:57:17 +08:00
Jeff Washington (jwash)
52f43a986d
skip rewrites in bank ( #23985 )
2022-04-20 14:08:46 -05:00
Jeff Washington (jwash)
b1c89cf6d4
append_vec::remaining_bytes ( #24531 )
2022-04-20 13:44:57 -05:00
Jeff Washington (jwash)
813d06529d
stats for rewrites ( #24529 )
2022-04-20 10:43:50 -05:00
Jeff Washington (jwash)
05438c3cd6
implement remove_old_historical_roots ( #24492 )
2022-04-20 10:43:32 -05:00
Jeff Washington (jwash)
cdc3c41001
helpers to skip rewrites in bank ( #24507 )
2022-04-20 10:21:02 -05:00
Jeff Washington (jwash)
0d797e2fff
contains_multiple_slots ( #24500 )
2022-04-20 09:53:36 -05:00
Jeff Washington (jwash)
cfe2177e16
validator option: accounts-db-skip-rewrites ( #24504 )
2022-04-20 09:41:00 -05:00
Jeff Washington (jwash)
957849f4a5
load_to_collect_rent_eagerly returns loaded_slot ( #24506 )
2022-04-20 09:14:03 -05:00
dependabot[bot]
dd15193c69
chore: bump rayon from 1.5.1 to 1.5.2 ( #24470 )
...
* chore: bump rayon from 1.5.1 to 1.5.2
Bumps [rayon](https://github.com/rayon-rs/rayon ) from 1.5.1 to 1.5.2.
- [Release notes](https://github.com/rayon-rs/rayon/releases )
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md )
- [Commits](https://github.com/rayon-rs/rayon/commits )
---
updated-dependencies:
- dependency-name: rayon
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-04-19 23:17:52 -06:00
Jeff Washington (jwash)
ef5e7cce6e
type PubkeyAccountSlot ( #24503 )
2022-04-19 21:34:00 -05:00
Jeff Washington (jwash)
4be01ec75a
remove temp dead_code markers ( #24508 )
2022-04-19 21:30:57 -05:00
Michael Vines
9e4999ef6a
Remove halt_at_slot from RuntimeConfig, it's not a runtime concern
2022-04-19 19:23:58 -07:00
Michael Vines
0e2e0c8b7d
Extract most storage-related services from the Tvu abstraction
2022-04-19 19:23:58 -07:00
Jeff Washington (jwash)
255a6a729d
add historical_roots_len stat ( #24497 )
2022-04-19 16:53:24 -05:00
Jeff Washington (jwash)
d23c04bb68
max_slot_in_storages_exclusive -> INclusive ( #24450 )
2022-04-19 13:59:41 -05:00
Tao Zhu
94b0186a96
Cost model tracks builtins and bpf programs separately ( #24468 )
...
* Cost model tracks builtins and bpf programs separatele (enables adjusting block cost by actual bpf programs execution costs)
* Address reviews: expand test; add metrics stat
2022-04-19 13:25:47 -05:00
Justin Starry
2ad1baa753
Add const fn StakeState::size_of and static assertion ( #24416 )
2022-04-20 01:04:12 +08:00