Repository navigation
Enhance logging and gateway selection with meter history fixes - #66
Merged
Merged
Conversation
The agent, central, the gateway fallback and standalone now log one readable line per step: the reading received, the decision, and the state reply enqueued, plus the real reason a report is rejected.
Each browser tab keeps its own target (a gateway or central): Terminal and ChirpStack name it in their addresses, ChirpStack logins are kept per target, and the shared selection cookie is gone. Logs now say why the agent decided a report on the gateway instead of central, why central refused an agent request, and why the power-state check failed. Non-billing ports show raw bytes, repeated states are logged once, short placeholders are no longer redacted and keyed RPC URLs are hidden.
A gateway that billed a meter standalone before joining central could never hand its fallback decisions to central: the first replayed nonce looked like a gap, so every later report fell back to the gateway. Central now starts a meter it has never seen at the oldest signed record (signature and token still checked); later gaps are refused.
auto-compose.sh records COMPOSE_FILE and COMPOSE_PROJECT_NAME in .env after a successful deploy, so plain 'docker compose logs -f' follows the running role. The Streamr app now counts only unpublished readings on central, scopes to the tab's gateway, explains that central publishes on managed gateways, refreshes itself and shows the last automatic publish. Central learns a meter's gateway from replayed reports too. Documents the known ENS verifier issue that keeps meters OFF.
…away A managed gateway sends readings it decided itself to the prover (only the prover) and records the send. At handover it reports those sends, read at handover time, and central records them so neither its immediate send nor its scheduled job repeats them. Central accepts the marker only for records in the same handover and for the same prover address.
MQTT topics don't carry the port, so the agent reads fPort and silently acknowledges anything other than port 2 (telemetry, network-control frames).
27-page manual covering setups, installation, the desktop and central workspace, publishing and proofs, reliability, logs, settings, extensions, maintenance, security and troubleshooting. Also corrects the guide: the script updates its own COMPOSE_ lines in .env.
Docker can start host-network containers before the host has DNS (slow Wi-Fi), leaving them with empty DNS settings forever: the agent never reached central. The agent and Console now restart themselves after 3 minutes without a nameserver (CONSOLE_DNS_RESTART_MS), and the agent logs when it can't reach central and when it reconnects. The coordinator no longer waits on the previous decider when the previous report is already settled (reply enqueued or seen in the queue), so the gateway decides new reports while central is unreachable.
Phones freeze or drop background pages, which ended the SSH session. The shell now waits up to 10 minutes (TERMINAL_RESUME_MS), keeping recent output, and the page reconnects with a one-time rotating resume key when it is visible again, also after the browser reloads the page. Disconnect and closing the window still end the session at once. On central, only the same user on the same target can resume.
…hain Central marked prover and Streamr sends as submitted and never sent them again, so readings the prover received but never proved were stuck. Scheduled prover and Streamr runs (and Publish Now) now send every stored reading not yet confirmed on-chain, every time; confirmed ones are pruned first. Only Arweave uploads and central's first per-module send of each new reading are recorded and never repeated. Also fixes gateway prover sends while central is away (a hook wrapper blocked them) and drops the now-pointless already-sent handover marker (still accepted from older gateways). Updates the guide and manual.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.