Skip to content

Experimental payment channels: cooperative escrow prerequisites and fail-closed preflight - #227

Open
kimminhyun-ai wants to merge 26 commits into
masterfrom
year3/m2-state-channel-sdk
Open

kimminhyun-ai wants to merge 26 commits into
masterfrom
year3/m2-state-channel-sdk

Conversation

@kimminhyun-ai

@kimminhyun-ai kimminhyun-ai commented Sep 11, 2026

Copy link
Copy Markdown

M2 cooperative escrow prerequisites — not network-finalized settlement

Source: 86c4e844144ccdc798f10e32235d0e84eda82346, existing
year3/m2-state-channel-sdk branch. This is an experimental source/evidence
prerelease, not npm or Docker-registry publication and not a public Ainize deployment.

Verified

  • Fix the SDK dependency-image installation path to apply its existing ain-util and
    eccrypto secp256k1 compatibility patches. Remove an obsolete WebSocket declaration
    patch incompatible with the current require import. Preserve earlier build/test failures.
  • Add immutable cooperative AIN escrow rules and replayed integer micro-AIN allocations.
    Final image build and 10 SDK +4 preflight tests pass.
  • Run actual native DB rule/function execution in isolated Docker with signature bypass
    disabled: 1 AIN escrow, 20 co-signed transfers of 3 micro-AIN, final allocation
    499,940/500,060 micro-AIN. All 24 operations pass their expected outcome; 11 invalid
    operations are rejected with the entire DB state proof restored. Final wallets
    9.5/9.5 →9.99994/10.00006; raw floating-point ledger numbers are retained.
  • Repeat on the final image, CPU2/cpuset0–7/RAM+swap ceiling4GiB/no GPU/no network,
    read-only root/tmpfs256MiB/non-root UID. No live chain volume or publisher key mounted.
  • Match 68 SDK source/test/patch/tool files against the frozen final build and nine
    native-chain files against ain-blockchain commit 5b0373e63c9d9daf4cdee8ecda23dbcbda93b997.
    Runtime: Node22.14.0, native chain1.6.0, SDK1.14.1 source build.

Failed live preflight — explicitly not passed

At12:41–12:45UTC, existing ten-node Docker containers still displayed healthy,
but completed native consensus reads reported health=false and finalized blocks
remained23086 (11:17:32UTC); some observations timed out. Existing node0 logs contain
state-proof mismatches and stale P2P messages. The cause is not asserted from those
symptoms. Existing containers also enable the development signature-verification bypass.

The guarded network escrow runner refuses this environment before key creation or
transaction signing/funding. All three attempted network runs have zero saved
private files and zero signed intents. Existing chain/model/trainer/API containers
are preserved. No timeout-triggered restart, replacement, volume deletion, or genesis reset.
The workspace compose healthcheck now checks native health as well as SERVING;
that configuration change was not silently deployed over live containers.

Still incomplete

  • GitHub PR227 CI is blocked before tests: Yarn1 reports Invalid value type 844:0
    in the pre-existing yarn.lock, then jest: not found. The lockfile is byte-identical
    to base eed7a51; it was not changed by this work. The local locked-npm Docker
    build and 14 focused tests passed, but this is not a green GitHub CI or merged PR.
  • Native ten-node funded peer recovery and independently finalized cooperative payout.
  • Unilateral challenge/timeout exit: not implemented; non-cooperation can lock funds.
  • 7,000 TPS and full stability evaluation. Previous test-credit HTTP benchmark remains
    667.85 average /796 peak TPS; its checkpoints are not escrow payouts.
  • Ainize public P2P delivery/Live inference and the full100-dataset evaluation/incentive path.
    Original P2P bodies remain locally available; the separate prior release proves
    empty-receiver0→2 restoration, not public delivery.

Failure logs, native execution receipts, limits, hashes and privacy checks accompany
the release. Private homes, keys, .env, model weights and NPZ bodies are excluded.
The workspace root has no Git repository: its updated documentation and Docker
configuration are supplied as release artifacts, not claimed as a root Git commit.

haechan-comcom and others added 26 commits September 11, 2026 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants