-
Notifications
You must be signed in to change notification settings - Fork 4
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
Space chars change compiled bytecode #73
Comments
The commonly known as bytecode piece of data encoded as contract bytearray (cb_...) is actually a serialized contract object that indeed includes the source hash together with the actual bytecode and some other properties. |
Yes, I think this is a documentation issue - the result of calling the compiler is a complete object that can go into the ContractCreateTx. It is a structured object containing among other things the actual contract byte code, but also the hash of the source code, the compiler version and whether or not the contract is payable... |
Got it. But shouldn't included files be hashed as well? |
I've noticed that if I add or remove space chars, the compiled bytecode insignificantly changes. From my perspective, these space chars don't change the contract semantics so the bytecode should be the same. Does it happen because the bytecode contains the hash of the source code? Can it be used somehow?
The current behavior looks odd because if I add space chars to an included file then the bytecode remains the same.
The text was updated successfully, but these errors were encountered: