mwhittaker / quoracle

A Swiss Army knife for read-write quorum systems
MIT License
84 stars 8 forks source link

F-resilient Write quorums for the Uniform strategy method #8

Closed samueleresca closed 3 years ago

samueleresca commented 3 years ago

Hi @mwhittaker,

I see the following implementation for the uniform_strategy method:

def uniform_strategy(self, f: int = 0) -> 'Strategy[T]':
  ...
  xs = list(self.elements())            
  read_quorums = list(self._f_resilient_quorums(f, xs, self.reads))            
  write_quorums = list(self._f_resilient_quorums(f, xs, self.reads))
  ...

(line 179)

Am I right to suppose that in the f_resilient_quorums call for the write_quorums var, it should pass the self.writes property of the quorum system?

Thanks 😄

mwhittaker commented 3 years ago

Haha whoops! Yeah, that is a bug. Just pushed a commit to fix it. Thanks so much for finding the bug Samuele. If you find any other bugs, definitely let me know!