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

feat[venom]: remove dloadbytes and sha3_64 venom instructions #4325

Closed
wants to merge 2 commits into from

Conversation

harkal
Copy link
Collaborator

@harkal harkal commented Oct 23, 2024

What I did

Remove dloadbytes and sha3_64 venom instructions, and updated the translator to emit directly lower level instructions.

How I did it

How to verify it

Commit message

This commit removes the higher level `dloadbytes` and `sha3_64` venom instructions.

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@harkal harkal marked this pull request as ready for review October 23, 2024 17:24
@harkal harkal requested a review from charles-cooper October 23, 2024 17:24
@charles-cooper
Copy link
Member

I think that we want dload and dloadbytes actually, they might be compiled differently on other architectures (which handle immutables differently)

@harkal
Copy link
Collaborator Author

harkal commented Oct 23, 2024

I think that we want dload and dloadbytes actually, they might be compiled differently on other architectures (which handle immutables differently)

We can always add them when we need them -and we know the exact requirements-

@charles-cooper
Copy link
Member

i think we need them, zksync handles immutables as storage variables. dload loads from a different location than code

@harkal
Copy link
Collaborator Author

harkal commented Oct 24, 2024

Since zkSync currently does not support Venom, merging this will not cause any disruptions. Furthermore, dstore was never part of Venom to begin with. To properly support zkSync or other architectures, we would need a command-line parameter for architecture selection. A less invasive approach would be to treat it as a special version of the EVM, although this isn't ideal. Venom will utilize architecture-specific information to decide which opcodes are permissible (or required) and even to choose more efficient opcodes on architectures where gas consumption varies, etc.

@harkal
Copy link
Collaborator Author

harkal commented Oct 24, 2024

Added an issue about it #4326

@harkal harkal closed this Nov 12, 2024
@harkal
Copy link
Collaborator Author

harkal commented Nov 12, 2024

Check #4357

@charles-cooper
Copy link
Member

i think we could even keep this open, since the other PR is more concerned with the frontend generating the instructions in the first place

@charles-cooper
Copy link
Member

the dloadbytes portion is superseded by #4410. let's leave this open for the sha3_64 change, although i think it can help with cse and instruction reordering

@harkal harkal closed this Jan 4, 2025
@harkal harkal deleted the feat/remove_dloadbytes branch January 4, 2025 16:33
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.

2 participants