Skip to main content
TLDR:
  • Builds a comprehensive Sui blockchain validator analytics tool using Python and the pysui library with Chainstack node endpoints.
  • Analyzes validator commission rates, stake distribution, and network decentralization metrics directly from on-chain data.
  • Provides interactive search functionality to explore individual validators and their detailed metadata including names, descriptions, and URLs.
  • Demonstrates how all validator data (financial metrics, operational data, and branding materials) is stored and accessible on-chain without external APIs.

Overview

In this tutorial, weโ€™ll build a simple analytics tool for the Sui blockchain network using Python and the pysui library. Our script will analyze validator performance metrics, commission rates, stake distribution, and provide interactive search capabilities for exploring the validator ecosystem. The Sui network relies on a proof-of-stake consensus mechanism where validators secure the network and process transactions. Our analytics tool will provide insights into:
  • Validator commission rates and distribution.
  • Stake concentration across validators.
  • Network epoch information.
  • Individual validator details and search functionality.

Prerequisites

Implementation

Our script connects to the Sui blockchain through a Chainstack endpoint and retrieves comprehensive validator data directly from the chain. The Sui network stores all validator information on-chain, including not just technical metrics like stake amounts and commission rates, but also metadata such as validator names, descriptions, website URLs, and even profile images. Using the pysui library, we fetch the current system state which contains the complete list of active validators and their properties. This includes financial data (stake balances, commission rates), operational data (voting power, gas prices), and presentation data (names, descriptions, project URLs, image URLs). The script processes this on-chain data to generate analytics on commission rate distributions, stake concentration, and provides search functionality to explore individual validators. The beauty of this approach is that all the data comes directly from the blockchainโ€”thereโ€™s no need for external APIs or databases. Everything from validator performance metrics to their branding materials is stored on-chain and accessible through our Chainstack node endpoint. The script:

Usage examples

Running the analytics tool

  1. Install dependencies:
  2. Configure your Chainstack endpoint: Replace CHAINSTACK_NODE_URL in the script with your actual Chainstack Sui mainnet endpoint.
  3. Run the script:

Sample output

When you run the script, youโ€™ll see output similar to:

Conclusion

This tutorial demonstrates how to build a comprehensive validator analytics tool for the Sui blockchain using Python and pysui. The script provides insights into validator economics, network decentralization, and helps users make informed decisions about staking and network participation. The entirety of the data is retrieved directly from the chain. The analytics tool serves multiple stakeholders in the Sui ecosystem, from individual delegators to network researchers, providing the data needed to maintain a healthy and decentralized network. By leveraging Chainstackโ€™s reliable Sui node infrastructure and the powerful pysui library, developers can build sophisticated blockchain analytics tools that provide real value to the Web3 community.

About the author

Ake

Ake Director of Developer Experience @ Chainstack
Talk to me all things Web3
20 years in technology | 8+ years in Web3 full time years experience
Last modified on April 13, 2026