Structs not being validated exhaustively
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 155
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
Some public/external functions (i.e.: [here](https://github.com/livepeer/protocol/blob/confluence/contracts/pm/mixins/MixinReserve.sol#L25) and [here](https://github.com/livepeer/protocol/blob/confluence/contracts/pm/mixins/MixinTicketBrokerCore.sol#L230)) return struct entities which are not then [validated exhaustively in the javascript tests.](https://github.com/livepeer/protocol/blob/confluence/test/unit/TicketBroker.js#L157-L159)
Add a deep equality/validation for all structs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the return sites in contracts/pm/mixins/MixinReserve.sol and contracts/pm/mixins/MixinTicketBrokerCore.sol, then inspect the existing validation in test/unit/TicketBroker.js. Run the JavaScript tests and extend the struct checks so every struct returned by the identified public or external functions is validated deeply and completely.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, solidity
- Domain
- blockchain, testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100