Raw Transaction Fee - 256: absurdly-high-fee error

0

1

I'm running the following codes, respectively.

 bitcoin-cli -testnet createrawtransaction '''
 [
    {
      "txid":"751b6361cd8d621de00466363120e5da2176c3cc092cb3f0b7373b02591372d2",
      "vout" : 0
    }
 ]''' '{ "2N2VoHPMHT8CBYrhJqhJj1uauPaxMN7Qqed": 0.001 }'

response;

0200000001d2721359023b37b7f0b32c09ccc37621dae52031366604e01d628dcd61631b750000000000ffffffff02a08601000000000017a914657abfa90bd62f0f7a9533509b855cfd5f6e7d178750c300000000000017a91477c7f1a5a522daf70274dab6cdcb85efcc6e99318700000000

My DecodeRawTransaction output;

 array:8 [▼
      "txid" => "8608e07487a15b8866496bd5e90c92736d909a8b3023e1cfc75481e613164fe7"
      "hash" => "8608e07487a15b8866496bd5e90c92736d909a8b3023e1cfc75481e613164fe7"
      "version" => 2
      "size" => 83
      "vsize" => 83
      "locktime" => 0
      "vin" => array:1 [▼
           0 => array:4 [▼
                "txid" => "751b6361cd8d621de00466363120e5da2176c3cc092cb3f0b7373b02591372d2"
                "vout" => 0
                "scriptSig" => array:2 [▼
                     "asm" => ""
                     "hex" => ""
                ]
                "sequence" => 4294967295
           ]
      ]
      "vout" => array:1 [▼
           0 => array:3 [▼
                "value" => 0.001
                "n" => 0
                "scriptPubKey" => array:5 [▼
                     "asm" => "OP_HASH160 657abfa90bd62f0f7a9533509b855cfd5f6e7d17 OP_EQUAL"
                     "hex" => "a914657abfa90bd62f0f7a9533509b855cfd5f6e7d1787"
                     "reqSigs" => 1
                     "type" => "scripthash"
                     "addresses" => array:1 [▼
                          0 => "2N2VoHPMHT8CBYrhJqhJj1uauPaxMN7Qqed"
                     ]
                ]
           ]
      ]
 ]

After, I'm running this command;

 signrawtransaction 0200000001d2721359023b37b7f0b32c09ccc37621dae52031366604e01d628dcd61631b750000000000ffffffff02a08601000000000017a914657abfa90bd62f0f7a9533509b855cfd5f6e7d178750c300000000000017a91477c7f1a5a522daf70274dab6cdcb85efcc6e99318700000000

And finally, I'm running the SendRawTransaction command.

bitcoin-cli -testnet sendrawtransaction 02000000000101d2721359023b37b7f0b32c09ccc37621dae52031366604e01d628dcd61631b75000000001716001466c18ec25251afe44f6a9f99be78b4e04857ef46ffffffff01a08601000000000017a914657abfa90bd62f0f7a9533509b855cfd5f6e7d178702483045022100b0291f0c753b3876a7d0d5c8970caa0e4b70cad224de9248377054e342ad1ed1022006de0d6e07991319ce467e5550bb203e4d398452c457b138e1fb5b7a3b2e9427012103f382a14da980fba9234d02599fe5ced7b1f907385d1d14bfb17017e5cfdc318500000000

And I get this error;

 256: absurdly-high-fee

Can anyone help me?

PHPSEO

Posted 2018-09-19T21:58:11.133

Reputation: 3

Question was closed 2018-10-01T08:57:41.763

My problem is still continuing. The relevant content did not help.PHPSEO 2018-09-19T22:14:23.193

1you are spending a 0.15 btc output and only sending 0.01 btc the rest 0.14 will implicitly go as a fee to the miner which is very high so you get an error. You need to add a second output with where do you want the 0.14 btc to go.Mike D 2018-09-19T22:22:19.353

Answers

2

The fee is calculated from the difference between vin and vout. Here you are sending a very small amount to an addresses but you have not specified an output to receive the change. The client sees this change as the fee which is probably very large.

You need to create a separate vout to send the change from the transaction, leaving a small amount for the fee.

Nikos Kostoulas

Posted 2018-09-19T21:58:11.133

Reputation: 111

Thank you for replying. I don't know much about it. How do I create vout?PHPSEO 2018-09-19T22:17:24.877

You already have a vout: { "2N2VoHPMHT8CBYrhJqhJj1uauPaxMN7Qqed": 0.001 }Nikos Kostoulas 2018-09-19T22:18:12.770

Create another one where the address belongs to your wallet (bitcoin-cli getnewaddress) and the value is the change minus a feeNikos Kostoulas 2018-09-19T22:18:43.700

You should be able to find the value of the vin by searching for the txid: 751b6361cd8d621de00466363120e5da2176c3cc092cb3f0b7373b02591372d2Nikos Kostoulas 2018-09-19T22:19:20.687

You could alternatively use the sendtoaddress rpc callNikos Kostoulas 2018-09-19T22:20:38.700

I'm trying, but I haven't succeeded. :( From adress is: 2N4ZgDkNDUqo5aHADMxW2qHUahC51g6FVYY (751b6361cd8d621de00466363120e5da2176c3cc092cb3f0b7373b02591372d2) To address is: 2N2VoHPMHT8CBYrhJqhJj1uauPaxMN7Qqed Can you show me an example? Thank you for helping.PHPSEO 2018-09-19T23:17:07.740

bitcoin-cli -testnet createrawtransaction ''' [ { "txid":"751b6361cd8d621de00466363120e5da2176c3cc092cb3f0b7373b02591372d2", "vout" : 0 } ]''' '{ "2N2VoHPMHT8CBYrhJqhJj1uauPaxMN7Qqed": 0.001, "change_address": vin_value - 0.001 - fee}'Nikos Kostoulas 2018-09-20T08:50:09.183

Thank you so much. What is the difference between sendfrom and createrawtransaction? Which is safer?PHPSEO 2018-09-21T21:14:16.423

With sendtoaddress input coins and fee are chosen automatically. With createrawtransaction you have the option which inputs to use and how exactly to structure outputs and fee.Nikos Kostoulas 2018-09-23T18:38:09.317