chore: bump tonic related crates

This commit upgrades all tonic related crates to the latest
version. Also uses latest own organization tonic_lnd fork.
Finally, fixes all breaking changes of these versions.
This commit is contained in:
Maurice 2025-09-09 19:04:50 -03:00
parent feaf3590c2
commit e07a412e6f
No known key found for this signature in database
GPG key ID: 500BD1099EBC3D61
7 changed files with 293 additions and 259 deletions

512
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -31,15 +31,16 @@ rand_chacha = "0.9.0"
rand_core = { version = "0.9.3", features = ["os_rng"] }
log = "0.4.17"
log4rs = { version = "1.2.0", features = ["file_appender"] }
rcgen = { version = "0.13.1", features = ["pem", "x509-parser"] }
rcgen = { version = "0.14.3", features = ["pem", "x509-parser"] }
tokio = { version = "1.25.0", features = ["rt", "rt-multi-thread", "signal", "test-util"] }
tonic = { version = "0.11", features = [ "tls", "transport" ] }
tonic_lnd = { git = "https://github.com/lndk-org/tonic_lnd", rev="201aa3eb18cd82577061c469234a6e299600e0ef", package="fedimint-tonic-lnd", features = ["lightningrpc", "routerrpc", "versionrpc"] }
tonic = { version = "0.14.2", features = ["tls-ring", "transport" ] }
tonic-prost = "0.14.2"
tonic_lnd = { git = "https://github.com/lndk-org/tonic_lnd", rev="f89f49aadc439b37d65947cc454eecffdc8c35e0", package="fedimint-tonic-lnd", features = ["lightningrpc", "routerrpc", "versionrpc"] }
hex = "0.4.3"
configure_me = "0.4.0"
bytes = "1.4.0"
triggered = "0.1.2"
prost = "0.12"
prost = "0.14.1"
async_fn_traits = "0.1.1"
# Integration test dependencies, only enabled with itest feature
@ -54,7 +55,7 @@ tempfile = "3.5.0"
[build-dependencies]
configure_me_codegen = "0.4.4"
tonic-build = "0.11"
tonic-prost-build = "0.14.2"
# The profile that 'cargo dist' will build with
[profile.dist]

View file

@ -2,9 +2,9 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
configure_me_codegen::build_script_auto().unwrap_or_else(|error| error.report_and_exit());
// Compile the protos for our grpc server.
tonic_build::configure()
tonic_prost_build::configure()
.protoc_arg("--experimental_allow_proto3_optional")
.compile(&["proto/lndkrpc.proto"], &["proto"])?;
.compile_protos(&["proto/lndkrpc.proto"], &["proto"])?;
Ok(())
}

View file

@ -33,7 +33,7 @@ use tonic_lnd::lnrpc::{
use tonic_lnd::signrpc::KeyLocator;
use tonic_lnd::tonic::Status;
use tonic_lnd::verrpc::Version;
use tonic_lnd::{Client, ConnectError};
use tonic_lnd::{Client, Error as ConnectError};
const ONION_MESSAGES_REQUIRED: u32 = 38;
pub(crate) const ONION_MESSAGES_OPTIONAL: u32 = 39;

View file

@ -1315,7 +1315,11 @@ mod tests {
sender_mock
.expect_send_custom_message()
.times(2)
.returning(|_| Ok(SendCustomMessageResponse {}));
.returning(|_| {
Ok(SendCustomMessageResponse {
..Default::default()
})
});
// Peer connected: onion messaging not supported.
sender

View file

@ -413,7 +413,10 @@ pub fn generate_tls_creds(
}
};
let CertifiedKey { cert, key_pair } = generate_simple_self_signed(subject_alt_names)
let CertifiedKey {
cert,
signing_key: key_pair,
} = generate_simple_self_signed(subject_alt_names)
.map_err(CertificateGenFailure::RcgenError)?;
// Create the tls files. Make sure the key is user-readable only:

View file

@ -515,12 +515,12 @@ impl LndNode {
while retry_num == 0 || retry {
thread::sleep(Duration::from_secs(3));
let client_result = tonic_lnd::connect(
self.address.clone(),
self.cert_path.clone(),
self.macaroon_path.clone(),
)
.await;
let client_result = tonic_lnd::ClientBuilder::new()
.address(self.address.clone())
.cert_path(self.cert_path.clone())
.macaroon_path(self.macaroon_path.clone())
.build()
.await;
match client_result {
Ok(client) => {