runtimeverification / runtimeverification/kontrol
Support ranges for dynamic types' lengths
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 122
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Related: https://github.com/runtimeverification/kontrol/issues/353
Dynamic array support implemented in https://github.com/runtimeverification/kontrol/pull/321 relies on the assumption that the array and its elements' length is fixed to a particular concrete value, e.g.,
/// @custom:length _withdrawalProof: 10,
/// @custom:length _withdrawalProof[]: 600,
function test_finalizeWithdrawalTransaction_paused(
bytes[] calldata _withdrawalProof
)
The feedback we received from the Optimism team, however, suggests that it'd be better if allowed specification of a range (min/max bounds) instead of a fixed value for bytes (and array) length. For example, in this test, the min proof length is 5 and the max is 8. The element lengths range from 32 to 532 bytes, so using 32 and 600 as the bounds would be better.
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 by reading related issue #353 and dynamic array support in pull request #321, then trace how the custom:length annotations in the Solidity example are parsed and applied. Define how minimum and maximum bounds should be represented for arrays and elements, and verify that the example accepts proof lengths of 5–8 and element lengths bounded by 32–600.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, solidity
- Domain
- devtools, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100