Phase 10.1: Registry protocol 2 (structured listing), migration 2, v1 refused explicitly

Listing (rates, modules, region, account provisioning), population with players and bots apart,
level cap and ruleset derived from the hash-checked capabilities. Realm records from protocol 1
keep their id, key and creation time and are republished in place. Host publishes the real
values: rates from the effective worldserver configuration, modules from the module catalog,
players/bots from the realm database.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ДмитрийandClaude Sonnet 5.5 committed 2026-10-07 21:31:45 +05:00
1 parent 3e57d32c90
commit e39cecb333
28 files changed
+1012 -397

No files matched your search

+3 -3
View File
@@ -1,4 +1,4 @@
"""Independent check of the documented Registry test vector with the RFC 8032 reference algorithm (pure Python, not the code under test)."""
"""Independent check of the documented Registry (protocol 2) test vector with the RFC 8032 reference algorithm (pure Python, not the code under test)."""
import base64
import hashlib
@@ -81,7 +81,7 @@ def sign(seed, msg):
b64 = lambda b: base64.urlsafe_b64encode(b).decode().rstrip("=")
seed = bytes([7]) * 32
realm = "018f2d9e-5c3a-7b21-8c4d-0e5f6a7b8c9d"
body = b'{"protocol_version":1}'
msg = "\n".join(["coa-registry-sig-v1", "1", "POST", f"/registry/v1/realms/{realm}/heartbeat", realm, "1790000000", hashlib.sha256(body).hexdigest()]).encode()
body = b'{"protocol_version":2}'
msg = "\n".join(["coa-registry-sig-v2", "2", "POST", f"/registry/v2/realms/{realm}/heartbeat", realm, "1790000000", hashlib.sha256(body).hexdigest()]).encode()
print("public key ", b64(public(seed)))
print("signature ", b64(sign(seed, msg)))