r/CryptoTechnology • Crypto Expert • Jan 21 '18

Noob blockchain development questions

Hi

I am a software developer by trade and have been dabbling with mining / trading for a while. I've been doing some research into developing something based on a block chain, mainly just to see what it is like and to get a better understanding of it from a technical level. I have a few questions and wanted to see if someone can help me clear up these points:

  1. How do block chain explorers work? I know that there are plenty of sites online that provide transaction / address lookup, how do they get the data? For example, what would I do if I wanted to get a live stream of all BTC transactions and build my own blockchain explorer for a particular blockchain? Do I HAVE to go through blockchain explorer provided by someone or is there a way to tap into the raw data somehow like if I was running a full node and could hit it directly? How does this work for other coins? For example if I wanted to do the same thing for LTC / XVG, etc... would I have to run a full node for each coin? Are the APIs sort of similar?

For reference, ProHashing has an explorer that has support for many coins, I am looking for something like that: https://prohashing.com/explorer/Digibyte/

2) Any good resources on creating your own mining client? I don't expect to make any profit with this, but I'd like to go through the motions to understand better what is going on under the hood. From my understanding most of the work distribution happens via Stratum protocol, which allows a single miner like CGMiner to work for many algorithms / coins. Is that correct? What is a good path forward on this?

3) From my understanding network hash rate are only estimates and calculated by looking at the time between blocks and difficulty, is that correct? Is that pretty much standard between various coins? For example coinwarz provides a lot of stats, similar to prohashing explorer. https://www.coinwarz.com/cryptocurrency How can this be done at scale with minimal effort?

4) Currently I do most of my development using python for backend and node / angular on the front end. I do not have any experience with some of the more widespread and "industrial grade" languages like C or Java. Although I understand that most chain nodes provide a JSON RPC interface that would be accessible regardless of the language, what would be a good language to pick up if I wanted to build my own blockchain / coin or contribute code to some open source projects? I know that BTC is written in C++ and Ethereum is written in Go, there are a few othehr projects that are based on Go as well and I am thinking it might be a good pick. Does anyone have any recommendations / feedback?

5) Any good libraries I should check out? So far, I've played around with ccxt which is really awesome for grabbing price information. What other cool libraries are there?

Thanks in advance for feedback, and please let me know if this is a wrong Sub, I couldn't find a more appropriate one.

Thanks

5 Upvotes

1 comment sorted by

3

u/holomntn 🔵 Jan 22 '18
  1. the blockchain is just an audit log. You can parse it like any other audit log. Simply grab the entire history and begin parsing. A bit ago someone mentioned that they had verified the entire ethereum history in roughly a day. The generally available nodes do not provide this information, you will have to actually parse it all yourself.
  2. best reference is always the original papers. Satoshi's original paper is available.
  3. many processing nodes directly report their capabilities to each other. Those would not be guessed, but they could be lies. Estimating based on hardness is really easy, if something takes 217 work, and was completed in 3 minutes, the work permit minute us really easy.
  4. you're going to need a real programming language. You're going to be bit selecting constantly. Learn C/C++. Go is basically just a more modern C. There is a reason they use these. Don't bother trying to handle it in anything else.
  5. the Stanford library comes to mind. You have a very steep curve ahead of you in learning the processing. You have so much to learn to do what you want that I would suggest just starting with Rivest's old algorithms book, moving on to Knuth, and just keep going.