Repository navigation
FluxOS carries the signed code hash list to peers and to fluxbench - #1925
Open
MorningLightMountain713 wants to merge 4 commits into
Open
MorningLightMountain713 wants to merge 4 commits into
MorningLightMountain713 wants to merge 4 commits into
Conversation
SignedDocumentExchange holds what keeping a signed document current with peers takes: the held document and its restore, adoption by verified sequence, the one-peer ask with its correlation id and three answers, the claim chase, peer confirmation, the backstop fetch and its phased tick. It takes everything it touches - log, event bus, signature check, storage, source - from the document's module, so a test replacing one of those replaces it for the exchange. policyStore is the policy bundle's instance: its exports, log lines, events, stored row and acquisition gate are unchanged. The envelope check, the stored row, the responder, the ask, the announcement and the capable peer lookup each take the document they serve; the policy wire names and capability are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… to fluxbench hashListStore is the second SignedDocumentExchange: the list fluxhashes publishes, verified against the two keys fluxbench pins, stored in its own row, exchanged with peers as fluxhashlistseq, fluxhashlistrequest and fluxhashlist under the hashList capability, and fetched from hashes.runonflux.io only as the backstop. FluxOS verifies a list before it stores or passes it on, and does not judge by it. GET /flux/hashlist serves the bytes this node holds, uncached, and 404 when it holds none. A network whose profile names no hash list source or keys keeps none; a suite fleet keeps none unless the suite configures one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The external stub signs and serves a hash list under a key of its own, with fetch counters by client and a control to refuse chosen addresses, re-sign and publish. Suite 1507 turns the hash list on for three nodes and has the source refuse the middle one: the others take the list from the source and announce it, the refused node takes it from a peer, and it serves the publisher's envelope on /flux/hashlist. Solo on chud: 3 passing. Before-state (development with this commit's harness files, no hash list in FluxOS): every test red at its own assertion - node 2 never stores a list, the refused node adopts nothing, /flux/hashlist answers 404. Mutations, one at a time: - the fluxhashlist handler not offering the list: "a node the source refuses takes the list from a peer" red - the hashList capability not advertised: the same test red - /flux/hashlist holding nothing: "the refused node serves on /flux/hashlist the list the publisher signed" red, alone Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…igner's document Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
FluxOS now carries the signed list of FluxOS code hashes that fluxbench checks a node against. Each node holds the list, verifies it, takes newer versions from its peers, and serves it to fluxbench and to the release pipeline on
GET /flux/hashlist. It travels on the same peer exchange as the network policy bundle, which this PR first moves into a module of its own so both documents share one implementation.What changes
1. The signed document exchange is its own module (
refactor(policy)).utils/signedDocumentExchange.jsholds what keeping a signed document current with peers takes: the held document and its restore, adoption by verified sequence, the one-peer ask with its correlation id and three answers (ahead, level, nothing), the claim chase, peer confirmation, the backstop fetch and its tick phased by collateral. It takes everything it touches (log, event bus, signature check, storage, source) from the document's module.policyStoreis the policy bundle's instance: its exports, log lines,policy:*events, stored row and acquisition gate are unchanged. The envelope check (verifySignedDocument), the stored row (readSignedDocument/writeSignedDocument), the responder, the ask, the announcement and the capable-peer lookup (getCapablePeers(capability)) each take the document they serve. The policy wire names (fluxpolicyseq,fluxpolicyrequest,fluxpolicy) and thepolicyBundlecapability are unchanged.2. The code hash list (
feat(hashlist)).hashListStoreis the second instance. It verifies a list against the keys fluxbench pins (the CI key and the cold key) before it stores or passes it on, and checks the payload is a list of tree hashes. It stores the signed bytes in their own row (fluxHashList) and exchanges them with peers asfluxhashlistseq,fluxhashlistrequestandfluxhashlistunder thehashListcapability. It fetches fromhashes.runonflux.io/hashlistonly as the backstop: a node restores its stored list at start, asks each capable peer as it connects, adopts and announces anything newer, and reaches the source only when its peers cannot settle what it holds, or on its daily tick. FluxOS carries the list and does not judge by it; fluxbench hashes the code and decides.GET /flux/hashlistserves the bytes the node holds, uncached, and 404 when it holds none. The network profile gainshashList(sourceUrl,publicKeys,minConfirmingPeers). A network whose profile names no source or keys keeps no list and answers a peer that asks that it holds nothing. A non-mainnet profile must carry the same keys as mainnet's, so a lab profile gainshashListwith an empty source and keys alongside this change.3. Harness suite 1507 (
test(hashlist)). The external stub signs and serves a hash list under a test key of its own, with fetch counters by client and a control to refuse chosen addresses, re-sign and publish. Suite 1507 turns the hash list on for three nodes and has the source refuse the middle one: the others take the list from the source and announce it, the refused node takes it from a peer, and it serves the publisher's envelope on/flux/hashlist. A suite fleet keeps no hash list unless the suite configures one, and the threehashList:*events are on the harness subscription list.Testing
tests/images/run-unit.sh, chud): full suite 13,444 passing, 0 failing. The policy store's tests pass unchanged on the first commit alone (848 passing across the policy-related files). New tests cover the hash list's verification (including the list fluxhashes published as seq 508 verifying under the pinned keys), its store,/flux/hashlist, the generic responder with the hash list's message names, andgetCapablePeers.fluxhashlisthandler not offering the list, and thehashListcapability not advertised, each turn "a node the source refuses takes the list from a peer" red;/flux/hashlistholding nothing turns "the refused node serves on /flux/hashlist the list the publisher signed" red, alone.before allhooks only (bootAndPeer's peer floors in its fleets with a stub peer and a deferred node), the harness ring following the fixture's txhash order, which fix(apps): a failed restore holds what it broke until it heals or its owner accepts it #1921 fixes; all 15 of its policy tests that ran passed.Notes for reviewers
/flux/hashlistadds a copy on every node, and lets the release pipeline sample live nodes.🤖 Generated with Claude Code