MCPcopy Create free account
hub / github.com/WizardOfMenlo/stir / Round

Class Round

scripts/protocol.py:220–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218 print("\tSize: ", convert_size(self.argument_size()))
219
220class Round:
221 def __init__(self):
222 self.stopped = False
223 self.message_list = []
224 self.lastOracle = None
225
226 def stop_protocol(self):
227 self.stopped = True
228
229 def isStopped(self):
230 return self.stopped
231
232 def addMessage(self, msg : Message):
233 self.message_list.append(msg)
234 if isinstance(msg, Polynomial):
235 self.lastOracle = msg
236
237 def proof_length(self):
238 s = 0
239 for msg in self.message_list:
240 s += msg.proof_length()
241 return s
242
243 def argument_size(self):
244 s = 0
245 for msg in self.message_list:
246 s += msg.argument_size()
247 return s
248
249 def queries(self):
250 q = 0
251 for msg in self.message_list:
252 q += msg.queries()
253 return q
254
255 def print(self):
256 for msg in self.message_list:
257 msg.print()
258
259 def getLastOracle(self):
260 return self.lastOracle
261
262class Protocol:
263 def __init__(self, ldt_params: LDTParameters):

Callers 5

begin_auroraFunction · 0.90
fri_roundFunction · 0.90
run_FRIFunction · 0.90
stir_roundFunction · 0.90
run_STIRFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected