runtimeverification / runtimeverification/kontrol

Support ranges for dynamic types' lengths

Open
#385 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

engagement enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.