Skip to content

merge queue: embarking unstable (8fa11aa) and [#5164 + #4981 + #5163] together #5195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions beacon_node/lighthouse_network/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,6 @@ pub struct Config {

/// Configuration for the inbound rate limiter (requests received by this node).
pub inbound_rate_limiter_config: Option<InboundRateLimiterConfig>,

/// Whether to disable logging duplicate gossip messages as WARN. If set to true, duplicate
/// errors will be logged at DEBUG level.
pub disable_duplicate_warn_logs: bool,
}

impl Config {
Expand Down Expand Up @@ -378,7 +374,6 @@ impl Default for Config {
outbound_rate_limiter_config: None,
invalid_block_storage: None,
inbound_rate_limiter_config: None,
disable_duplicate_warn_logs: false,
}
}
}
Expand Down
35 changes: 17 additions & 18 deletions beacon_node/lighthouse_network/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ pub struct Network<AppReqId: ReqId, TSpec: EthSpec> {
gossip_cache: GossipCache,
/// This node's PeerId.
pub local_peer_id: PeerId,
/// Flag to disable warning logs for duplicate gossip messages and log at DEBUG level instead.
pub disable_duplicate_warn_logs: bool,
/// Logger for behaviour actions.
log: slog::Logger,
}
Expand Down Expand Up @@ -427,7 +425,6 @@ impl<AppReqId: ReqId, TSpec: EthSpec> Network<AppReqId, TSpec> {
update_gossipsub_scores,
gossip_cache,
local_peer_id,
disable_duplicate_warn_logs: config.disable_duplicate_warn_logs,
log,
};

Expand Down Expand Up @@ -746,21 +743,23 @@ impl<AppReqId: ReqId, TSpec: EthSpec> Network<AppReqId, TSpec> {
.gossipsub_mut()
.publish(Topic::from(topic.clone()), message_data.clone())
{
if self.disable_duplicate_warn_logs && matches!(e, PublishError::Duplicate) {
debug!(
self.log,
"Could not publish message";
"error" => ?e,
"kind" => %topic.kind(),
);
} else {
warn!(
self.log,
"Could not publish message";
"error" => ?e,
"kind" => %topic.kind(),
);
};
match e {
PublishError::Duplicate => {
debug!(
self.log,
"Attempted to publish duplicate message";
"kind" => %topic.kind(),
);
}
ref e => {
warn!(
self.log,
"Could not publish message";
"error" => ?e,
"kind" => %topic.kind(),
);
}
}

// add to metrics
match topic.kind() {
Expand Down
6 changes: 1 addition & 5 deletions beacon_node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1271,11 +1271,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
.arg(
Arg::with_name("disable-duplicate-warn-logs")
.long("disable-duplicate-warn-logs")
.help("Disable warning logs for duplicate gossip messages. The WARN level log is \
useful for detecting a duplicate validator key running elsewhere. However, this may \
result in excessive warning logs if the validator is broadcasting messages to \
multiple beacon nodes via the validator client --broadcast flag. In this case, \
disabling these warn logs may be useful.")
.help("This flag is deprecated and has no effect.")
.takes_value(false)
)
.group(ArgGroup::with_name("enable_http").args(&["http", "gui", "staking"]).multiple(true))
Expand Down
3 changes: 0 additions & 3 deletions beacon_node/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1425,9 +1425,6 @@ pub fn set_network_config(
Some(config_str.parse()?)
}
};

config.disable_duplicate_warn_logs = cli_args.is_present("disable-duplicate-warn-logs");

Ok(())
}

Expand Down
5 changes: 0 additions & 5 deletions book/src/help_bn.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ FLAGS:
--disable-deposit-contract-sync Explicitly disables syncing of deposit logs from the execution node. This
overrides any previous option that depends on it. Useful if you intend to
run a non-validating beacon node.
--disable-duplicate-warn-logs Disable warning logs for duplicate gossip messages. The WARN level log is
useful for detecting a duplicate validator key running elsewhere.
However, this may result in excessive warning logs if the validator is
broadcasting messages to multiple beacon nodes via the validator client
--broadcast flag. In this case, disabling these warn logs may be useful.
-x, --disable-enr-auto-update Discovery automatically updates the nodes local ENR with an external IP
address and port as seen by other peers on the network. This disables
this feature, fixing the ENR's IP/PORT to those specified on boot.
Expand Down
17 changes: 11 additions & 6 deletions book/src/help_vc.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,19 @@ FLAGS:
--disable-auto-discover
If present, do not attempt to discover new validators in the validators-dir. Validators will need to be
manually added to the validator_definitions.yml file.
--disable-log-timestamp If present, do not include timestamps in logging output.
--disable-log-timestamp If present, do not include timestamps in logging output.
--disable-malloc-tuning
If present, do not configure the system allocator. Providing this flag will generally increase memory usage,
it should only be provided when debugging specific memory allocation issues.
--disable-run-on-all
DEPRECATED. Use --broadcast. By default, Lighthouse publishes attestation, sync committee subscriptions and
proposer preparation messages to all beacon nodes provided in the `--beacon-nodes flag`. This option changes
that behaviour such that these api calls only go out to the first available and synced beacon node
--disable-slashing-protection-web3signer
Disable Lighthouse's slashing protection for all web3signer keys. This can reduce the I/O burden on the VC
but is only safe if slashing protection is enabled on the remote signer and is implemented correctly. DO NOT
ENABLE THIS FLAG UNLESS YOU ARE CERTAIN THAT SLASHING PROTECTION IS ENABLED ON THE REMOTE SIGNER. YOU WILL
GET SLASHED IF YOU USE THIS FLAG WITHOUT ENABLING WEB3SIGNER'S SLASHING PROTECTION.
--enable-doppelganger-protection
If this flag is set, Lighthouse will delay startup for three epochs and monitor for messages on the network
by any of the validators managed by this client. This will result in three (possibly four) epochs worth of
Expand All @@ -32,8 +37,8 @@ FLAGS:
Enable per validator metrics for > 64 validators. Note: This flag is automatically enabled for <= 64
validators. Enabling this metric for higher validator counts will lead to higher volume of prometheus
metrics being collected.
-h, --help Prints help information
--http Enable the RESTful HTTP API server. Disabled by default.
-h, --help Prints help information
--http Enable the RESTful HTTP API server. Disabled by default.
--http-allow-keystore-export
If present, allow access to the DELETE /lighthouse/keystores HTTP API method, which allows exporting
keystores and passwords to HTTP API consumers who have access to the API token. This method is useful for
Expand All @@ -47,15 +52,15 @@ FLAGS:
flag unless you're certain that a new slashing protection database is required. Usually, your database will
have been initialized when you imported your validator keys. If you misplace your database and then run with
this flag you risk being slashed.
--log-color Force outputting colors when emitting logs to the terminal.
--log-color Force outputting colors when emitting logs to the terminal.
--logfile-compress
If present, compress old log files. This can help reduce the space needed to store old logs.

--logfile-no-restricted-perms
If present, log files will be generated as world-readable meaning they can be read by any user on the
machine. Note that logs can often contain sensitive information about your validator and so this flag should
be used with caution. For Windows users, the log file permissions will be inherited from the parent folder.
--metrics Enable the Prometheus metrics HTTP server. Disabled by default.
--metrics Enable the Prometheus metrics HTTP server. Disabled by default.
--prefer-builder-proposals
If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload
value.
Expand All @@ -69,7 +74,7 @@ FLAGS:
--use-long-timeouts
If present, the validator client will use longer timeouts for requests made to the beacon node. This flag is
generally not recommended, longer timeouts can cause missed duties when fallbacks are used.
-V, --version Prints version information
-V, --version Prints version information

OPTIONS:
--beacon-nodes <NETWORK_ADDRESSES>
Expand Down
127 changes: 0 additions & 127 deletions book/src/js/deposit.js

This file was deleted.

4 changes: 0 additions & 4 deletions book/src/redundancy.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ from this list:
- `none`: Disable all broadcasting. This option only has an effect when provided alone, otherwise
it is ignored. Not recommended except for expert tweakers.

Broadcasting attestation, blocks and sync committee messages may result in excessive warning logs in the beacon node
due to duplicate gossip messages. In this case, it may be desirable to disable warning logs for duplicates using the
beacon node `--disable-duplicate-warn-logs` flag.

The default is `--broadcast subscriptions`. To also broadcast blocks for example, use
`--broadcast subscriptions,blocks`.

Expand Down
19 changes: 0 additions & 19 deletions lighthouse/tests/beacon_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2584,22 +2584,3 @@ fn genesis_state_url_value() {
assert_eq!(config.genesis_state_url_timeout, Duration::from_secs(42));
});
}

#[test]
fn disable_duplicate_warn_logs_default() {
CommandLineTest::new()
.run_with_zero_port()
.with_config(|config| {
assert_eq!(config.network.disable_duplicate_warn_logs, false);
});
}

#[test]
fn disable_duplicate_warn_logs() {
CommandLineTest::new()
.flag("disable-duplicate-warn-logs", None)
.run_with_zero_port()
.with_config(|config| {
assert_eq!(config.network.disable_duplicate_warn_logs, true);
});
}
17 changes: 17 additions & 0 deletions lighthouse/tests/validator_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -636,3 +636,20 @@ fn validator_registration_batch_size_zero_value() {
.flag("validator-registration-batch-size", Some("0"))
.run();
}

#[test]
fn validator_disable_web3_signer_slashing_protection_default() {
CommandLineTest::new().run().with_config(|config| {
assert!(config.enable_web3signer_slashing_protection);
});
}

#[test]
fn validator_disable_web3_signer_slashing_protection() {
CommandLineTest::new()
.flag("disable-slashing-protection-web3signer", None)
.run()
.with_config(|config| {
assert!(!config.enable_web3signer_slashing_protection);
});
}
Loading