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

no overwrite timestamp, add REPEAT #190

Merged
merged 2 commits into from
Dec 1, 2022

Conversation

krlosMata
Copy link
Contributor

This PR does the following:

  • start hashK address with 0
  • avoid overwrite timestamp if already set
  • add REPEAT new instruction
  • increase %MAX_CNT_KECCAK_F available

main/main.zkasm Outdated
$ => D :SLOAD

; skip overwrite timestamp if it is different than 0
D - 1 :JMPN(writeGlobalExitRoot)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think his could also be done like this:
-D :JMPN(skipSetGlobalExitRoot)
$ => D :MLOAD(timestamp)
$ => SR :SSTORE ; Store 'timestamp' in storage position 'keccak256(globalExitRoot, 0)'
skipSetGlobalExitRoot:
....
One label and one JMP less

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you are right !! I will change it

@krlosMata krlosMata force-pushed the feature/no-overwrite-timestamp branch from c286117 to e49e85c Compare December 1, 2022 12:03
Copy link
Contributor

@ignasirv ignasirv left a comment

Choose a reason for hiding this comment

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

💯

@krlosMata krlosMata force-pushed the feature/no-overwrite-timestamp branch from e49e85c to ba7afdb Compare December 1, 2022 14:24
@krlosMata krlosMata merged commit 5d30f02 into develop Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants