Creating a P2P network like Block Chain

1

Posting this in Bitcoin community because I believe that you guys would be the best to answer the question since my question is related with the blockchain.

I am wondering how to create a P2P database (like blockchain?) which can be maintained by some party (miners)?

For example, in Bitcoin community, we know that a transaction is not valid if someone attempts to transact more Bitcoins than they have. Nodes don't relay them and miners discard them.

What should be the approach to create this project? Also, just like Bitcoin, you transact to store data (technically) on the network. How do I stop spammers? What measure should I adopt to achieve a spam-less network?

Areeb

Posted 2017-04-25T12:54:49.017

Reputation: 125

And, how does a Bitcoin node start finding peers? – Areeb – 2017-04-25T12:55:15.483

Answers

3

I am wondering how to create a P2P database (like blockchain?) which can be maintained by some party (miners)?

This is quite a big question to answer in one message. There's "Mastering Bitcoin: Programming the Open Blockchain" book that explains all the internals of Bitcoin in details. Also you can refer to Bitcoin Developer Guide – there're answers to all you questions.

How do I stop spammers?

This is why Proof-of-Work is needed: adding a block to blockchain takes a lot of time and a lot of computations (that's why people buy fast video cards for mining). Thus, spamming is not possible.

And, how does a Bitcoin node start finding peers?

There're are DNS seeds hardcoded in Bitcoin clients. When a new node is started it queries the seeds to get the IP address of at least one other node.

Jeiwan

Posted 2017-04-25T12:54:49.017

Reputation: 146