Disable the PubSub vote subscription by default
The --rpc-pubsub-enable-vote-subscription flag may be used to enable it. The current vote subscription is problematic because it emits a notification for *every* vote, so hundreds a second in a real cluster. Critically it's also missing information about *who* is voting, rendering all those notifications practically useless. Until these two issues can be resolved, the vote subscription is not much more than a potential DoS vector.
This commit is contained in:
@ -1264,6 +1264,12 @@ pub fn main() {
|
||||
.validator(solana_net_utils::is_host)
|
||||
.help("IP address to bind the RPC port [default: use --bind-address]"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("rpc_pubsub_enable_vote_subscription")
|
||||
.long("rpc-pubsub-enable-vote-subscription")
|
||||
.takes_value(false)
|
||||
.help("Enable the unstable RPC PubSub `voteSubscribe` subscription"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("rpc_pubsub_max_connections")
|
||||
.long("rpc-pubsub-max-connections")
|
||||
@ -1469,6 +1475,7 @@ pub fn main() {
|
||||
)
|
||||
}),
|
||||
pubsub_config: PubSubConfig {
|
||||
enable_vote_subscription: matches.is_present("rpc_pubsub_enable_vote_subscription"),
|
||||
max_connections: value_t_or_exit!(matches, "rpc_pubsub_max_connections", usize),
|
||||
max_fragment_size: value_t_or_exit!(matches, "rpc_pubsub_max_fragment_size", usize),
|
||||
max_in_buffer_capacity: value_t_or_exit!(
|
||||
|
Reference in New Issue
Block a user