Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do blockchains contain a websocket server?

I was recently reading about blockchains and am very intrigued by this technology. I had a few questions regarding blockchains:

  1. Do Blockchains use web-sockets to transmit information between users? If yes then is the information(blocks) sent always a JSON object?

  2. Do all users have the entire copy of the blockchain, do they each just see a partial copy of the blockchain? if yes then how big can the file get?

  3. Also, what determines transactions/second? I read bitcoin does about 7transactions/seconds and what is needed to make them more scalable, is it coding factors such as writing a more efficient algorithm (big-O) or is it some kind of hardware limitation?

Sorry if these questions seem trivial but I am a newbie trying to learn the technology. Any help would be appreciated.

like image 283
pi2018 Avatar asked Jul 13 '18 03:07

pi2018


People also ask

Does blockchain have a server?

Blockchains use a different network architecture than most of the web services that we're used to. These services use a client-server architecture, where the server acts as a single source of ground truth, and the clients connect directly to it to upload or download application data.

Does ethereum use WebSockets?

When the “emit UserWinsMoney(…)” creates a log and gets confirmed by Ethereum blockchain, then the data is available to be sent via websocket.

What are Blockchains hosted on?

Blockchain is decentralized and hence there is no central place for it to be stored. That's why it is stored in computers or systems all across the network. These systems or computers are known as nodes. Each of the nodes has one copy of the blockchain or in other words, the transactions that are done on the network.

Do you need a server for WebSocket?

By definition websockets like normal sockets are client-server so yes, you need a server.


1 Answers

  1. No, usually they use low-level protocol build on top of TCP.
  2. Users should have an entire copy of blockchain in order to verify transactions. Database size of Bitcoin: 200 GB, Ethereum 660 GB. You can use lightweight clients, which don't have a full copy, but in this case, you are not part of the network.
  3. In Bitcoin, there is a limit on block size, 1 MB. Average transaction size is about 400 bytes, so the average block contains 2000 transactions. There is no problem with increasing block size limit, this was done in Bitcoin Cash network (32 MB). But we cannot increase it to infinity since internet connection speed and transaction verification disk/CPU resources are not infinite.
like image 184
Zergatul Avatar answered Oct 10 '22 13:10

Zergatul