Skip to content
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

Remove dev consensus key #1614

Merged
merged 7 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Description of the upcoming release here.

### Changed

- [#1614](https://github.com/FuelLabs/fuel-core/pull/#1614): Use default consensus key regardless of trigger mode.
MujkicA marked this conversation as resolved.
Show resolved Hide resolved
- [#1613](https://github.com/FuelLabs/fuel-core/pull/1613): Add api endpoint to retrieve a message by its nonce
- [#1597](https://github.com/FuelLabs/fuel-core/pull/1597): Unify namespacing for `libp2p` modules
- [#1591](https://github.com/FuelLabs/fuel-core/pull/1591): Simplify libp2p dependencies and not depend on all sub modules directly.
Expand Down
9 changes: 1 addition & 8 deletions bin/fuel-core/src/cli/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,6 @@ pub struct Command {
#[clap(flatten)]
pub poa_trigger: PoATriggerArgs,

/// Use a default insecure consensus key for testing purposes.
/// This will not be enabled by default in the future.
#[arg(long = "dev-keys", default_value = "true", env)]
pub consensus_dev_key: bool,

/// The block's fee recipient public key.
///
/// If not set, `consensus_key` is used as the provider of the `Address`.
Expand Down Expand Up @@ -226,7 +221,6 @@ impl Command {
min_gas_price,
consensus_key,
poa_trigger,
consensus_dev_key,
coinbase_recipient,
#[cfg(feature = "relayer")]
relayer_args,
Expand Down Expand Up @@ -268,15 +262,14 @@ impl Command {

// if consensus key is not configured, fallback to dev consensus key
let consensus_key = load_consensus_key(consensus_key)?.or_else(|| {
MujkicA marked this conversation as resolved.
Show resolved Hide resolved
if consensus_dev_key && trigger != Trigger::Never {
if debug {
let key = default_consensus_dev_key();
warn!(
"Fuel Core is using an insecure test key for consensus. Public key: {}",
key.public_key()
);
Some(Secret::new(key.into()))
} else {
// if consensus dev key is disabled, use no key
None
}
});
Expand Down
Loading