-
Notifications
You must be signed in to change notification settings - Fork 712
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 timestamp when querying zkevm_getBatchByNumer and the batch is only in trusted state #3750
Conversation
…ly in trusted state
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.
LGTM
…ly in trusted state (#3750) * fix timestamp when querying zkevm_getBatchByNumer and the batch is only in trusted state * control timestamp to be returned for a batch in GetBatchTimestamp * fix ErrNotFound * fix state.ErrNotFound check * fix comments * fix GetRawBatchTimestamps * fix comments * fix GetRawBatchTimestamps return err
…ly in trusted state (#3750) (#3768) * fix timestamp when querying zkevm_getBatchByNumer and the batch is only in trusted state * control timestamp to be returned for a batch in GetBatchTimestamp * fix ErrNotFound * fix state.ErrNotFound check * fix comments * fix GetRawBatchTimestamps * fix comments * fix GetRawBatchTimestamps return err
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.
|
What does this PR do?
When querying zkevm_getBatchByNumber endpoint and the batch requested was only in trusted state (not sequenced/virtualized) the timestamp returned in the response for the batch was wrong. The function assigned a "nil" value for the timestamp and this was intrepreted as a very high timestamp value in the json response (future timestamp).
Now the issue is fixed and in the case the batch is only in trusted state it returns the timestamp of the last L2 block in the batch.
Reviewers
Main reviewers:
@ToniRamirezM
@tclemos
@ARR552