kai1 2017-01-20 08:08:48
hi everyone
kai1 2017-01-20 08:12:23
if someone might help me, following sceneario (using bitcoinj, if that makes a difference): i get a transaction from somebody, i want to check that it is in the block chain. i could check that by adding the tx hash into the bloom filter and then send getdata msgs of the probably blocks, but i would need to check many blocks if my partner who sent me the tx doesn't tell me the blocknumber the tx is contained
kai1 2017-01-20 08:12:26
in
gmaxwell 2017-01-20 08:13:06
kai1: the somebody could just give you a proof that its in the chain.
fireduck 2017-01-20 08:13:34
kai1: There are a lot of ways to use bitcoinj. One of them is that you start it up and tell it what addresses you have (in a wallet object) and it will watch for transactions to that wallet as it keeps up iwth the block chain
fireduck 2017-01-20 08:13:59
but bitcoinj is a pretty flexible library, you can do any number of dumb things with it
fireduck 2017-01-20 08:14:38
I certainly have
kai1 2017-01-20 08:17:19
gmaxwell: you mean the partner sends me the blockheader and merklebranch directly? if i had the blocknumber i could do just a getdata msg with the adjusted bloom filter right?
kai1 2017-01-20 08:17:38
or blockheadernumber
kai1 2017-01-20 08:17:41
of course
abpa 2017-01-20 08:17:43
If you have a transaction id you can request that someone give you a bunch of merkle hashes that when put together hash to the merkle root in the block header
kai1 2017-01-20 08:18:12
abpa: transaction id == tx hash?
abpa 2017-01-20 08:18:15
Yeah
abpa 2017-01-20 08:18:35
Of course knowing that the headers are valid is another story, all you can tell is that they are basically ok, like that they have a valid proof of work
kai1 2017-01-20 08:18:38
abpa: but that someone needs to know which blockheader it is in, right?
abpa 2017-01-20 08:19:06
If they know the transaction id and they have the blockchain it shouldn't be too hard to figure out
gmaxwell 2017-01-20 08:19:09
kai1: yes, they send you a txoutproof.
kai1 2017-01-20 08:21:16
gmaxwell: ok thanks
fireduck 2017-01-20 08:22:08
gmaxwell: is there a standard form for that? Should we be doing that in electrum?
gmaxwell 2017-01-20 08:23:22
fireduck: there has been in bitcoin core for a long time, implemented by gettxoutproof/verifytxoutproof
fireduck 2017-01-20 08:23:49
taking a look now
whilhelm 2017-01-20 08:31:15
!Help
gribble 2017-01-20 08:31:15
The bot responds when you start a line with the ! character. A good starting point for exploring the bot is the !facts command. You can also visit the bot's website for a list of help topics and documentation: http://gribble.sourceforge.net/
whilhelm 2017-01-20 08:31:34
!Facts
gribble 2017-01-20 08:31:35
To see a nice sortable web view of all factoids, click here: http://gribble.dreamhosters.com/viewfactoids.php?db=%23bitcoin || To see a list of the most popular factoids, run !rank || To search factoids, run !factoids search
whilhelm 2017-01-20 08:31:51
!tip
gribble 2017-01-20 08:31:52
Error: "tip" is not a valid command.
kai1 2017-01-20 08:32:25
fireduck: are you an electrum dev?
fireduck 2017-01-20 08:37:46
I wrote one of the server implementations and now that I look at it we are doing the merkle proof thing
fireduck 2017-01-20 08:37:55
I have a brain malfunction and was thinking something else