170 likes | 315 Views
Joshua Dunn Ryhan Pathan Joshua Strange. Teaching tool for the byzantine general problem. Abstract.
E N D
Joshua Dunn RyhanPathan Joshua Strange Teaching tool for the byzantine general problem
Abstract • There is a lack of sufficient visualization tools for assisting first-time learners in understanding solutions to the Byzantine Generals problem, specifically the Lamport, Shostak, and Pease Algorithm. Furthermore, we feel that the algorithm is complex enough to necessitate some manner of illustration in order to grasp. To address this issue, we have created such a tool using Java Swing as well as the GraphViz software suite.
Scenario • There exist several divisions of the Byzantine army surrounding an enemy city. Each division is commanded by its own general. • The generals need to settle upon a single course of action, attack or retreat, while only being capable of communicating via messenger. However, some of the generals may be traitors trying to confound the process of reaching an agreement. • The generals must have a method that operates within these constraints to guarantee that all the loyal generals arrive at the same course of action, and that a small number of traitors cannot cause the army as a whole to arrive at an undesirable decision.
Constraints • More than 2/3 of generals must be loyal • All messages are delivered successfully without malicious modification • Sender's identity is readily apparent • Number of traitors is known but not their identities
Execution • A commanding general begins by sending a signed, unforgeable order to each other general. • Each general other than the commander then copies this message, appending his own signature, also unforgeable, and sends it to every other general excluding the commander. Note that in this step, a traitor may choose to relay a conflicting order, but he cannot provide a signature that is not his own. • The generals continue sending messages in rounds, discarding messages which they have already signed, until the number of rounds exceeds the number of traitors by one. • Each general takes all of the messages he has received and sorts them based on the number of signatures. He then lays them out in a tree format such that each message is the child of a message whose path is the prefix of the current message's path. • At each level of the tree, a majority decision is reached and propagated to the parent. This process is continued until the root node of the tree contains a decision. This is the general's final decision.
Data Structures • Message • General
Message • Value • Path • Decision • Traitor Status
General • Type • ID • Sent Messages • Received Messages • Decision Messages
Stage 1: Message Passing • m + 1 rounds of message passing, where m is the number of traitors • Messages sent and received instantaneously • Initially Commander issues messages to all other generals • In remaining rounds, generals append their ID to the path of each message received, and send it to all other generals if it does not create a cycle • Traitors randomize value of message before sending
Stage 2: Decision Making • Received messages arranged in tree • At outermost branches, received message set as decision • Each parent node sets decision as majority of its children's decisions
Lessons Learned • Impracticality of sent messages panel • Addition of sent and received message panels
Lessons Learned • Addition of metrics panel • Lowered maximum number of generals from 10 to 8 due to unreasonable runtimes and unmanageable graphs
Statistics • Equation to calculate total messages given n total generals and m traitors: • For n=10 and m=10, a total of 8,887,690 messages are sent (986,409 messages from each general). On our machine this case had a runtime of 608 seconds. • For n=8 and m=8, a total of 95,900 messages are sent (13,699 messages from each general). On our machine this case had a runtime of 3.5 seconds.