Repository navigation
Conversation
kvinwang
marked this pull request as draft
September 22, 2026 15:16
kvinwang
marked this pull request as ready for review
September 22, 2026 15:49
kvinwang
force-pushed
the
research/phala-l2-light-client
branch
from
October 27, 2026 04:13
5c7f648 to
72fd3df
Compare
Collaborator
Author
|
Rebased onto
Rebase conflicts were only in #1492 deletes the legacy |
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Pin the Helios fork commit that proves the unsafe signer from Ethereum L1 before accepting blocks and enforces the configured head age. Require an explicit KMS image, drop the preview release workflow and the dev Compose alias, warn when auth-api runs without verified-read settings, and document the secure_time requirement and failure handling. Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Pin Dstack-TEE/helios master (645af74), which merges the Phala light client with CI fixes and simplified static-peer reconnects. Default the KMS deploy script to dstack-0.6.0, since secure_time hangs on older guests (#745), and point the on-chain governance guide at the light client settings. Signed-off-by: Kevin Wang <wy721@qq.com>
The Phala RPC, Ethereum RPCs and relay peer are untrusted: every response is checked against signatures or proofs. Read them from the unmeasured user config so operators can replace an endpoint without a new compose hash and on-chain approval. Only the user config file is mounted, and only fixed keys are read, so the host cannot inject other variables. The Ethereum checkpoint stays in Compose because it anchors verification. Signed-off-by: Kevin Wang <wy721@qq.com>
The KMS image copies the auth-builder node binary into the runtime, so auth-api ran on Node 20.20.2, which still trusts the compromised eMudhra/emSign intermediates. Use the Node 22.23.4 image that #1466 already moved the compose auth-api to. Signed-off-by: Kevin Wang <wy721@qq.com>
Dstack-TEE/helios#2 moves the lock to rustls-webpki 0.103.16 and webpki-roots 1.0.10, so Helios rustls clients reject chains through the compromised eMudhra/emSign intermediates. Signed-off-by: Kevin Wang <wy721@qq.com>
kvinwang
force-pushed
the
research/phala-l2-light-client
branch
from
October 27, 2026 04:27
72fd3df to
eb59916
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
KMS_IMAGEdigest.645af74(#1), which proves the Phala sequencer signer from Ethereum L1 before accepting any block.deploy-to-vmm.shtodstack-0.6.0:secure_timehangs on older guests (secure_time: true can never sync — guest chrony is built without NTS #745).ETH_MAX_BLOCK_AGE_SECONDSbounds state age in both Helios and auth-api.Trust model
Contract reads are verified against blocks signed by the sequencer key registered in Phala's L1
SystemConfig, proven through the Ethereum light client. L1 settlement is not checked, so the sequencer key remains trusted. Freshness depends on guest time: approve only KMS app-composes withsecure_time: true.Validation
Hardware TDX, QEMU 8.2.2, dstack-0.6.0 guest (OS hash
621080…471ca), Phala chain 2035, test KMS proxy0xf4bcb0A454838a776D79D3e341D7f4aa2Cf366F0, block lag 2, max age 300s, relay idle timeout 30s,secure_time: true. Image built fromfd2bbcfand served from a private test registry.key_provider=kmswith the new KMS CA key. After removing its compose hash, a fresh CVM gotBoot denied: Compose hash not allowed; the hash was restored.authorization backend unavailableat 413s, and recovered after the network returned without restarting containers.eth_calls on 20 recent blocks matched the Phala RPC except 3 rate-limited RPC replies.a6a38d9from a fresh clone produced the same digestsha256:b1cc5ff158e20337c2c901e37bcf41b8d9b8b6d3eb0d47e26869fdef09349ec1.645af74(Rust 1.94.1): workspace fmt/clippy/wasm checks and tests pass, except network tests needing RPC secrets or Holesky. Local relay + Helios against Phala: signer proven from L1, head within one block of the Phala RPC, 12/12eth_calls at head-2 matched. Calls in the first minute can fail closed until three blocks are cached.