populus icon indicating copy to clipboard operation
populus copied to clipboard

Validate value lengths when linking bytecode

Open pipermerriam opened this issue 7 years ago • 7 comments

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.

108c643a0a956d03551bad79c3a5844b

pipermerriam avatar Jul 18 '17 20:07 pipermerriam

If I were to work on this would I clone from pipermerriam/populus or ethereum/populus?

eric-smithson avatar Jul 23 '18 17:07 eric-smithson

@eric-smithson ethereum/populus

voith avatar Jul 23 '18 18:07 voith

@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.

srisankethu avatar Aug 17 '18 10:08 srisankethu

Can someone help me out here https://github.com/ethereum/populus/issues/312#issuecomment-413822852?

srisankethu avatar Aug 21 '18 20:08 srisankethu

@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 avatar Aug 22 '18 13:08 voith

@voith Its my first issue. I don't know much about the project. I want to know:

  1. What does validate value lengths mean ? What is an appropriate length?
  2. If I have a sample bytecode and linked_reference_values as in here, I can test my changes. thanks in advance :)

srisankethu avatar Aug 22 '18 13:08 srisankethu

hey @voith, just checking in, were you ever able to answer the above questions for @srisankethu?

frankchen07 avatar Sep 18 '18 15:09 frankchen07