Transcript for #bitcoin-dev 2017/10/14

12:44 shmoon I have a question regarding https://bitcoin.org/en/developer-guide#pubkey - Is it referring to the fact that in txn outputs public key (derived from private key) isn't directly used because it is insecure but instead a public key hash is used (derived from public key, as specific in the P2PKH section) ?
12:50 esotericnonsense shmoon: yep
12:50 esotericnonsense shmoon: 'insecure' is an exaggeration, less secure is more accurate
12:51 shmoon esotericnonsense: In that case I have 2 follow up questions, 1. Howcome multisig as defined here https://bitcoin.org/en/developer-guide#multisig use public keys then and not public key hashes ? and 2. How are public key insecure and public key hash which is derived form the same piece of data, i.e., public key, secure ?
12:51 shmoon infact if you see the first example under multi sig that's pretty much a P2PKH transaction but instead of using key hashes its using the key itself.
12:52 esotericnonsense shmoon: notice 'Although P2SH multisig is now generally used for multisig transactions'
12:52 shmoon the P2SH multisig also uses public keys not hashes :D
12:53 esotericnonsense yes but the pubkeys are not revealed until the spending/scriptsig stage
12:53 esotericnonsense (as is also true for single p2pkh)
12:55 esotericnonsense you can think of p2pkh as sort of being a special case of p2sh
12:55 esotericnonsense it precedes the introduction of p2sh
12:55 shmoon no they are revealed in the pubkey script stage (output of previosu transaction) ?
12:56 esotericnonsense shmoon: a p2sh outputs's scriptpubkey is op_hash160 hash op_equal
12:56 shmoon The `Pubkey script` or `Redeem script` in multisig of P2SH or the simple one has the public key
12:56 esotericnonsense shmoon: yeah that's not the p2sh multisig that's bare multisig
12:57 esotericnonsense the redeem script p2sh one is not revealed until spending
12:57 esotericnonsense only the hash is in the pubkey script
12:58 esotericnonsense the sigscript for p2sh looks like 'rest of sig script' 'push redeem script'; the sigscript actually contains the redeem script
12:59 shmoon you mean redeem script (that contains public key) is with signature script only - part of input of the transaction that spends the UTXO ?
12:59 esotericnonsense yes, it's split into three (pubkey script, redeem script, signature script) because the redeem script is pushed as part of the sigscript, not just concatenated
13:00 esotericnonsense it's just more readable that way I think rather than having sigscript say something like OP_0 <A sig> <C sig> < OP_2 <A pubkey> .... > and having nested pushes
13:00 shmoon oh I though redeem was pushed with scriptpubkey
13:00 esotericnonsense nope, just the hash
13:01 shmoon ah got it now, maybe the documentation can be changed in that case. would make it less readable but more understandable!
13:02 shmoon but still why not use pubhash instead of pubkey and save on space! :)
13:06 esotericnonsense shmoon: it wouldn't save space because you'd have to give the pubkey with the signature
13:06 esotericnonsense shmoon: notice that in the bare multisig case there the sigscript only contains sigs and not sig + pubkey
13:08 esotericnonsense shmoon: p2sh already provides security of the pubkeys prior to spending because all that's in the chain (e.g. the p2sh address) is a hash of the redeem script
13:08 esotericnonsense so you'd be hashing some hashes
14:15 camarads hey guys. is there any way to see the ancestors or descendants of a txid using bitcoind rpc api ?
14:15 camarads the tx id's are generated by me.
17:18 ZiNC Hey.
17:20 ZiNC I'm trying to understand a few tech details, though from an end-user perspective. I hope the #'s right place.
17:55 Sentineo ZiNC: #bitcoin is mutch better suited for you then, please ask there
17:56 ZiNC No luck so far, but alright.
18:48 shmoon esotericnonsense: thanks that was helpful :)
19:02 shmoon esotericnonsense: still around ?
19:32 camarads hey guys. does somebody know the bitcoind cmd to list all the unconfirmed transactions from my wallet ?
19:39 arubi bitcoin-cli listunspent 0 0 ?
19:50 shmoon Trying to understand https://bitcoin.org/en/developer-guide#null-data - my understanding is these are empty transactions without any inputs and only outputs which contain amounts as 0 and pubkey as OP_RETURN 83 bytes data. Idea is to be able to store random data inside the block that can be used for some specific bookkeeping purpose. Is my understanding correct ?
19:50 shmoon the guide also says they can be automaticlaly pruned, not sure if I understand the meaning of that. Can somebody explain that as well.
19:58 camarads arubi nope, that is the unspent transactions, i want the entire list of unconfirmed transactions from my wallet
19:59 arubi that should give you unspent outputs in your wallet that have zero confirmations I think
20:00 camarads i need all my unconfirmed transactions, not only the unspent outputs
20:01 arubi you you mean outbound
20:01 camarads don't know the term outbound , sorry :|
20:02 arubi you mean unconfirmed transactions that you sent?
20:02 camarads yes
20:03 arubi bitcoin-cli listtransactions | grep -A1 'confirmations": 0,'
20:04 camarads nope. it shows 10 lines
20:04 camarads i have more than that unconfirmed
20:05 arubi not sure, that's a list of transactions in your wallet with 0 confirmations
20:05 camarads i've read the help file but didn't find
22:33 iwkse hi, I was going to sync the blockchain and I get a segfault running the core, https://pastebin.com/536YyKVe
22:34 iwkse datadir is on an external usb disk