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

fix: forward at tag calls #315

Merged
merged 1 commit into from
May 31, 2022
Merged

fix: forward at tag calls #315

merged 1 commit into from
May 31, 2022

Conversation

koivunej
Copy link
Contributor

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).

@Mirko-von-Leipzig
Copy link
Contributor

Mirko-von-Leipzig commented May 30, 2022

Should we not explicitly be checking for pending and only forward those to the sequencer? And latest right now is the highest L2 block number we have.

// 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.
Copy link
Member

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?

Copy link
Member

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? And latest 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?

Copy link
Contributor Author

@koivunej koivunej May 30, 2022

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.

Copy link
Contributor

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.

Copy link
Member

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).

Copy link
Contributor Author

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).
@koivunej koivunej force-pushed the forward_non_tag_calls branch from f536d97 to 2bf8c61 Compare May 31, 2022 11:36
@koivunej koivunej merged commit 9ca45bb into main May 31, 2022
@koivunej koivunej deleted the forward_non_tag_calls branch May 31, 2022 11:43
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.

4 participants