-
Notifications
You must be signed in to change notification settings - Fork 247
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
fix: forward at tag calls #315
Conversation
Should we not explicitly be checking for |
// only forward calls to specific blocks to our local impl, because we currently | ||
// don't do an on-demand poll and flush for the pending block. | ||
// | ||
// unsure about the expected Tag::Latest semantics either. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we be checking if we're at head and forward for latest
only if not at head?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we not explicitly be checking for
pending
and only forward those to the sequencer? Andlatest
right now is the highest L2 block number we have.
Iuuc, latest
in the api spec refers to global L2 network latest
and not our node-local L2 head? Or am I misunderstanding what latest
means?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's one possible implementation. I wouldn't do it here though. Didn't see your second comment but this just highlights the unsureness I'm referring to in the comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there is never a global latest I would expect latest to be local. Currently there is a single global latest, but thats because the sequencer is not yet decentralized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to clarify this with Starkware, to be sure if we should aim for the correct meaning right from the start. Right being what you @Mirko-von-Leipzig mentioned (no single global latest after sequencers decentralizing).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think regardless that's outside of scope of this PR, which is a correctness fix needed either way. Discussions on forwarding what and what not are already scheduled.
forward them to sequencer because we can't support the two at the moment, or at least the latest semantics would probably be different from what py/src/call.py supports (queries highest l2 block number).
f536d97
to
2bf8c61
Compare
forward them to sequencer because we can't support the two at the
moment, or at least the latest semantics would probably be different
from what py/src/call.py supports (queries highest l2 block number).