See https://github.com/malbeclabs/doublezero/blob/main/rfcs/rfc12-network-provisioning.md for context.
Add a device activation criterion to device-health-oracle: Do not advance a device's health to ready-for-links or ready-for-users unless it has worth of records in the clickhouse controller_grpc_getconfig_success table. The query should check that the device has called the controller at least once per minute over the interval.
There is a different clickhouse database for each doublezero environment:
- devnet.controller_grpc_getconfig_success
- testnet.controller_grpc_getconfig_success
- mainnet-beta.controller_grpc_getconfig_success
You can find a reference clickhouse client implementation here:
- controlplane/telemetry/cmd/geoprobe-target/main.go
- controlplane/telemetry/internal/geoprobe/migrations.go
- controlplane/telemetry/internal/geoprobe/clickhouse.go
- controlplane/telemetry/internal/geoprobe/clickhouse_test.go
- controlplane/telemetry/db/clickhouse/migrations/20260401000001_location_offsets.sql
Regarding architecture:
- Today the oracle simply sets health to ready-for-users (devices) or ready-for-service (links). This is the first of many criteria we will be adding for devices and links. As the rfc explains, devices will go through 2 stages of readiness - ready-for-links and ready-for-users (and must pass through ready-for-links before proceeding to ready-for-users), while links only have 1 stage - ready-for-service. Please look for software design patterns suitable for this task, list 2 or 3 alternatives, and propose one.
- Today the oracle sets health to ready-for-users (devices) or ready-for-service (links) without regard for their current values. Please optimize this so we don't change a value if it's already set to the desired value.
See https://github.com/malbeclabs/doublezero/blob/main/rfcs/rfc12-network-provisioning.md for context.
Add a device activation criterion to device-health-oracle: Do not advance a device's health to ready-for-links or ready-for-users unless it has worth of records in the clickhouse controller_grpc_getconfig_success table. The query should check that the device has called the controller at least once per minute over the interval.
There is a different clickhouse database for each doublezero environment:
You can find a reference clickhouse client implementation here:
Regarding architecture: