fix(devnet): green up everlight devnet test on master#123
Merged
mateeullahmalik merged 1 commit intomasterfrom Apr 27, 2026
Merged
fix(devnet): green up everlight devnet test on master#123mateeullahmalik merged 1 commit intomasterfrom
mateeullahmalik merged 1 commit intomasterfrom
Conversation
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.
Reviewed all six changed files. The fixes are well-targeted and correct:
No issues found. Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
j-rafique
approved these changes
Apr 27, 2026
j-rafique
approved these changes
Apr 27, 2026
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
make devnet-tests-everlightis failing on master (7ca770a, PR #113). This PR makes it green with a single, surgical, multi-file fix.Result on a fresh 5-validator devnet:
The 4 SKIPs are intentional (S3.5–S3.7 payout-timing on devnet, S4 longer state setup, S9 pre-Everlight upgrade flow, S10 full lifecycle).
What was broken
devnet/go.modpinnedlumera v1.10.0buttests/validator/lep5_test.go(PR LEP 5 #103) importsx/action/v1/merklewhich only exists at HEAD —go mod tidyfailed.everlight_test.shhad 9cmd; rc=$?sites that swallow non-zero exits silently underset -euo pipefail, killing the script before anyFAILline could print (this is why the original symptom wasS2.1 PASS … make: *** Error 1with nothing in between).audit_current_epoch_idused.epoch_id // empty— proto3/gogoproto omits zero-valued scalars, so a legitimate epoch 0 response renders without.epoch_idand the function returned a missing-key error.audit assigned-targets --supernode-account FOOandsupernode report-supernode-metrics --validator-address FOOuse positional args, not flags. The script's flag form silently failed.epoch_length_blocks. The audit module correctly enforces this as immutable-after-genesis (consensus-critical epoch math). The test was wrong, not the chain.MsgSubmitEpochReportevery ~5s with the SN's reporter key. The test tries to submit using the same key from outside the SN and loses the account-sequence race every time → S2.3, S2.4, S2.6, S5.x all silently failed in the recovery loop.What this PR changes
devnet/go.mod— activate the localreplace lumera => ..block so devnet builds against this repo's HEAD; bump baseline require tov1.11.1.devnet/default-config/devnet-genesis.json— setepoch_length_blocks: 20so devnet has fast (~20s) epochs. No chain-code change required; matches the design that this is a genesis-time decision.devnet/generators/docker-compose.go— emitEVERLIGHT_TEST_TARGET=1only onsupernova_validator_1(the test target).devnet/scripts/supernode-setup.sh— whenEVERLIGHT_TEST_TARGET=1, forwardLUMERA_SUPERNODE_DISABLE_HOST_REPORTER=1so v1's host_reporter is suppressed and the test can driveMsgSubmitEpochReportcleanly. The other 4 validators keep host_reporter running, so peer reachability observations still flow and ACTIVE-state eligibility still works.devnet/tests/everlight/everlight_test.sh— 7 fixes: set -e hardening, jq epoch-0 fix, two flag→positional fixes, S7.7 immutable-by-design refactor, S2 recovery preamble, S5.4 anti-gaming property assertion rewrite.Companion change (required)
LumeraProtocol/supernode#285 — adds the
LUMERA_SUPERNODE_DISABLE_HOST_REPORTERenv knob. Without it theEVERLIGHT_TEST_TARGET=1propagation in this PR is a no-op and S2/S5 will still fail.No chain code touched
Every suspected "chain bug" turned out to be correct protocol behavior (epoch_length immutability, missing-report POSTPONE, host_reporter auto-submit, anti-gaming smoothing). This PR only updates devnet config, devnet test infrastructure, and the test script itself.
x/audit,x/supernode,x/action, ante handlers, keepers, migrations — all untouched.Risk / rollback
devnet/and devnet-only configuration.MinCascadeBytesForPayment,MinCpuFreePercent,epoch_length_blockssemantics, and the audit/supernode modules are unchanged.Test evidence