1 2017-05-11 03:57:04 <RainMan28> is there a way to specifically spend some incoming unconfirmed coins on a bitcoind wallet with a higher fee (basically CPFP from command line)?
  2 2017-05-11 06:04:29 <wumpus> RainMan28: the only way to do that is manual: listunspent, then create a transaction using raw transactions API, then send it using sendrawtransaction
  3 2017-05-11 09:22:42 <negatratoron> hello
  4 2017-05-11 09:22:56 <negatratoron> i'm trying to figure out why bitcoin-core isn't synchronizing in a timely manner
  5 2017-05-11 09:27:41 <negatratoron> the bitcoin-qt client is hung at block #464933, and shows the message "Connecting to peers..."
  6 2017-05-11 17:12:37 <ineb> iam trying to understand btc and i wonder if some pool miner found a share, which is also valid for the network, could simply not submit that share to the pool and use it only for himself
  7 2017-05-11 17:12:53 <abpa> How would he use it for himself?
  8 2017-05-11 17:13:08 <ineb> i mean as if he is solo mining
  9 2017-05-11 17:13:21 <arubi> then he is not a part of a pool
 10 2017-05-11 17:13:24 <ineb> not sending the share to the pool but to the btc network instead and get all rewards for himself
 11 2017-05-11 17:13:42 <abpa> how does he get the rewards?
 12 2017-05-11 17:14:50 <ineb> maybe my understanding is wrong. i think that a share is a hash with lower difficulty than the btc network. however, a share is now and then also a valid hash for the btc network
 13 2017-05-11 17:15:10 <abpa> The reward payouts are part of the winning hash
 14 2017-05-11 17:15:20 <abpa> If you change the payouts, the hash is no longer valid
 15 2017-05-11 17:17:12 <ineb> ok one more time, consider a miner that sends all useless shares to the pool but if he founds the golden one which is also valid for the btc network, then he is submitting it directly to the network instead to the pool
 16 2017-05-11 17:17:36 <abpa> The payouts are in the hash
 17 2017-05-11 17:17:43 <abpa> You can't change the payouts
 18 2017-05-11 17:18:05 <ineb> is this because of the nonce from the pool?
 19 2017-05-11 17:18:32 <abpa> The way to win is to get a hash that matches a special pattern
 20 2017-05-11 17:18:44 <abpa> The hash is derived from many things, including the payout addresses
 21 2017-05-11 17:18:56 <abpa> You can't change the payout addresses after you win
 22 2017-05-11 17:18:58 <ineb> ahh
 23 2017-05-11 17:19:21 <ineb> that makes sense now
 24 2017-05-11 17:19:40 <ineb> ok i will look futher into it. thanks for your information
 25 2017-05-11 17:19:44 <abpa> np
 26 2017-05-11 18:19:33 <suryab> anyone have any thoughts on why a Bitcoin node would log `sending alert peer=145` before disconnecting from me? I looked up alerts and looks like they are an old thing
 27 2017-05-11 18:19:42 <suryab> to my knowledge the bitcoin code is up to date
 28 2017-05-11 18:21:48 <achow101> suryab: core 0.14.0 sends a max sequence alert to ensure that all old nodes know that the alert system is disabled.
 29 2017-05-11 18:22:09 <achow101> suryab: https://bitcoin.org/en/alert/2016-11-01-alert-retirement
 30 2017-05-11 18:22:54 <arubi> suryab, do you have the useragent for that peer?  maybe one of these tracking peers that "ping" you and disconnect right after
 31 2017-05-11 18:24:30 <suryab> hmmm,
 32 2017-05-11 18:24:54 <suryab> so i tell the node that my version number is 70002
 33 2017-05-11 18:25:37 <arubi> I think that's the wallet version
 34 2017-05-11 18:25:42 <suryab> i actually have two bitcoin nodes that I'm running and want one to connect to the other
 35 2017-05-11 18:26:05 <suryab> one of them is relatively old and the other one is completely new
 36 2017-05-11 18:26:09 <arubi> that's the most convoluted XY problem I ever witnessed :)
 37 2017-05-11 18:27:08 <suryab> 2017-05-11 18:13:46 receive version message: <subversion>: version 70002, blocks=346110, us=72.36.89.11:8884, peer=185 2017-05-11 18:13:46 sending alert (168 bytes) peer=185 2017-05-11 18:14:42 disconnecting peer=185
 38 2017-05-11 18:27:46 <arubi> try with -whitelist
 39 2017-05-11 18:28:01 <arubi> on the serving node.  -connect on the client node
 40 2017-05-11 18:28:53 <suryab> i'll give that a try but do you have any idea what could be causing this?
 41 2017-05-11 18:29:08 <arubi> I'm guessing your node just wants to connect to witness nodes
 42 2017-05-11 18:29:47 <arubi> the new one that is
 43 2017-05-11 18:29:47 <suryab> even if this is on mainnet?
 44 2017-05-11 18:29:54 <arubi> especially on mainnet
 45 2017-05-11 18:30:06 <achow101> suryab: core 0.13.0+ won't use its outbound connections to non-segwit nodes
 46 2017-05-11 18:30:19 <achow101> you should be able to override that with -whitelist and -addnode
 47 2017-05-11 18:30:44 <suryab> the new node isn't creating an outbound connection, i'm connectingg to it fro the other node
 48 2017-05-11 18:32:05 <arubi> best to try with whitelist and addnode before trying to debug further
 49 2017-05-11 18:32:11 <suryab> okay
 50 2017-05-11 18:32:31 <arubi> it could be that the ip's are similar, slots are exhausted..
 51 2017-05-11 18:33:10 <arubi> I /think/ a node avoids connecting to "near by" peers..  not sure
 52 2017-05-11 21:22:58 <RainMan28> i'm trying to use the coinb.in tool to create a raw txn in order to bump the miner fee for some coins that are waiting to confirm to my wallet. Could anyone help me please? I am not sure what to enter for vout or script.
 53 2017-05-11 21:25:39 <abpa> RainMan28 was your transaction flagged RBF?
 54 2017-05-11 21:26:19 <RainMan28> abpa: no, I am the receiving party though, and was hoping to use my receiving address' private key to create a new raw txn to myself with a higher fee
 55 2017-05-11 21:27:01 <abpa> So child pays for parent?
 56 2017-05-11 21:27:05 <RainMan28> yes
 57 2017-05-11 21:27:24 <RainMan28> but I am trying to use the coinb.in tool to create the transaction and am not sure what to enter in for vout and script fields for the input
 58 2017-05-11 21:28:10 <abpa> Why don't you just use a normal wallet
 59 2017-05-11 21:28:53 <RainMan28> the coins were sent to my bitcoind wallet but the node doesn't see the transaction because the fee paid was way too low and isn't being relayed by other nodes
 60 2017-05-11 21:29:13 <RainMan28> if there's another way to do this thats easier, I'm all ears though
 61 2017-05-11 21:30:15 <abpa> If the fee is too low to be relayed, how will child pays for parent work?
 62 2017-05-11 21:30:30 <abpa> You could try submitting the raw transaction to your own node though
 63 2017-05-11 21:30:37 <abpa> sendrawtransaction
 64 2017-05-11 21:32:26 <RainMan28> abpa: maybe I don't understand CPFP correctly but won't I be able to use some of the output amount as the miner fee and can't I make the miner fee larger that way?
 65 2017-05-11 21:32:38 <RainMan28> How can I get the raw transaction?
 66 2017-05-11 21:32:56 <abpa> What is the transaction id?
 67 2017-05-11 21:32:56 <RainMan28> here is the txid: https://blockchain.info/tx/db42ec6e7d8d70889886b89dd43b4f34f9d694aca1aeb1b9e17f60cd660736f2?show_adv=true
 68 2017-05-11 21:33:44 <achow101> RainMan28: low fee isn't your only problem. There's also the fact that that transaction spends from another unconfirmed transaction which has an even low fee
 69 2017-05-11 21:34:07 <abpa> wow, low fee
 70 2017-05-11 21:34:14 <abpa> that is below the min relay fee so it might not get to the miners at all
 71 2017-05-11 21:34:25 <abpa> that would mean you couldn't use child pays for parent since they wouldn't know your parent
 72 2017-05-11 21:36:01 <RainMan28> I see. So I can't just pay a high enough fee to be high enough for both txns?
 73 2017-05-11 21:36:25 <abpa> Normally you can if the tx fee is high enough to be relayed
 74 2017-05-11 21:36:46 <achow101> RainMan28: You should be able to
 75 2017-05-11 21:37:19 <RainMan28> ok so I want to pay like 0.005 BTC as a fee, that should be high enough to get them both included easily
 76 2017-05-11 21:38:01 <achow101> don't go by a fixed fee, use fee rate instead and calculate what the aggregate fees for all three of the transactions should be. then use that as the fee for the cpfp transaction
 77 2017-05-11 21:41:32 <RainMan28> achow101: ok that part i can handle, what i don't know how to do is how to create the transaction
 78 2017-05-11 21:42:56 <RainMan28> on coinb.in's new transaction tool, https://coinb.in/#newTransaction, it asks for outputs and inputs. I place my new receive address in the output. For inputs, it wants the transaction ID, and N, and script. I don't know what N and Script are supposed to be.
 79 2017-05-11 21:44:22 <achow101> N is the output index of the output you want to spend. script is the script associated with that output
 80 2017-05-11 21:46:12 <achow101> the output index starts from 0. For example, if you want to spend the output going to 14qgdqnQT7F4RiSWne2QrjwFn4warqEfTh, the output index is 1 and the script is 76a9202a1d6de72a50dba70848ed01a142d65a86adaf63878ac
 81 2017-05-11 21:46:35 <RainMan28> how did you determine that achow101?
 82 2017-05-11 21:46:41 <RainMan28> that is the gap in my knowledge
 83 2017-05-11 21:47:28 <achow101> look at your transaction that you posted and make sure that you are in advanced mode on blockchain.info so it shows all inputs, outputs, and scripts
 84 2017-05-11 21:48:05 <achow101> look in the outputs side of the transaction. starting from 0, count from the top down until you reach the output you want to spend. Whatever number you get is the output index
 85 2017-05-11 21:49:01 <RainMan28> Ok i have seen blockchain.info show the output addresses in different sequences before on page reloads before so i wasn't sure if that was how it works
 86 2017-05-11 21:49:18 <achow101> scroll down to the bottom where it says output scripts. again, starting from 0, find the output script for your transaction by counting from the top down until you get to the number of the output index. whichever script you are on is the output script that you want to spend
 87 2017-05-11 21:49:44 <achow101> I've never seen blockchain.info do that before
 88 2017-05-11 21:50:47 <RainMan28> achow101: ok i must be mistaken. now for the input script i do the same thing? I start from 0 and count to 1 (the second one)?
 89 2017-05-11 21:51:35 <RainMan28> oh wait I don't need the input scripts from that txid, just the output scripts
 90 2017-05-11 21:51:37 <achow101> what I described is how you get the numbers to enter for the inputs section of coinb.in's transaction maker
 91 2017-05-11 21:51:58 <achow101> right, it's all based on outputs
 92 2017-05-11 21:52:14 <achow101> but finding input scripts works in the same way
 93 2017-05-11 21:54:13 <RainMan28> achow101: so i see the following as the script: OP_DUP OP_HASH160 2a1d6de72a50dba70848ed01a142d65a86adaf63 OP_EQUALVERIFY OP_CHECKSIG   but what you pasted is different?
 94 2017-05-11 21:54:23 <RainMan28> you said the script is:  76a9202a1d6de72a50dba70848ed01a142d65a86adaf63878ac
 95 2017-05-11 21:55:06 <achow101> coinb.in only takes the hex of the script itself, not the names of the opcodes.
 96 2017-05-11 21:55:32 <achow101> OP_DUP is 76, OP_HASH160 is a9, 20 is for the length of the hash that follows, OP_EQUALVERIFY is 88 and OP_CHECKSIG is ac
 97 2017-05-11 21:56:01 <achow101> A list of opcodes can be found here: https://en.bitcoin.it/wiki/Script
 98 2017-05-11 21:56:08 <RainMan28> are you a wizard
 99 2017-05-11 21:56:28 <achow101> nope :D
100 2017-05-11 21:56:40 <achow101> I just know the output formats after staring at them for a long time now
101 2017-05-11 21:57:36 <RainMan28> achow101: very nice. so i tried to create, and sign the transaction and now I am receiving this error when broadcasting: 64: scriptsig-not-pushonly
102 2017-05-11 21:58:09 <achow101> don't use coinb.in to sign transactions. something is wrong with their signer. Use bitcoind instead
103 2017-05-11 21:58:25 <RainMan28> doh!
104 2017-05-11 21:59:37 <RainMan28> ok so i see that i have to do bitcoin-cli signrawtransaction
105 2017-05-11 21:59:54 <RainMan28> but is the hexstring what coinb.in generated for me
106 2017-05-11 21:59:57 <achow101> yes
107 2017-05-11 22:00:31 <achow101> since your bitcoind doesn't have the previous transaction, you will also need to supply the outputs array too. that will just have the info that you got for coinb.in
108 2017-05-11 22:03:57 <RainMan28> achow101: ok i am trying to follow along here
109 2017-05-11 22:04:02 <RainMan28> the first part is the hexstring which I have
110 2017-05-11 22:06:07 <RainMan28> then i do {"tx_id":"id" so in this part i put the txid where it says "id" ?
111 2017-05-11 22:06:10 <achow101> your full command should be this: bitcoin-cli signrawtransaction <hex> '[{"txid":"db42ec6e7d8d70889886b89dd43b4f34f9d694aca1aeb1b9e17f60cd660736f2","vout":1,"scriptPubKey": "76a9202a1d6de72a50dba70848ed01a142d65a86adaf63878ac","amount":0.82848}]'
112 2017-05-11 22:06:29 <achow101> obviously replace <hex> with the hextring you got from coinbin
113 2017-05-11 22:06:36 <RainMan28> you're the man
114 2017-05-11 22:06:40 <RainMan28> thank you so much
115 2017-05-11 22:07:11 <achow101> use decoderawtransaction with the hex that signrawtransaction spits out to double check that everything is right before you send it
116 2017-05-11 22:07:27 <RainMan28> ok
117 2017-05-11 22:07:54 <achow101> make sure that the fee is right. its the most important part :)
118 2017-05-11 22:08:13 <RainMan28> blah it is telling me that the scriptPubKey must be hexadecimal string
119 2017-05-11 22:09:44 <achow101> could you paste your full command?
120 2017-05-11 22:09:48 <RainMan28> sure
121 2017-05-11 22:10:06 <RainMan28> bitcoin-cli signrawtransaction 0100000001f2360766cd607fe1b9b1aea1ac94d6f9344f3bd49db8869888708d7d6eec42db010000001a76a9202a1d6de72a50dba70848ed01a142d65a86adaf63878a0cffffffff01c0e6e004000000001976a914c997567d6e073832ea6cf51226a4dfff918447fe88ac00000000 '[{"txid":"db42ec6e7d8d70889886b89dd43b4f34f9d694aca1aeb1b9e17f60cd660736f2","vout":1,"scriptPubKey": "76a9202a1d6de72a50dba70848ed01a142d65a86ada
122 2017-05-11 22:10:06 <RainMan28> f63878ac","amount":0.82848}]'
123 2017-05-11 22:11:24 <achow101> try removing the space after "scriptPubKey":
124 2017-05-11 22:11:28 <RainMan28> ok
125 2017-05-11 22:11:31 <achow101> I don't remember if whitespace matters, but it might
126 2017-05-11 22:11:48 <RainMan28> scriptPubKey must be hexadecimal string (not '76a9202a1d6de72a50dba70848ed01a142d65a86adaf63878ac')
127 2017-05-11 22:12:19 <achow101> oh, I see it now. I forget an extra 8 before ac at the end
128 2017-05-11 22:12:38 <RainMan28> ah nice
129 2017-05-11 22:12:46 <RainMan28> that worked, but gave a different error
130 2017-05-11 22:13:06 <achow101> err. actually the script is 76a9202a1d6de72a50dba70848ed01a142d65a86adaf6388ac
131 2017-05-11 22:13:11 <RainMan28> oh ok
132 2017-05-11 22:13:58 <RainMan28> achow101: https://dpaste.de/wOk0
133 2017-05-11 22:15:06 <achow101> bleh. I remembered the format wrong. it's actually 76a9142a1d6de72a50dba70848ed01a142d65a86adaf6388ac. this time its right, I pulled it from the raw transaction itself :D
134 2017-05-11 22:15:19 <RainMan28> No problem, thank you!!
135 2017-05-11 22:15:43 <achow101> np
136 2017-05-11 22:15:46 <RainMan28> that worked
137 2017-05-11 22:15:49 <RainMan28> now i will decode it
138 2017-05-11 22:16:41 <RainMan28> looks good!
139 2017-05-11 22:16:50 <achow101> great. you can send it with sendrawtransaction
140 2017-05-11 22:17:06 <achow101> and then hope that miners use CPFP
141 2017-05-11 22:20:13 <RainMan28> error code: -25
142 2017-05-11 22:20:14 <RainMan28> error message:
143 2017-05-11 22:20:14 <RainMan28> Missing inputs
144 2017-05-11 22:20:23 <RainMan28> when i tried to do bitcoin-cli sendrawtransaction
145 2017-05-11 22:20:30 <RainMan28> with the raw hash
146 2017-05-11 22:20:44 <achow101> derp. your node doesn't have the previous transaction, so it can't accept your transaction
147 2017-05-11 22:20:58 <RainMan28> oh right
148 2017-05-11 22:21:00 <RainMan28> you mentioned that
149 2017-05-11 22:21:33 <achow101> just use some transaction broadcasting service. blockchain.info has one
150 2017-05-11 22:21:43 <RainMan28> OK
151 2017-05-11 22:24:08 <RainMan28> wow achow101 that worked
152 2017-05-11 22:24:12 <RainMan28> you are awesome
153 2017-05-11 22:24:16 <RainMan28> that is some complicated stuff
154 2017-05-11 22:25:42 <achow101> RainMan28: no problem.
155 2017-05-11 22:26:02 <achow101> lol. 5,235.602 sat/B I think you're getting into absurd fee territory there :p
156 2017-05-11 22:29:43 <RainMan28> achow101: haha it is cheaper than asking ViaBTC to mine it.
157 2017-05-11 22:29:50 <RainMan28> achow101: I have actually one more so am going to try to do this one myself