Comments (7)
Exactly @olojzyg, an alternative strategy, is to except registring the current node_address in the list of peers, that's how i resolved that problem in my case to avoid the loop that @GaganSuneja mentioned up there.
So for each updates on the current list of peers, verify if the current host is in and remove it.
from python_blockchain_app.
Hey, thanks for the issue.
I'm not able to see why it'd run into an infinite loop? because the chain is being called again for the peers, not for the node itself.
from python_blockchain_app.
I hope it's resolved. Closing it due to inactivity, feel free to open that up just in case you feel necessary :)
from python_blockchain_app.
Hi satwikkansal,
If we register a new node, using your guide:
curl -X POST
http://127.0.0.1:8001/register_with
-H 'Content-Type: application/json'
-d '{"node_address": "http://127.0.0.1:8000"}'
8001 will update itself in this function register_with_existing_node()... So the peers set in node 8001 include itself...
Because node 8000 return 8001 as its peers...
from python_blockchain_app.
@Sanix-Darker @satwikkansal
Another loop in two nodes system, node 8000 and node 8001:
- node 8001 consensus() call its peer node 8000 /chain
- node 8000 /chain call consensus()
- node 8000 consensus() call its peer node 8001 /chain
- loop......
from python_blockchain_app.
@olojzyg it's after a mining, that we can have a consenus() and if the chain in two side are the same there is no need to continue the process.
from python_blockchain_app.
@Sanix-Darker Could you please explain how you resolved the issue with details? I don't get it.
from python_blockchain_app.
Related Issues (20)
- What prevents a new node with a bigger chain to join and deceive everyone? HOT 1
- Quick question about deploying this to share with my class
- How can we generate desired hash code ? HOT 1
- Submit transaction to all miners HOT 3
- Blockchain data goes to node 8000/chain HOT 2
- Can´t execute the Blockchain HOT 1
- Error HOT 1
- 1
- Transaction size HOT 1
- requests.exceptions.ConnectionError HOT 4
- Tutorial no longer accessible HOT 2
- e
- Pin markupsafe version in requirements.txt HOT 8
- in run_app.py 'app' is not defined HOT 1
- timestamp is not included when calculate genesis block HOT 2
- Localhost 5000 & 8000 can not work. HOT 1
- Containerise this?
- OpenAPI API spec HOT 1
- Server error HOT 2
- How can retrieve transactions and how many transaction in one block? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python_blockchain_app.