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 block proposals and lookahead posting #25

Merged
merged 8 commits into from
Jul 3, 2024

Conversation

AnshuJalan
Copy link
Collaborator

This addresses issue #9.

I have added a small design nuance that I would like further discussion on under this PR.

Besides, when an epoch does not have a single preconfer in any of the slots, I advocate for falling back to a randomly selected preconfer in another situation—when the current epoch's lookahead is invalidated.

There are two reasons for this:

  • When the lookahead is invalidated, how do we decide who the next preconfer/poster will be for the current epoch?
    • One approach is to leave it to a random operator to push the lookahead, but that may lead to a race condition.
    • Another option is to have the disputer push the correct lookahead, but does it make sense to add more complexity to lookahead dispute?
  • Changing the lookahead for the in-flight epoch without disturbing other constraints (like allowing a future preconfer to preconf empty lookahead slots in advance) requires quite a bit of additional storage state, which seems to bloat up the contract.

@linoscope
Copy link
Collaborator

I advocate for falling back to a randomly selected preconfer in another situation—when the current epoch's lookahead is invalidated.

This sounds good to me, especially since the second point you raise:

Changing the lookahead for the in-flight epoch without disturbing other constraints (like allowing a future preconfer to preconf empty lookahead slots in advance) requires quite a bit of additional storage state, which seems to bloat up the contract.

The lookahead dispute will be an edge case that should only happen very rarely in practice, so it makes sense to fall back to the simplest approach.

@AnshuJalan
Copy link
Collaborator Author

Made the proposal function payable as it is a requirement of the internally called proposeBlock function in TaikoL1.

@smartprogrammer93 smartprogrammer93 merged commit 577c576 into master Jul 3, 2024
1 check passed
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