feat(NET-1186): discover and parse the worker-oriented assignment - #67
Merged
Conversation
- visible_assignment() prefers NetworkState.worker_assignment, falling back to the legacy assignment pointer (mirrors sqd-portal's PR #125 pattern), gated by mvcc-chunks. - fetch_worker_assignment() decodes sqd_assignments::WorkerAssignment alongside the untouched legacy fetch_assignment(); shared gzip-download logic factored into download_gzipped(). - p2p.rs: when an update is sourced from worker_assignment, decode and log it only -- never fed to the legacy parser, and DatasetsIndex/serving stays on the legacy path. WorkerAssignmentChunk has no files/base_url; deriving them from schema_id/tables_present needs schema delivery, which is separate, not-yet-scoped work (see NET-1180). Temporarily pins sqd-assignments to NET-1180's unmerged branch commit (1e334ec) since the new WorkerAssignment/PortalAssignment types aren't on sqd-network's master yet -- re-pin once NET-1180 lands. Verified: cargo check/test/clippy/fmt all clean, both with and without mvcc-chunks -- full suite (lib + e2e + query_concurrency + query_surface), 97 tests, 0 failures.
…ommit Picks up define-null's review fixes on sqd-network#214 (worker/portal .fbs split, last_block_hash moved to the dataset level, assignment_fb.rs facade doc comment) -- none of them touch anything worker-rs uses (no references to PortalAssignment or last_block_hash anywhere in this repo). Still a TEMPORARY pin pending NET-1180's merge. Verified: check/test/clippy/fmt clean in both feature configs -- full suite (97 tests: lib + e2e + query_concurrency + query_surface, both configs), run one target at a time given prior OOM issues on this machine; none recurred. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
define-null
approved these changes
Aug 4, 2026
NET-1180 (sqd-network#214) merged as 360bbd4. Drops the TEMPORARY branch pin now that WorkerAssignment/PortalAssignment are on sqd-network's main. Verified: check/test/clippy/fmt clean in both feature configs -- full suite (97 tests), run one target at a time given prior OOM issues on this machine; recurred once mid-run this time (unrelated background memory pressure), all targets passed cleanly on retry after confirming memory had recovered. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
Adds discovery and decoding support for the new
WorkerAssignmenttype (from NET-1180), without touching real chunk-serving. Scope is deliberately narrow — infra only, not a switch-over.visible_assignment()now prefersNetworkState.worker_assignment, falling back to the legacyassignmentpointer — mirrors the pattern already used in sqd-portal (PR #125), gated behindmvcc-chunks.fetch_worker_assignment()decodessqd_assignments::WorkerAssignmentalongside the untouched legacyfetch_assignment(); shared gzip-download logic factored out intodownload_gzipped().p2p.rs: when an update is sourced fromworker_assignment, it's decoded and logged only — never fed to the legacy parser.DatasetsIndexand actual chunk-serving stay on the legacy path entirely.Notes
WorkerAssignmentChunkhas nofiles/base_url— deriving them fromschema_id/tables_presentneeds the schema delivery mechanism, which is separate, not-yet-scoped work (tracked against NET-1180's design doc, not this ticket).sqd-assignmentsto NET-1180's branch commit (1e334ec) in both[dependencies]and[dev-dependencies], since the new types aren't on sqd-network's master yet. Marked# TEMPORARY— needs re-pinning to master once sqd-network#214 merges.Test plan
cargo check/test/clippy -D warnings/fmt --checkclean, both with and withoutmvcc-chunkse2e+query_concurrency+query_surface), 97 tests, 0 failures🤖 Generated with Claude Code