Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use date+number to derive double spend hash #2

Open
theBergmann opened this issue Jun 25, 2018 · 8 comments
Open

Use date+number to derive double spend hash #2

theBergmann opened this issue Jun 25, 2018 · 8 comments

Comments

@theBergmann
Copy link

theBergmann commented Jun 25, 2018

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 ...

@GitCash
Copy link

GitCash commented Jun 25, 2018

GitCash Tip Response
@dagurval

@theBergmann
Copy link
Author

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

@GitCash
Copy link

GitCash commented Jun 25, 2018

GitCash Tip Response
@dagurval

@dagurval
Copy link
Owner

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'
}

@theBergmann
Copy link
Author

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

@dagurval
Copy link
Owner

dagurval commented Jun 25, 2018

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

Bounty: Create an index as described in comment above.

@chaintip 180 days

@dagurval
Copy link
Owner

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

@chaintip
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants