Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
3ba4fba
refactor(trust): drop the signed trust-root ceremony; the gateway ser…
echobt Oct 19, 2026
034a889
feat(validator): only the weight-setting role needs a validator hotkey
echobt Oct 19, 2026
1e46373
feat(cli): keep keygen for challenge leaf keys
echobt Oct 19, 2026
e2f6cd7
refactor(profile): rename trust root to challenge profile in code, ch…
echobt Oct 19, 2026
cccfa5a
docs: describe the gateway-served challenge profile; drop the trust-r…
echobt Oct 19, 2026
27d6b33
test(gateway): validator without local trust uses the gateway-served …
echobt Oct 19, 2026
4c24c76
docs,deploy: drop gateway/leaf keys, keygen and signature docs for wi…
echobt Oct 19, 2026
b463ce4
Remove signatures from leaves, bundle and gateway; wire format v2
echobt Oct 19, 2026
6606ebb
Remove cortex keygen command
echobt Oct 19, 2026
33d2cf8
Refuse a v1 gateway store that only holds trust profiles
echobt Oct 19, 2026
c699f87
Dissent unsupported version for a v1 bundle before decoding it
echobt Oct 19, 2026
3951660
docs: remove stale gateway/leaf-key mentions, document operator-beare…
echobt Oct 19, 2026
b6de502
Test the strict leaf epoch check of verify_inputs
echobt Oct 19, 2026
0d534b9
Refresh wire-format docstrings for v2
echobt Oct 19, 2026
6af357f
Persist trust-version watermarks only after verification
echobt Oct 19, 2026
97fd3a9
Test the validator-reconcile CLI end to end
echobt Oct 19, 2026
fe4ecc6
Reject a non-integer profile epoch/version with a clear error
echobt Oct 19, 2026
f03b843
docs: never set introduced_epoch in the future; third challenge needs…
echobt Oct 19, 2026
d846671
feat(gateway): require a separate bearer for raw leaf intake
echobt Oct 19, 2026
6263a2a
feat(validator): add an operator-only watermark reset command
echobt Oct 19, 2026
0f594d3
docs: describe raw intake under the separate intake bearer
echobt Oct 19, 2026
927eb55
fix(cli): report a sqlite failure in watermark reset without traceback
echobt Oct 19, 2026
6dc89eb
fix(validator): fail fast on an unreadable hotkey or half a wallet
echobt Oct 19, 2026
f8f10a9
fix(validator): say the chain preflight is skipped without a hotkey
echobt Oct 19, 2026
6c6b843
docs(deploy): add the validator to weight-setter upgrade note
echobt Oct 19, 2026
2d8f3cb
docs(deploy): keep consensus.key out of the verify-only identity dir
echobt Oct 19, 2026
d9b2885
docs: drop the last signed-profile and leaf-signing claims
echobt Oct 19, 2026
3151f6e
test(config): pin the 503 for a placeholder challenge profile
echobt Oct 19, 2026
05bd7c2
fix(protocol): cap measurements_version before the watermark moves
echobt Oct 19, 2026
7a8ce56
fix(gateway): refuse raw intake while an epoch is being sealed
echobt Oct 19, 2026
5e1a0e3
fix(http): re-check bearer distinctness and length on every request
echobt Oct 19, 2026
9e504c4
fix(cli): open the watermark-reset target read-only before writing
echobt Oct 19, 2026
a08d5f6
fix(config): validate challenge profile field types before decoding
echobt Oct 19, 2026
748eaae
fix(deploy): give the weight-setter its own identity directory variable
echobt Oct 19, 2026
d909255
docs(changelog): describe algorithm 2 activation in the past tense
echobt Oct 19, 2026
922112a
fix(gateway): scope the sealing refusal to the epoch being sealed
echobt Oct 19, 2026
1a7754f
fix(cli): keep watermark-reset preflight free of sidecars and schema
echobt Oct 19, 2026
5fb36cd
fix(deploy): check the operator env file and real volume names
echobt Oct 19, 2026
b3ec7db
fix(protocol): cap challenges_version like measurements_version
echobt Oct 19, 2026
3eda466
docs(changelog): explain the version cap upgrade consequence
echobt Oct 19, 2026
dfad4d3
test(master): pin the intake refusal across the whole emit window
echobt Oct 19, 2026
1826891
fix(config): map a deeply nested challenge profile to the clean 503
echobt Oct 19, 2026
60f7ac7
fix(cli): give watermark-reset fixed reasons for unusable state files
echobt Oct 19, 2026
1161319
fix(cli): read the watermark-reset preflight without sidecars
echobt Oct 19, 2026
4145240
fix(deploy): read validator env values as compose does and refuse nes…
echobt Oct 19, 2026
3196cc3
docs(security): state the 32-byte bearer minimum and per-request check
echobt Oct 19, 2026
5a330f7
test(cli): cover watermark-reset --netuid on a journal without netuid
echobt Oct 19, 2026
94a680a
test(master): pin the 32-byte bearer boundary on a rotated intake file
echobt Oct 19, 2026
3d4e315
docs(config): describe profile reload and cautious restart in comments
echobt Oct 19, 2026
b05daf0
docs(deploy): describe profile activation as cautious, not required
echobt Oct 19, 2026
cb8179d
docs(validator): state the reset lock guard limits and drop gateway key
echobt Oct 19, 2026
9eec8ea
docs(changelog): describe the master restart on share change as caution
echobt Oct 19, 2026
aed7efe
docs(review): describe wire v2 rules in coderabbit and AGENTS
echobt Oct 19, 2026
1c4c1f4
fix(deploy): refuse nested validator identity directories
echobt Oct 19, 2026
71b0cca
test(validator): skip read-only watermark reset cases as root
echobt Oct 19, 2026
b50cb7a
docs(validator): cover both profile version caps and restart wording
echobt Oct 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test(gateway): validator without local trust uses the gateway-served …
…profile; pin mismatch refuses

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
  • Loading branch information
echobt and claude committed Oct 19, 2026
commit 27d6b33e55a767c1910627c56f7e9a85f166f192
34 changes: 34 additions & 0 deletions tests/gateway/test_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
sign_leaf,
)
from cortex.protocol.crypto import encode_hotkey, public_key
from cortex.protocol.scale import ProtocolError
from cortex.validator import ChainSnapshot, SubmissionJournal, Validator


Expand Down Expand Up @@ -162,6 +163,39 @@ async def test_signed_intake_seal_latest_validator_and_chain_dispatch(network):
assert network.chain.submissions == [(541, ((1, 65535),), 1)]


async def test_validator_without_local_trust_uses_the_gateway_served_profile(network):
await intake(network)
assert (await seal(network)).status_code == 200
served = (await network.client.get("/v1/trust")).json()
assert served == network.service.trust_profile()
validator = Validator(
gateway_url="https://master.invalid",
netuid=541,
chain=network.chain,
journal=network.journal,
http=network.client,
)
assert (await validator.run_once()).outcome == "submitted"
assert validator.trust == network.trust
assert network.chain.submissions == [(541, ((1, 65535),), 1)]


async def test_validator_pinned_to_another_gateway_key_refuses_the_served_profile(network):
await intake(network)
assert (await seal(network)).status_code == 200
validator = Validator(
gateway_url="https://master.invalid",
netuid=541,
chain=network.chain,
journal=network.journal,
http=network.client,
gateway_public=bytes(32),
)
with pytest.raises(ProtocolError, match="pinned --gateway-public"):
await validator.run_once()
assert network.chain.submissions == []


async def test_unsealed_burn_is_available_without_owner_wallet_or_chain(network):
response = await network.client.get("/v1/weights/latest")
assert response.status_code == 200
Expand Down