You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bring flow onto the current rain stack so it tracks latest and can use the upstream reusable CI/deploy workflows: migrate the interpreter integration V2 → V4 (eval4), de-submodule to soldeer, and convert workflows to the rainix reusables. flow is currently the org's straggler — submodules, OZ 4.x, the deprecated V2 interpreter API, and a vestigial deploy (manual-sol-artifacts.yaml runs rainix-sol-artifacts, which requires a script/Deploy.sol flow doesn't have → it would fail on dispatch).
Why now
The dead magic-nix-cache already breaks flow's deploy workflow; the proper fix is the reusable, which needs soldeer + a real Deploy.sol.
flow is pinned to a removed/deprecated interpreter API: LibEncodedDispatch no longer exists in rain.interpreter.interface, and the flat V2 interfaces (IInterpreterV2/StoreV2, IExpressionDeployerV3, IInterpreterCallerV2) are now under deprecated/. flow on V2 may already be incompatible with current deployed interpreters.
Upstream reference (security semantics — DO NOT invent)
Follow RaindexV6 / LibRaindex (the money-moving reference already on V4). The V4 model is eval-time, no deploy-time integrity check (the IExpressionDeployer model is gone):
(StackItem[] memorystack, bytes32[] memorywrites) = evaluable.interpreter.eval4(
EvalV4({
store: evaluable.store,
namespace: DEFAULT_STATE_NAMESPACE.qualifyNamespace(address(this)),
bytecode: evaluable.bytecode, // raw bytecode, not a deployed expression address
sourceIndex: SourceIndexV2.wrap(FLOW_ENTRYPOINT),
context: LibContext.build(context, signedContexts), // bytes32[][]
inputs: newStackItem[](0),
stateOverlay: newbytes32[](0)
})
);
if (writes.length>0) evaluable.store.set(namespace, writes);
Work — interpreter V2 → V4
Config EvaluableConfigV3{deployer,bytecode,constants} → EvaluableV4{interpreter,store,bytecode} (no deployer/constants; bytecode carries constants).
EvaluableV2{interpreter,store,expression} → EvaluableV4; use V4 LibEvaluable hashing for registeredFlows.
_flowStack: replace eval2(...encodedDispatch...) with the eval4(EvalV4{...}) block above.
Stack/writes type uint256[] → StackItem[](bytes32) + uint256[] → bytes32[] — ripples through LibFlow.stackToFlow, the RAIN_FLOW_SENTINEL decode, and the transfer encoding. (Biggest piece.)
Security semantics: drop the init-time deployExpression2 integrity check (UnsupportedFlowInputs/InsufficientFlowOutputs); enforce flow validity at eval-time per upstream (require stack.length >= MIN_FLOW_SENTINELS).
Rewrite all ~10 test files (they build EvaluableConfigV3 + deploy expressions; Flow.time.t.sol's LibStackGeneration.generateFlowStack helper, etc.).
Work — de-submodule to soldeer (remappings-only, no src edits)
foundry.toml [dependencies] + [soldeer] recursive_deps=false + remappings; remove lib/ + .gitmodules. Deps: forge-std 1.16.1, OZ (5.6.1 to track latest — note OZ 4→5 is an extra code axis: security/→utils/ for ReentrancyGuard, ECDSAUpgradeable removed, Multicall*; OR pin OZ 4.9.6 to defer), rain-factory 0.1.1, rain-interpreter-interface 0.1.0, rain-math-fixedpoint 0.2.0, rain-solmem 0.1.3 + transitive. Per-file remaps for the deprecated interfaces (interface/IInterpreterCallerV2.sol → interface/deprecated/v1/..., IInterpreterStoreV2 → deprecated/v2/...).
Add script/Deploy.sol (deterministic Zoltu deploy of the Flow impl) + BuildPointers.sol + src/generated/Flow.pointers.sol. No legacy-redeploy concern (deploy was vestigial).
Goal
Bring
flowonto the current rain stack so it tracks latest and can use the upstream reusable CI/deploy workflows: migrate the interpreter integration V2 → V4 (eval4), de-submodule to soldeer, and convert workflows to the rainix reusables. flow is currently the org's straggler — submodules, OZ 4.x, the deprecated V2 interpreter API, and a vestigial deploy (manual-sol-artifacts.yamlrunsrainix-sol-artifacts, which requires ascript/Deploy.solflow doesn't have → it would fail on dispatch).Why now
magic-nix-cachealready breaks flow's deploy workflow; the proper fix is the reusable, which needs soldeer + a realDeploy.sol.LibEncodedDispatchno longer exists inrain.interpreter.interface, and the flat V2 interfaces (IInterpreterV2/StoreV2,IExpressionDeployerV3,IInterpreterCallerV2) are now underdeprecated/. flow on V2 may already be incompatible with current deployed interpreters.Upstream reference (security semantics — DO NOT invent)
Follow
RaindexV6/LibRaindex(the money-moving reference already on V4). The V4 model is eval-time, no deploy-time integrity check (theIExpressionDeployermodel is gone):Work — interpreter V2 → V4
EvaluableConfigV3{deployer,bytecode,constants}→EvaluableV4{interpreter,store,bytecode}(no deployer/constants; bytecode carries constants).EvaluableV2{interpreter,store,expression}→EvaluableV4; use V4LibEvaluablehashing forregisteredFlows._flowStack: replaceeval2(...encodedDispatch...)with theeval4(EvalV4{...})block above.uint256[]→StackItem[](bytes32) +uint256[]→bytes32[]— ripples throughLibFlow.stackToFlow, theRAIN_FLOW_SENTINELdecode, and the transfer encoding. (Biggest piece.)LibEncodedDispatch,IExpressionDeployerV3,IInterpreterV2/StoreV2,IInterpreterCallerV2,EvaluableConfigV3. Add:IInterpreterV4,IInterpreterStoreV3,IInterpreterCallerV4(EvaluableV4/EvalV4/SourceIndexV2), V4LibContext/LibEvaluable,StackItem.IFlowV5→IFlowV6(breaking):flow()takesEvaluableV4;callerContextuint256[]→bytes32[];stackToFlow()takesStackItem[]. Bump dependent flow interfaces.deployExpression2integrity check (UnsupportedFlowInputs/InsufficientFlowOutputs); enforce flow validity at eval-time per upstream (requirestack.length >= MIN_FLOW_SENTINELS).EvaluableConfigV3+ deploy expressions;Flow.time.t.sol'sLibStackGeneration.generateFlowStackhelper, etc.).Work — de-submodule to soldeer (remappings-only, no src edits)
foundry.toml
[dependencies]+[soldeer] recursive_deps=false+ remappings; removelib/+.gitmodules. Deps:forge-std 1.16.1, OZ (5.6.1 to track latest — note OZ 4→5 is an extra code axis:security/→utils/for ReentrancyGuard,ECDSAUpgradeableremoved,Multicall*; OR pin OZ 4.9.6 to defer),rain-factory 0.1.1,rain-interpreter-interface 0.1.0,rain-math-fixedpoint 0.2.0,rain-solmem 0.1.3+ transitive. Per-file remaps for the deprecated interfaces (interface/IInterpreterCallerV2.sol→interface/deprecated/v1/...,IInterpreterStoreV2→deprecated/v2/...).Work — reusable workflows (the original ask)
rainix.yaml(CI) →rainlanguage/rainix/.github/workflows/rainix-sol.yaml(secrets: inherit). [its inline nix was already modernised in deploy: always sign with PRIVATE_KEY (never PRIVATE_KEY_DEV) #473]script/Deploy.sol(deterministic Zoltu deploy of theFlowimpl) +BuildPointers.sol+src/generated/Flow.pointers.sol. No legacy-redeploy concern (deploy was vestigial).manual-sol-artifacts.yaml→ reusablerainix-manual-sol-artifacts.yaml(DEPLOYMENT_SUITE).git-clean.yaml→ reusablerainix-copy-artifacts.yaml.Notes
Flow.sol+ tests) — sequence after the queue drains or coordinate rebases.