Signals between nodes
1) Signal concept
Signal - the minimum unit of semantic communication in the network: event, request, confirmation, status, limit, policy. Unlike a "raw" packet, a signal has semantics (type, scheme, context, invariants) and guarantees (delivery, order, idempotency).
Goals: to reduce the connectivity of services, speed up the response to changes, make the network manageable and observable.
2) Signal taxonomy
Event: facts about what happened (Created, Updated, Settled, Slashed).
Command-Action intent (Mint, Pause, RotateKey).
Query/Reply-Retrieves state/aggregations.
State Snapshot-Periodic snapshots (limits, quotas, configs).
Alerts/Incidents: deviations, degradation, SLA violations.
治理/Politiki (Governance/Policy): parameters of tariffs, limits, versions.
Cross-domain (X-Chain/X-Domain): transfers of rights/messages between chains/zones of trust.
Each class is fixed by a schema (version ID, required fields, invariants).
3) Message model
Minimum composition:- `signal_id` (ULID), `causality_id` (trace/span), `ts`, `ttl`
- `type` (namespace:version), `schema_hash`
- 'producer _ id ',' domain ',' auth _ proof '(signature/VC/ZK)
- 'qos' (class), 'retries', 'attempt'
- `payload` (CBOR/JSON/ProtoBuf), `crc`
- 'idempotency _ key '(by business entity)
4) QoS and delivery classes
Q0 Fire-and-Forget: without confirmations (telemetry, metrics).
Q1 At-Least-Once: Retrai, deadup at receiver, idempotency.
Q2 Exactly-Once (effective): idempotent entry + dedup + transactional outbox/inbox.
Q3 Ordered: keyed partitioning.
Q4 Priority/Deadline: Priorities and Deadlines (EDF/LLF) for critical teams.
Solution: default Q1 + idempotency; Q3 - for flows with causality; Q4 - for avary/治理.
5) Order, causality and idempotence
Causality keys: 'aggregate _ id', 'version', 'prev _ hash'.
Outbox/InBox pattern: transactional event commit and dispatch.
Idempotent handlers: saving 'idempotency _ key' to "seen table" + upsert.
Reconciliation: periodic checks of snapshots and logs (repair jobs).
Retray/TTL limits: protection against "eternal" repetitions and state drift.
6) Flow control and backpressure
Quotas and tokens: leaky/bucket, rate-limit by type/consumer.
Frequency/size contract: batch size, window, max-in-flight.
Drop/Degrade policies: overload overview telemetry; important Q4s do not drop.
Fairness: WFQ/DRR queuing.
Adaptability: PID controllers: increasing latency → reduce window.
7) Transport and tire
Local event bus: Kafka/Pulsar/NATS/Redis Streams - partitioning by keys.
Synchronous queries - Query/Reply gRPC/HTTP2, timeouts, and Circuit Breakers.
Cross-domain channels: IBC/CCIP-like layers, relayers with pledges, provable confirmations.
Edge/POP: local buffers and retransmission to core.
8) Signal safety
Authentication: mTLS/OIDC for S2S; signed messages (EdDSA/secp256k1).
Authorization: ABAC/RBAC for topics and signal types; RNFT rights/limits.
Integrity: butch hashes/mercurializations, unchangeable logs.
Confidentiality: fields in ZK/field encryption (FPE for partial leaks).
Anti-fraud: behavioral signatures, honey traffic, stochastic checks.
9) Observability and tracing
Correlation: trace-id/span-id in each signal, end-to-end labels.
Metrics: p50/p95 latency by type, success rate, timeout/reties%, DLQ depth, consumer lag.
Logs of politics: who, when, what changed (治理/limity), signatures and diffuses of configs.
Alerts: SLO error budgets; synthetic samples for critical routes.
DLQ/Replay: dead queues, reprocess with double proof.
10) Diagrams and versioning
Schema Registry: evolution of fields (back/forward compatible), semver types.
Feature flags: gradual activation of fields/logic.
Compatibility contracts: old producer ↔ new consummer tests and vice versa.
Migrations: dual-write/dual-read, mirror topics, sunset plans.
11) Retray and deduplication policies
Retrai: exponential delay + jitter, maximum attempts, quarantine after threshold.
Dedup: storing the last 'N' keys per party or bloom filters; TTL records.
Anti-storm: group ACK/NACK, coalescing events (debounce/aggregate).
12) SLA/SLO for signals
Example of target SLOs (by class):- Q4: p95 ≤ 200 ms, success ≥ 99. 99%, DLQ = 0, Incident MTTR ≤ 15 min.
- Q3: p95 ≤ 500 ms, success ≥ 99. 9%, violation of the order of ≤ 10⁻⁶/soobshcheniye.
- Q1: success ≥ 99. 5% per T window, p95 ≤ 1-2 s.
Error budget: overspending → auto-download speeds, enabling priorities, degradation feature flag.
13) Cross-chain signals (multi-chain)
Event proofs: light-client/state proofs instead of "relay trust."
Finality: accounting for domain finalization delays, temporary locks (challenge period).
Economic guarantees: S-pledge of relayers, slashings for false confirmations.
X-Domain idempotency: global 'x _ msg _ id', seen tables at both ends.
Exit policies: stop taps, volume/time limits, manual quorum for attacks.
14) Anti-collusion and abuse
Fake signals: strong auth + behavioral anomaly detector.
Replay attacks: nonce/TTL and one-time keys.
Producer collation: correlation audit, blind samples, bias penalties.
Event pharming: charging by quality (Q-class), rate limits by essence.
15) Implementation playbook
1. Mapping of domains and signal types. Determine criticality (Q-class), owners, schemes.
2. Choice of transport and topic architecture. Partitioning by causality keys.
3. SLO/SLA definition. Error budgets, alerts, emergency procedures.
4. Security-by-default. Signatures, mTLS, ABAC, key rotation.
5. Idempotence and dedup. Outbox/InBox, seen-tables, TTL.
6. Backpressure. Quotas, windows, priorities, dashboards of lags.
7. Schema Registry & versioning. Compatibility contracts, test matrices.
8. Observability. E2E tracing, synthetic samples, DLQ/Replay.
9. Pilot and game-days. Incident training, replay real logs.
10. Scaling. X-domain, limits, stopcocks, public post-mortems.
16) Metrics and dashboards
Performance: latency p50/p95/p99, throughput, consumer lag, in-flight.
Reliability: success rate, retry%, DLQ depth, duplicate ratio.
Order: out-of-order%, reordering distance.
Economics: processing cost/message, class margin, penalties/incentives.
Safety: rate of suspicious signals, false positive/negative.
治理: the speed of rolling out schemes/policies, the proportion of successful upgrades without rollback.
17) Contract/service templates
Signal Gateway: validation, authentication, normalization, prioritization.
Schema Registry: schema storage/validation, compatibility.
Signal Router: routing by type/domain, QoS classes, rate limits.
Idempotency Store: keys, TTL, deadup.
DLQ/Replay Service: quarantine, deferred processing, replay on windows.
X-Domain Relay: proofs, pledges, slashing, finality.
Policy Hub: limit/config management, change auditing.
18) Delivery checklist
- QoS and SLO classes defined for all signal types
- Signatures enabled, mTLS, key rotation, ABAC
- Configured outbox/inbox, idempotent handlers, deadup
- Rate limits, backpressure, priorities implemented
- Introduced Schema Registry, compatibility tests, mig plans
- Dashboards available: latency/lag/DLQ, alerts on error budgets
- Game-days, replay, post-mortems
- Evidence, pledges and stopcocks included for X-domain
19) Glossary
QoS: delivery guarantee/priority class.
Idempotency: repeated execution without side effects.
Backpressure: mechanisms that limit the load during overload.
DLQ: Dead queue for failed processing.
Trace/Span - End-to-end trace IDs.
X-Domain/X-Chain: cross-domain/cross-chain signal routes.
Bottom line: properly designed signals are the "nervous system" of the network. By standardizing schematics, safeguards, safety and observability, the ecosystem gains predictable delivery, fault tolerance and managed evolution without hidden connections and hand crutches.