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