-
-
Notifications
You must be signed in to change notification settings - Fork 788
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: optionally disable metadata in bytecode #3107
feat: optionally disable metadata in bytecode #3107
Conversation
vyper/ir/compile_ir.py
Outdated
@@ -967,7 +967,7 @@ def adjust_pc_maps(pc_maps, ofst): | |||
return ret | |||
|
|||
|
|||
def assembly_to_evm(assembly, pc_ofst=0, insert_vyper_signature=False): | |||
def assembly_to_evm(assembly, pc_ofst=0, insert_vyper_signature=False, disable_vyper_signature=False): |
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.
insert_vyper_signature and disable_vyper_signature both being arguments is a little weird. it should be the callers responsibility to decide what the value here should be
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.
correct, i agree, this was a short term resolution to avoid refactoring due to the recursive pattern L1011
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.
looks good, left a comment about one signature, and also i think the option should be named something like --no-signature
, or, --no-bytecode-metadata
thanks @charles-cooper renamed option to |
What I did
Optionally disable metadata in bytecode
How I did it
Added the flag
--no-bytecode-metadata
to the cli and pass the parameters in the respective componentsHow to verify it
Compile a contract with and without the flag. Bytecode produced will include or not the metadata (e.g. vyper signature) at the end
Commit message
feat: optionally disable metadata in bytecode
Description for the changelog
cli: optionally disable metadata in bytecode with
--no-bytecode-metadata
Cute Animal Picture