Commit Graph

2706 Commits

Author SHA1 Message Date
Jeff Washington (jwash) 896729f25e
keep track of oldest slot used by last hash calculation (#25152) 2022-05-12 11:18:08 -05:00
Jeff Washington (jwash) abb4993a3b
SortedStorages::max_slot_inclusive() (#25153) 2022-05-12 10:24:03 -05:00
Jeff Washington (jwash) 849cbe93aa
add AccountsToStore::has_overflow (#25143) 2022-05-12 10:14:27 -05:00
Jeff Washington (jwash) c56d978cb1
minor cleanup (#25144) 2022-05-11 14:58:43 -05:00
Justin Starry 68800982ea
Add size_of const fns for upgradeable loader states (#25131) 2022-05-11 22:22:59 +08:00
Jeff Washington (jwash) a8930ee14b
add --accounts-db-ancient-append-vecs (#25125) 2022-05-11 08:47:07 -05:00
Jon Cinque 542a14d9b7
test-validator: Always use overridden compute budget in bank (#25128) 2022-05-11 15:46:51 +02:00
Jeff Washington (jwash) 11fa0db850
more ancient append vec fns (#25127) 2022-05-11 08:02:05 -05:00
Jeff Washington (jwash) 3ce877d1ab
add metric for ancient append vec count (#25126) 2022-05-11 08:01:04 -05:00
Jeff Washington (jwash) c4506269a6
add ancient_append_vecs (#25119) 2022-05-10 16:41:04 -05:00
Pankaj Garg c838e15234
Unset needs_unlock for rebatched transactions batches (#25095)
* Unset needs_unlock for rebatched transactions batches

* address review comments
2022-05-10 13:39:08 -07:00
DimAn 2fa9bc3e70
Add options to store full and/or incremental snapshots in separate locations (#24247) 2022-05-10 16:37:41 -04:00
Jeff Washington (jwash) dc6e28099b
mark_dirty_dead_stores (#25114) 2022-05-10 15:08:29 -05:00
Jeff Washington (jwash) e9e267947e
simplify storage_finder -> storage (#25109) 2022-05-10 14:18:51 -05:00
Jeff Washington (jwash) e9a9604ca7
avoid zeroing out root stats with empty data (#25111) 2022-05-10 13:56:30 -05:00
Jeff Washington (jwash) b91cc87680
assert when rewrites skipped (#25110) 2022-05-10 13:55:48 -05:00
Jeff Washington (jwash) 8e5bb0a1e2
check file size of accounts cache mmap before indexing (#25077) 2022-05-10 13:33:22 -05:00
Jeff Washington (jwash) 2d7ce2a6c2
Revert "uses designated thread-pools for account db parallel ops (#24954)" (#25053)
This reverts commit e8bdc27080.
2022-05-06 15:20:50 -05:00
Justin Starry 082502d4f3
Fail tx sanitization when ix program id uses lookup table (#25035)
* Fail tx sanitization when ix program id uses lookup table

* feedback
2022-05-07 03:19:50 +08:00
Jeff Washington (jwash) df9a4a0c9d
Bank::new_for_benches uses bench config (#25017) 2022-05-06 13:35:18 -05:00
Jeff Washington (jwash) 7401bc0fa5
remove_old_historical_roots uses correct epoch schedule (#25020)
* remove_old_historical_roots uses correct epoch schedule

* Update runtime/src/accounts_db.rs

Co-authored-by: apfitzge <apfitzge@users.noreply.github.com>

Co-authored-by: apfitzge <apfitzge@users.noreply.github.com>
2022-05-06 12:38:09 -05:00
Jason 47cd0d9061
Speed up get-data-cost function (#25013)
* Combine data_bytes_cost into the get_transaction_cost function, for speedup

* Remove a dead function, fix a value in a test

* Respond to comments by changing call signature to take a &mut struct rather than return a tuple
2022-05-06 11:39:00 -05:00
behzad nouri 492f89a170
checks account owner when initializing a vote-account (#25018)
A VoteAccount may only wrap an account if the account owner is
solana_vote_program:id or equivalently this check returns true:
solana_vote_program::check_id(account.owner())
2022-05-06 16:22:49 +00:00
behzad nouri 3fff34a65f
explicitly removes accounts with zero lamports from stakes cache (#25015)
Zero lamport accounts are not stored in accounts-db:
https://github.com/solana-labs/solana/blob/7b5835ddf/runtime/src/accounts_db.rs#L5007-L5014
https://github.com/solana-labs/solana/blob/7b5835ddf/runtime/src/accounts_db.rs#L4481-L4483

However, in order to purge the account from cache, stakes cache update
partially relies on accounts data to be also zeroed out :
https://github.com/solana-labs/solana/blob/7b5835ddf/runtime/src/bank.rs#L3471-L3478

This can be error-prone and introduce inconsistency between accounts-db
and vote/stake cache. This commit instead explicitly removes accounts
from cache if lamports == 0.
2022-05-06 14:04:49 +00:00
Jeff Washington (jwash) 0cc97689f9
add stats for stakes_cache_check_and_store_us (#24349)
* add stats for stakes_cache_check_and_store_us

* remove redundant metrics
2022-05-05 17:22:48 -05:00
Jeff Washington (jwash) 96259b4f23
when testing hash calc, also verify cap (#25012) 2022-05-05 15:16:15 -05:00
Jeff Washington (jwash) e0092902ea
maybe_update_rent_epoch_on_load uses correct EpochSchedule (#24999) 2022-05-05 13:34:03 -05:00
behzad nouri 7b5835ddfa
removes manual implementations of serde Deserialize from vote_account (#25006)
Container attribute #[serde(from = "...")] already achieves desired
implementation.
2022-05-05 16:33:10 +00:00
Jae-Heon Ji f6e8e16691
chore: update function name (#24166) 2022-05-05 10:27:14 -05:00
dependabot[bot] f0319f9ced
chore: bump im from 15.0.0 to 15.1.0 (#24992)
* chore: bump im from 15.0.0 to 15.1.0

Bumps [im](https://github.com/bodil/im-rs) from 15.0.0 to 15.1.0.
- [Release notes](https://github.com/bodil/im-rs/releases)
- [Changelog](https://github.com/bodil/im-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bodil/im-rs/compare/v15.0.0...v15.1.0)

---
updated-dependencies:
- dependency-name: im
  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-05-05 05:48:05 +00:00
dependabot[bot] bece7f32c8
chore: bump log from 0.4.16 to 0.4.17 (#24987)
* chore: bump log from 0.4.16 to 0.4.17

Bumps [log](https://github.com/rust-lang/log) from 0.4.16 to 0.4.17.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/commits/0.4.17)

---
updated-dependencies:
- dependency-name: log
  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-05-05 01:49:18 +00:00
behzad nouri e8bdc27080
uses designated thread-pools for account db parallel ops (#24954)
Instead of global rayon thread-pool, the commit uses
AccountsDb::{thread_pool,thread_pool_clean} for parallel ops in
AccountsDB::{update_index,clean_accounts_older_than_root}.
2022-05-04 22:47:12 +00:00
Jeff Washington (jwash) e8bf812a8a
allow ledger-tool halt at slot to calc hash using write cache (#24974) 2022-05-04 16:27:49 -05:00
Jeff Washington (jwash) 40986daddf
log write cache contents from purge_slots_from_cache_and_store (#24948) 2022-05-04 14:28:47 -05:00
apfitzge 0ca54db524
use bank's epoch_schedule accessor internally (#24918) 2022-05-04 13:52:48 -05:00
Alexander Meißner eae9a66531
Record instructions which are precompiles (#24743)
* Record instructions which are "is_precompile".
2022-05-04 16:32:14 +02:00
dependabot[bot] 9258d81ba3
chore: bump serde from 1.0.136 to 1.0.137 (#24957)
* chore: bump serde from 1.0.136 to 1.0.137

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.136 to 1.0.137.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.136...v1.0.137)

---
updated-dependencies:
- dependency-name: serde
  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-05-03 22:14:59 -06:00
Jack May e070c5ca38
default compute units per instruction (#24899) 2022-05-03 09:50:06 -07:00
HaoranYi fd44198c0a
fix typo (#24937) 2022-05-03 09:57:15 -05:00
Jeff Washington (jwash) 755100dd7c
use correct epoch schedule (#24904) 2022-05-03 09:21:47 -05:00
apfitzge 112a0b475a
Revert "Refactor to use EpochSchedule from within RentCollector struct" (#24893)
* Revert "Ran cargo fmt"

This reverts commit 9052e41b32.

* Revert "Fix build error introduced by my editor setup, part 2"

This reverts commit 4dfeab3b38.

* Revert "Fix build error introduced by my editor setup"

This reverts commit 87fb78dc56.

* Revert "Remove redundant epoch_schedule from AccountsPackage"

This reverts commit c2f7f2fff8.

* Revert "Fix a test"

This reverts commit 36c0bdaa78.

* Revert "Fixes to initial code"

This reverts commit ed7813e698.

* Revert "Removing redundant EpochSchedule param from fns"

This reverts commit 5472d2e605.
2022-05-02 13:46:17 -05:00
Jeff Washington (jwash) 546730cf42
retire deprecate_rewards_sysvar (#24651)
* retire deprecate_rewards_sysvar

* Update expected hash for bank after eliminating reqards sysvar

* Hack test_bank_update_vote_stake_rewards to pass after removing sysvar rewards account

* formatting change

* formatting cleanup

* Remove legacy validator Rewards code from unit test. Change expected inflation computation

* Update bank.rs

* Update bank.rs

* Clean up inflation abstraction function

* Formatting cleanup

* rename vars. Add struct for inflation rewards return

* format cleanup + comment

* Fix format warnings

Co-authored-by: Brennan Watt <brennan.watt@solana.com>
2022-05-02 10:10:51 -05:00
Michael Vines 74b586ae71 Always retain the highest incremental snapshot for all full snapshots 2022-05-02 07:37:55 -07:00
Brooks Prumo a73f99823d
Do not hold lock unnecessarily when hashing (#24815) 2022-04-29 08:40:28 +00:00
Dan Albert ad7c95b8a5
Update non-circulating supply list (#24817)
Co-authored-by: publish-docs.sh <maintainers@solana.com>
2022-04-29 02:57:54 +00:00
Brooks Prumo b4ade0d48a
Make stake integration tests aware of stake minimum delegation (#24809) 2022-04-28 18:11:39 -05:00
Jon Cinque b4503d4110
token: Add features for new program releases (#24742)
* token: Add features for new program releases

* Add PR number
2022-04-28 23:43:57 +02:00
Justin Starry 4e58b3870c
Update all BankForks methods to return owned values (#24801) 2022-04-28 18:51:00 +00:00
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