Summary
node/tests/test_epoch_proposal_merkle_validation.py imports rustchain_p2p_gossip before setting a test HMAC secret. Since rustchain_p2p_gossip.py now intentionally exits at import time when RC_P2P_SECRET is unset, this test file cannot be collected in a normal shell without that environment variable.
Reproduction
From a clean checkout with no RC_P2P_SECRET exported:
python -m pytest node\tests\test_epoch_proposal_merkle_validation.py -q
Current result:
SystemExit: [P2P] FATAL: RC_P2P_SECRET environment variable is not set or contains an insecure placeholder value.
No tests run because collection aborts while importing rustchain_p2p_gossip.
Expected behavior
The test should set a deterministic unit-test RC_P2P_SECRET before importing the P2P gossip module, matching the pattern used by nearby P2P tests such as test_p2p_endpoint_auth.py, test_p2p_gossip_routes.py, and test_p2p_vote_spoofing.py.
Bug bounty reference: #305
Summary
node/tests/test_epoch_proposal_merkle_validation.pyimportsrustchain_p2p_gossipbefore setting a test HMAC secret. Sincerustchain_p2p_gossip.pynow intentionally exits at import time whenRC_P2P_SECRETis unset, this test file cannot be collected in a normal shell without that environment variable.Reproduction
From a clean checkout with no
RC_P2P_SECRETexported:Current result:
No tests run because collection aborts while importing
rustchain_p2p_gossip.Expected behavior
The test should set a deterministic unit-test
RC_P2P_SECRETbefore importing the P2P gossip module, matching the pattern used by nearby P2P tests such astest_p2p_endpoint_auth.py,test_p2p_gossip_routes.py, andtest_p2p_vote_spoofing.py.Bug bounty reference: #305