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

feat: new behavior for network bootstrapping #1257

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
822 changes: 593 additions & 229 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ url = "2.5"
warp_lambda = "0.1.4"
wsts = "9.2.0"
hex = "0.4.3"
libp2p = { version = "0.54.1", features = [
libp2p = { version = "0.55.0", default-features = false, features = [
"macros", "kad", "noise", "ping", "tcp",
"tokio", "yamux", "mdns", "quic", "gossipsub",
"relay", "identify", "tls", "dns", "autonat",
Expand Down
1 change: 0 additions & 1 deletion blocklist-client/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use tracing_subscriber::EnvFilter;
/// # Arguments
///
/// * `pretty` - A boolean that determines if the logging format should be pretty or JSON

pub fn setup_logging(pretty: bool) {
match pretty {
true => setup_logging_pretty(),
Expand Down
1 change: 0 additions & 1 deletion emily/handler/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use tracing_subscriber::EnvFilter;
/// # Arguments
///
/// * `pretty` - A boolean that determines if the logging format should be pretty or JSON

pub fn setup_logging(directives: &str, pretty: bool) {
match pretty {
true => setup_logging_pretty(directives),
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.80.0"
channel = "1.84.0"
components = ["rustfmt", "clippy"]
targets = ["x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl"]
profile = "minimal"
2 changes: 1 addition & 1 deletion signer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ clarity.workspace = true
config = "0.14"
futures.workspace = true
hashbrown.workspace = true
libp2p.workspace = true
libp2p = { workspace = true, default-features = false }
lru = { workspace = true, default-features = false }
metrics.workspace = true
metrics-exporter-prometheus.workspace = true
Expand Down
6 changes: 3 additions & 3 deletions signer/src/bitcoin/utxo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ impl<'a> RequestRef<'a> {
}
}

impl<'a> Weighted for RequestRef<'a> {
impl Weighted for RequestRef<'_> {
fn needs_signature(&self) -> bool {
match self {
Self::Deposit(req) => req.needs_signature(),
Expand Down Expand Up @@ -774,7 +774,7 @@ pub struct SignatureHash {
pub aggregate_key: XOnlyPublicKey,
}

impl<'a> SignatureHashes<'a> {
impl SignatureHashes<'_> {
/// Get deposit sighashes
pub fn deposit_sighashes(mut self) -> Vec<SignatureHash> {
self.deposits.sort_by_key(|(x, _)| x.outpoint);
Expand Down Expand Up @@ -1257,7 +1257,7 @@ impl BitcoinInputsOutputs for Transaction {
}
}

impl<'a> BitcoinInputsOutputs for UnsignedTransaction<'a> {
impl BitcoinInputsOutputs for UnsignedTransaction<'_> {
fn tx_ref(&self) -> &Transaction {
&self.tx
}
Expand Down
4 changes: 2 additions & 2 deletions signer/src/bitcoin/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,10 @@ impl BitcoinPreSignRequest {
Ok(cache)
}

async fn validate_max_mintable<'a, C>(
async fn validate_max_mintable<C>(
&self,
ctx: &C,
cache: &ValidationCache<'a>,
cache: &ValidationCache<'_>,
) -> Result<(), Error>
where
C: Context + Send + Sync,
Expand Down
2 changes: 1 addition & 1 deletion signer/src/config/serialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ pub fn try_parse_p2p_multiaddr(s: &str) -> Result<Multiaddr, SignerConfigError>
let host_str = url
.host_str()
.ok_or(P2PHostRequired)?
.trim_matches(&['[', ']']); // `Url` includes brackets for IPv6 addresses
.trim_matches(['[', ']']); // `Url` includes brackets for IPv6 addresses

let mut addr = if let Ok(addr) = IpAddr::from_str(host_str) {
Multiaddr::empty().with(Protocol::from(addr))
Expand Down
1 change: 1 addition & 0 deletions signer/src/context/signer_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ impl SbtcLimits {
self.max_mintable_cap.unwrap_or(Amount::MAX_MONEY)
}

/// TODO: Document me
#[cfg(test)]
pub fn new_per_deposit(min: u64, max: u64) -> Self {
Self {
Expand Down
2 changes: 1 addition & 1 deletion signer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ pub const MAX_SIGNER_STATE_MACHINES: u64 = MAX_MEMPOOL_PACKAGE_SIZE
/// bitcoin.
pub const MIN_BITCOIN_INPUT_VSIZE: u64 = 58;

/// These are all build info variables. Many of them are set in build.rs.
// These are all build info variables. Many of them are set in build.rs.

/// The name of the binary that is being run,
pub const PACKAGE_NAME: &str = env!("CARGO_PKG_NAME");
Expand Down
3 changes: 1 addition & 2 deletions signer/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ use tracing_subscriber::EnvFilter;
///
/// # Arguments
///
/// * `pretty` - A boolean that determines if the logging format should be pretty or JSON

/// - `pretty` - A boolean that determines if the logging format should be pretty or JSON
pub fn setup_logging(directives: &str, pretty: bool) {
match pretty {
true => setup_logging_pretty(directives),
Expand Down
Loading
Loading