Make wallet network immutable after creation, or document and validate it explicitly
Les mainteneurs répondent en général sous 2 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 55/100
Piste de recherche
Start by reading the --network option on CliOpts and trace how it reaches wallet creation and other subcommands; then find the check that compares the stored and requested networks. Decide whether to ignore the option after creation or report a clear mismatch with the stored network and suggested fix. Done when the chosen behavior is documented and a different network produces the intended result.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Describe the enhancement
The --network flag is a top-level option on every command, which makes it look like a per-invocation choice. In reality the network is fixed at wallet create and stored in the wallet config. Passing a different value later fails with Error: Generic error: Network mismatch: loaded testnet, expected testnet4, which does not explain why. Either the flag should be ignored on non-creation commands (network read from config), or the mismatch should be caught early with a clear message naming the wallet's stored network and suggesting the fix.
Use case
Descriptors only distinguish mainnet from non-mainnet (xpub vs tpub). Testnet, testnet4, signet, and regtest all share tpub, so the network genuinely cannot be inferred from the descriptor and has to be stored and validated separately so the current check is correct, only the UX is wrong. A user who created a wallet on one network and later types a different --network out of habit, or omits the flag entirely if it has a default, gets an opaque error that reads like a descriptor problem. A specific message for example: This wallet was created for network 'testnet'; remove --network or pass --network testnet turns a confusing failure into a one-line fix. Ignoring the flag on non-creation commands would be cleaner still, since the value is not actually a choice at that point.
Additional context
The flag is defined on CliOpts and flows into every subcommand, so nothing at the definition site signals that it is creation-time-only. At minimum, the --network help text should note that on non-creation commands it must match the wallet's stored network. The generic wrapping in Error::Generic is what hides the cause: the underlying check knows both the stored network and the requested one, but that information never reaches the user.
- Langage dominant
- Rust
- Étoiles
- 142
- Forks
- 103
- Merge moyen
- 4 j 8 h
- PR mergées (30 j)
- 5
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de bitcoindevkit/bdk-cli
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
bitcoindevkit/bdk-cli#360 ·
Les mainteneurs répondent en général sous 2 jours
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
bitcoindevkit/bdk-cli#358 ·
Les mainteneurs répondent en général sous 2 jours
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
bitcoindevkit/bdk-cli#357 ·
Les mainteneurs répondent en général sous 2 jours
-
Remove "wallet" field from `WalletConfigInner`Peut-être pris @Jennycj l’a pris il y a 7 jours. Ouverteenhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
bitcoindevkit/bdk-cli#332 · 2 commentaires ·
Les mainteneurs répondent en général sous 2 jours
-
`warn!` output is invisible unless `RUST_LOG` is setPeut-être pris @chukwudiikeh l’a pris il y a 4 jours. Ouverte
bitcoindevkit/bdk-cli#352 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 2 jours
Toutes les issues de bitcoindevkit/bdk-cli
Issues similaires
-
BASEPRI needs an ISBOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 69/100
rust-embedded/cortex-m#702 · 1 commentaire ·
-
Make major, minor, and makedev safe on solarish targetsPeut-être pris @xtqqczze l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
improvement/feedback improvement/workflow-project
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
higress-group/HiRoute#166 ·
Les mainteneurs répondent en général sous 1 jour
-
Proxy ignores l5d-retry-http and l5d-retry-grpc conditions that follow a comma and spacePeut-être pris @RaphaelFakhri l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
Les mainteneurs répondent en général sous 3 jours
-
sncast panics when decoding a `u384` valuePeut-être pris @RaphaelFakhri l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
foundry-rs/starknet-foundry#4635 ·
Les mainteneurs répondent en général sous 3 jours