satwikkansal / python_blockchain_app

A fully functional blockchain application implemented in Python from scratch (with tutorial).
824 stars 472 forks source link

Implementation is not 100% decentralized #16

Closed sabatha7 closed 5 years ago

sabatha7 commented 5 years ago

I am new to git! many thanks. ❤❤

[instances]

  1. I run a new instance(server) on port=8000. 2.I run another instance(client) on port=5000.

[running]

  1. I access localhost:5000 and i see UI that I can interact and run commands.
  2. I access localhost:8000 and nothing displayed however command line displays output and executed commands by the client at localhost:5000 (assumption).

[later]

  1. I run yet another (duplicate) instance of port=8000. This port rejects clients or rather the first instance says; "No, I was here first". I still can't use the desired app features.
  2. I run another instance on port=9000 and access localhost:9000. I can use the app without worry.

[conclusions] If port=8000 goes down then the entire system crashes. All data lost 😢

[exceptions handled] 1. requests.exceptions.ConnectionError requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8000): Max retries exceeded with url: /chain (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000232FF828048>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))

2. Internal Server Error The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.