populus
populus copied to clipboard
Validate value lengths when linking bytecode
What is wrong?
Populus uses the function populus.utils.link_bytecode
to transform unlinked bytecode into it's fully linked representation. This is done by providing a mapping of values that should be substituted for each link reference.
Currently, the linking process does not validate that the value being linked is of the appropriate size for the link reference location in the bytecode.
How can it be fixed?
Add logic to this function which iterates through the paired link references and values and checks that all values are of the appropriate length for their respective link references.
#306 is a blocker which must be merged prior to this ticket being actionable.
Cute Animal Picture
put a cute animal picture here.
If I were to work on this would I clone from pipermerriam/populus or ethereum/populus?
@eric-smithson ethereum/populus
@pipermerriam Helllo, I am new to this project. How can i test my changes? I need an example, bytecode
and linked_reference_values
to test it.
Can someone help me out here https://github.com/ethereum/populus/issues/312#issuecomment-413822852?
@srisankethu Sorry for the delay. I din't comment earlier because I didn't understand the issue completely. I am fighting some production fires at work but I'll try to answer your question tonight(IST).
@voith Its my first issue. I don't know much about the project. I want to know:
- What does
validate value lengths
mean ? What is an appropriate length? - If I have a sample
bytecode
andlinked_reference_values
as in here, I can test my changes. thanks in advance :)
hey @voith, just checking in, were you ever able to answer the above questions for @srisankethu?