Bitcoin Forum
July 05, 2024, 11:06:53 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 [2] 3 4 5 »
21  Bitcoin / Development & Technical Discussion / Re: Get list of all addresses with a balance over x? on: January 08, 2014, 10:04:05 PM
What do you mean?  The percent of all possible addresses which have been used to date is probably something like 0.00000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000 01%
22  Bitcoin / Development & Technical Discussion / Re: Get list of all addresses with a balance over x? on: January 08, 2014, 09:36:28 PM
If you have a 64bit windows machine and the entire blockchain on your hard drive you can use this console app:

First, download an unzip the console app.

https://drive.google.com/file/d/0BwdyTvSh6bUkazZLRk1CQkVsNXM/edit?usp=sharing

Run blockchain.exe passing in the command line argument of wherever the blk?Huh?.dat files are on your machine.

Example: blockchain.exe c:\Users\YourName\AppData\Roaming\Bitcoin\blocks

Once the program comes up, type the command: "scan" and hit enter.  This will scan all of the blockchain.

Next, enable gathering address statistics by typing "statistics" and hitting enter. Warning you must have a lot of memory and swap available on your machine!

Next, type "process" and hit enter.

When that is done you can decide the minimum balance addresses you want to know about.  Say you want all addresses with more than 1000 bitcoins.  Then type: "min_balance 1000" and hit enter.

Now, to get a report of the top 100 addresses with a balance over a thousand type: "top_balance 100"

Scanning and processing the blockchain may take a long time on your machine (several minutes) the first time you run it.  However, doing queries against it once it has been parsed is immediate.

You can also report the oldest addresses by using the command 'oldest' and you can get stats for 'zombie' addresses by typing 'zombie' followed by the number of days.  So, if you type 'zombie 365' it will report stats about how many addresses (higher than the min balance and older than one year).

If somebody wants to build this for Ubuntu or Mac-OS that would be great too.

http://codesuppository.blogspot.com/2014/01/a-command-line-interface-for-blockchain.html
23  Bitcoin / Development & Technical Discussion / Re: How do I crawl through the block chain? on: January 08, 2014, 09:22:35 PM
FWIW, I just released a binary Windows console app (64 bit) that will let you parse the whole blockchain and do queries against it.  Since it doesn't write the data to a database, instead, it holds the whole thing in memory, you will need a beefy machine to run it as it allocates about 10gb of memory to parse the whole blockchain.

http://codesuppository.blogspot.com/2014/01/a-command-line-interface-for-blockchain.html
24  Bitcoin / Development & Technical Discussion / Re: How can I implement a payment system from a dedicated windows app? on: January 05, 2014, 12:46:23 AM
Here's a follow up question.

Apparently there is some API called 'websockets' (I apologize, I know *nothing* about web based programming) which is some kind of standardized way to do communications over the internet and might talk to things like the blockchain.info service.

So, would the strategy I need be to integrate a lightweight C++ implementation of a websocket client, something like:

https://github.com/dhbaird/easywsclient

And then just put my various payment requests to the blockchain.info site?

Sorry, I apologize for my ignorance but this really just isn't my area of expertise.  Ask me about how to program game engines and I can help you out there....

Thanks,

John
25  Bitcoin / Development & Technical Discussion / How can I implement a payment system from a dedicated windows app? on: January 05, 2014, 12:08:37 AM
I am developing a windows application, which runs in full 3d graphics and written in C++, that I want to release as sort of 'shareware'.  In other words I want users to be able to pay me a modest bitcoin fee and they will *immediately* be able to unlock the full features of the application. I do *not* want to have to launch a web-browser or anything like that.  I don't care about any form of payment other than bitcoin. I just want to be able to display a QR code/key and get an 'ack' that says 'payment received'.

I see that blockchain offers a great free way to handle payments like this, pretty much just the way I want, but it's all implemented assuming your are running a web-based application in a browser.

I'm not really much of a web-developer, my background is developing 3d graphics applications for the game industry.

What I would ideally like is a windows 32/64 bit DLL which I could demand load in my app.

I would like to be able to send to this DLL a 'purchase request', which essentially amounts to "send this much money to this address".

The DLL would then bring up a modal dialog box with a QR code for the end user to scan as well as the address if they need/want to copy/paste it.  The dialog box would stay up until the payment was received or the user hit cancel.  The DLL would then just return a success/fail to me.

I suppose the first question is, does such a thing already exist?  And, second, if it doesn't how hard would it be for someone to write?  And, third, if you answered 'that would be easy', can I please pay you to write it for me?  This is a very important feature I want to have in my product but I'm very much not interested in writing the code to do it myself.

Thanks,

John
26  Bitcoin / Development & Technical Discussion / Re: How do I crawl through the block chain? on: January 04, 2014, 09:35:08 PM
http://codesuppository.blogspot.com/2013/07/bitcoin-code-snippets.html

I am also writing a thorough piece of documentation for this exact topic right now.  You can read what I have so far here, I created a detailed graphic.  I don't expect to be completely finished with the article until tomorrow.

http://codesuppository.blogspot.com/2014/01/how-to-parse-bitcoin-blockchain.html
27  Bitcoin / Development & Technical Discussion / Re: Understanding Transaction #14 on block #141460 on: January 02, 2014, 08:53:10 PM
Yeah, I'm still working on documentation/cleanup.  It was written with the primary intention that other programmers would build it and step through the source code as a learning exercise.

I *will* add some command line switches where you can just run it and get like a dump of keys, that sort of thing.  Just haven't gotten to that yet.

I am now working on a pretty amazing visualization tool that I think the community is going to find very interesting.  I'm writing a 3d graphics application which can visually display virtually every single block on the blockchain with a reasonable balance and then *animate* it in real-time over time.

John
28  Bitcoin / Development & Technical Discussion / Raw Bitcoin Address Data in ASCII text file comma separated value format on: January 01, 2014, 10:01:43 PM
I finished up my blockchain parser and produced some interesting data output that I would like to share in the hopes that (a) other people find it useful and (b) other people do some interesting analysis/graphing/reporting on it and (c) to get some bitcoin tips for my effort.

The parser which produced this data is completely open source and consists of a *single* C++ file that is only about 4,000 lines of code that I wrote over Christmas break. 

Here are the links to the data.

The top 150,000 bitcoin addresses by balance and sorted by balance.

https://drive.google.com/file/d/0BwdyTvSh6bUkc2V3RUprclhCSUU/edit?usp=sharing

The top 150,000 bitcoin addresses by balance and sorted by age in days.

https://drive.google.com/file/d/0BwdyTvSh6bUkNWF1ZzdmQVhVOXM/edit?usp=sharing

Some summary statistics about the blockchain measured over time month by month:

https://drive.google.com/file/d/0BwdyTvSh6bUkTm56bll1czk5MjA/edit?usp=sharing

The source code that produced this data can be found here:

https://code.google.com/p/blockchain/

To parse the blockchain you need only two source files:

BlockChain.h https://code.google.com/p/blockchain/source/browse/trunk/BlockChain.h
BlockChain.cpp https://code.google.com/p/blockchain/source/browse/trunk/BlockChain.cpp

The source that demonstrates how to use the parser is at:

https://code.google.com/p/blockchain/source/browse/trunk/main.cpp

I have not tested this version on Linux yet.  I will try to get to that soon.  If someone else wants to make sure the Linux version still builds let me know and I will give you access to the project.  If you want to parse the blockchain only, that should work on a 32 bit machine.  However, if you want to process all transactions in the blockchain to produce these reports, you need a 64 bit machine as it allocates about 10gig of memory to assemble all of the data.

The blog post I made associated with this can be found here:

http://codesuppository.blogspot.com/

Over the next few days I plan to do some documentation and cleanup and a few other things.

At any rate, I hope you guys find the data useful.

The comma-separated-value text files contain the following information about each bitcoin address:

*Days since this address was used for a spend output.

*The current value at this address.

*The first time this address was ever used.

*The Last time bitcoins were sent to this address.

*The last time bitcoins were spent from this address (if ever)

*The total number of bitcoins spent from this address.

*The total number of bitcoins received to this address.

*The total number of transactions on this address.

*The public-key of the address.
29  Bitcoin / Development & Technical Discussion / Re: Understanding Transaction #14 on block #141460 on: January 01, 2014, 07:46:13 PM
Yeah, I got this all fixed and working.  What I did is that I changed my code to scan in all block-headers from the files on disk.  I compute the block-hash based on each header and put it in a hash-map.  Then, once I have hit the last header block, I walk backwards using the 'previous-block' field to do a hash-table lookup until I hit the first block.  Seems to work perfectly unless, I suppose the 'last' block was an orphan, but I'm not that worried about such a rare event.

I revised all of the source and made some new graphs and posted it here.

http://codesuppository.blogspot.com/2014/01/show-me-money-scatter-graph-of-all.html
30  Bitcoin / Development & Technical Discussion / Re: Understanding Transaction #14 on block #141460 on: December 31, 2013, 09:05:26 PM
Ok, it looks like I finally have this fixed.  It was just the orphan blocks which were throwing me off, and now those are all taken into account.  The parser now successfully reads every single block, transaction, input, and output in the blockchain.  There are some output scripts which it fails to derive a valid public key signature for  However, in all of those cases I found both blockexplorer and blockchain.info have the same issue, so I'm not treating that is a big concern for now.

I plan to write up a specific blog post detailing all of these 'gotchas' you have to know about to stream/parse the block-chain sequentially (rather than trying to scan all of the blocks into some kind of graph/tree) up front.  There are a bunch little annoying things that are not obvious.

[Edit: Spoke too soon, I get off the rail a little further down the blockchain, still have to debug this some more...]

John
31  Bitcoin / Development & Technical Discussion / Re: Understanding Transaction #14 on block #141460 on: December 31, 2013, 05:09:05 PM
Thanks, I'm working on my implementation now.  For my first attempt I'm just going to skip the orphan block when I detect it and assume the next block is not an orpahan.  I have an assert in my code to see if this is, in fact, always the case.

Here is how I believe you can get a bitcoin-qt local database with orphaned blocks in it.

If you fire up bitcoin-qt with a completely fresh database, it will download the entire blockchain to your hard drive with zero orphan blocks.  However..if you leave bitcoin-qt running day to day, synchronizing to the network, then it is possible for it to write an orphaned block to your local hard drive (this is what happened to me).  One thing, perhaps, unique about my block-chain parser is that it is entirely sequential.  It reads in 4 blocks at any given time, the logical previous block, the logical 'current' block, the logical 'next', block, and the one after that.  Each cycle it reads in the 'next' block in that pattern and shuffles some pointers. 

Since I was already reading the next block, and the one after that, I think this 'fixup' approach is going to work.

Thanks,

John
32  Bitcoin / Development & Technical Discussion / Re: Understanding Transaction #14 on block #141460 on: December 31, 2013, 04:23:20 PM
So, when parsing the blockchain sequentially and you encounter an 'orphaned' block what is the proper way to deal with this?

Looking at the raw data stream I imagine I could 'detect' it by the fact that multiple blocks in a row point to the same 'previous' block.  Is it always safe/true that the last block is considered on the 'main' chain?

Thanks,

John
33  Bitcoin / Development & Technical Discussion / Re: Understanding Transaction #14 on block #141460 on: December 31, 2013, 05:50:31 AM
Guys, thanks for the detailed response.  I've made a lot of progress on my parser, though my big outstanding issue is that it is going off the rails somewhere after block #240,000.  I will debug that tomorrow.  In a previous file I hit a case where after scanning a block and expecting the block-header for the next block, instead it found a big chunk of zero bytes.  I had to just scan the file until I hit the header which was some distance further along in the file.  I don't know how/why bitcoin-qt could do this, but on my machine it does.  I have a sneaky suspicion that if I deleted my blockchain and forced it to completely redownload it, this problem would go away.  However, I don't want to do that, because I want to figure out the source of the problem as it is now on my machine.

At any rate, I experimented with generating some 3d surface graphs of the blockchain evolving over time.  It's very early stuff, but it was kind of cool to see anyway.

codesuppository.blogspot.com/2013/12/work-in-progress.html
34  Bitcoin / Development & Technical Discussion / Re: Understanding Transaction #14 on block #141460 on: December 29, 2013, 03:53:44 PM
Yeah, it's probably something like that.  Hopefully somebody who worked on the blockchain.info code can explain how they handle that specific transaction.  If I take the previous 65 bytes prior to the OP_CHECKSIG as a public key, it's still not valid since the header and checksum are off.  I suppose I could throw away the header and the checksum, but rather than doing that and just guessing, I would be interested to learn what the blockchain info guys did specifically.  At any rate, it appears to be an 'unspendable' output, and I think that's a safe/correct way to interpret it for now.

As I'm scanning the blockchain there are quite a few of these unspendable outputs (outputs without any valid public key associated with them).

For just one example, check this transcation out:

http://blockexplorer.com/tx/6d5088c138e2fbf4ea7a8c2cb1b57a76c4b0a5fab5f4c188696aad807a5ba6d8

Not that the 'To address' is 'Unknown' and of type 'Strange'.  It contains the instructions to verify a signature but no actual signature!  There's a whole bunch like this.  Presumably this means that all of these outputs are 'lost forever'.  I wonder how much that is going to add up to in the end..

Thanks,

John
35  Bitcoin / Development & Technical Discussion / Understanding Transaction #14 on block #141460 on: December 29, 2013, 12:40:07 AM
I'm working on some code to parse the bitcoin blockchain and I just ran into an issue with transaction #14 in block #141460.  I did a google search and found some comments about this particular transaction which has an output which just inserted some nonsense text into the script.  The specific text that it inserted is: "LUKE-JR IS A PEDOPHILE! Oh, and god isn't real, sucka. Stop polluting the blockchain with your nonsense."

The output just has this text and no destination public key that I can identify.

Here is my question.

In block-explorer it shows this output transaction as having an 'unknown' destination address and is marked as 'strange'. 

http://blockexplorer.com/tx/9740e7d646f5278603c04706a366716e5e87212c57395e0d24761c0ae784b2c6

This seems reasonable to me considering the script.

However, and this is the core of my question, on the BlockChain.info website it lists the output script with a valid destination address.

This makes no sense to me since the output doesn't have one.  What does BlockChain info do in this case?  How are they coming up with that 'destination' address?  Do they just default back to the miner's original coinbase output address?

https://blockchain.info/tx/9740e7d646f5278603c04706a366716e5e87212c57395e0d24761c0ae784b2c6

On blockchain.info it indicates that the output is going to this address: 17Xbx4rf27bTjbRdwUKHrzpmg2unVXo1DB

But I have no clue how they came up with that address since it's not contained in the output-script.

Thanks,

John
36  Bitcoin / Bitcoin Discussion / Re: Mike Hearn, Foundation's Law & Policy Chair, is pushing blacklists right now on: November 14, 2013, 11:23:01 PM
Schindler had a list.
37  Economy / Marketplace / Re: Lakefront property for sale, bitcoin accepted on: November 14, 2013, 09:48:22 PM
I got so fed up with this thread I just took down my listing entirely.  The property is no longer for sale, not for bitcoin or for USD.  I think I'll go fishing.  Carry on as you were.
38  Economy / Marketplace / Re: Lakefront property for sale, bitcoin accepted on: October 28, 2013, 10:50:12 PM
What makes accepting bitcoin more or less dangerous than accepting cash?

Is it the amount?  Like, as if accepting $100 worth of bitcoin is no big deal, but accepting $10,000 worth of bitcoin is?

Since, apparently, according to the people in this thread, I 'know nothing' about bitcoin, please explain it to me.

Why is cash better than bitcoin?

Not sure if you're just wilfully ignoring the points being raised or if you're trying to convince people that you're naive and can therefore be trusted  Undecided

What in the world are you people even talking about?  I've addressed every bizarre point raised in this surreal thread and haven't received a single rational response.  No one bothered to explain in a rational way the difference between accepting cash, goods, or bitcoins, for trade.  So, I give up.  Go back to your healthy trolling guys...

Fine, I'll ask this one simple question:

Are you aware of the risks involved in being the purchaser (i.e. the one handing Bitcoins over)?

Yes, they are the same risks involved in handing me a big bag of cash and walking away, right?  Is your question a general question about the risks involved in bitcoin or the risks involved in doing cash transactions for a piece of property?

In other words, can you explain to me the risk/difference between a bitcoin transaction and a cash in hand transaction? To me they seem effectively the same.  Well, cash is a bit riskier because it can be counterfeited while bitcoins, once fully confirmed by the network, cannot.
39  Economy / Marketplace / Re: Lakefront property for sale, bitcoin accepted on: October 21, 2013, 02:40:15 AM
What makes accepting bitcoin more or less dangerous than accepting cash?

Is it the amount?  Like, as if accepting $100 worth of bitcoin is no big deal, but accepting $10,000 worth of bitcoin is?

Since, apparently, according to the people in this thread, I 'know nothing' about bitcoin, please explain it to me.

Why is cash better than bitcoin?

Not sure if you're just wilfully ignoring the points being raised or if you're trying to convince people that you're naive and can therefore be trusted  Undecided

What in the world are you people even talking about?  I've addressed every bizarre point raised in this surreal thread and haven't received a single rational response.  No one bothered to explain in a rational way the difference between accepting cash, goods, or bitcoins, for trade.  So, I give up.  Go back to your healthy trolling guys...
40  Economy / Marketplace / Re: Lakefront property for sale, bitcoin accepted on: October 16, 2013, 03:46:40 PM
Some of the responses to this thread have been a little bit bizarre and I'm not sure how to respond to them.

Whether or not you know how real-estate transactions work is beside the point of the core question at hand.

The core question is what is the difference between paying for something, anything, with bitcoin versus the equivalent amount in cash?

To me, bitcoin seems preferable.  Cash can be counterfeit, bitcoin, as far as I am aware, once confirmed, cannot.

So, let's sidestep the technical details of how one goes about buying and selling a piece of real-estate and answer this specific question.

What makes accepting bitcoin more or less dangerous than accepting cash?

Is it the amount?  Like, as if accepting $100 worth of bitcoin is no big deal, but accepting $10,000 worth of bitcoin is?

Since, apparently, according to the people in this thread, I 'know nothing' about bitcoin, please explain it to me.

Why is cash better than bitcoin?
Pages: « 1 [2] 3 4 5 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!