BLOODWORK_XS
 
 
class PaxosNode:
def propose(self, value):
proposal_id = self.generate_proposal_id()
promises = self.send_prepare(proposal_id)

if self.majority(promises):
value = self.get_highest_value(promises) or value
acceptances = self.send_accept(proposal_id, value)

if self.majority(acceptances):
self.send_commit(value)

def send_prepare(self, proposal_id):
# Sends prepare requests to all other nodes
pass

def send_accept(self, proposal_id, value):
# Sends accept requests to all other nodes
pass

def send_commit(self, value):
# Sends commit requests to all other nodes
pass

def majority(self, responses):
# Checks if a majority of nodes have responded
return len(responses) > (self.num_nodes // 2)
Artwork Showcase
Favorite Game
2,992
Hours played
1
Achievements
MnZo 25 Sep @ 12:14pm 
-rep afk baiter
Hawk Tuah 18 Sep @ 12:39pm 
-rep just bait and wait all the time
FazeOGPush 6 Jun @ 3:52am 
+rep
Kris 2 May, 2023 @ 7:56am 
+rep nice player
shotgun smartest player 29 Apr, 2023 @ 7:06am 
+rep very good player
Froom De Generate 22 Nov, 2022 @ 11:30am 
dm me ur nudes pls