Transcript for #bitcoin-dev 2018/01/09

06:24 conman question: can bech32 addresses be used in generation transactions?
06:25 arubi addresses are not in transactions at all, scriptpubkeys are. and yes, native segwit scripts are possible in generation tx outputs
06:26 conman thanks is there a document anywhere describing this? I've not found much on bech32 on searching
06:27 arubi describing what exactly? bech32 and segwit scritpubkeys in transactions are unrelated
06:27 conman well
06:28 conman how to get a segwit scriptpubkey from bech32 to use in a generation transaction... I guess that's all it is?
06:29 arubi why not just set the output to a segwit scriptpubkey like you normally would to a p2pkh or p2pk ?
06:29 arubi bech32 is encoding, not script
06:30 arubi if you have miner software that asks you for an encoded address, then you'll have to check if that software supports bech32 itself first
06:30 conman when decoded is it a pk?
06:31 conman sorry if I'm missing details...
06:31 arubi not necessarily
06:31 conman so when decoded it can decode to a key hash or a script hash?
06:31 arubi for version 0 witness, yes, but can be other things on newer versions
06:31 arubi currently version 0 is the only one defined
06:32 arubi higher versions are just evaluated to true, so anyone-can-spend
06:32 arubi can you explain what you're trying to do exactly?
06:32 conman ok so if I were to implement a gen txn to a bech32 address, I'd decode it and then treat it like any p2kh or p2sh transaction?
06:32 arubi no, you'll treat it as p2wpkh or p2wsh script
06:32 conman I'm trying to figure out how to create a generation transaction "to" a bech32 address (I know it's not directly to the address)
06:34 arubi do you know how to construct segwit scriptpubkeys at all? the fact that it's generation tx doesn't matter
06:36 conman um
06:37 arubi have to go to work. these are segwit programs : https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#Witness_program , this is how to encode bech32 : https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki .
06:37 conman thanks
06:37 conman appreciate it
10:13 Qint He guys, i'm a security researcher and would like to recommend a change to a certain BIP. What is the best way to do this?
10:39 echeveria Qint: complain on the mailing list.
10:39 echeveria Qint: what's your change?
10:44 Qint echeveria: complain... great choice of words
10:44 echeveria it's bitcoin-dev.
10:44 echeveria it's complaining, people who haven't done googling, mixed in with sensible stuff :)
11:21 Qint echeveria: done
11:22 Qint Pending review