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

consortium-v2: add parent list parameter to IsTrippEffective #651

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

minh-bq
Copy link
Collaborator

@minh-bq minh-bq commented Dec 19, 2024

This is the same as commit b718105 ("consortium-v2: add parent list parameter to IsPeriodBlock") but with the IsTrippEffective function. The parent list is passed to this function when it is called in the VerifyHeader path.

This is the same as commit b718105 ("consortium-v2: add parent list
parameter to IsPeriodBlock") but with the IsTrippEffective function. The parent
list is passed to this function when it is called in the VerifyHeader path.
@NganSM
Copy link
Contributor

NganSM commented Dec 20, 2024

@minh-bq It seems like there are two methods named isTrippEffective (method 1 and 2). The logic to determine if Tripp consensus rules are enabled is different for each method (method 1 determines by block number and method 2 determines by both period and block number). Can you clarify this?

@minh-bq
Copy link
Collaborator Author

minh-bq commented Dec 20, 2024

The method 2 uses the period number in the snapshot, the method 1 is used in the snapshot itself so it cannot rely on the snapshot's period number, it must rely on the extraData of produced block which is filled in Prepare.

@minh-bq
Copy link
Collaborator Author

minh-bq commented Dec 20, 2024

Hmm, actually, we can implement method 1 to use same rule like method 2 without using snapshot information. The main problem is how to get the period number of last epoch. To get that we might need to traverse back the chain to get the header information, in case we don't use snapshot.

Copy link
Contributor

@chiphamskymavis chiphamskymavis left a comment

Choose a reason for hiding this comment

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

LGTM

@minh-bq minh-bq merged commit e14b3cf into axieinfinity:master Jan 6, 2025
1 check passed
@minh-bq minh-bq deleted the fix/error-log branch January 6, 2025 03:54
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