Justin Starry
44d1e62007
Refactor: No need to return stake in Bank::get_vote_account ( #26220 )
2022-06-25 16:27:43 +00:00
Michael Vines
f3639b76ce
Remove some clippy lints
2022-06-22 09:23:22 -07:00
Michael Vines
ace24a7c82
A default tower is no longer considered to contain a stray last vote
2022-06-10 14:17:26 -07:00
Michael Vines
b05c7d91ed
Fix derive_partial_eq_without_eq clippy lint
2022-05-22 22:22:21 -07: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
Justin Starry
4e58b3870c
Update all BankForks methods to return owned values ( #24801 )
2022-04-28 18:51:00 +00:00
HaoranYi
2d4defa477
fix typo ( #24576 )
2022-04-22 08:43:57 -05:00
steviez
c31db81ac4
Use VoteAccountsHashMap type alias in all applicable spots ( #23904 )
2022-03-24 12:09:48 -05:00
buffalu
70ebab2c82
Add rustfmt.toml and `cargo fmt` ( #23238 )
...
* fmt
* formatted
Co-authored-by: Lucas B <buffalu@jito.network>
2022-02-19 13:32:29 +08:00
Ashwin Sekar
5acf0f6331
Add feature gate for new vote instruction and plumb through replay ( #21683 )
...
* Add feature gate for new vote instruction and plumb through replay
Add tower versions
* Add check for slot hashes history
* Update is_recent check to exclude voting on hard fork root slot
* Move tower rollback test to flaky and ignore it until #22551 lands
2022-02-07 14:06:19 -08:00
Michael Vines
8dc6f9f589
Remove unused mut
2022-01-18 12:10:31 -08:00
carllin
4ab7d6c23e
Filter out outdated slots ( #22450 )
...
* Filter out outdated slots
* Fixup error
2022-01-13 19:51:00 -05:00
Ashwin Sekar
eeec1ce2ad
Add local cluster test to repro slot hash expiry bug ( #21873 )
2022-01-10 00:58:21 -05:00
behzad nouri
4d62f03297
uses enum instead of trait for VoteTransaction ( #22019 )
...
Box<dyn Trait> involves runtime dispatch, has significant overhead and
is slow. It also requires hacky boilerplate code for implementing Clone
or other basic traits:
https://github.com/solana-labs/solana/blob/e92a81b74/programs/vote/src/vote_state/mod.rs#L70-L102
Only limited known types can be VoteTransaction and they are all defined
in the same crate. So using a trait here only adds overhead.
https://github.com/solana-labs/solana/blob/e92a81b74/programs/vote/src/vote_state/mod.rs#L125-L165
https://github.com/solana-labs/solana/blob/e92a81b74/programs/vote/src/vote_state/mod.rs#L221-L264
2021-12-22 14:25:46 +00:00
Ashwin Sekar
f0acf7681e
Add vote instructions that directly update on chain vote state ( #21531 )
...
* Add vote state instructions
UpdateVoteState and UpdateVoteStateSwitch
* cargo tree
* extract vote state version conversion to common fn
2021-12-07 16:47:26 -08:00
Michael Vines
7027d56064
Resolve nightly-2021-10-05 clippy complaints
2021-10-06 10:37:58 -07:00
behzad nouri
8ad52fa095
implements copy-on-write for vote-accounts ( #19362 )
...
Bank::vote_accounts redundantly clones vote-accounts HashMap even though
an immutable reference will suffice:
https://github.com/solana-labs/solana/blob/95c998a19/runtime/src/bank.rs#L5174-L5186
This commit implements copy-on-write semantics for vote-accounts by
wrapping the underlying HashMap in Arc<...>.
2021-08-30 15:54:01 +00:00
Michael Vines
e9722474eb
Move tower storage into its own module
2021-08-11 00:20:46 -07:00
Michael Vines
d7ab510229
Move tower save into the VotingService
2021-08-11 00:20:46 -07:00
behzad nouri
00e5e12906
renames solana_runtime::vote_account::VoteAccount
...
Rename:
VoteAccount -> VoteAccountInner # the private type
ArcVoteAccount -> VoteAccount # the public type
2021-08-10 22:54:17 +00:00
Michael Vines
397801a2d8
Extract tower storage details from Tower struct
2021-08-06 10:04:37 -07:00
carllin
03353d500f
Actively manage dead slots in AncestorHashesService ( #18912 )
2021-08-02 14:33:28 -07:00
Michael Vines
61865c0ee0
`solana-validator set-identity` now loads the tower file for the new identity
2021-07-21 22:22:08 -07:00
Michael Vines
b30b32300d
`solana-validator set-identity` now works for voting validators
2021-07-14 09:42:35 -07:00
Michael Vines
62d864559f
Tower cleanup: reduce fn visibility, remove unnecessary new_with_key()
2021-07-14 09:42:35 -07:00
carllin
4d3e301ee4
Introduce slot dumping to ReplayStage ( #18160 )
2021-07-08 19:07:32 -07:00
Michael Vines
d5c2c72360
Rename Tower::lockouts to Tower::vote_state
2021-07-02 18:35:49 -07:00
carllin
0eca92de18
Make set roots an iterator ( #18357 )
2021-07-01 20:02:40 -07:00
Michael Vines
b6792a3328
Add ability to change the validator identity at runtime
2021-07-01 17:50:04 -07:00
carllin
68c87469c3
Cleanup ReplayStage tests ( #18241 )
2021-06-28 20:19:42 -07:00
Alexander Meißner
789f33e8db
chore: cargo fmt
2021-06-18 10:42:46 -07:00
Alexander Meißner
6514096a67
chore: cargo +nightly clippy --fix -Z unstable-options
2021-06-18 10:42:46 -07:00
Tyera Eulberg
d0511de9a6
chore: bump trees from 0.2.1 to 0.4.2 ( #18052 )
...
* chore: bump trees from 0.2.1 to 0.4.2 (#18041 )
Bumps [trees](https://github.com/oooutlk/trees ) from 0.2.1 to 0.4.2.
- [Release notes](https://github.com/oooutlk/trees/releases )
- [Commits](https://github.com/oooutlk/trees/commits )
---
updated-dependencies:
- dependency-name: trees
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Accommodate field & type changes
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-17 22:45:09 +00:00
carllin
c8535be0e1
Port unconfirmed duplicate tracking logic from ProgressMap to ForkChoice ( #17779 )
2021-06-11 03:09:57 -07:00
carllin
afafa624a3
Account for duplicate before a bank is frozen or replayed ( #17866 )
2021-06-10 22:28:23 -07:00
carllin
8664b2cc39
Fix bad assertion ( #17401 )
2021-05-22 20:18:13 -07:00
Tao Zhu
0781fe1b4f
Upgrade Rust to 1.52.0 ( #17096 )
...
* Upgrade Rust to 1.52.0
update nightly_version to newly pushed docker image
fix clippy lint errors
1.52 comes with grcov 0.8.0, include this version to script
* upgrade to Rust 1.52.1
* disabling Serum from downstream projects until it is upgraded to Rust 1.52.1
2021-05-19 09:31:47 -05:00
carllin
bc7e741514
Integrate gossip votes into switching threshold ( #16973 )
2021-05-04 00:51:42 -07:00
Jeff Washington (jwash)
541aa5ad85
tests: lamports -> lamports() ( #16982 )
2021-05-03 10:45:54 -05:00
Justin Starry
8e561354d5
Improve readability of vote lockout processing ( #16987 )
...
* Improve readability of vote lockout processing
* clippy
* simplify comment
* feedback
2021-05-02 08:36:06 +00:00
carllin
5981399612
Distinguish max replayed and max observed vote ( #16936 )
2021-04-29 14:43:28 -07:00
carllin
b5d30846d6
Retry latest vote if expired ( #16735 )
2021-04-28 11:46:16 -07:00
carllin
4c94f8933f
Ingest votes from gossip into fork choice ( #16560 )
2021-04-21 14:40:35 -07:00
Michael Vines
a911ae00ba
clippy
2021-04-18 20:55:02 -07:00
carllin
dc7030ffaa
Allow fork choice to support multiple versions of a slot ( #16266 )
2021-04-12 01:00:59 -07:00
carllin
99b3aab703
Track gossip vote updates per hash for replay stage ( #16421 )
...
* Track gossip vote updates per hash for replay stage
2021-04-10 17:34:45 -07:00
sakridge
b99ae8f334
Skip leader slots until a vote lands ( #15607 )
2021-03-25 18:54:51 -07:00
carllin
52703badfa
Setup ReplayStage confirmation scaffolding for duplicate slots ( #9698 )
2021-03-24 23:41:52 -07:00
Jeff Washington (jwash)
c09ea2c314
More AccountSharedData construction ( #15844 )
...
* one more AccountSharedData construction
* one more construct
2021-03-15 19:27:17 -05:00
Jeff Washington (jwash)
952c3bcbb7
AccountSharedData construction ( #15790 )
2021-03-11 18:09:04 -06:00