* Move vote related code to its own crate
* Update imports in code and tests
* update programs/sbf/Cargo.lock
* fix check errors
* update abi_digest
* rebase fixes
* fixes after rebase
removes outdated matches crate from the dependencies
std::matches has been stable since rust 1.42.0.
Other use-cases are covered by assert_matches crate.
* allow pedantic invalid cast lint
* allow lint with false-positive triggered by `test-case` crate
* nightly `fmt` correction
* adapt to rust layout changes
* remove dubious test
* Use transmute instead of pointer cast and de/ref when check_aligned is false.
* Renames clippy::integer_arithmetic to clippy::arithmetic_side_effects.
* bump rust nightly to 2023-08-25
* Upgrades Rust to 1.72.0
---------
Co-authored-by: Trent Nelson <trent@solana.com>
* remove unnecessary hashes around raw string literals
* remove unncessary literal `unwrap()`s
* remove panicking `unwrap()`
* remove unnecessary `unwrap()`
* use `[]` instead of `vec![]` where applicable
* remove (more) unnecessary explicit `into_iter()` calls
* remove redundant pattern matching
* don't cast to same type and constness
* do not `cfg(any(...` a single item
* remove needless pass by `&mut`
* prefer `or_default()` to `or_insert_with(T::default())`
* `filter_map()` better written as `filter()`
* incorrect `PartialOrd` impl on `Ord` type
* replace "slow zero-filled `Vec` initializations"
* remove redundant local bindings
* add required lifetime to associated constant
* sdk: Add concurrent support for rand 0.7 and 0.8
* Update rand, rand_chacha, and getrandom versions
* Run command to replace `gen_range`
Run `git grep -l gen_range | xargs sed -i'' -e 's/gen_range(\(\S*\), /gen_range(\1../'
* sdk: Fix users of older `gen_range`
* Replace `hash::new_rand` with `hash::new_with_thread_rng`
Run:
```
git grep -l hash::new_rand | xargs sed -i'' -e 's/hash::new_rand([^)]*/hash::new_with_thread_rng(/'
```
* perf: Use `Keypair::new()` instead of `generate`
* Use older rand version in zk-token-sdk
* program-runtime: Inline random key generation
* bloom: Fix clippy warnings in tests
* streamer: Scope rng usage correctly
* perf: Fix clippy warning
* accounts-db: Map to char to generate a random string
* Remove `from_secret_key_bytes`, it's just `keypair_from_seed`
* ledger: Generate keypairs by hand
* ed25519-tests: Use new rand
* runtime: Use new rand in all tests
* gossip: Clean up clippy and inline keypair generators
* core: Inline keypair generation for tests
* Push sbf lockfile change
* sdk: Sort dependencies correctly
* Remove `hash::new_with_thread_rng`, use `Hash::new_unique()`
* Use Keypair::new where chacha isn't used
* sdk: Fix build by marking rand 0.7 optional
* Hardcode secret key length, add static assertion
* Unify `getrandom` crate usage to fix linking errors
* bloom: Fix tests that require a random hash
* Remove some dependencies, try to unify others
* Remove unnecessary uses of rand and rand_core
* Update lockfiles
* Add back some dependencies to reduce rebuilds
* Increase max rebuilds from 14 to 15
* frozen-abi: Remove `getrandom`
* Bump rebuilds to 17
* Remove getrandom from zk-token-proof
The commit revises socket tag for TVU over QUIC to reuse old
TVU-forwards socket tag. This avoids gaps in socket tags which wastes
space in ContactInfo.cache.
The change is backward compatible because TVU-forwards is not used any
more and TVU over QUIC is not released yet.
The commit adds a Vec<Extension> to ContactInfo so that future additions
to ContactInfo can be done by only adding new Extensions instead of
modifying the entire ContactInfo.
* we only want to report received message signatures on PUSH requests, not PULL requests
* woops accidently had it has LocalMessage not PushMessage
* switch from match to if let statement
* convert if let to matches macro
* add in from field in PushMessage for message tracking
* update with cargo fmt
* remove display for gossip route and add lifetime param to pubkey reference in gossiproute enum
* forgot to run fmt
* we only want to report received message signatures on PUSH requests, not PULL requests
* woops accidently had it has LocalMessage not PushMessage
* switch from match to if let statement
* convert if let to matches macro
process_gossip_packets_iterations_since_last_report measures the same loop count as gossip_listen_loop_iterations_since_last_report which already exists
* screwed up old branch and syncing with upstream branch
* add fixed size ring buff instead of variable sized vecdeque for reporting signatures
* modify difficulty to take in n 0 bits and check if signature ending ends in n 0 bits
* update to only push every 18 trailing zero bits. and clean up
* report origin with signature. and set trailing 0s to 8 for local testing
* change back to 18 trailing zeros and rm unused imports
* run cargo rmt
* run ./scripts/cargo-for-all-lock-files.sh tree
* allow integer arithmetic for bit comparison
* rm unused lifetime
* rm duplicate entry?
* re implement ring buf
* put ringbuf in sorted order
* ringbuf in cargo.toml now in sorted order
* rm ring buf, refactor, fix trailing zero bug
* fix bug in trailing zeros. was comparing wrong ones
* fix needless range loop bug
* fix bug
* change trailing zero checking to build in methods and only report first 8 bytes of signature and origin pubkey
* report full origin string and first 8 bytes of signature
* set SIGNATURE_SAMPLE_TRAILING_ZEROS back to 18
* forgot to run cargo tree
* avoid panic and change working
* rm bs58
* pass in Option<String> into datapoint_info
* shorten metric names
`Arc` is already a reference internally, so it does not seem to be
beneficial to pass a reference to it. Just adds an extra layer of
indirection.
Functions that need to be able to increment `Arc` reference count need
to take `Arc<AtomicBool>`, but those that just want to read the
`AtomicBool` value can accept `&AtomicBool`, making them a bit more
generic.
This change focuses specifically on `Arc<AtomicBool>`. There are other
uses of `&Arc<T>` in the code base that could be converted in a similar
manner. But it would make the change even larger.
Using a fixed port could cause a false negative, if the port is
currently in use. We actually see this test failing regularly with an
error that port `1111` is already in use.
Quick search did not show any tests that hardcode port 1111, so it is
unclear why is this happening. But using hardcoded ports is not a good
practice anyways.
A node operator can manage a public TPU address (at node startup and while it's running), but doesn't have the ability to manage the TPU Forwards address as well.
This PR adds that functionality.
Added the start argument --public-tpu-forwards-address
Reworked the set-public-tpu-address subcommand into the set-public-address subcommand
Working towards LegacyContactInfo => ContactInfo migration, the commit
hides some implementation details of LegacyContactInfo and expands API
parity with the new ContactInfo.