1

My main question here is, is this understanding correct or have I misunderstood something? If this question would be better for Reddit then I apologise in advance and I'll move to there. Thanks.

Scenario:

So technically I could download the bitcoin source code and run my own altcoin (let's call it pokercoin) on a network of 5 computers (for me and my 4 geeky friends who wanted to play poker without chips).

If I'm understanding correctly, we would each be running pokercoin source code/qt on our laptops and no other computers would be needed to keep the thing running (or maybe we would need to run something else to ensure the network works, because otherwise there is no other way of the network doing all the IP level stuff? Or do nodes do this and run something other than the bitcoin source code?).

When I make a payment, each of the other 4 computers receives a copy of that transaction, and they all add this to a block of 1 transaction which gets appended to our very short blockchain after 10 minutes (because hypothetically my computer is able to solve in 10 mins).

If 2 of us made a transaction, (the new block to be added has 2 transactions), but the other 3 computers wrote their own block which diverged in truth to my computer and my friend's computer, then this 51 percent attack would beat the previous block to be appended (or is it added only after ANOTHER block is added (because this is now the longest chain).

We all also get new pokercoin for being miners in our own system (or maybe it is only those running different code who get to be miners).

Finally, none of us actually argues over having any money, because we know that 'how much we own' is actually only made up of the network iterating over every transaction that happened in order to calculate our amounts (and this happens every time a new block is made).

We also don't argue over block sizes, because there are 5 of us.

2

If you were using a fork of Bitcoin Core, your small scale network would not work.

Assuming you did the basic chain parameter modification or just firewall yourself from the rest of the Bitcoin network, there are two major things that are missing: peer discover, and mining.

Bitcoin Core by default uses a process called DNS Seeding in order to discover seed nodes. If those seeders fail, it will fall back to using some hard coded seed nodes. However, these are seed nodes which are treated differently than normal nodes (even though they are still normal nodes). Seed nodes are only connected to in order to get a list of more nodes to connect to. It is nodes on that list that are eventually connected to for actual normal node operations. Your node disconnects from those seed nodes once they get this list.

So, for your network, you would need to potentially run your own DNS seeders and seed nodes. But that's actually not really necessary. You would just need to disable DNS seeding and the hardcoded seed nodes, then just have everyone on your network set multiple connect=<ip> lines in their configuration files where <ip> is the IP address of a node. This will force the node to connect only to the specified nodes. Note that this will disable further node discovery and automatic node connection, so if you add someone else to your network, not all of the other nodes will connect to the newcomer unless they are explicitly added.

The other problem will be mining. Bitcoin Core does not contain any mining logic at all. It does not automatically mine nor does it even have the ability to produce blocks. Instead you will need to install some other mining software. However, because CPU and GPU mining are pointless, you will have to build, and potentially modify, those mining software yourself in order to enable CPU and GPU mining. Otherwise you will need to get some mining hardware supported by those software. Without using any mining software, your network will not produce any blocks and no transactions will be confirmed.

  • Thanks Andrew, I did a bit of reading around how discovery works based on your answer and it makes a lot of sense now. I guess for a home network, one could just hard code ips and run on an intranet (if I'm understanding correctly). – timhc22 May 14 at 15:00
  • I now need to do some research around how mining works and what mining software could be set up to run a tiny blockchain network! Thanks again for your help :) – timhc22 May 14 at 15:02
  • Although if It were a network without mining, purely for recreational use, then it should work with just a few computers running the modified core right? – timhc22 May 14 at 15:31
  • This may be useful to anyone else reading this thread quora.com/Can-you-create-a-blockchain-without-miners – timhc22 May 14 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.