Transaction feeをケチると認証されない件
Bitcoinの送信でtx feeを0.00001BTCにして成功したことがあったので、何度か同じように試してみたが失敗することがあったので調べてみた。
Transaction fees - Bitcoin Wiki
Sending A transaction may be safely sent without fees if these conditions are met:
- It is smaller than 1,000 bytes.
- All outputs are 0.01 BTC or larger.
- Its priority is large enough (see the Technical Info section below)
つまり、以下の条件のときはtx feeなしで成功するかも、とのこと。
- 1,000バイトより少ない
- 出力が 0.01 BTCより多い
- プライオリティが十分に高い
3つ目が分かりにくいが、以下の計算式で求められるとのこと。
priority = sum(input_value_in_base_units * input_age)/size_in_bytes
例として、入力が次の2つ、10 confirmationsの5 BTCが1つと、3 confirmationsの2 BTCのときで、出力サイズが500バイトだとすると、プライオリティは以下の計算式となるようだ。
(500000000 * 10 + 200000000 * 3) / 500 = 11,200,000
要は額が大きくて、長いこと移動されていないコインはプライオリティが高いということだろう。
Otherwise, the reference implementation will round up the transaction size to the next thousand bytes and add a fee of 0.1 mBTC (0.0001 BTC) per thousand bytes[1].
つまり、上記の3つの条件が揃わないときは1,000バイト毎に0.0001 BTCをtx feeとして渡さないとうまくいかないようだ。