Commit Graph

3257 Commits

Author SHA1 Message Date
Jeff Washington (jwash) 56d1a88924
add _inclusive (#27334) 2022-08-23 14:19:13 -05:00
Jeff Washington (jwash) a5c5d70c1c
add _inclusive (#27335) 2022-08-23 14:19:04 -05:00
Jeff Washington (jwash) 7f4dc496ef
add _inclusive (#27336)
add _inclusive, rename slot
2022-08-23 14:18:55 -05:00
Jeff Washington (jwash) 326f43d644
don't mark ancient append vecs as dirty wrt clean (#27312) 2022-08-23 09:18:48 -05:00
Alexander Meißner b2ae7def06
Remove `total_data_size` and `data_size_changed` from `ExecuteDetailsTimings` (#27051)
* Removes total_data_size and data_size_changed from ExecuteDetailsTimings.
2022-08-23 14:58:32 +02:00
Ryo Onodera 3db5e82c0a
Remove redundant and stale comment (#27229) 2022-08-23 13:43:25 +09:00
Brennan Watt e4a7d01e10
Rust v1.63 (#27303)
* Upgrade to Rust v1.63.0

* Add nightly_clippy_allows

* Resolve some new clippy nightly lints

* Increase QUIC packets completion timeout

* Update quinn-udp crate

Co-authored-by: Michael Vines <mvines@gmail.com>
2022-08-22 18:01:03 -07:00
apfitzge a655d45f3a
remove unnecessary references (#27219) 2022-08-22 19:22:35 -05:00
Jeff Washington (jwash) 748c6ea609
in ancient shrink, unref accounts that were already ancient shrunk (#27294) 2022-08-22 18:37:46 -05:00
Jeff Washington (jwash) 0ac114fc5d
add _inclusive (#27308) 2022-08-22 18:03:32 -05:00
Jeff Washington (jwash) 66aa81647b
add _inclusive (#27310) 2022-08-22 17:59:40 -05:00
Brooks Prumo 04eb5d414d
Remove unused `Bank::_clean_accounts()` (#27262) 2022-08-22 18:36:25 -04:00
Jeff Washington (jwash) 0e45e17aca
log reason why oldest store_id isn't being cleaned (#27298) 2022-08-22 17:11:38 -05:00
Jeff Washington (jwash) 9703855a80
add _inclusive (#27300) 2022-08-22 14:55:58 -05:00
Jeff Washington (jwash) ae02d955b4
add _inclusive (#27301) 2022-08-22 14:33:17 -05:00
Jeff Washington (jwash) 15af69f4c1
add _inclusive (#27302) 2022-08-22 14:23:58 -05:00
Jeff Washington (jwash) 97036b1c75
refactor/document calc_delete_dependencies (#27272) 2022-08-22 13:28:18 -05:00
Brooks Prumo 9daa41024d
Call AccountsDb::clean_accounts() directly, inside Bank::verify_snapshot_bank() (#27258) 2022-08-22 13:56:13 -04:00
Jeff Washington (jwash) 5272a2852d
account_iter instead of accounts() (#27252) 2022-08-22 11:35:43 -05:00
Jeff Washington (jwash) fc1a4dd11a
run hash calc with index on failure (#27279) 2022-08-22 10:58:04 -05:00
Jeff Washington (jwash) ab0731728a
release roots tracker read lock earlier (#27267) 2022-08-22 10:51:20 -05:00
Jeff Washington (jwash) ab826b71a9
rename unused parameter for clarity (#27271) 2022-08-22 10:27:24 -05:00
apfitzge 9d5029da15
slots_per_epoch shouldn't be optional (#27256) 2022-08-22 10:15:48 -05:00
behzad nouri 7fda0287cb
checks that cached vote accounts are consistent with accounts-db (#27286)
The commit adds sanity checks that when loading a bank from snapshots:
* cached vote accounts are consistent with accounts-db.
* all valid vote-accounts referenced in stake delegations are already
  cached.
2022-08-22 13:38:41 +00:00
HaoranYi 389bedda5e
Refactor epoch reward 4 (#27261)
* refactor: extract store_stake_accounts fn

* refactor: extract store_vote_account fn

* refactor: extract reward history update fn

* remove avg point value from pay_valiator fn. not used

* clippy: slice

* clippy: slice

* remove abort() from test-validator (#27124)

* chore: bump bytes from 1.1.0 to 1.2.1 (#27172)

* chore: bump bytes from 1.1.0 to 1.2.1

Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.1.0 to 1.2.1.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/compare/v1.1.0...v1.2.1)

---
updated-dependencies:
- dependency-name: bytes
  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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>

* Share Ancestors API get with contains_key (#27161)

consolidate similar fns

* Rename to `MAX_BLOCK_ACCOUNTS_DATA_SIZE_DELTA` (#27175)

* chore: bump libc from 0.2.129 to 0.2.131 (#27162)

* chore: bump libc from 0.2.129 to 0.2.131

Bumps [libc](https://github.com/rust-lang/libc) from 0.2.129 to 0.2.131.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.129...0.2.131)

---
updated-dependencies:
- dependency-name: libc
  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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>

* reverts wide fanout in broadcast when the root node is down (#26359)

A change included in
https://github.com/solana-labs/solana/pull/20480
was that when the root node in turbine broadcast tree is down, the
leader will broadcast the shred to all nodes in the first layer.
The intention was to mitigate the impact of dead nodes on shreds
propagation, because if the root node is down, then the entire cluster
will miss out the shred.
On the other hand, if x% of stake is down, this will cause 200*x% + 1
packets/shreds ratio at the broadcast stage which might contribute to
line-rate saturation and packet drop.
To avoid this bandwidth saturation issue, this commit reverts that logic
and always broadcasts shreds from the leader only to the root node.
As before we rely on erasure codes to recover shreds lost due to staked
nodes being offline.

* add getTokenLargestAccounts rpc method to rust client (#26840)

* add get token largest accounts rpc call to client

* split to include with commitment

* Bump spl-token-2022 (#27181)

* Bump token-2022 to 0.4.3

* Allow cargo to bump stuff to v1.11.5

* VoteProgram.safeWithdraw function to safeguard against accidental vote account closures (#26586)

feat: safe withdraw function

Co-authored-by: aschonfeld <andrew@proofofalpha.io>

* chore: bump futures from 0.3.21 to 0.3.23 (#27182)

* chore: bump futures from 0.3.21 to 0.3.23

Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.21 to 0.3.23.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.21...0.3.23)

---
updated-dependencies:
- dependency-name: futures
  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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>

* chore: bump nix from 0.24.2 to 0.25.0 (#27179)

* chore: bump nix from 0.24.2 to 0.25.0

Bumps [nix](https://github.com/nix-rust/nix) from 0.24.2 to 0.25.0.
- [Release notes](https://github.com/nix-rust/nix/releases)
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.24.2...v0.25.0)

---
updated-dependencies:
- dependency-name: nix
  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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>

* Parse ConfidentialTransaction instructions (#26825)

Parse ConfidentialTransfer instructions

* snapshots: serialize version file first (#27192)

serialize version file first

* serialize incremental_snapshot_hash (#26839)

* serialize incremental_snapshot_hash

* pr feedback

* derives Error trait for ClusterInfoError and core::result::Error (#27208)

* Add clean_accounts_for_tests() (#27200)

* Rust v1.63.0 (#27148)

* Upgrade to Rust v1.63.0

* Add nightly_clippy_allows

* Resolve some new clippy nightly lints

* Increase QUIC packets completion timeout

Co-authored-by: Michael Vines <mvines@gmail.com>

* docs: updated "transaction fees" page (#26861)

* docs: transaction fees, compute units, compute budget

* docs: added messages definition

* Revert "docs: added messages definition"

This reverts commit 3c56156dfaaf17158c5eafbc5877080a83607a06.

* docs: added messages definition

* Update docs/src/transaction_fees.md

Co-authored-by: Jacob Creech <82475023+jacobcreech@users.noreply.github.com>

* fix: updates from feedback

Co-authored-by: Jacob Creech <82475023+jacobcreech@users.noreply.github.com>

* sdk: Fix args after "--" in build-bpf and test-bpf (#27221)

* Flaky Unit Test test_rpc_subscriptions (#27214)

Increase unit test timeout from 5 seconds to 10 seconds

* chore: only buildkite pipelines use sccache in docker-run.sh (#27204)

chore: only buildkite ci use sccache

* clean feature: `prevent_calling_precompiles_as_programs` (#27100)

* clean feature: prevent_calling_precompiles_as_programs

* fix tests

* fix test

* remove comment

* fix test

* feedback

* Add get_account_with_commitment to BenchTpsClient (#27176)

* Fix a corner-case panic in get_entries_in_data_block() (#27195)

#### Problem
get_entries_in_data_block() panics when there's inconsistency between
slot_meta and data_shred.

However, as we don't lock on reads, reading across multiple column families is
not atomic (especially for older slots) and thus does not guarantee consistency
as the background cleanup service could purge the slot in the middle.  Such
panic was reported in #26980 when the validator serves a high load of RPC calls.

#### Summary of Changes
This PR makes get_entries_in_data_block() panic only when the inconsistency
between slot-meta and data-shred happens on a slot older than lowest_cleanup_slot.

* Verify snapshot slot deltas (#26666)

* store-tool: log lamports for each account (#27168)

log lamports for each account

* add an assert for a debug feature to avoid wasted time (#27210)

* remove redundant call that bumps age to future (#27215)

* Use from_secs api to create duration (#27222)

use from_secs api to create duration

* reorder slot # in debug hash data path (#27217)

* create helper fn for clarity (#27216)

* Verifying snapshot bank must always specify the snapshot slot (#27234)

* Remove `Bank::ensure_no_storage_rewards_pool()` (#26468)

* cli: Add subcommands for address lookup tables (#27123)

* cli: Add subcommand for creating address lookup tables

* cli: Add additional subcommands for address lookup tables

* short commands

* adds hash domain to ping-pong protocol (#27193)

In order to maintain backward compatibility, for now the responding node
will hash the token both with and without domain so that the other node
will accept the response regardless of its upgrade status.
Once the cluster has upgraded to the new code, we will remove the legacy
domain = false case.

* Revert "Rust v1.63.0 (#27148)" (#27245)

This reverts commit a2e7bdf50a.

* correct double negation (#27240)

* Enable QUIC client by default. Add arg to disable QUIC client. (Forward port #26927) (#27194)

Enable QUIC client by default. Add arg to disable QUIC client.

* Enable QUIC client by default. Add arg to disable QUIC client.
* Deprecate --disable-quic-servers arg
* Add #[ignore] annotation to failing tests

* slots_connected: check if the range is connected (>= ending_slot) (#27152)

* create-snapshot check if snapshot slot exists (#27153)

* Add Bank::clean_accounts_for_tests() (#27209)

* Call `AccountsDb::shrink_all_slots()` directly (#27235)

* add ed25519_program to built-in instruction cost list (#27199)

* add ed25519_program to built-in instruction cost list

* Remove unnecessary and stale comment

* simple refactorings to disk idx (#27238)

* add _inclusive for clarity (#27239)

* eliminate unnecessary ZERO_RAW_LAMPORTS_SENTINEL (#27218)

* make test code more clear (#27260)

* banking stage: actually aggregate tracer packet stats (#27118)

* aggregated_tracer_packet_stats_option was alwasys None

* Actually accumulate tracer packet stats

* Refactor epoch reward 1 (#27253)

* refactor: extract store_stake_accounts fn

* clippy: slice

Co-authored-by: haoran <haoran@mbook>

* recovers merkle shreds from erasure codes (#27136)

The commit
* Identifies Merkle shreds when recovering from erasure codes and
  dispatches specialized code to reconstruct shreds.
* Coding shred headers are added to recovered erasure shards.
* Merkle tree is reconstructed for the erasure batch and added to
  recovered shreds.
* The common signature (for the root of Merkle tree) is attached to all
  recovered shreds.

* Simplify `Bank::clean_accounts()` by removing params (#27254)

* Account files remove (#26910)

* Create a new function cleanup_accounts_paths, a trivial change

* Remove account files asynchronously

* Update and simplify the implementation after the validator test runs.

* Fixes after testing on the dev device

* Discard tokio.  Use thread instead

* Fix comments format

* Fix config type to pass the github test

* Fix failed tests.  Handle the case of non-existing path

* Final cleanup, addressing the review comments
Avoided OsString.
Made the function more generic with "impl AsRef<Path>"

Co-authored-by: Jeff Washington <jeff.washington@solana.com>

* Refactor: Flattens `TransactionContext::instruction_trace` (#27109)

* Flattens TransactionContext::instruction_trace.

* Stop the search at transaction level.

* Renames get_instruction_context_at => get_instruction_context_at_nesting_level.

* Removes TransactionContext::get_instruction_trace().
Adds TransactionContext::get_instruction_trace_length() and TransactionContext::get_instruction_context_at_index().

* Have TransactionContext::instruction_accounts_lamport_sum() accept an iterator instead of a slice.

* Removes instruction_trace from ExecutionRecord.

* make InstructionContext::new() private

* Parallel insertion of dirty store keys during clean (#27058)

parallelize dirty store key insertion

* Refactor epoch reward 2 (#27257)

* refactor: extract store_stake_accounts fn

* refactor: extract store_vote_account fn

* clippy: slice

* clippy: slice

* fix merge error

Co-authored-by: haoran <haoran@mbook>

* Standardize thread names

Tenets:
1. Limit thread names to 15 characters
2. Prefix all Solana-controlled threads with "sol"
3. Use Camel case. It's more character dense than Snake or Kebab case

* cleanup comment on filter_zero_lamport_clean_for_incremental_snapshots (#27273)

* remove inaccurate log (#27255)

* patches metrics for invalid cached vote/stake accounts (#27266)

patches invalid cached vote/stake accounts metrics

Invalid cached vote accounts is overcounting actual mismatches, and
invalid cached stake accounts is undercounting.

* Refactor epoch reward 3 (#27259)

* refactor: extract store_stake_accounts fn

* refactor: extract store_vote_account fn

* refactor: extract reward history update fn

* clippy: slice

* clippy: slice

Co-authored-by: haoran <haoran@mbook>

* fix merges

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: haoran <haoran@mbook>
Co-authored-by: Jeff Biseda <jbiseda@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Co-authored-by: Brooks Prumo <brooks@solana.com>
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
Co-authored-by: AJ Taylor <anthonjtaylor@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
Co-authored-by: Andrew Schonfeld <andrew.schonfeld1@gmail.com>
Co-authored-by: aschonfeld <andrew@proofofalpha.io>
Co-authored-by: apfitzge <apfitzge@users.noreply.github.com>
Co-authored-by: Jeff Washington (jwash) <wash678@gmail.com>
Co-authored-by: Brennan Watt <brennan.watt@solana.com>
Co-authored-by: Michael Vines <mvines@gmail.com>
Co-authored-by: Nick Frostbutter <75431177+nickfrosty@users.noreply.github.com>
Co-authored-by: Jacob Creech <82475023+jacobcreech@users.noreply.github.com>
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
Co-authored-by: Yihau Chen <a122092487@gmail.com>
Co-authored-by: Justin Starry <justin@solana.com>
Co-authored-by: kirill lykov <kirill.lykov@solana.com>
Co-authored-by: Yueh-Hsuan Chiang <93241502+yhchiang-sol@users.noreply.github.com>
Co-authored-by: leonardkulms <42893075+leonardkulms@users.noreply.github.com>
Co-authored-by: Will Hickey <will.hickey@solana.com>
Co-authored-by: Tao Zhu <82401714+taozhu-chicago@users.noreply.github.com>
Co-authored-by: Xiang Zhu <xzhu70@gmail.com>
Co-authored-by: Jeff Washington <jeff.washington@solana.com>
Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
2022-08-22 08:19:50 -05:00
HaoranYi f617374b0b
Refactor epoch reward 3 (#27259)
* refactor: extract store_stake_accounts fn

* refactor: extract store_vote_account fn

* refactor: extract reward history update fn

* clippy: slice

* clippy: slice

Co-authored-by: haoran <haoran@mbook>
2022-08-21 16:20:51 -05:00
behzad nouri 544a957ad7
patches metrics for invalid cached vote/stake accounts (#27266)
patches invalid cached vote/stake accounts metrics

Invalid cached vote accounts is overcounting actual mismatches, and
invalid cached stake accounts is undercounting.
2022-08-20 19:10:22 +00:00
Jeff Washington (jwash) 8f98333395
remove inaccurate log (#27255) 2022-08-20 10:15:10 -05:00
Jeff Washington (jwash) 58ebae5b9c
cleanup comment on filter_zero_lamport_clean_for_incremental_snapshots (#27273) 2022-08-20 10:14:49 -05:00
Michael Vines 3f4731b37f Standardize thread names
Tenets:
1. Limit thread names to 15 characters
2. Prefix all Solana-controlled threads with "sol"
3. Use Camel case. It's more character dense than Snake or Kebab case
2022-08-20 07:49:39 -07:00
HaoranYi c17f15a34f
Refactor epoch reward 2 (#27257)
* refactor: extract store_stake_accounts fn

* refactor: extract store_vote_account fn

* clippy: slice

* clippy: slice

* fix merge error

Co-authored-by: haoran <haoran@mbook>
2022-08-20 09:37:02 -05:00
Brennan Watt 3c786bab65
Parallel insertion of dirty store keys during clean (#27058)
parallelize dirty store key insertion
2022-08-20 06:52:32 -07:00
Alexander Meißner 55d18e8463
Refactor: Flattens `TransactionContext::instruction_trace` (#27109)
* Flattens TransactionContext::instruction_trace.

* Stop the search at transaction level.

* Renames get_instruction_context_at => get_instruction_context_at_nesting_level.

* Removes TransactionContext::get_instruction_trace().
Adds TransactionContext::get_instruction_trace_length() and TransactionContext::get_instruction_context_at_index().

* Have TransactionContext::instruction_accounts_lamport_sum() accept an iterator instead of a slice.

* Removes instruction_trace from ExecutionRecord.

* make InstructionContext::new() private
2022-08-20 11:20:47 +02:00
Brooks Prumo 510d195620
Simplify `Bank::clean_accounts()` by removing params (#27254) 2022-08-19 18:15:04 -04:00
HaoranYi a54ea4d62d
Refactor epoch reward 1 (#27253)
* refactor: extract store_stake_accounts fn

* clippy: slice

Co-authored-by: haoran <haoran@mbook>
2022-08-19 21:04:24 +00:00
Jeff Washington (jwash) 1b441f7a2d
make test code more clear (#27260) 2022-08-19 14:39:20 -05:00
Jeff Washington (jwash) 42e227778b
eliminate unnecessary ZERO_RAW_LAMPORTS_SENTINEL (#27218) 2022-08-19 14:18:00 -05:00
Jeff Washington (jwash) e132583a24
add _inclusive for clarity (#27239) 2022-08-19 14:17:32 -05:00
Jeff Washington (jwash) 2031e0afaf
simple refactorings to disk idx (#27238) 2022-08-19 12:40:42 -05:00
Tao Zhu 6f045d6080
add ed25519_program to built-in instruction cost list (#27199)
* add ed25519_program to built-in instruction cost list

* Remove unnecessary and stale comment
2022-08-19 12:14:37 -05:00
Brooks Prumo b3c72bc8a2
Call `AccountsDb::shrink_all_slots()` directly (#27235) 2022-08-19 12:09:47 -04:00
Brooks Prumo 2184d0ff26
Add Bank::clean_accounts_for_tests() (#27209) 2022-08-19 12:09:35 -04:00
Brennan Watt 7573000d87
Revert "Rust v1.63.0 (#27148)" (#27245)
This reverts commit a2e7bdf50a.
2022-08-19 09:19:44 +01:00
Brooks Prumo 0b54b22f58
Remove `Bank::ensure_no_storage_rewards_pool()` (#26468) 2022-08-18 16:24:36 -04:00
Brooks Prumo fa4122f9a8
Verifying snapshot bank must always specify the snapshot slot (#27234) 2022-08-18 17:24:23 +00:00
Jeff Washington (jwash) e0472050c0
create helper fn for clarity (#27216) 2022-08-18 11:30:35 -05:00
Jeff Washington (jwash) f115e4d0ed
reorder slot # in debug hash data path (#27217) 2022-08-18 11:30:11 -05:00
HaoranYi 4634fb944c
Use from_secs api to create duration (#27222)
use from_secs api to create duration
2022-08-18 11:06:52 -05:00
Jeff Washington (jwash) 77563bc1c9
remove redundant call that bumps age to future (#27215) 2022-08-18 11:01:05 -05:00
Jeff Washington (jwash) 7720b48aa6
add an assert for a debug feature to avoid wasted time (#27210) 2022-08-18 10:35:22 -05:00
apfitzge 7569f8eded
store-tool: log lamports for each account (#27168)
log lamports for each account
2022-08-18 10:00:04 -05:00
Brooks Prumo d2868f439d
Verify snapshot slot deltas (#26666) 2022-08-18 09:48:58 -04:00
Justin Starry 7d765e3d67
clean feature: `prevent_calling_precompiles_as_programs` (#27100)
* clean feature: prevent_calling_precompiles_as_programs

* fix tests

* fix test

* remove comment

* fix test

* feedback
2022-08-18 05:21:16 +00:00
Brennan Watt a2e7bdf50a
Rust v1.63.0 (#27148)
* Upgrade to Rust v1.63.0

* Add nightly_clippy_allows

* Resolve some new clippy nightly lints

* Increase QUIC packets completion timeout

Co-authored-by: Michael Vines <mvines@gmail.com>
2022-08-17 15:48:33 -07:00
Brooks Prumo 2fd9a4f373
Add clean_accounts_for_tests() (#27200) 2022-08-17 18:45:59 -04:00
Jeff Washington (jwash) 225cddcffb
serialize incremental_snapshot_hash (#26839)
* serialize incremental_snapshot_hash

* pr feedback
2022-08-17 15:14:31 -05:00
apfitzge c1111fa069
snapshots: serialize version file first (#27192)
serialize version file first
2022-08-17 12:57:52 -05:00
Brooks Prumo 3fc4ba7c9a
Rename to `MAX_BLOCK_ACCOUNTS_DATA_SIZE_DELTA` (#27175) 2022-08-16 13:57:24 -04:00
HaoranYi dbd2423e9f
Share Ancestors API get with contains_key (#27161)
consolidate similar fns
2022-08-16 12:06:52 -05:00
Jeff Washington (jwash) 8c791f871e
store hash calc failures in a separate folder by slot (#27146)
* store hash calc failures in a separate folder by slot

* Update runtime/src/accounts_db.rs

Co-authored-by: Brooks Prumo <brooks@prumo.org>

Co-authored-by: Brooks Prumo <brooks@prumo.org>
2022-08-16 09:35:56 -05:00
Brooks Prumo bc0d01110c
Remove `fn slot_deltas()` from StatusCache (#26931) 2022-08-16 06:08:29 -04:00
HaoranYi 1a90cffabe
Add stats for readonly cache evicts (#26938)
* add stats for readonly cache evicts

* bump up account cache to 400M

* aggregate num_evicts in the loop
2022-08-15 16:23:37 -05:00
Jeff Washington (jwash) 3ad93c84b6
wait for bg hash calc to complete before 'calculate_capitalization' (#27145) 2022-08-15 11:47:54 -05:00
Jeff Washington (jwash) 0ca8239ef7
don't log when there is no work to do for combining ancient slots (#26925) 2022-08-13 14:38:41 -06:00
Justin Starry bdce208fe5
clean feature: `request_units_deprecated` (#27102)
clean feature: request_units_deprecated
2022-08-13 13:12:35 +01:00
Justin Starry 6c796727df
clean-feature: `default_units_per_instruction` (#27101)
clean-feature: default_units_per_instruction
2022-08-13 09:04:40 +01:00
Brooks Prumo 35c87c3888
Fix test_accounts_data_size_and_resize_transactions (#27105) 2022-08-12 17:06:54 +00:00
Justin Starry 5618e9fd07
Allow overriding the runtime transaction account lock limit (#26948)
* Add --transaction-account-lock-limit cli arg to test-validator

* Allow overriding the tx account lock limit in ProgramTest
2022-08-12 15:07:48 +01:00
dependabot[bot] a00c045d7c
chore: bump once_cell from 1.12.0 to 1.13.0 (#27049)
* chore: bump once_cell from 1.12.0 to 1.13.0

Bumps [once_cell](https://github.com/matklad/once_cell) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/matklad/once_cell/releases)
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.12.0...v1.13.0)

---
updated-dependencies:
- dependency-name: once_cell
  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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <you@example.com>
2022-08-10 12:19:10 -06:00
dependabot[bot] ae5b680c6f
chore: bump serde from 1.0.138 to 1.0.143 (#27015)
* chore: bump serde from 1.0.138 to 1.0.143

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.138 to 1.0.143.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.138...v1.0.143)

---
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-08-10 05:08:43 +00:00
Michael Vines ccfbc54195 Move vote program state and instructions to solana-program 2022-08-09 20:52:47 -07:00
apfitzge 6e57a8f8a1
A more convenient store-tool (#26796)
* Use new_from_file_unchecked - don't sanitize input length for appendvec file

* Exit-early on completely zeroed accounts
2022-08-08 06:55:00 -07:00
Will Hickey ed8c224374
Bump version to v1.12 (#26967) 2022-08-06 13:20:30 -05:00
Christian Kamm cf58640937
Keypair: implement clone() (#26248)
* Keypair: implement clone()

This was not implemented upstream in ed25519-dalek to force everyone to
think twice before creating another copy of a potentially sensitive
private key in memory.

See https://github.com/dalek-cryptography/ed25519-dalek/issues/76

However, there are now 9 instances of
  Keypair::from_bytes(&keypair.to_bytes())
in the solana codebase and it would be preferable to have a function.

In particular since this also comes up when writing programs and can
cause users to either start messing with lifetimes or discover the
from_bytes() workaround themselves.

This patch opts to not implement the Clone trait. This avoids automatic
use in order to preserve some of the original "let developers think
twice about this" intention.

* Use Keypair::clone
2022-08-06 11:54:38 -06:00
Justin Starry 69598ed4c0
Refactor: Add `RuntimeConfig` field to Bank (#26946)
* Refactor: Simplify arguments for bank constructor methods

* Refactor: Add RuntimeConfig to Bank fields

* Arc wrap runtime_config

* Arc wrap all runtime config usages

* Remove Copy trait derivation from RuntimeConfig

* Remove some arc wrapping
2022-08-05 20:49:00 +01:00
Brooks Prumo 06a610130e
Remove bank test_max_accounts_data_size_exceeded() (#26772)
bank: remove test_max_accounts_data_size_exceeded()
2022-08-05 09:55:29 -04:00
Jeff Washington (jwash) 73fe400407
protect access to rent paying account vec (#26919) 2022-08-05 08:19:46 -05:00
Tyera Eulberg 2dca239480
Remove runtime dependency from solana-transaction-status (#26930)
* Move RewardType out of runtime

* Move collect_token_balances to solana-ledger

* Remove solana-runtime dependency
2022-08-05 00:20:27 -06:00
steviez 300666dce7
Make `solana-ledger-tool` run AccountsBackgroundService (#26914)
Prior to this change, long running commands like `solana-ledger-tool
verify` would OOM due to AccountsDb cleanup not happening.

Co-authored-by: Michael Vines <mvines@gmail.com>
2022-08-04 15:44:31 -05:00
Jeff Washington (jwash) 4b8f881af3
in mem acct idx scan multiple ages simultaneously (#26853) 2022-08-03 13:44:01 -05:00
github-actions[bot] fbf1bf6d86
Bump Version to 1.11.6 (#26906)
Co-authored-by: willhickey <willhickey@users.noreply.github.com>
2022-08-03 12:48:43 -05:00
Jeff Washington (jwash) 0732a6c45f
add 'oldest_root' stat in hash calc (#26896) 2022-08-03 10:02:08 -05:00
Jeff Washington (jwash) 6706be0f56
log oldest dirty slot on clean (#26897) 2022-08-03 10:01:29 -05:00
Brennan Watt f24de9d254
Make tx error accounting more granular (#26718) 2022-08-02 16:43:03 -07:00
Jeff Washington (jwash) 224550d65f
allow caching on ancient append vecs for accounts hash calc (#26885) 2022-08-02 14:40:29 -05:00
Jeff Washington (jwash) acc1112e9c
calculate cache hash path for store_detailed_debug_info_on_failure (#26874) 2022-08-02 11:19:00 -05:00
Jeff Washington (jwash) e5c5055869
Revert "allow caching on ancient append vecs for accounts hash calc" (#26882)
Revert "allow caching on ancient append vecs for accounts hash calc (#26770)"

This reverts commit 30b408ed0c.
2022-08-02 10:23:11 -05:00
Jon Cinque f210182851
accounts: Don't collect rent on newly created accounts (#26851) 2022-08-02 16:34:34 +02:00
Jeff Washington (jwash) 050c66f197
enable accounts hash caching if store_detailed_debug_info_on_failure (#26864) 2022-08-01 14:27:20 -05:00
Jeff Washington (jwash) d159682a6d
add comment (#26875) 2022-08-01 14:25:19 -05:00
Jeff Washington (jwash) ebabc53cee
use Vec::drain instead of option/take (#26852) 2022-07-31 21:04:15 -05:00
Jeff Washington (jwash) c7462b7a52
ledger tool verify can store debug info on hash calc (#26837) 2022-07-29 15:54:56 -05:00
HaoranYi 38cd29810f
Fix ordering for AccountEntry ref_count (#26842)
fix ordering for ref_count
2022-07-29 15:47:03 -05:00
Jeff Washington (jwash) 69b5dd9b07
cleanup ignore_eof_error (#26838) 2022-07-29 12:10:22 -05:00
apfitzge c1f7d1a367
Add AppendVec::new_from_file_unchecked (#26795)
new_from_file_unchecked
2022-07-28 14:57:26 -05:00
Brennan Watt 467cb5def5
Concurrent slot replay (#26465)
* Concurrent replay slots

* Split out concurrent and single bank replay paths

* Sub function processing of replay results for readability

* Add feature switch for concurrent replay
2022-07-28 11:33:19 -07:00
Jeff Washington (jwash) 817f65bb50
add full_snapshot to hash config (#26811) 2022-07-28 09:46:34 -05:00
Ashwin Sekar 8d69e8d447
Compact vote state updates to reduce block size (#26616)
* Compact vote state updates to reduce block size

* Add rpc transaction tests
2022-07-27 13:23:44 -06:00
Jeff Washington (jwash) 1a5b830294
CalcAccountsHashConfig default for tests (#26810) 2022-07-27 13:21:38 -05:00
Jeff Washington (jwash) 1421833c5e
log when shrink still contains extra stores (#26794) 2022-07-27 09:14:16 -05:00
Jeff Washington (jwash) 30b408ed0c
allow caching on ancient append vecs for accounts hash calc (#26770) 2022-07-27 09:13:32 -05:00
dependabot[bot] cd4340ed06
chore: bump bytemuck from 1.10.0 to 1.11.0 (#26792)
* chore: bump bytemuck from 1.10.0 to 1.11.0

Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.10.0 to 1.11.0.
- [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.10.0...v1.11.0)

---
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-07-26 20:50:30 -06:00
apfitzge 293d651ca8
store-tool use accounts_iter (#26793) 2022-07-26 17:29:53 -05:00
Tao Zhu 5e622f82ac
Add feature gate to use default units per instruction for fee calculation (#26786)
* Add feature gate to use default units per instruction for fee calculation

* fix bpf tests
2022-07-26 19:39:24 +00:00
apfitzge 5de1a7accf
Add streaming_unpack_snapshot to send entry files during unpack (#26781)
* Add streaming_unpack_snapshot to send entry files during unpack

* Update unpack tests to call internal function
2022-07-26 14:09:28 -05:00
apfitzge a7e4df5d6e
Separate remapping append_vecs into functions (#26696)
Separate remapping append_vecs into remap_and_reconstruct_storages and helpers
2022-07-25 14:55:30 -05:00
Jeff Washington (jwash) 6f5995c841
add stats for disk_index_find_entry_mut_us (#26753) 2022-07-25 14:47:17 -05:00
github-actions[bot] 5d038b9d2a
Bump Version to 1.11.5 (#26758)
Co-authored-by: willhickey <willhickey@users.noreply.github.com>
2022-07-25 13:05:14 -06:00
Brooks Prumo 01e367f19b
Add Bank::update_accounts_data_size_delta_off_chain_for_tests() (#26771) 2022-07-25 18:58:04 +00:00
Jeff Washington (jwash) d9c7bc7e78
Revert "cleanup feature: default units per instruction (#26684)" (#26750)
This reverts commit 39a34db52a.
2022-07-23 11:03:46 -05:00
apfitzge f2b81fe665
Separate field_from_stream to get bank/account fields from individual snapshot stream (#26679) 2022-07-21 12:27:31 -05:00
Alexander Meißner 075a5ac44e
Removes `AccountSharedData` from `SysvarCache`. (#26712)
* Removes AccountSharedData from SysvarCache.

* Fixes incorrect transaction account index in stake_instruction::test_set_lockup().
2022-07-21 18:32:28 +02:00
Alexander Meißner cbb74a190f
Cleanup: `record_instruction_in_transaction_context_push` (#26658)
Cleanup feature gate of record_instruction_in_transaction_context_push.
2022-07-21 12:49:34 +02:00
HaoranYi 6ec89ee861
log error for cache_hash_data save failure (#26676)
log error for cach_hash_data save
2022-07-20 16:19:35 -05:00
Jack May 39a34db52a
cleanup feature: default units per instruction (#26684) 2022-07-20 19:13:34 +00:00
apfitzge b20edd232b
Remove useless enumerate from test_hold_range_in_memory2 (#26683) 2022-07-20 10:06:08 -05:00
Jeff Washington (jwash) 9f2f2a45cd
AcctIdx: ref_count_from_storage remove Arc::clone (#26678) 2022-07-20 10:05:13 -05:00
Justin Starry f8e9af5f1e
Cap the number of accounts passed to a bpf program ix (#26630)
* Cap the number of accounts passed to a bpf program ix

* update bank abi hash

* fix ci failures
2022-07-20 14:12:43 +02:00
apfitzge 07f41628db
untar_snapshot_create_shared_buffer doesn't need to return a result (#26686) 2022-07-19 23:15:41 +00:00
Jeff Washington (jwash) 2d689ac53a
get rid of rwlock per bin in accounts index (#26675) 2022-07-19 17:48:40 -05:00
apfitzge e7cd6daebe
Add helper fn to create shared buffer - simplify archive format matching (#26674) 2022-07-19 20:30:30 +00:00
apfitzge 84c8cfe901
Refactor/hardened unpack more generic unpack archive (#26677)
* Add entry_processor fn to unpack_archive - not used yet

* Add generic unpack_snapshot_with_processors to separate account paths handling from entry checking
2022-07-19 14:48:57 -05:00
Jeff Washington (jwash) 7efe72a74f
eliminate write lock usage in acct idx (#26673) 2022-07-19 13:24:03 -05:00
apfitzge 77843306c7
rename parallel_archivers -> parallel_divisions for consistency (#26672)
parallel_archivers -> parallel_divisions for consistency
2022-07-19 13:15:33 -05:00
Jeff Washington (jwash) 263911e7fd
save off what we find when calculating hash (#26663) 2022-07-19 09:55:52 -05:00
Jeff Washington (jwash) 738c4a79b7
metric for 'ancient_account_cleans' (#26664) 2022-07-19 09:16:23 -05:00
Jeff Washington (jwash) 6efe7e095b
temporarily make ancient append vecs 10x smaller to find intermittent bugs (#26574) 2022-07-19 08:51:36 -05:00
Jeff Washington (jwash) c4d2c95540
move hash stat to correct level for ahv to work (#26649) 2022-07-18 12:44:33 -05:00
Jeff Washington (jwash) 1c08f83c7e
eliminate flatten().collect() of reclaims in clean (#26647) 2022-07-18 12:37:17 -05:00
Justin Starry fd6038884b Clean up forgotten error log 2022-07-17 12:21:52 +02:00
Jeff Washington (jwash) be8813e588
shrink stops using HandleReclaims (#26594) 2022-07-15 17:54:48 -05:00
Jeff Washington (jwash) 83c614da3c
change type to be more clear (#26646) 2022-07-15 17:17:17 -05:00
Jeff Washington (jwash) 47716a5e01
async hash verify on load (#26208)
* verify accounts hash in bg on startup

* fix some tests and loading from genesis

* add extra state for when background thread has completed
2022-07-15 14:29:56 -05:00
behzad nouri bf225bae73
restricts rent-paying accounts lifetime extension (#26606)
https://github.com/solana-labs/solana/pull/22292
prevents rent paying accounts creation going forward. However a rent
paying account can linger on for ever if it is continually topped up but
stays below the rent-exempt minimum.
This can prevent eliminating accounts-rewrites and the problematic
rent_epoch field in accounts.

Link to discord discussion:
https://discord.com/channels/428295358100013066/943609352068145162/995202300001927219

This commit restricts rent-paying accounts lifetime extension by
preventing increasing lamports on the account if the account stays below
the rent-exempt minimum.
2022-07-15 13:23:37 +00:00
Alexander Meißner 038da82b6f
Feature: Early verification of account modifications in `BorrowedAccount` (#25899)
* Adjusts test cases for stricter requirements.

* Removes account reset in deserialization test.

* Removes verify related test cases.

* Replicates account modification verification logic of PreAccount in BorrowedAccount.

* Adds TransactionContext::account_touched_flags.

* Adds account modification verification to the BPF ABIv0 and ABIv1 deserialization, CPI syscall and program-test.

* Replicates the total sum of all lamports verification of PreAccounts in InstructionContext

* Check that the callers instruction balance is maintained during a call / push.

* Replicates PreAccount statistics in TransactionContext.

* Disable verify() and verify_and_update() if the feature enable_early_verification_of_account_modifications is enabled.

* Moves Option<Rent> of enable_early_verification_of_account_modifications into TransactionContext::new().

* Relaxes AccountDataMeter related test cases.

* Don't touch the account if nothing changes.

* Adds two tests to trigger InstructionError::UnbalancedInstruction.

Co-authored-by: Justin Starry <justin@solana.com>
2022-07-15 09:31:34 +02:00
Tao Zhu f13b5c832d
Remove obsoleted metrics reporting to reduce lock contention on cost_model (#26608)
remove obsoleted metrics reporting to reduce lock contention on cost_model
2022-07-14 23:02:49 -05:00
HaoranYi 819d6512ab
add PartialEq, Eq and spell correction (#26614) 2022-07-14 14:55:03 +00:00
Jeff Washington (jwash) 3e9bd6170c
use OnceCell instead of RwLock for rent_paying_accounts_by_partition (#26601) 2022-07-14 08:52:41 -05:00
Jeff Washington (jwash) 4dea32e8e5
fix active_scans metric to not swap (#26602) 2022-07-13 20:11:23 -05:00
Jeff Washington (jwash) 2b7cc107d8
typo (#26618) 2022-07-13 17:55:02 -05:00
HaoranYi 1aa9215411
Refactor: add account_iter api for appendvec (#26591)
* add account iterator for appendvec

* semicolon
2022-07-12 23:56:05 +00:00
Jeff Washington (jwash) 6b0eb5a42b
handle rent paying accounts differently (#26487)
* handle rent paying accounts differently

* restore collection

* downgrade assert to metric and warn until we get more runtime
2022-07-12 17:51:33 -05:00
Brooks Prumo 1dfbb225e3
Fix test_accounts_data_size_and_rent_collection (#26576) 2022-07-12 17:05:21 -05:00
Jeff Washington (jwash) c62c55a16b
shrink stores by id (#26490) 2022-07-12 15:43:41 -05:00
Jeff Washington (jwash) 9d31216d23
add StoreReclaims::Ignore (#26489) 2022-07-12 15:05:47 -05:00
HaoranYi bf14440895
clean up and optimize account hash verify (#26560)
* remove unused code

* extract test related fault hash inject fn

* use rotate to optimize hashes removal

* use rotate to optimize snapshot hashes removal

* address code reveiw feedbacks

* revise comments

* inline
2022-07-12 19:27:28 +00:00
Jeff Washington (jwash) f54f528148
make bank test creation standard (#26519) 2022-07-12 09:07:55 -05:00
github-actions[bot] fd5df1cf25
Bump Version to 1.11.4 (#26578)
Co-authored-by: willhickey <willhickey@users.noreply.github.com>
2022-07-11 23:30:38 -05:00
Jeff Washington (jwash) 1db136a8be
do not count 0 lamport accounts as rent-paying (#26514) 2022-07-11 22:16:46 -05:00
Jeff Washington (jwash) 36bd46bece
ancient append vec: reuse AccountsToStore (#26572) 2022-07-11 22:13:09 -05:00
Nicholas Clarke ee0a40937e
Add validator argument log_messages_bytes_limit to change log truncation limit.
Add new cli argument log_messages_bytes_limit to solana-validator to control how long program logs can be before truncation
2022-07-11 10:53:18 -05:00
behzad nouri ba785cf8ab
removes erroneous uses of std::mem::swap (#26536)
All instances should be replace by std::mem::{replace,take},
or just plain assignment.
2022-07-11 11:33:15 +00:00
Jeff Washington (jwash) 602da5e51f
add accounts db config to bank tests (#26517) 2022-07-10 19:42:06 -05:00
Jeff Washington (jwash) 2b6c9852f1
add more slop to test_age_time (#26537) 2022-07-10 17:52:07 -05:00
Jeff Washington (jwash) 1babf460ab
collapse some bank test creation fns (#26532) 2022-07-10 17:51:38 -05:00
behzad nouri 105c7e19e1
moves check for feature activation out of accounts loop (#26535) 2022-07-10 17:39:19 +00:00
Jeff Washington (jwash) 8576832f2a
rename Bank::new_with_config_for_tests (#26533) 2022-07-10 09:33:13 -05:00
Brooks Prumo 785a7a5936
Track more accounts data size changes (#26467) 2022-07-08 19:17:15 -05:00
behzad nouri c99d9f00a9
preserves rent_epoch for rent exempt accounts (#26479)
https://github.com/solana-labs/solana/pull/22292
prevents rent paying account creation going forward. As a result
rent_epoch field for rent exempt accounts is redundant, and advancing
this field will incur expensive account rewrites and cause discrepancy
between accounts-db and cached vote/stake accounts.

This commit adds a feature which upon activation preserves rent_epoch
field for rent exempt accounts so that the field is frozen and is no
longer advanced.
2022-07-08 20:04:08 +00:00
HaoranYi 995756a550
Use RefCount type alias instead of u64 (#26472)
use RefCount type alias instead of u64
2022-07-08 13:51:16 -05:00
Brooks Prumo 78b8a8a6db
Remove `get_total_resize_remaining()` and `total_resize_limit` from `TransactionContext` (#26504) 2022-07-08 20:26:54 +02:00
dependabot[bot] d1370f2c7d
chore: bump bytemuck from 1.9.1 to 1.10.0 (#26495)
* chore: bump bytemuck from 1.9.1 to 1.10.0

Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.9.1 to 1.10.0.
- [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.9.1...v1.10.0)

---
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-07-08 10:04:43 -06:00
Jeff Washington (jwash) d9eee72edb
remove FoundStoredAccount.account_size (#26460) 2022-07-07 18:37:14 -05:00
Brooks Prumo 3b759bcffb
Add fn to get max accounts data size from Bank (#26478) 2022-07-07 18:08:42 -05:00
Jeff Washington (jwash) 38d53ef8a2
add metrics for # scans active and scan distance (#26395) 2022-07-07 16:20:32 -05:00
Jeff Washington (jwash) ee0a54ce80
improve clean acct idx calls (#26320) 2022-07-07 15:50:12 -05:00
Jeff Washington (jwash) b582e4ce0f
introduce UpsertReclaim (#26462) 2022-07-07 15:40:17 -05:00
github-actions[bot] 9d937fb8a0
Bump Version to 1.11.3 (#26481)
Co-authored-by: willhickey <willhickey@users.noreply.github.com>
2022-07-07 14:39:46 -05:00
Jeff Washington (jwash) c9f1d01e79
refactor, add GetUniqueAccountsResult (#26457) 2022-07-07 13:49:33 -05:00
Jeff Washington (jwash) 8e64b5883e
restore population of 'accounts' metric in rent collection (#26454) 2022-07-07 13:19:23 -05:00
Jeff Washington (jwash) 72256ac54d
use iter for append vecs (#26459) 2022-07-07 13:13:47 -05:00
Justin Starry 8416090732
Clean up `enable_durable_nonce` feature (#26470)
Clean up enable_durable_nonce feature
2022-07-07 17:14:46 +01:00
Justin Starry eb6a722eba
Clean up `nonce_must_be_writable` feature (#26444)
Clean up nonce_must_be_writable feature
2022-07-07 15:45:19 +01:00
Jeff Washington (jwash) b3a47de1ce
improve startup stats for rent payers (#26432) 2022-07-07 08:39:57 -05:00
Brooks Prumo f8bdedb596
Make accounts data size tests more robust (#26466) 2022-07-07 00:01:13 -05:00
Xiang Zhu 134303714b
Fix the order assumption of the pubkeys created by Pubkey::new_unique() (#26451)
new_unique() does not gurantee the increment order due to the bytes
array storage and its eq-partial trait interpreting the bytes in the
big-endian way.
2022-07-06 15:35:32 -07:00
carllin 90ef2cd02a
Parse snapshot for bank fields (#26016) 2022-07-06 17:30:30 -05:00
Jeff Washington (jwash) 16219e300e
generating index sets uncleaned_roots correctly (#26431)
* generating index sets uncleaned_roots correctly

* fix test failures

* rename

* update comments
2022-07-06 16:12:47 -05:00
behzad nouri d7201a8d1a
names fields in RentResullt::CollectRent enum variant (#26449)
Avoiding ambiguous raw tuple:
    CollectRent((Epoch, u64))

Using named fields instead:
    CollectRent {
        new_rent_epoch: Epoch,
        rent_due: u64,
    },
2022-07-06 20:01:16 +00:00
Justin Starry f4718be22f
Clean up `leave_nonce_on_success` feature (#26447)
Clean up leave_nonce_on_success feature
2022-07-06 17:59:34 +00:00
Justin Starry ff1e6fcbed
Clean up `nonce_must_be_advanceable` feature (#26446)
Clean up nonce_must_be_advanceable feature
2022-07-06 17:36:33 +00:00
Alexander Meißner 06ebfa1eb2
Replicates `AccountsDataMeter` in `TransactionContext` (#26438)
Replicates AccountsDataMeter in TransactionContext.
2022-07-06 19:27:42 +02:00
Justin Starry 611ac33718
Clean up `nonce_must_be_authorized` feature (#26445)
Clean up nonce_must_be_authorized feature
2022-07-06 17:17:31 +00:00
Xiang Zhu 44f499cff3
Refactor account index scan function parameters (#26428)
* Refactor account index scan function parameters

F: FnMut(bool, &SlotList<T>, &'a Pubkey, RefCount) -> AccountsIndexScanResult,
Refactor to take  (&'a Pubkey, Option<(&SlotList<T>, RefCount))

* Update comments based on review feedback

* cargo fmt --all fixes
2022-07-06 09:49:11 -07:00
Jeff Washington (jwash) 17a99d98dd
Revert "avoid adding to 'uncleaned_roots' when generating index and c… (#26441)
Revert "avoid adding to 'uncleaned_roots' when generating index and caller passes accounts-db-skip-shrink (#25936)"

This reverts commit e24cc537a4.
2022-07-06 11:32:45 -05:00
Jeff Washington (jwash) ab164fc975
simplify code (#26443) 2022-07-06 11:22:26 -05:00
Justin Starry f8dccd4602
Clean up `max_tx_account_locks` feature (#26440)
Clean up max_tx_account_locks feature
2022-07-06 15:06:03 +00:00
Jeff Washington (jwash) 5afe4d938d
combine lookup in calc_delete_dependencies (#26429) 2022-07-06 08:50:14 -05:00
Jeff Washington (jwash) 71c7b4f9cb
use append vec iter in construct_candidate_clean_keys (#26426) 2022-07-06 08:49:35 -05:00
behzad nouri 6f5857a5db
removes feature gate code separating durable nonce from blockhash domain (#26055) 2022-07-06 12:03:13 +00:00
dependabot[bot] 37f4621c06
chore: bump serde from 1.0.137 to 1.0.138 (#26421)
* chore: bump serde from 1.0.137 to 1.0.138

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

---
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-07-05 23:18:08 -06:00
Tao Zhu c1d89ad749
forward packets by prioritization in desc order (#25406)
- Forward packets by prioritization in desc order
- Add support of cost-tracking by transaction requested compute units
- Hook up account buckets to forwarder
- Add metrics for forwardable batches count
- Remove redundant invalid packets filtering at end of slot since forwarder will do the same when batch forwardable packets
- Add bench test for forwarding
2022-07-05 23:24:58 -05:00
Jeff Washington (jwash) 38216aa781
update comment for the next weary traveller (#26413) 2022-07-05 23:12:35 -05:00
Jeff Washington (jwash) 75149fd624
move mark_old_slots_as_dirty to be called from ahv (#26411) 2022-07-05 23:11:32 -05:00
Jeff Washington (jwash) 2aafef38f9
is_shrinking_productive calls avoid arc clone (#26422) 2022-07-05 17:53:29 -05:00
Jeff Washington (jwash) b7e34aea15
refactor calculate_rent_result (#26416)
reactor calculate_rent_result
2022-07-05 16:45:59 -05:00
Brooks Prumo 53b9420562
Remove `INTO!` macros in serde_snapshot (#26409) 2022-07-05 16:37:20 -05:00
carllin ce39c14025
Add end-to-end replay slot metrics (#25752) 2022-07-05 13:58:51 -05:00
Jeff Washington (jwash) 0ab521d5f1
inc counter when append vec drop fails (#26396) 2022-07-05 11:27:01 -05:00
Jeff Washington (jwash) 5f3b7bdd16
prevent ledger tool from calculating hash on non-rooted slots (#26355) 2022-07-02 11:50:01 -05:00