Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
syntrust
marked this pull request as ready for review
July 14, 2026 11:11
…boot The slave performs no network I/O of any kind, but registering all of geth's debug.Flags made --pprof start an HTTP listener and --pyroscope push to a remote server. Register an allowlisted subset instead: logging and file-based profiling only, fail-closed against upstream additions, with a test pinning the boundary in both directions. Install the SIGINT/SIGTERM handler before any resource opens, so a signal that lands during config load or shard boot still funnels into the blocking Stop() path instead of the OS default termination. A watcher restores default signal handling the moment the first signal lands, keeping the second-signal force-quit available even mid-boot. Covered by a reexec subprocess test that signals at the 'slave booting' line and asserts a clean exit plus a reopenable datadir. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The pattern was added with a leading space, which is significant in gitignore syntax, so it never matched anything. Remove it rather than fix it and restore the trailing newline. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
syntrust
requested review from
blockchaindevsh,
iteyelmp,
ping-ke,
qizhou and
qzhodl
July 15, 2026 11:11
Take the finalized cmd/slave CLI shape from slave-m2 and relocate the boot tests it superseded: the fixture helpers, TestBootSlave, and TestBootSlaveRejectsBadNodeID move from slave_test.go (owned by slave-m1) into run_test.go, which also adopts its final goleak TestMain form; run.go and qkc/slave pick up their follow-up TODO markers. main.go keeps only the one-line app.Action wiring on top of slave-m2. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The README baseline now carries the final section structure; keep only the 'Running a slave' section on top (its milestone marker dropped with the rest). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 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.
Milestone M3 of #17, stacked on #26 (base:
slave-m2).Boots a slave identity end to end:
slave --cluster_config <file> --node_id S0starts every owned shard, runs until SIGINT/SIGTERM, and shuts down cleanly. No network I/O.What's included
qkc/slave:SlaveBackendwith a branch-keyed shard registry (mirrors pyquarkchainSlaveServer); the slave process itself owns no database.Stop()is idempotent and blocks until every shard and chaindb is closed.cmd/slave: default run action — a drop-in for how pyquarkchain'scluster.pylaunches a slave — with signal-driven shutdown; a second signal force-quits.Test plan
go build ./cmd/slave && go test ./qkc/... ./cmd/slave/— 131 tests / 12 packages green; gofmt/vet clean.Options.Chain(pebble's directory lock proves the DBs were closed); idempotentStop; cmd-levelbootSlavepipeline withDB_PATH_ROOTredirected to a temp dir.shard started genesis=0x… head=0→^Cexits 0 → rerun on the same datadir logsexisting genesis validatedper shard (viaqkc/shard.ReconcileGenesisRecord, slave (M2): add shard skeleton with ShardChain stub and genesis record #26).🤖 Generated with Claude Code