Real-time Transparency with Public API Boundary Node Access Logs
We are excited to announce the successful completion of the Levitron milestone, a major step forward in transparency and insights for the Internet Computer Protocol (ICP). With this milestone, API boundary node (API BN) access logs become p…
We are excited to announce the successful completion of the Levitron milestone, a major step forward in transparency and insights for the Internet Computer Protocol (ICP). With this milestone, API boundary node (API BN) access logs become publicly available in real-time, offering unprecedented insight into how the Internet Computer and its hosted canisters are being used.The edge of the Internet Computer: the API Boundary NodesAPI BNs act as the public edge of the Internet Computer. They are the first point of contact for every incoming request, forwarding each one to the appropriate subnet, replica node, and, ultimately, the target canister. This means they capture and log every single external request for the Internet Computer.Unlocking new insights with public access logsPublic access logs are an invaluable resource for both canister developers and the broader ICP community, and their availability provides a wealth of information that was previously inaccessible. For example, they allow the following.Tracking canister usage: For the first time, developers can observe the full spectrum of canister interactions, including query calls, which were previously not visible.Gauging network activity: The broader community can track activity across popular dapps and the overall network.Providing data for analytics platforms: Ranking and analytics platforms can directly integrate these logs to provide accurate metrics directly from ICP.Until now, these logs were not publicly accessible. However, in true Web3 spirit, the Levitron milestone changes this: each API BN now exposes an endpoint, allowing clients to subscribe to and stream these logs directly.Decentralized, direct, and detailedThis new access is entirely decentralized, meaning there is no intermediary. Interested parties can stream information directly from the API boundary nodes of the Internet Computer itself.Log streaming happens on a per-canister basis, providing detailed information such as:The method being called.The status code of the response.The client making the call.The cache status of the response (hit, miss, or bypass).The error information (if available).The request and response sizes.And more!Prioritizing privacyIt is important to understand that these logs are designed with privacy in mind. They do not contain any information about the actual payload of the call, IP addresses, or the sender principal. The only user-related information provided is the client ID, which is a salted hash of the IP and the sender. This salt stems from the salt-sharing canister, is rotated every month, and is only accessible by the API BNs, meaning no other entity knows this salt. This ensures valuable usage data is accessible without compromising user privacy.Real-time streaming and future enhancementsYou can now stream logs in real-time, starting today! It is important to note that this direct streaming mechanism does not provide historical data. If you want to analyze past activity, you will need to build your own database to store the streamed logs.To help you get up and running, we have provided instructions in our documentation, along with a sample client that is ready for use.Looking ahead, once SEV-SNP is rolled out to the API boundary nodes, clients will be able to attest to these nodes. This will significantly enhance the authenticity and integrity of these logs, giving you even greater confidence in the data.For more in-depth information and technical details, be sure to check out the official documentation and the sample client.Real-time Transparency with Public API Boundary Node Access Logs was originally published in The Internet Computer Review on Medium, where people are continuing the conversation by highlighting and responding to this story.