* add metrics for startup
* roll timings up higher
* fix test
* fix duplicate
(cherry picked from commit 471b34132e)
# Conflicts:
# ledger/src/bank_forks_utils.rs
# runtime/src/snapshot_utils.rs
conflicts because #17778 is not present.
Co-authored-by: Jeff Washington (jwash) <75863576+jeffwashington@users.noreply.github.com>
Refactor a few functions that are on the load-from-snapshot path, to facilitate
adding in incremental snapshots more easily.
Additionally, add some tests and doc comments.
(cherry picked from commit 1953543274)
Co-authored-by: Brooks Prumo <brooks@solana.com>
* Refactor stake program into solana_program (#17906)
* Move stake state / instructions into solana_program
* Update account-decoder
* Update cli and runtime
* Update all other parts
* Commit Cargo.lock changes in programs/bpf
* Update cli stake instruction import
* Allow integer arithmetic
* Update ABI digest
* Bump rust mem instruction count
* Remove useless structs
* Move stake::id() -> stake::program::id()
* Re-export from solana_sdk and mark deprecated
* Address feedback
* Run cargo fmt
* Run cargo fmt post cherry-pick
* calculate_capitalization uses hash calculation
* feedback
* remove debugging code, clean up slot math
Co-authored-by: Jeff Washington (jwash) <75863576+jeffwashington@users.noreply.github.com>
Reports of excessive GPU memory usage and errors
from cudaHostRegister. There are some cases where pinning is
not required.
(cherry picked from commit eeee75c5be)
Co-authored-by: sakridge <sakridge@gmail.com>
* fix minor typos and punctuation
* fix minor typos and punctuation
* rewording for clarity and typo corrections
* rewording for clarity and typo corrections
* rewording for clarity and typo corrections
Co-authored-by: Gregg Dourgarian <greggd@aidacreative.com>
(cherry picked from commit 54155f875a)
Co-authored-by: Haik Dulgarian <greggd@tempworks.com>
* update dependence version for gag to leatest support windows
* fix compile on windows
* add Cargo.lock
(cherry picked from commit e0ab5ee4f8)
Co-authored-by: Govlzkoy <gotope@users.noreply.github.com>
* rework hash calculation to not keep slot and write version
* refactor functions and add tests
* always use multiple slot code path
(cherry picked from commit b5bb91b50f)
Co-authored-by: Jeff Washington (jwash) <75863576+jeffwashington@users.noreply.github.com>
* Accounts dumping logic
* Add test for interaction between cache flush and remove_unrooted_slot()
* Update comments
* Rename
* renaming
* Add more comments
* Renaming
* Fixup test and bad check
(cherry picked from commit bbcdf073ba)
Co-authored-by: carllin <carl@solana.com>
* system-program: Move lamports == 0 check on transfers
* Address feedback
* Update stake split to explicitly allocate + assign
* Update stake tests referring to split instruction
* Revert whitespace
* Update split instruction index in test
* Remove unnecessary `assign_with_seed` from `split_with_seed`
* Fix stake instruction parser
* Update test to allow splitting into account with lamports
(cherry picked from commit 8f5e773caf)
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
* document ProgramTest::new
* simplify ProgramTest::new doc-string
* make ProgramTest::add_program noisier
`add_program` (and `new`, implicitly) now prints a warning when the user
supplies a bogus program name to a ProgramTest and invokes `test-bpf`.
Additionally, it is now impossible to ask for a regular `test` and for
the generated ProgramTest to load BPF code instead of native code.
Previously, this was caused by a precedence issue: BPF code would always
be preferred over native if the program name was valid, regardless of
user choice.
(cherry picked from commit 2aaf55795f)
Co-authored-by: xuoe <alex@psi.io>
If the crds entry belongs to the caller itself, then the caller will
always have the more recent version of it, regardless of it being
filtered out by the bloom filter or not.
The exception is node-instance types which are meant to detect duplicate
running instances, and those are exempted.
(cherry picked from commit 7cf6e66ddd)
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
epoch-slots may be overwritten before they are written to crds table:
https://github.com/solana-labs/solana/issues/17711
This commit writes new epoch-slots to crds table synchronously with
push_epoch_slots. The functions is still not thread-safe as commented in
the code, however currently only one threads is invoking this code.
(cherry picked from commit 60b0a13444)
Co-authored-by: behzad nouri <behzadnouri@gmail.com>