Do blockchains contain a websocket server?

倖福魔咒の 提交于 2020-01-14 10:44:47

问题


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.


回答1:


  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.


来源:https://stackoverflow.com/questions/51317370/do-blockchains-contain-a-websocket-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!