Skip to content

feat(protocol): add preconf slasher #19330

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

Draft
wants to merge 12 commits into
base: shasta_upgrade2
Choose a base branch
from
Draft

Conversation

AnshuJalan
Copy link
Collaborator

@AnshuJalan AnshuJalan commented Apr 24, 2025

This PR covers Preconfirmation Structure, Preconfirmation Violations, Missing EOP and Invalid EOP sections of our LLD doc

@AnshuJalan
Copy link
Collaborator Author

I feel I will also be including Preconf EOP violations in this same contract. I was inclining toward having a separate contract for EOPs, but now that I think about it, the preconfer would then need to opt into another contract just for EOP. This is inconvenient.

@AnshuJalan AnshuJalan requested a review from adaki2004 April 25, 2025 09:18
@AnshuJalan AnshuJalan requested a review from dantaik April 25, 2025 09:21
bytes32 blockHash;
// `true` if this preconfer is not going to deliver anymore
// preconfirmations after this block
bool eop; // End-Of-Preconf flag
Copy link
Contributor

Choose a reason for hiding this comment

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

I know we briefly discussed this in our call, but I still prefer using an enum here. It allows us to explicitly mark a block as one of the following:

  • 1: Start of a batch
  • 2: End of a batch, but not end of preconfirmation
  • 3: End of a batch and end of preconfirmation
  • 0: All other blocks

By enforcing the correct marker for each block, it becomes easier to identify mistakes. Also, if we decide not to use markers 1 and 2, we don’t need to change the protocol at all. Using an enum gives us this flexibility.

ITaikoInbox.BatchInfo batchInfo;
// This is the BatchMetadata of the batch that contains the block at height X
ITaikoInbox.BatchMetadata batchMetadata;
// This is the BatchMetadata of the next batch that contains the block at height X + 1
Copy link
Contributor

Choose a reason for hiding this comment

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

what if block X and block X+1 are in the same batch?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nextBatchMetadata stays empty in that case. I think the suggestion on keeping evidences separate will make this clearer.

@AnshuJalan AnshuJalan requested review from dantaik and adaki2004 April 27, 2025 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants