Conversation
|
I think overall DZDs should be using their telemetry key to write this data onchain. I don't think we want this as part of the onchain user, since I think we don't want to give DZDs the authority to modify user accounts. instead, probably a separate onchain program (bgp-monitor?) that maintains this data. Eventually perhaps add a cross-program call to have the bgp-monitor call into serviceability to delete users when uploaded data shows stale sessions. |
|
We would be creating an instruction that can be executed by the agent using the telemetry PK, which is only allowed to update this field in the user account. It does not have permission to modify any other fields. Additionally, it internally sets the slot values. |
ben-malbeclabs
left a comment
There was a problem hiding this comment.
Approved from a conceptual perspective, would be good to have another dev confirm too.
c43c227 to
738bdc5
Compare
- last_bgp_reported_at updated on every write (not only on transitions) - telemetry agent writes on state change or after periodic refresh interval (~1h) - removed user.status == Activated validation constraint - instruction variant changed from 94 to TBD (94-103 are taken) - expanded UserBGPSession alternative with rejection rationale - removed resolved open question about periodic reconfirmation writes
8979999 to
f26b906
Compare
This pull request introduces RFC 17, which proposes a new onchain mechanism to track the real BGP session status for each user, closing the gap between configuration and actual client connectivity. The RFC details new fields to be added to the User account, a new instruction for updating BGP status, and changes to telemetry collection and SDKs. This enhancement will enable more accurate diagnostics and user lifecycle management by making BGP session state observable onchain.
User account and onchain status tracking:
Userstruct:bgp_status(session state),last_bgp_up_at(last time session was Up), andlast_bgp_reported_at(last time status changed), requiring a 17-byte account reallocation on first write.SetUserBGPStatus, allowing authorized metrics publishers to update BGP status for each user, with strict validation.Telemetry and agent changes:
SDK and compatibility: