Pankaj Garg
1c2ae470c5
Fix forwarding of transactions over QUIC ( #25674 )
...
* Spawn QUIC server to receive forwarded txs
* Update validator port range
* forward votes using UDP
* no forwarding from unstaked nodes
* forwarding stats in banking stage
* fix test builds
* fix lifetime of forward sender
2022-06-02 11:14:58 -07:00
Michael Vines
b05c7d91ed
Fix derive_partial_eq_without_eq clippy lint
2022-05-22 22:22:21 -07:00
Michael Vines
a2be810dbc
Resolve new clippy complaints
2022-04-11 18:15:03 -04:00
ryleung-solana
8b72200afb
Thin client quic ( #23973 )
...
Change thin-client to use connection-cache
2022-03-31 15:47:00 -04:00
klykov
3f2971692d
update clap to v3: net-utils
2022-03-23 09:25:36 +01:00
HaoranYi
4f0070a5c6
unittest for bind two consecutive ports ( #23008 )
...
* minor fix of comments in fork-selection tests
* fix doc link
* add unittest for bind_two_consecutive_in_range
2022-03-02 09:10:29 -06:00
sakridge
514aab46d9
Search for consecutive ports ( #22979 )
2022-02-07 17:53:40 +01:00
Jeff Biseda
8b66625c95
convert std::sync::mpsc to crossbeam_channel ( #22264 )
2022-01-11 02:44:46 -08:00
Michael Vines
b8837c04ec
Reformat imports to a consistent style for imports
...
rustfmt.toml configuration:
imports_granularity = "One"
group_imports = "One"
2021-12-03 09:19:13 -08:00
Anton Lazarev
9079de825b
avoid using unavailable udp_socket optimizations on ios targets
2021-12-01 22:19:00 -08:00
Jon Cinque
567f30aa1a
windows: Make solana-test-validator work ( #20099 )
...
* windows: Make solana-test-validator work
The important changes to get this going on Windows:
* ledger lock needs to be done on a file instead of the directory
* IPC service needs to use the Windows pipe naming scheme
* always disable the JIT
* file logging not possible yet because we can't redirect stderr,
but this will change once env_logger fixes the pipe output target!
* Integrate review feedback
2021-09-22 23:10:35 +02:00
dependabot[bot]
8e1341c7ea
chore: bump socket2 from 0.3.17 to 0.4.1 ( #19143 )
...
* chore: bump socket2 from 0.3.17 to 0.4.1
Bumps [socket2](https://github.com/rust-lang/socket2 ) from 0.3.17 to 0.4.1.
- [Release notes](https://github.com/rust-lang/socket2/releases )
- [Changelog](https://github.com/rust-lang/socket2/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/socket2/commits )
---
updated-dependencies:
- dependency-name: socket2
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
* Update to use new consts, From trait
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: Tyera Eulberg <tyera@solana.com>
2021-08-10 21:08:35 +00:00
behzad nouri
598093b5db
adds shred-version to ip-echo-server response
...
When starting a validator, the node initially joins gossip with
shred_verison = 0, until it adopts the entrypoint's shred-version:
https://github.com/solana-labs/solana/blob/9b182f408/validator/src/main.rs#L417
Depending on the load on the entrypoint, this adopting entrypoint
shred-version through gossip sometimes becomes very slow, and causes
several problems in gossip because we have to partially support
shred_version == 0 which is a source of leaking crds values from one
cluster to another. e.g. see
https://github.com/solana-labs/solana/pull/17899
and the other linked issues there.
In order to remove shred_version == 0 from gossip, this commit adds
shred-version to ip-echo-server response. Once the entrypoints are
updated, on validator start-up, if --expected_shred_version is not
specified we will obtain shred-version from the entrypoint using
ip-echo-server.
2021-06-21 19:37:16 +00:00
François Garillot
b08cff9e77
Simplify some pattern-matches ( #16402 )
...
When those match an exact combinator on Option / Result.
Tool-aided by [comby-rust](https://github.com/huitseeker/comby-rust ).
2021-04-08 12:40:37 -06:00
Trent Nelson
7f7370c306
Re-allow clippy::integer_arithmetic at crate-level
2021-02-17 13:55:08 -07:00
Tyera Eulberg
d1563f0ccd
Bump tonic, prost, tarpc, tokio ( #15013 )
...
* Update tonic & prost, and regenerate proto
* Reignore doc code
* Revert pull #14367 , but pin tokio to v0.2 for jsonrpc
* Bump backoff and goauth -> and therefore tokio
* Bump tokio in faucet, net-utils
* Bump remaining tokio, plus tarpc
2021-02-05 00:21:53 -07:00
Michael Vines
71b88da48e
Speed up UDP reachable port checks
2020-12-30 09:29:52 -08:00
Michael Vines
fb6c660cfd
Port ip-echo-server to tokio 0.3
2020-12-30 09:29:16 -08:00
Michael Vines
ace360ade2
Multiple entrypoint support
2020-12-22 18:35:31 -08:00
Michael Vines
7143aaa89b
Clippy
2020-12-14 08:03:29 -08:00
Trent Nelson
6dc735e996
ip-echo-server: Don't use framed decoder, it can't be read-limited
2020-11-13 07:53:19 +00:00
Trent Nelson
d2cfeb31b9
ip-echo-server: Limit socket read to expected reply length
2020-11-12 05:53:18 +00:00
Trent Nelson
7481ba5618
ip-echo-server: Add helper to compute reply length
2020-11-12 05:53:18 +00:00
Trent Nelson
aab5f24518
ip-echo-server: Name the header length magic number
2020-11-12 05:53:18 +00:00
Greg Fitzgerald
3a3b7a399a
Fix netutils test ( #10842 )
2020-06-30 09:57:16 -06:00
Ryo Onodera
a39df7ee5d
Fix udp port check retry and check all udp ports ( #10385 )
...
* Don't start if udp port is really closed
* Fully check all udp ports
* Remove test code.......
* Add tests and adjust impl a bit
* Add comment
* Move comment a bit
* Move a bit
* clean ups
2020-06-15 07:36:08 +09:00
Kristofer Peterson
e23340d89e
Clippy cleanup for all targets and nighly rust (also support 1.44.0) ( #10445 )
...
* address warnings from 'rustup run beta cargo clippy --workspace'
minor refactoring in:
- cli/src/cli.rs
- cli/src/offline/blockhash_query.rs
- logger/src/lib.rs
- runtime/src/accounts_db.rs
expect some performance improvement AccountsDB::clean_accounts()
* address warnings from 'rustup run beta cargo clippy --workspace --tests'
* address warnings from 'rustup run nightly cargo clippy --workspace --all-targets'
* rustfmt
* fix warning stragglers
* properly fix clippy warnings test_vote_subscribe()
replace ref-to-arc with ref parameters where arc not cloned
* Remove lock around JsonRpcRequestProcessor (#10417 )
automerge
* make ancestors parameter optional to avoid forcing construction of empty hash maps
Co-authored-by: Greg Fitzgerald <greg@solana.com>
2020-06-09 09:38:14 +09:00
Michael Vines
0a373149dd
verify_reachable_ports: Handle errors without expect() ( #10298 )
...
automerge
2020-05-28 14:16:53 -07:00
Michael Vines
269db1710e
Retry a couple times before declaring a UDP port unreachable ( #10181 )
2020-05-22 14:33:01 -07:00
Michael Vines
2521f75c18
Advertise node software version in gossip ( #9981 )
...
* Advertise node version in gossip
* Remove solana_clap_utils::version! macro
2020-05-11 15:02:01 -07:00
Michael Vines
c11abf88b7
Clean up `use` to keep rust 1.43.0 from complaining ( #9740 )
2020-04-27 16:54:11 -07:00
sakridge
ee72714c08
Fix race in multi_bind_in_range ( #9493 )
2020-04-14 13:34:41 -07:00
Michael Vines
7b71a331c6
clippy
2020-04-09 20:27:54 -07:00
Michael Vines
032127b591
Search for ports sequentially instead of at random for more predictable port selection
2020-04-09 20:27:54 -07:00
Michael Vines
448b957a13
Add --bind-address and --rpc-bind-address validator arguments ( #8628 )
2020-03-04 22:46:43 -07:00
Michael Vines
36c0cb052b
set_read_timeout() can fail, don't expect() it not to
2020-02-11 18:57:14 -07:00
François Garillot
f016c9a669
Maintenance : simplify a few patterns, remove unneeded dependencies ( #8137 )
...
* Simplify a few pattern matches
* Removing unneeded dependencies, upgrading internal version #s
net-shaper: Removing log, semver, serde_derive
bench-tps: Removing serde, serde_derive
banking-bench: Removing solana
ledger-tool: Removing bincode, serde, serde_derive
librapay: Removing solana, language_e2e_tests
log-analyzer: Removing log, semver, serde_derive
exchange: Removing solana
core: Removing crc, memmap, symlink, untrusted
perf: Removing serde_derive
genesis: Removing hex, serde_derive
sdk-c: Removing sha2
sys-tuner: Removing semver
bench-exchange: Removing bincode, bs58, env_logger, serde, serde_derive, untrusted, ws
btc_spv_bin: Removing serde_json
btc_spv: Removing chrono
bpf_loader: Removing serde
ledger: Removing dlopen, dlopen_derive, serde_derive
move_loader: Removing byteorder, libc, language_e2e_tests
ownable: Removing serde, serde_derive
client: Removing rand
archiver-utils: Removing rand_chacha
validator: Removing serde_json, tempfile
param_passing_dep: Removing solana
failure: Removing log
vest: Removing log
vote-signer: Removing bs58, serde
local-cluster: Removing symlink
keygen: Removing rpassword
install: Removing bs58, log
upload-perf: Removing log
runtime: Removing serde_json
stake: Removing rand
* Add modified Cargo.lock
* fixup! Simplify a few pattern matches
* fixup! Simplify a few pattern matches
2020-02-06 10:02:38 -07:00
Michael Vines
e8a6c8cd6d
Don't panic if peer_addr() fails ( #7678 )
...
automerge
2020-01-04 10:00:22 -08:00
Michael Vines
d38f3f664f
Ensure IpEchoServerMessage is not fragmented ( #7214 )
...
automerge
2019-12-02 22:32:43 -08:00
Ryo Onodera
a35087a5ed
Fix typo ( #7202 )
2019-12-02 19:51:27 -07:00
Michael Vines
c6695a3120
Correctly parse ip echo server response and fix broken test ( #7196 )
2019-12-02 18:37:01 -07:00
Michael Vines
1eaf71b5b4
Improve error handling when the user mixes up gossip (8001) and RPC (8899) ports ( #7158 )
...
automerge
2019-12-02 09:01:25 -08:00
Michael Vines
b0271394cd
Clean up --gossip-port argument ( #7067 )
...
--gossip-port now specifies exactly that, the gossip port to use. The
new --gossip-host argument can be used to specify the DNS name/IP
address for gossip if --entrypoint is not supplied (when --entrypoint is
supplied, the gossip address is automatically set to the node's ip
address as observed by the entrypoint)
2019-11-20 15:21:34 -07:00
Ryo Onodera
4fc767b3f6
Move version! from core:: to clap_utils:: ( #6944 )
...
* Move version! from core to clap-utils
* Completely move version! from core:: to clap_utils::
* rustfmt
* Do remaining transition after rebase
2019-11-14 13:10:38 +09:00
Ryo Onodera
3faeb7fa79
Rename solana-netutil to solana-net-utils for consistency ( #6895 )
...
* sed -i -e 's/netutil/net_utils/g' $(git grep --files-with-matches netutil :**.rs)
* sed -i -e 's/netutil/net-utils/g' $(git grep --files-with-matches netutil)
* git mv netutil/ net-utils
* Tweak a bit
* Fix rustfmt & clippy
2019-11-12 13:37:13 -07:00