Skip to content

Migrate to latest rain.interpreter.interface (V4 caller / V4 interpreter / V3 store) #437

@thedavidmeister

Description

@thedavidmeister

Context

lib/rain.interpreter.interface is pinned at dab8e3d (2024-02-28) in foundry.lock. Upstream main is 0908a84 (2026-03-24) — roughly 2 years and 288 commits ahead. This repo's live Flow.sol / LibFlow.sol / IFlowV5.sol are written against the older V2 interpreter and V2 store.

Upstream now ships V4 caller, V4 interpreter, and V3 store:

src/interface/IInterpreterCallerV4.sol
src/interface/IInterpreterExternV4.sol
src/interface/IInterpreterStoreV3.sol
src/interface/IInterpreterV4.sol

V2 / V3 of the older interfaces are now under src/interface/deprecated/ upstream.

Known interface changes that affect this repo

  • IInterpreterStoreV2.set(StateNamespace, uint256[])IInterpreterStoreV3.set(StateNamespace, bytes32[]) (kvs type widened from uint256[] to bytes32[]).
  • IInterpreterV2.eval2 → likely IInterpreterV4.evalN or similar (signature change to be confirmed).
  • EvaluableV2, EvaluableConfigV3, SignedContextV1 consumers in Flow.sol / LibFlow.sol will likely need to swap to V4-era equivalents.

84 references across src/ to V2-era interface symbols.

Out of scope (filed for tracking, not scope of this issue)

Effort

Substantial. Likely a multi-PR migration:

  1. Bump submodule head in foundry.lock, run forge update lib/rain.interpreter.interface.
  2. Migrate LibFlow.sol set call site to bytes32[].
  3. Migrate Flow.sol eval2 call to V4 equivalent; rename / restructure types as required.
  4. Roll the live-V5 interface forward: IFlowV5IFlowV6 (new live interface) with V4-era types; demote IFlowV5 to deprecated/v5/.
  5. Update tests / mocks in test/ to V4 caller/store mocks.
  6. Re-run audits.

Why now

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions