Repository navigation
Add an independent Go runtime for the XIR execution layer - #2
Conversation
go-runtime/ implements the delivery, confirmation, and recovery paths of the XIR runtime independently of the Python campaign machinery: - internal/xir, internal/abiutil: byte-exact wire encoding and ABI packing. - internal/state, internal/evm: durable SQLite ledger, JSON-RPC client, signer, and a transactor whose intent/frozen-calldata/signed/submitted sequence survives a restart without rebroadcasting or reusing a nonce. - internal/artifacts, internal/deploy: Forge artifact loading, the Hyperlane and LayerZero stack bootstrap, the XIR application deployment, and the registry/adapter configuration. - internal/layerzero, internal/hyperlane: packet/checkpoint codecs and the DVN/Executor and validator/relayer roles the local lab needs. - internal/runner: attempt loop, carriers, transitions, delivery, effect checks, and an injected-fault hook for recovery tests. - internal/lab: disposable anvil chains for integration tests. - cmd/xirlab-go: CLI; keys come from environment variables only. - scripts/generate_go_parity_vectors.py and testdata/vectors.json pin every derivation against the Python reference. Verification: go vet and go test are green across the module, including an anvil integration test that deploys both protocol stacks plus one XIR application on three chains, executes an HL route end to end, and a recovery test that injects a fault after the first dispatch and resumes from the same ledger with the dispatch count unchanged. Planning, governance gates, analysis, and publication remain Python-side; a Go run is not a campaign result.
The GitHub runner image does not carry Python 3.13.14, so `uv sync --frozen` aborted with "No interpreter found" before any check ran in either job.
The runner image cannot provide Python 3.13.14, so the Go job no longer runs uv: the parity vectors are committed and regenerated locally when the Python runtime changes, and the integration tests skip when the protocol artifacts are absent. The pre-existing zero-write job is left exactly as it was.
The repository ignores artifacts/ because release evidence must not be committed; that rule also swallowed go-runtime/internal/artifacts, so the Go module did not build from a fresh checkout.
CI builds the XIR contracts but cannot build the pinned Hyperlane and LayerZero sources, so the tests that read protocol-projects artifacts now skip with the reason instead of failing. The deploy request validation also runs before any artifact lookup, so a caller who mixes up routes or role addresses is told that rather than "protocol artifacts are missing".
|
Verification summary for this branch. Go module (
Parity — Python suite — unchanged by this branch. CI — the new Boundaries — planning, governance gates, analysis, and publication stay Python-side; a Go run is not a campaign result. The integration tests use anvil because the frozen five-chain Besu QBFT topology needs at least 8 CPUs and 20 GB. No mainnet or public-testnet write path. |
…re real Go E2E in CI
本 PR 增加独立的 Go XIR 执行层:ABI/哈希与 Python 对齐、SQLite 持久化交易、部署与多跳执行、Hyperlane/LayerZero 本地协议投递、CLI 和 Go CI。规划、治理、分析和发布继续由 Python 承担。
此次在原 PR 分支
feat/go-runtime上修复恢复缺陷,未新建重复 PR。旧发现和失败基线绑定294db67dbe064bb98d3d2b23e2798f7b0f7f5949,修复快照为53c25e3f1cea985c3b4ff321747646845323a547;base 为main/4966152ad92d572dbbe733cf09f2eb510f032d9f。发布前已重新核对原作者没有更新。四项修复
time.Duration,去除重复乘秒;实际异步投递测试确认首次未验证后仍能继续轮询并成功。record_nonce冻结到 action intent,并纳入 nonce 预留;旧版本账本缺少该字段时从原交易RootCreated事件恢复,保持 nonce/rid 一致。Go CI 修复
从 lock 中的官方 Hyperlane/LayerZero 提交安装依赖,构建 XIR 及两组真实协议产物;Foundry 固定 v1.5.1。CI 使用
XIR_REQUIRE_E2E=1,缺少 Anvil/产物直接失败。JSON gate 要求原 E2E、四个原复现及新增恢复测试实际 PASS,拒绝 skip、失败或缺少测试,上传测试日志。未修改 Pythonzero-write流程。本地验证与独立复审
go vet ./...通过。全量 JSON 为 160 个测试/子测试 PASS、零测试 skip;CLI 包无测试。-race检查 caller intent 和同区块并发 dispatch 恢复通过;缺少产物的真实负向检查按预期 FAIL,未计作成功 E2E。未测及边界
仅使用隔离本地 Anvil 和真实协议合约,不代表公共网络或生产就绪;没有远程部署或主网/测试网交易。历史恢复要求 RPC 提供原区块 state,必要时还需完整 hook logs;裁剪节点、远端限流及日志范围限制未验证。已冻结且在执行前过期的 DVN 指令不会自动更新签名,保持失败关闭。未改动 paper、数据或 Kaggle 材料。
CI 状态
已回读固定 head
53c25e3的两次工作流:uv sync --frozen报No interpreter found for Python 3.13.14 in managed installations or search path。该 pin 和流程已存在于 base,未作无关重写;后续 Python lint/type/tests 和该 job 的 Solidity 测试未执行,不算通过。