From bc592e7d4ca495a1c73e9a3541918b3fe2bb6e32 Mon Sep 17 00:00:00 2001 From: Ash Manning Date: Fri, 7 Feb 2025 04:04:11 +0800 Subject: [PATCH] Increase max size when decoding gRPC messages, bump version for release --- Cargo.lock | 35 ++++++++++++++++++++++------------- Cargo.toml | 6 +++--- lib/types/proto.rs | 5 ++++- 3 files changed, 29 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d2c8132..b88ec68 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -839,8 +839,8 @@ dependencies = [ [[package]] name = "bip300301_enforcer_integration_tests" -version = "0.3.1" -source = "git+https://github.com/Ash-L2L/bip300301_enforcer?rev=135d408213ee7309b59f49dfdc2608e6fa53db42#135d408213ee7309b59f49dfdc2608e6fa53db42" +version = "0.3.2" +source = "git+https://github.com/Ash-L2L/bip300301_enforcer?rev=42cfbe73a894186a73cadc36cc398b879fe5bee6#42cfbe73a894186a73cadc36cc398b879fe5bee6" dependencies = [ "anyhow", "bdk_wallet", @@ -871,8 +871,8 @@ dependencies = [ [[package]] name = "bip300301_enforcer_lib" -version = "0.3.1" -source = "git+https://github.com/Ash-L2L/bip300301_enforcer?rev=135d408213ee7309b59f49dfdc2608e6fa53db42#135d408213ee7309b59f49dfdc2608e6fa53db42" +version = "0.3.2" +source = "git+https://github.com/Ash-L2L/bip300301_enforcer?rev=42cfbe73a894186a73cadc36cc398b879fe5bee6#42cfbe73a894186a73cadc36cc398b879fe5bee6" dependencies = [ "aes-gcm", "argon2", @@ -897,6 +897,7 @@ dependencies = [ "hashlink 0.10.0", "heed", "hex", + "humantime", "jsonrpsee", "miette", "nom", @@ -921,6 +922,7 @@ dependencies = [ "tonic-build", "tracing", "tracing-subscriber", + "uuid", "zeromq", ] @@ -992,8 +994,9 @@ checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf" [[package]] name = "bitcoin-send-tx-p2p" -version = "0.2.0" -source = "git+https://github.com/Ash-L2L/bitcoin-send-tx-p2p?rev=4e03ed7c6807771b4709864b0357e2bd8843c83f#4e03ed7c6807771b4709864b0357e2bd8843c83f" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77b7d7131363292af9da72a06bf7f1b723b3200644fc6ab6b3b82d98d5f59968" dependencies = [ "async-trait", "bitcoin", @@ -1574,8 +1577,8 @@ dependencies = [ [[package]] name = "cusf-enforcer-mempool" -version = "0.1.4" -source = "git+https://github.com/LayerTwo-Labs/cusf-enforcer-mempool.git?rev=fce4283eba07df788ed3830cf3b51e35a7c590a9#fce4283eba07df788ed3830cf3b51e35a7c590a9" +version = "0.1.5" +source = "git+https://github.com/LayerTwo-Labs/cusf-enforcer-mempool.git?rev=cf467500d9cd68d6736b98d6fb3653bcebbf54bc#cf467500d9cd68d6736b98d6fb3653bcebbf54bc" dependencies = [ "anyhow", "async-trait", @@ -2925,6 +2928,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9994b79e8c1a39b3166c63ae7823bb2b00831e2a96a31399c50fe69df408eaeb" +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + [[package]] name = "hyper" version = "1.6.0" @@ -4722,7 +4731,7 @@ checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "plain_bitnames" -version = "0.10.1" +version = "0.10.2" dependencies = [ "addr", "anyhow", @@ -4773,7 +4782,7 @@ dependencies = [ [[package]] name = "plain_bitnames_app" -version = "0.10.1" +version = "0.10.2" dependencies = [ "anyhow", "bincode", @@ -4813,7 +4822,7 @@ dependencies = [ [[package]] name = "plain_bitnames_app_cli" -version = "0.10.1" +version = "0.10.2" dependencies = [ "anyhow", "bitcoin", @@ -4830,7 +4839,7 @@ dependencies = [ [[package]] name = "plain_bitnames_app_rpc_api" -version = "0.10.1" +version = "0.10.2" dependencies = [ "anyhow", "bitcoin", @@ -4845,7 +4854,7 @@ dependencies = [ [[package]] name = "plain_bitnames_integration_tests" -version = "0.10.1" +version = "0.10.2" dependencies = [ "anyhow", "bip300301_enforcer_integration_tests", diff --git a/Cargo.toml b/Cargo.toml index ad01d76..0c4f03d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,12 +36,12 @@ utoipa = { version = "5.2.0", default-features = false } [workspace.dependencies.bip300301_enforcer_lib] default-features = false git = "https://github.com/Ash-L2L/bip300301_enforcer" -rev = "135d408213ee7309b59f49dfdc2608e6fa53db42" +rev = "42cfbe73a894186a73cadc36cc398b879fe5bee6" [workspace.dependencies.bip300301_enforcer_integration_tests] default-features = false git = "https://github.com/Ash-L2L/bip300301_enforcer" -rev = "135d408213ee7309b59f49dfdc2608e6fa53db42" +rev = "42cfbe73a894186a73cadc36cc398b879fe5bee6" [workspace.dependencies.l2l-openapi] git = "https://github.com/Ash-L2L/l2l-openapi" @@ -64,7 +64,7 @@ authors = [ "Ash Manning " ] edition = "2021" license-file = "LICENSE.txt" publish = false -version = "0.10.1" +version = "0.10.2" # temp-dir does not leak correctly after clone # https://gitlab.com/leonhard-llc/ops/-/issues/17 diff --git a/lib/types/proto.rs b/lib/types/proto.rs index cdf407f..54ca3cf 100644 --- a/lib/types/proto.rs +++ b/lib/types/proto.rs @@ -897,9 +897,12 @@ pub mod mainchain { T: super::Transport, { pub fn new(inner: T) -> Self { + // 1GB + const MAX_DECODE_MESSAGE_SIZE: usize = 1024 * 1024 * 1024; Self(generated::validator_service_client::ValidatorServiceClient::::new( inner, - )) + ).max_decoding_message_size(MAX_DECODE_MESSAGE_SIZE) + ) } pub async fn get_block_header_info(