ord icon indicating copy to clipboard operation
ord copied to clipboard

error: wallet does not contain enough cardinal UTXOs, please add additional funds to wallet.

Open dude513 opened this issue 2 years ago • 17 comments

Command used:

./ord wallet inscribe FILE --fee-rate 13

Output:

error: wallet does not contain enough cardinal UTXOs, please add additional funds to wallet.

Current UTXOs checked with ./ord wallet outputs:

[
  {
    "output": "tx1:0",
    "amount": 10000
  },
  {
    "output": "tx2:0",
    "amount": 200000
  }
]

Does it mean ord looks for the first output ignoring the second with enough funds to spend?

EDIT: I am on a speedup-improvements branch, @andrewtoth's repo. EDIT: repo is not relevant as it happens on the main ord and on a andrewtoth's one.

dude513 avatar Feb 14 '23 17:02 dude513

If both outputs contain inscriptions then yes. Is that the case?

You can check whether that's true if the locations field in ord wallet inscriptions matches those outputs.

raphjaph avatar Feb 14 '23 20:02 raphjaph

inscriptions

No, I don't have any. Second output is the newly received funds.

dude513 avatar Feb 14 '23 20:02 dude513

Hmm that's weird. What does the ord wallet balance show?

raphjaph avatar Feb 14 '23 23:02 raphjaph

Hmm that's weird. What does the ord wallet balance show?

The balance was my both outputs combined. :) I have made another deposit and still something doesn't work, might be a bug?

[
  {
    "output": "tx1:0",
    "amount": 10000
  },
  {
    "output": "tx2:0",
    "amount": 300000
  },
  {
    "output": "tx3:0",
    "amount": 200000
  }
]

Balance shows "cardinal": 500000.

dude513 avatar Feb 15 '23 07:02 dude513

I will create a new wallet and try to sweep funds into a single output, for this though I need to reindex all blocks with a new wallet, if it does fix my problem we might have a bug. 🐛

dude513 avatar Feb 15 '23 07:02 dude513

I have observed the same issue in one of my wallets. Enough cardinal UTXOs available, still same message. Will investigate.

veryordinally avatar Feb 15 '23 07:02 veryordinally

I'm seeing the same thing

$ ord wallet outputs
[
  {
    "output": "<txid>:0",
    "amount": 50000
  }
]
$ ord wallet inscriptions
[]
$ ord wallet balance
{
  "cardinal": 50000
}
$ RUST_LOG=debug ord wallet inscribe my_file.png
[2023-02-15T09:41:28Z INFO  ord::options] Connecting to Bitcoin Core RPC server at 127.0.0.1:8332/wallet/ord using credentials from `/home/alex/.bitcoin/.cookie`
[2023-02-15T09:41:28Z DEBUG bitcoincore_rpc] JSON-RPC request: getblockchaininfo []
[2023-02-15T09:41:28Z DEBUG bitcoincore_rpc] JSON-RPC request: getnetworkinfo []
[2023-02-15T09:41:28Z DEBUG bitcoincore_rpc] JSON-RPC request: getnetworkinfo []
[2023-02-15T09:41:28Z DEBUG bitcoincore_rpc] JSON-RPC request: listwallets []
[2023-02-15T09:41:28Z DEBUG bitcoincore_rpc] JSON-RPC request: listdescriptors []
[2023-02-15T09:41:28Z INFO  ord::index] Connecting to Bitcoin Core RPC server at 127.0.0.1:8332/wallet/ord using credentials from `/home/alex/.bitcoin/.cookie`
[2023-02-15T09:41:28Z DEBUG bitcoincore_rpc] JSON-RPC request: getblockcount []
[2023-02-15T09:41:28Z DEBUG bitcoincore_rpc] JSON-RPC request: getblockhash [776637]
[2023-02-15T09:41:28Z DEBUG bitcoincore_rpc] JSON-RPC error for getblockhash: RpcError { code: -8, message: "Block height out of range", data: None }
[2023-02-15T09:41:28Z DEBUG bitcoincore_rpc] JSON-RPC request: listunspent []
[2023-02-15T09:41:28Z DEBUG bitcoincore_rpc] JSON-RPC request: listlockunspent []
[2023-02-15T09:41:28Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawchangeaddress ["bech32m"]
[2023-02-15T09:41:28Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawchangeaddress ["bech32m"]
[2023-02-15T09:41:28Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawchangeaddress ["bech32m"]
error: wallet does not contain enough cardinal UTXOs, please add additional funds to wallet.

AlexLloyd0 avatar Feb 15 '23 09:02 AlexLloyd0

From what I can tell from adding a few debug logs:

src/subcommand/wallet/transaction_builder.rs:

  fn build_transaction(self) -> Result<Transaction> {
    self
      .select_outgoing()?         // <-- Removes entry from self.utxos
      .align_outgoing()
      .pad_alignment_output()?    // <-- Checks for *another* entry in self.utxos. Can't find one => fails
      .add_value()?
      .strip_value()
      .deduct_fee()
      .build()
  }

I'm not sure why pad_alignment_output thinks that the output isn't big enough...

AlexLloyd0 avatar Feb 15 '23 10:02 AlexLloyd0

I'm seeing the same thing

What branch/repo is that? @AlexLloyd0 EDIT: I am on a speedup-improvements branch, andrewtoth's repo.

dude513 avatar Feb 15 '23 11:02 dude513

I'm seeing the same thing

What branch/repo is that? @AlexLloyd0 EDIT: I am on a speedup-improvements branch, andrewtoth's repo.

main on casey/ord

AlexLloyd0 avatar Feb 15 '23 11:02 AlexLloyd0

Any solution to this? I get the same error. image

pavillag avatar Feb 16 '23 01:02 pavillag

Is there a solution to this problem? I also encountered the same problem.

aaacat6 avatar Feb 20 '23 02:02 aaacat6

    你的图片太大了,10kb左右试试

     
    
        
                    ***@***.***
        
    
 


---- Replied Message ----



  
    
     From 
    
    
        ***@***.***>
        
    
  
  
    
     Date 
    
    
    3/4/2023 17:15
    
  
  
    
     To 
    
    
     
      
        ***@***.***>
        
      
    
  
  
    
     Cc 
    
    
      
        ***@***.***>
        ,
      
      
        ***@***.***>
        
      
    
  
  
    
     Subject 
    
    
          Re: [casey/ord] error: wallet does not contain enough cardinal UTXOs, please add additional funds to wallet. (Issue #1736)
    
  

Any solution to this? I get the same error!!!!

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

aaacat6 avatar Mar 05 '23 14:03 aaacat6

Any solution to this? I get the same error. image

--fee-rate 10

yinchonging avatar Mar 09 '23 02:03 yinchonging

Any solution to this? I get the same error. image

--fee-rate 10

It won't help.

dude513 avatar Mar 09 '23 14:03 dude513

I created a new wallet with 3 unspent outputs, this is a bug for sure. Anyone have some ideas?

dude513 avatar Mar 25 '23 13:03 dude513

Workaround for me was to send a bigger tx from my ord wallet to my sparrow wallet. Then made a "send to many" with each tx being around 100k sats instead of 20k or 10k as before. Suddenly it worked and I was able to inscribe without error.

PicklErik21 avatar Apr 22 '23 03:04 PicklErik21