feat(host_reporter): add LUMERA_SUPERNODE_DISABLE_HOST_REPORTER test affordance#285
Merged
mateeullahmalik merged 1 commit intomasterfrom Apr 27, 2026
Merged
Conversation
…affordance Allow disabling the on-chain host_reporter service via the LUMERA_SUPERNODE_DISABLE_HOST_REPORTER=1 env var so devnet/CI test scenarios can drive MsgSubmitEpochReport directly without losing the account-sequence race against the SN's own ~5s auto-submit ticker. Production deployments must leave this unset; the canonical path is unchanged when the env var is absent. This unblocks the everlight devnet test's STORAGE_FULL transition scenarios (S2.3-S2.6) which submit audit reports from the SN reporter key as part of a black-box state-machine test.
No issues found. The change is minimal and well-scoped: env-var gating is clean, the nil guard before append is correct and consistent with the existing Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
mateeullahmalik
added a commit
to LumeraProtocol/lumera
that referenced
this pull request
Apr 27, 2026
Multi-faceted fix to make 'make devnet-tests-everlight' green on master: - devnet/go.mod: activate the local 'replace lumera => ..' block (was pinned to v1.10.0 but tests/validator imports x/action/v1/merkle which only exists at HEAD). Bump baseline require to v1.11.1. - devnet/default-config/devnet-genesis.json: set epoch_length_blocks=20 in genesis. The audit module enforces 'epoch_length_blocks is immutable after genesis' (consensus-critical math); the previous test attempted to gov-update this at runtime which is correctly rejected. Devnet wants short epochs (~20s) for fast lifecycle coverage. - devnet/generators/docker-compose.go: emit EVERLIGHT_TEST_TARGET=1 on supernova_validator_1 only. The companion supernode change (LumeraProtocol/supernode#285) suppresses host_reporter on that validator so the test can drive MsgSubmitEpochReport without losing the account-sequence race. Other validators keep host_reporter running so peer reachability data still flows for ACTIVE eligibility. - devnet/scripts/supernode-setup.sh: forward EVERLIGHT_TEST_TARGET=1 through to LUMERA_SUPERNODE_DISABLE_HOST_REPORTER=1 when starting the supernode binary. - devnet/tests/everlight/everlight_test.sh: six fixes 1. Rewrite 9 'cmd; rc=$?' sites to 'rc=0; cmd || rc=$?' so 'set -e' no longer aborts before FAIL/SKIP can be recorded. 2. audit_current_epoch_id: '.epoch_id // empty' -> '.epoch_id // 0'. proto3/gogoproto omits zero-valued scalars; epoch 0 (first 400 blocks under default params, first 20 blocks under devnet) is a valid epoch but renders without the .epoch_id key. 3. 'audit assigned-targets --supernode-account FOO' -> positional 'FOO'. The CLI takes a positional arg, the flag does not exist and silently fails the entire submit pipeline. 4. 'supernode report-supernode-metrics --validator-address FOO' -> positional 'FOO'. Same shape as #3, on the legacy metrics path. 5. S7.7: stop trying to gov-update epoch_length_blocks (immutable by design) and convert the assertion into a presence + value check. 6. Scenario 2 entry: drive a healthy self-report and wait one epoch so the target supernode recovers from POSTPONED -> ACTIVE before S2.3 attempts the STORAGE_FULL transition. POSTPONED is the expected starting state when host_reporter is disabled (missing-report consecutive postponement is correct chain behavior). 7. S5.4: rewrite assertion from 'eligible after growth jump' to 'smoothed_weight < raw post-jump bytes'. The original assertion races the growth-cap clamp; the rewritten one tests the actual anti-gaming property without a timing dependency on smoothing ramp-up. ## Verification 5-validator devnet, fresh genesis, full make devnet-tests-everlight: PASS: 39 FAIL: 0 SKIP: 4 EXIT=0 The 4 SKIPs are intentional: S3.5-S3.7 (payout candidates not yet eligible at distribution time on devnet timing), S4 (needs longer state setup), S9 (pre-Everlight upgrade flow), S10 (full lifecycle). ## Companion change Requires LumeraProtocol/supernode#285 (LUMERA_SUPERNODE_DISABLE_HOST_REPORTER env var). Without it the EVERLIGHT_TEST_TARGET env propagation in this PR is a no-op.
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 an env-gated knob to disable the on-chain
host_reporterservice:LUMERA_SUPERNODE_DISABLE_HOST_REPORTER=1(ortrue) → host_reporter is not started.Why
The everlight devnet test (
devnet/tests/everlight/everlight_test.shin the lumera repo) drivesMsgSubmitEpochReportfrom outside the SN to exercise the STORAGE_FULL state transition (S2.3–S2.6) and anti-gaming guardrails (S5.x) as black-box state-machine tests. The SN's ownhost_reporterticks every ~5s and auto-submits using the same reporter key — the test loses every account-sequence race and the scenarios cannot complete.This was not a chain bug: epoch math is immutable-by-design,
MsgSubmitEpochReport.Creatormust be the registered SN account, and host_reporter's auto-submit (PR #284) is correct. The fix is a test affordance, not a behavior change.Scope
supernode/cmd/start.go), ~27 LOC.hostReporteris now optional in the services slice; nil-guarded before append.Verification
Built locally, deployed in 5-validator devnet with
EVERLIGHT_TEST_TARGET=1only onsupernova_validator_1:INFO host_reporter disabled via LUMERA_SUPERNODE_DISABLE_HOST_REPORTERepoch report submittedlines flowing).make devnet-tests-everlightrun: PASS: 39 FAIL: 0 SKIP: 4 (skips are intentional — full-lifecycle / pre-Everlight genesis scenarios that are out of scope for the everlight feature flag).Risks
NewServicecall, same fatal-on-error, same services-slice membership).if hostReporter != nilguard before append is a no-op in the canonical path.Rollback
Revert this single commit. Companion lumera-side changes (devnet compose + everlight test fixes) ship in a separate PR on the lumera repo.