Validate value lengths when linking bytecode
- Dominant language
- No language data
- Stars
- 319
- Forks
- 110
- PR merge metrics
- No merged PRs in 30d
Description
### What is wrong?
Populus uses the function [`populus.utils.link_bytecode`](https://github.com/pipermerriam/populus/blob/master/populus/utils/linking.py#L107) 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.

Contributor guide
No contributing guide indexed for this repository
Research direction
Read populus/utils/linking.py at the link_bytecode function, after blocker #306 has been merged. Follow how paired link references and values are processed, then add validation that each value matches its reference length. Done means inappropriate lengths are rejected before bytecode linking proceeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- blockchain, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100