Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PoC python script simulating the tower bft lockout algorithm #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jarry-xiao
Copy link

I wrote a script that implements the algorithm described on the Solana docs page: https://docs.solana.com/implemented-proposals/tower-bft#algorithm

It at least makes the exact logic codified in a more digestible way.

The state updates identically to the outputs specified in this document. I'm not an expert here, so my code might not be 100% correct. Should be enough to get started though.

Copy link
Collaborator

@ripatel-fd ripatel-fd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind moving this to solana_specs/consensus/tower_bft.py?
Otherwise, looks good to go.

ripatel-fd

This comment was marked as duplicate.

entry.expired = True # Mark the entry to be removed
expired_slots.append(i)

# Remove all expired towers
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expired slots?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants