doublespend.cash icon indicating copy to clipboard operation
doublespend.cash copied to clipboard

Use date+number to derive double spend hash

Open theBergmann opened this issue 6 years ago • 8 comments

I thought about using the json-api of doublespend.cash to collect information about double spends and create statistics.

To do so I need to know the url before querying the api. With urls like /txdata/cc4d87dc905b913ef4af8020e54f6dfda4a3017e.json it seems impossible to write the program (at least for me :) If you however derive the hash from something like date+number - for example: 2018062501, 2018062502 etc. - you can easily query the json-api to collect data about doublespends.

@GitCash send 0.005 bch to @dagurval

Update: I think it is this line: "h.update(txid_first.encode() + txid_second.encode())" in this file https://github.com/dagurval/doublespend.cash/blob/master/respend/txdata.py

I guess replacing it with (date+k) requires some kind of loop to count k ...

theBergmann avatar Jun 25 '18 10:06 theBergmann

GitCash Tip Response @dagurval

GitCash avatar Jun 25 '18 10:06 GitCash

Oh, that was a bit low ... nice to see it working ... draining my account :) @GitCash spend 0.01 bch to @dagurval

theBergmann avatar Jun 25 '18 10:06 theBergmann

GitCash Tip Response @dagurval

GitCash avatar Jun 25 '18 10:06 GitCash

Would creating a static index of all double spends allow you create the statistics you're after?

For example txdata/index.json with array of

{
   'firstseen' : timestamp,
   'tx1' : txid,
   'tx2' : txid,
   'rawdata' : 'cc4d87dc905b913ef4af8020e54f6dfda4a3017e.json'
}

dagurval avatar Jun 25 '18 11:06 dagurval

If it doesn't get too large, it would be perfect.

theBergmann avatar Jun 25 '18 11:06 theBergmann

I'll forward your tip into a bounty :-)

Bounty: Create an index as described in comment above.

@chaintip 180 days

dagurval avatar Jun 25 '18 11:06 dagurval

I've made a data dump of all the double spends available as a tar.gz file on the website

dagurval avatar Sep 13 '18 07:09 dagurval

Thank you @testtip! 0.01536902 BCH| ~ 8.26 USD has now been tipped to this issue. To claim this bounty, get a pull request merged with @chaintip fixes #2 in the creation comment.

chaintip avatar Sep 28 '18 22:09 chaintip