test: Go simnet harness for charon/pluto e2e duty tests#526
Open
varex83agent wants to merge 1 commit into
Open
test: Go simnet harness for charon/pluto e2e duty tests#526varex83agent wants to merge 1 commit into
varex83agent wants to merge 1 commit into
Conversation
Add test-infra/harness, a Go module that reuses charon v1.7.1 as a library (cluster fixtures, beaconmock, validatormock, relay) to run simnet-style end-to-end attester duty tests over clusters mixing in-process charon nodes and subprocess pluto nodes. Since charon's beaconmock only implements dynamic behaviour on its Go client interface, the harness adds a per-node HTTP gateway fronting one shared mock, serving duties/validators/attestation endpoints over real HTTP and capturing submissions per node for assertions. Unlike upstream simnet, partial-signature exchange runs over real p2p so out-of-process nodes participate in consensus and threshold signing. Scenarios: all-charon in-process (baseline), all-charon via gateway (validates the gateway), all-pluto and 2+2 mixed with threshold 3 (skip until `pluto run` lands, then activate automatically). The subprocess path is validated today by pointing PLUTO_BIN at a charon binary, which passes the mixed scenario in ~5s. CI runs the charon scenarios standalone for fast signal, plus the full suite with a freshly built pluto binary. Co-Authored-By: Bohdan Ohorodnii <35969035+varex83@users.noreply.github.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.
What
Adds
test-infra/harness/, a Go test harness that runs simnet-style end-to-end attester duty tests over distributed-validator clusters mixing charon nodes (in-process, reusing charon's ownapp.Run) and pluto nodes (subprocesses of the pluto binary), plus a CI workflow.Charon
v1.7.1(our parity reference) is consumed as a regular Go module dependency — no fork. The harness reuses itscluster.NewForTdeterministic fixtures,testutil/beaconmock,testutil/validatormockandtestutil/relaydirectly.Design
BroadcastCallbackassertions.Scenarios
TestSimnetAttesterCharonInProcessTestSimnetAttesterCharonViaGatewayTestSimnetAttesterPlutopluto runlandsTestSimnetAttesterMixedpluto runlandsThe pluto scenarios probe
$PLUTO_BIN run --helpand activate automatically once theruncommand exists. The subprocess path is already validated end-to-end today: pointingPLUTO_BINat a charon binary (which accepts the same flags) passes the mixed scenario in ~5s, covering the on-disk fixture layout, run flags, readiness polling, HTTP-driven validator mock and capture assertions.CI
.github/workflows/go-harness.yml:pluto-cli(same steps as dkg-runner) and runs the full suite withPLUTO_BINset.Notes
replacedirectives ingo.modare copied from charon's owngo.mod(Go does not propagate a dependency's replaces); they must move in lockstep when bumping the pinned charon version.pluto runrequirements for the scenarios to activate are documented in the README (charon-equivalent flags + validator API on the configured address).🤖 Generated with Claude Code