Issues importing descriptors in Core regtest wallet

Issues importing descriptors in Core regtest wallet

Manage alerts

Loading saved threads...

jiamijiang · External communityPost link
External question — Bitcoin Stack Exchange Author: jiamijiang Original post: https://bitcoin.stackexchange.com/questions/131092 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. ok using in regtest with my bitcoin core, i am trying to import the below descriptor and its corresponding arguments for the importdescriptors command but i am unsuccessful. i've tried a few different variations and still the same issue. bitcoin-cli-rt -rpcwallet="my-descriptor-wallet" importdescriptors << 'EOF' [ { "desc": "tr([9a3ad634/86'/1'/0']tpubDCAqxEgJB2o9ZL4gozDZ5xmRGYFzV7oJB1hC1hSDYqXyoFYNEvbHh7smPmhDPsozfusb4czadKiC5HQ4e231rY9o9Q6tN34nrruJcF6rPYB/0/*,{multi_a(2,[8e7dc54e/86'/1'/0']tpubDDGyiLE11EYR9sNLNqExhwASubctpctXt5S5kfHepuL4UtihdkvKuHvakCR6od6yusSCruZ3HnejrgEvechahX3PjNQr87WPwMrUHM1J7CM/0/*,[32bbb15e/86'/1'/0']tpubDCwvzUy66wLsmQ7GzB1Tzem7xL9JWCtAYj3z2ubqFyRebgvbwtSXNxyzSHNs2zCNWuUHe8QpnMqNsvQcXYRyaxYZaNtNQLX4MgohApjsTs3/0/*,[c556a9ec/86'/1'/0']tpubDCJTFn83QPCEVG8i7ZpChtYsykvU6U2g8QJTHhJQ3xQbLwDiEg1DSFtRV25FaJkpwxLbCA91iB8AZrxJmh13XBbpPuk64bcYWVsm4xLBnZL/0/*),and_v(v:sha256(4b58001763231587a62a9eaa3e94fd639780bfa0467b272292646bd8c8dad403),and_v(v:pk([8e7dc54e/86'/1'/0']tpubDDGyiLE11EYR9sNLNqExhwASubctpctXt5S5kfHepuL4UtihdkvKuHvakCR6od6yusSCruZ3HnejrgEvechahX3PjNQr87WPwMrUHM1J7CM/1/*),older(144)))})#qd05lhaq", "timestamp": "now", "range": 100, "next_index": 0 } ] EOF The error is always just: error code: -1 error message: importdescriptors requests Import descriptors. This will trigger a rescan of the blockchain based on the earliest timestamp of all descriptors being imported. Requires a new wallet backup. When importing descriptors with multipath key expressions, if the multipath specifier contains exactly two elements, the descriptor produced from the second element will be imported as an internal descriptor. Note: This call can take over an hour to complete if using an early timestamp; during that time, other rpc calls may report that the imported keys, addresses or scripts exist but related transactions are still missing. The rescan is significantly faster if block filters are available (using startup option "-blockfilterindex=1"). I'm not sure if the issue lies in the descriptor itself or the command arguments. And i'm not sure what to make of that error message. The above descriptor was generated from the below compiled miniscript: "t:or_c(pk([9a3ad634/86'/1'/0']tpubDCAqxEgJB2o9ZL4gozDZ5xmRGYFzV7oJB1hC1hSDYqXyoFYNEvbHh7smPmhDPsozfusb4czadKiC5HQ4e231rY9o9Q6tN34nrruJcF6rPYB/0/*),or_c(multi_a(2,[8e7dc54e/86'/1'/0']tpubDDGyiLE11EYR9sNLNqExhwASubctpctXt5S5kfHepuL4UtihdkvKuHvakCR6od6yusSCruZ3HnejrgEvechahX3PjNQr87WPwMrUHM1J7CM/0/*,[32bbb15e/86'/1'/0']tpubDCwvzUy66wLsmQ7GzB1Tzem7xL9JWCtAYj3z2ubqFyRebgvbwtSXNxyzSHNs2zCNWuUHe8QpnMqNsvQcXYRyaxYZaNtNQLX4MgohApjsTs3/0/*,[c556a9ec/86'/1'/0']tpubDCJTFn83QPCEVG8i7ZpChtYsykvU6U2g8QJTHhJQ3xQbLwDiEg1DSFtRV25FaJkpwxLbCA91iB8AZrxJmh13XBbpPuk64bcYWVsm4xLBnZL/0/*),v:and_v(v:sha256(4b58001763231587a62a9eaa3e94fd639780bfa0467b272292646bd8c8dad403),and_v(v:pkh([8e7dc54e/86'/1'/0']tpubDDGyiLE11EYR9sNLNqExhwASubctpctXt5S5kfHepuL4UtihdkvKuHvakCR6od6yusSCruZ3HnejrgEvechahX3PjNQr87WPwMrUHM1J7CM/1/*),older(144)))))" I just want to verify that my descriptor can be imported into my Core wallet successfully and that it can generate addresses from that descriptor.
Quote
Report
Ava Chow · External communityPost link
External answer — Bitcoin Stack Exchange Author: Ava Chow Original post: https://bitcoin.stackexchange.com/a/131093 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. Invalid descriptors will give you an error message telling you what is wrong with the descriptor. The error you are seeing is the help text, which is presented when the wrong number of arguments is provided. Your issue is that you are sending the RPC arguments in a way that bitcoin-cli is not expected, and it is therefore not sending them to the RPC server. When you use << , the text that you input is sent over stdin. bitcoin-cli is not expecting anything to come in over stdin unless you give it -stdin . Without that option, all arguments are expected to be command line arguments. Thus, when bitcoin-cli sends the RPC, it is doing so without your parameters and giving you the error that contains the help text.
Quote
Report

Post Reply

Quoted from Forex.com.bd-Editorial External answer — Bitcoin Stack Exchange Author: Ava Chow Source score (net votes, not local likes): 1 Original post: https://bitcoin.stackexchange.com/a/131093 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. Invalid descriptors will give you an error message telling you what is wrong with the descriptor. The error you are seeing is the help text, which is presented when the wrong number of arguments is provided. Your issue is that you are sending the RPC arguments in a way that bitcoin-cli is not expected, and it is therefore not sending them to the RPC server. When you use << , the text that you input is sent over stdin. bitcoin-cli is not expecting anything to come in over stdin unless you give it -stdin . Without that option, all arguments are expected to be command line arguments. Thus, when bitcoin-cli sends the RPC, it is doing so without your parameters and giving you the error that contains the help text.

Cancel quote

Checking account access…
Issues importing descriptors in Core regtest wallet | Forex.com.bd