Transcript for #bitcoin-dev 2017/11/26

01:41 garit If bitcoin will continue to grow in price, it will continue to be more expensive in terms of energy. Currently it takes about 225 kwh per transaction. I realise that this is more of a market issue, not technical, but still, is there a way to fix this?
01:46 cncr04s 225kwh per transaction?
01:47 cncr04s I don't even have that much power
01:47 cncr04s so I doubt thats true
01:47 cncr04s per block mabye..
01:50 garit Current power is 343 megawatts, or 57 Mwh per block
01:50 garit cncr04s: this is based on miner expenses, not user expenses
03:05 eck when it says time is not present in version messages, does that mean time should be zeroed, or omitted entirely?
06:55 jonasschnelli eck: the version message contains two addr's, those don't have a time field.
06:55 jonasschnelli (not null, it's omitted)
10:10 _flow_ I'm playing around with testnet3 and generate(toaddress) in an attempt to (cpu) mine a testnet block. I issue "generate 6000" which causes a few "CreateNewBlock()" log messages followed by "keypool return". Did I mine a block, or did something go wrong, or did I something wrong?
13:18 hkjn0 @mlz: sorry for lack of reply yesterday, but reason I'm setting -reindex is because bitcoind doesn't start otherwise, with message 'You need to rebuild the database using -reindex to change -txindex'
13:19 hkjn0 I'm doing IBD again now with txindex=1 set and clean data directory, but would like to understand why blocks seem to need to be downloaded again with -reindex
13:59 buZz because you deleted data directory?
14:36 tlim Hi, this is my first time on bitcoin-dev and I have a few questions regarding collecting stats of transaction fees. Would someone be free to answer them?
15:33 aFeijo hi guys! Anyone use the bitfinex api? I cant find one function from their API that return all altcoins rates. It wouldnt be a good idea to call the API for each coin
15:56 hkjn0 buZz: I moved away the old data directory *after* finding that my node started syncing down all blocks when running with -reindex. I do realize that without a data directory, the node needs to sync down the blockchain :)
15:57 buZz heh ok
15:57 buZz reindexing with a nonpruned blockchain doesnt download anything, afaik
16:20 hkjn0 right, thus my confusion.. oh well, can maybe dig into the code to try to figure it out later, for now I'll just redownload with txindex=1
18:31 johnnylulz hi. hav downloaded bitcoin source. found a genesis block with GenesisBlockZero within 2 hours. edited chainparams.cpp. compiled bitcoin. bitcoind starts successfully. run cpuminer for 1 day and no new block found. what am I doing wrong?
18:33 garit johnnylulz: can you check the complexity of mining in your system?
18:33 garit it looks like you try to make a new blockchain , and you expect to see low complexity, and something isnt right
18:35 johnnylulz yes, i need a new blockchain for tests
18:35 johnnylulz how to check complexity?
18:38 garit I don't know, sorry
18:38 johnnylulz ok thx
18:59 garit What algorithm is in bitcoin private address key? (key that allows to spend btc)
19:00 arubi what do you mean?
19:01 garit When i send money from address X i also add some crypto thing to show others that i poses the right to use address X, right?
19:02 arubi the second part is right. you never send from an address
19:02 arubi you do add signatures to some already predetermined script, and if that turns out to result to true then your spend of the coins is valid
19:03 garit What signature algorithm is used that verifies the ownership of an adress?
19:03 arubi ECDSA
19:03 arubi specifically, secp256k1 is the curve
19:04 garit Thanks
19:04 arubi cheers
19:12 garit Lets assume fake transaction and valid block attack. A miner adds fake transaction from address X that he has no key to so he adds random data instead. But apart from this the block is valid. Will other miners check every transaction in a block? What if miner adds fake transaction into block 1 and mines second valid block on top? Will miners just check the top block, or all the chain?
19:13 arubi the block can't be valid with an invalid transaction in it
19:13 arubi it might have valid proof of work, but that doesn't make a difference
19:14 garit Question is will miners accept this block in case if a valid block is added on top? By the same miner for example
19:14 arubi why would they accept it if it's invalid?
19:15 arubi you don't just skip validation. you validate everything
19:15 arubi if one block is invalid, then the whole chain from that point on is invalid, it's that simple
19:16 garit Okay, thanks, i wanted to ensure that miners check every block
19:16 arubi hopefully!
19:17 arubi if you just check the proof of work, you could get fooled, but the other party just wasted a bunch of resources to mine an invalid block
19:21 txter garit: You might like the book 'Mastering bitcoin', it will answer many of these questions in more detail
19:24 puchu hi
19:25 puchu how long does a tx stay unconfirmed in the mempool when it's not rebroadcasted?
19:27 arubi puchu, if it's in your wallet, it's there forever
19:28 arubi what do you really want to do?
19:28 mlz arubi, it's supposed to be dropped after two weeks
19:29 arubi just the odd transaction, sure. but if it's the wallet's transaction, it's in the wallet forever and it'll be retried every time
19:29 mlz ah yes
19:29 arubi maybe some difference in if it's received or sent.. actually I don't know. I hope not :)
19:30 puchu i have a stuck transaction pedning for 3 days. i just payed the minimum fee
19:30 arubi is that fee enough to get it through right now? can you tell the fee?
19:37 puchu i don't tihnk so. it's 192sat
19:37 puchu arubi:
19:37 arubi that doesn't tell me much. what's the fee, and how many bytes is the transaction?
19:38 arubi is it your transaction? or did someone send it to you?
19:39 arubi if it's yours, are you sending to yourself?
19:39 arubi it's important because even though it's unconfirmed, it's still valid and the recipient can use it at any point. so I'm trying to figure our what your end goal is
19:40 arubi also I'm about to be afk, so if you're here later on we could continue then :)
19:42 puchu 1.005 sat/B - size 191 (bytes)
19:43 puchu Fee 0.00000192 BTC
19:44 garit puchu: what is your goal? Delete the transaction? You could edit the wallet manually. Make this transaction happen? probably could send a second transaction from an end address but with a higher fee. Or delete + send again with higher fee
19:45 arubi no need to edit manually, it's possible to discard it from mempool with commands, but it really doesn't do anything if you already relayed it
19:46 arubi the other person could just cpfp and get the money at some point
19:50 garit arubi: he can sent this coins elsewhere and then receiver wont be able to spend them
19:50 arubi right! double spend, but it's hard to do when it's still in the node's mempool and not abandoned from the wallet :)
19:50 arubi /dinner
19:55 garit You could try to flood low fee transactions to clear the mempool (i doubt they store 2 weeks. More likely X megabytes of data)
19:56 mlz wat
19:57 garit mlz: do you expect nodes to have u limited storage for mempool?
19:57 garit Unlimited*
19:58 mlz what do you mean?
19:58 puchu the mempool is a fifo when it runs full
19:59 puchu or better the lowest fee leaves at first :)
19:59 garit mlz: what should mempool do in case of flood?
19:59 mlz nothing?
20:01 mlz puchu, you can try CPFP like arubi said, or the receiver can try it
20:02 garit mlz: keep recording gigabytes of data? delete old entries? Ignore neW entries?
20:06 esotericnonsense as far as i'm aware it's trimmed to a fee level
20:06 esotericnonsense txmempool.cpp has a TrimToSize function that looks to do that
20:07 garit So in order to flush transaction X from a mempool you need to flood it with lots of transactions with a bit higher fee
20:07 esotericnonsense very much a lot, the standard mempool size iirc is 300MiB usage which is about 100MiB tx
20:09 garit Figuring out what is a current composition of mempool would help too (may be your tx isnt even included)
20:11 esotericnonsense it depends on the node but it probably is
20:11 esotericnonsense i have less than 75MiB for the last week
20:12 mlz there're always nodes that run with 0 fee relay