Skip to content

30.2.8#20

Merged
nervana21 merged 10 commits intomainfrom
30.2.8
Mar 8, 2026
Merged

30.2.8#20
nervana21 merged 10 commits intomainfrom
30.2.8

Conversation

@nervana21
Copy link
Owner

Bump downstream crate to v30.2.8

nervana21 added 10 commits March 7, 2026 16:07
A prior commit introduced a single `CONCAT_TO_SNAKE` table used by
`sanitize_external_identifier` so that generated params and response
structs use idiomatic Rust names. This commit extends that table with
many additional RPC names that were still emitted as concatenated
identifiers: response fields such as `pruneheight`, `feerate`, and
`chainwork`, and param fields such as `hexstring`, `privkeys`,
`prevtxs`, `iswitness`, and `permitsigdata`, which now map to
`prune_height`, `fee_rate`, `chain_work`, `hex_string`, `priv_keys`,
`prev_txs`, `is_witness`, and `permit_sig_data` (and others in the
same vein). The hardcoded `DecodedVin` struct in the response-type
generator previously used the field name `txinwitness`; it now uses
`tx_in_witness` with `#[serde(rename = "txinwitness")]` so that the
Rust API is consistent and the JSON wire format is unchanged. The
codegen already emits `#[serde(rename = "...")]` when the Rust name
differs from the RPC key, so no change to serialization behaviour is
required beyond that one explicit attribute. These updates keep the
codebase consistent with the convention that external RPC names are
normalized at codegen time to snake_case for Rust consumers.
The transport infrastructure generator emitted a bare `use serde;` in two
places (HTTP and Unix socket generated code). The same generated code
uses `serde::Serialize` and `serde::Deserialize` via full path, so the
import was never needed.
The pipeline template for the generated RPC client included `use
std::result::Result;`. Rust's prelude already brings `Result` into
scope, and the template does not need to disambiguate it.
The pipeline's lib.rs generator added `#![allow(unused_imports)]` and
`#![allow(dead_code)]` to every generated client crate. Those allows
hide real issues instead of fixing them. After removing redundant
imports from templates and transport generation, generated code should
not rely on these blanket allows. Removing them keeps the generated
crate aligned with normal Rust lint expectations and makes future
unused or dead code more easily visible.
The test node generator emits inline serde modules for `maxfeerate_opt`
and `serde_amounts_map`. Each module imported `Serialize` even though
only `Serializer` is used in the `serialize` functions. Dropping the
unused `Serialize` import keeps generated code consistent with the
stricter lint setup from the previous commit and avoids unused_imports
warnings in generated client crates.
The test node generator emits a `maxfeerate_opt` serde module with both
`serialize` and `deserialize`. For APIs that only send `maxfeerate` (e.g.
as a request parameter) and never parse it, `deserialize` is unused and
triggers `dead_code` after the crate-level allow was removed. Adding
`#[allow(dead_code)]` on that function only keeps the generated crate
clean for those API shapes without re-enabling a blanket allow for the
whole library.
The generated `create_transport` logic used inline arrays and a magic
number for Bitcoin Core RPC warmup codes and retry count. This change
adds `generate_init_constants` to emit module-level `INIT_WAIT_RPC_CODES`
and `INIT_MAX_RETRIES`, and updates the generated method to use them.
The Bitcoin Core test config used the same default `extra_args` list in
both `from_config` and `Default`, with the literal repeated and a
comment about full blockchain history. This change introduces a single
`DEFAULT_EXTRA_ARGS` constant and uses it in both places via `map(
String::from).to_vec()`.
The node manager generator emits a `create_transport` method that
previously repeated `use std::sync::Arc` and `use crate::transport::
DefaultTransport` inside the method. The same generator already writes
those imports at module level in `generate_imports`, so the inner
`use` lines were redundant.
@nervana21 nervana21 merged commit 4831fff into main Mar 8, 2026
7 checks passed
@nervana21 nervana21 deleted the 30.2.8 branch March 8, 2026 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant