Yes, it looks like this (and other differences) is why it's called a "Bitcoin-like" project. It also runs over HTTP instead of plain TCP/IP, so it can't be used as a Bitcoin node anyway (and there are numerous other differences).
But it's a nice example of a Bitcoin-like project, and manages to get the main ideas of Bitcoin in as an educational project.
Very cool! I've been working on a similar project every so often(https://github.com/lambdanaut/lambdacoin). I'm not as far along as you are, but so far it seems like creating a cryptocurrency from scratch is not really all that big of a project, at least getting it into a prototypical state.
I was delighted to find that much of the math logic is already handled by libraries such as pycrypto.
It's funny to me how similar our codebases look. Especially our classes such as `Block` and `Transaction`. We each have to_json and from_json methods as well, in order to serialize the data for propagation.
> It's funny to me how similar our codebases look.
To me, your codebases don't look very similar at all, except for the fact that you're both coding mini-Bitcoin nodes, so there will be inevitable similarities.
Edit: Not trying to be rude, but I'm never sure what people are suggesting when they say "hey, your codebase looks like mine!". Perhaps just an innocent remark, but otherwise, I just wanted to point out that the two codebases are quite different.
Just curious as to how you got started into this? Are there any references you'd recommend. I have a typical Web dev background(+ some machine learning from college). Been investing in crypto for a bit and would love to learn and implement some basic blockchain concepts on my own. I've also been looking at Solidity.
Really it's just a lot of googling and looking for good tutorials that explain how the Bitcoin protocol works. Whenever you hit a concept you don't understand, google it.
Start by defining your basic objects, and then begin adding their methods, just like you would any sort of program. The basic objects here are the Blockchain, Transactions, and a Client to interact with the chain. The rest is just implementing rules for how these objects work together.
There's an old Bitcoin in Python project called ArtForz's Bitcoin "half-node" (or maybe "half-a-node") which is a compressed, single file, easy-to-follow simplified Bitcoin node. No wallet functions, just the basic networking and validating.
Once you understand these, it's pretty much all serializing, deserializing, validating, and passing these around over TCP/IP sockets. And then building the chain. And then adding wallet functions.
It's been a while since I've done this so now I'm thinking of building another one in some new language.
Cool project. It seems like the only way for nodes to mine on the same chain is for them each to use different ports. I tried to use different IPs on the same port, and it didn't work.
Also, for the JavaScript fans: http://bcoin.io/ it's actually a full node implementation that can run in the browser (can if you have time and space for the blockchain).
> Having a node set-up will allow you to more easily test and query the RPC/REST API, and begin monitoring new transactions added to the bitcoin blockchain/mempool.
> The default bcoin HTTP server listens on the standard RPC port (8332 for main, 18332 for testnet, 48332 for regtest, and 18556 default for simnet). It exposes a REST json api, as well as a JSON-RPC api.
Seems bcoin doesn't connect you directly, but rather to a node they're running elsewhere.
I can’t answer that question, it does implement server and client and the demo does try to download the whole blockchain on your browser (I’m not sure who has the bandwith to play with that demo)
It’s tho in production use and many people like the project cause it’s a full node implementation.
Word of warning, this is not Bitcoin's curve. This is a NIST curve.
The library you're using (fastecdsa) has secp256k1 available to use, if that's what you want to do.