Skip to content

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

Open
jarry-xiao wants to merge 1 commit intosolana-foundation:mainfrom
jarry-xiao:jxiao/tower-bft-python
Open

Add PoC python script simulating the tower bft lockout algorithm#28
jarry-xiao wants to merge 1 commit intosolana-foundation:mainfrom
jarry-xiao:jxiao/tower-bft-python

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