This repository contains a Python implementation of the Paxos consensus algorithm. Paxos is a protocol for achieving consensus in a network of unreliable or distributed nodes, commonly used in distributed systems to ensure consistency.
- Basic Paxos roles: Proposer, Acceptor, Learner
- Message passing simulation
- Fault tolerance demonstration
- Easily extensible for advanced Paxos variants
- Clone the repository:
git clone https://github.com/yourusername/paxos.git cd paxos
To run the Paxos simulation:
uv run main.pyYou can modify parameters or node configurations in main.py or other source files as needed.
main.py: Entry point for running the simulationproposer.py,acceptor.py,learner.py: Paxos roles- Other
.pyfiles: Supporting modules
Pull requests and issues are welcome!
MIT License