sui
sui copied to clipboard
A basic implementation of tally rule
The tally rule works as follows:
- For every digest we received from gossip, we assign a unique (incrementing) sequence number, and add the digest and validator name along with the sequence number to the a record table
- At the end of each checkpoint, for each digest included in the checkpoint, we go over all validators that sent us this digest in the order we received them (provided by the sequence number), and give them score based on the order.
It's very basic at the moment, and the score calculation is also very rough. We can tune and iterate on it. TODO: Will add tests.