diff --git a/Cargo.lock b/Cargo.lock index a2800f5d2..d33302f65 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2571,6 +2571,16 @@ dependencies = [ "libc", ] +[[package]] +name = "fdlimit" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e182f7dbc2ef73d9ef67351c5fbbea084729c48362d3ce9dd44c28e32e277fe5" +dependencies = [ + "libc", + "thiserror 1.0.69", +] + [[package]] name = "ff" version = "0.13.0" @@ -3688,7 +3698,7 @@ dependencies = [ "fc-rpc", "fc-rpc-core", "fc-storage", - "fdlimit", + "fdlimit 0.3.0", "fp-evm", "frame-benchmarking", "frame-benchmarking-cli", @@ -8105,7 +8115,7 @@ dependencies = [ "array-bytes", "chrono", "clap", - "fdlimit", + "fdlimit 0.2.1", "futures", "libp2p-identity", "log", diff --git a/Cargo.toml b/Cargo.toml index 8c743c1eb..86425e102 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ ed25519-dalek = { version = "2", default-features = false } ethereum = { version = "0.14", default-features = false } ethers-core = { version = "2.0.14", default-features = false } evm = { git = "https://github.com/rust-blockchain/evm", rev = "b7b82c7e1fc57b7449d6dfa6826600de37cc1e65", default-features = false } -fdlimit = { version = "0.2", default-features = false } +fdlimit = { version = "0.3", default-features = false } futures = { version = "0.3", default-features = false } getrandom = { version = "0.3", default-features = false } hex = { version = "0.4", default-features = false } diff --git a/crates/humanode-peer/src/cli/init.rs b/crates/humanode-peer/src/cli/init.rs index 19627d17a..45f14af6f 100644 --- a/crates/humanode-peer/src/cli/init.rs +++ b/crates/humanode-peer/src/cli/init.rs @@ -38,12 +38,12 @@ const RECOMMENDED_OPEN_FILE_DESCRIPTOR_LIMIT: u64 = 10_000; /// We require a substantial amount of fds for the networking, so raise it, and report if the raised /// limit is still way too low. pub fn raise_fd_limit() { - if let Some(new_limit) = fdlimit::raise_fd_limit() { - if new_limit < RECOMMENDED_OPEN_FILE_DESCRIPTOR_LIMIT { + if let Ok(fdlimit::Outcome::LimitRaised { from: _, to }) = fdlimit::raise_fd_limit() { + if to < RECOMMENDED_OPEN_FILE_DESCRIPTOR_LIMIT { tracing::warn!( "Low open file descriptor limit configured for the process. \ Current value: {:?}, recommended value: {:?}.", - new_limit, + to, RECOMMENDED_OPEN_FILE_DESCRIPTOR_LIMIT, ); } diff --git a/utils/checks/snapshots/features.yaml b/utils/checks/snapshots/features.yaml index 66b7738df..60ec42106 100644 --- a/utils/checks/snapshots/features.yaml +++ b/utils/checks/snapshots/features.yaml @@ -895,6 +895,8 @@ features: [] - name: fdlimit 0.2.1 features: [] +- name: fdlimit 0.3.0 + features: [] - name: ff 0.13.0 features: - alloc