Xerberus is designed to monitor multiple blockchain networks and perform risk analysis on the tokens existing within each chain. Our network is designed as a shared network in order to distribute the workload and enhance the required scalability. This script demonstrates a simulation of a sharding and block proposer selection algorithm. This algorithm assigns validators to shards based on their identity in a deterministic manner and selects one validator per shard to propose a block using a weighted deterministic choice. The simulation uses randomly generated validators and wallets with delegated stakes to demonstrate the sharding and proposal selection process. See [GitHub](https://gist.github.com/epappas/689784158280f51607baa2464a597a82) ![[Protocol Architecture.png]] In more detail, the Xerberus network consists of X shards, each representing a subset of blockchain networks that we monitor, such as Ethereum, Cardano, and others. The sharding design is needed for the concurrent processing from these networks. Each shard operates semi-independently, allowing for asynchronous updates which can vary in pace depending on the activity level and transaction throughput of the corresponding blockchain networks. #### The Algorithm for Sharding and Validator Selection This script demonstrates a simulation of a sharding and block proposer selection algorithm. This algorithm assigns validators to shards based on their identity in a deterministic manner and selects one validator per shard to propose a block using a weighted deterministic choice. The simulation uses randomly generated validators and wallets with delegated stakes to demonstrate the sharding and proposal selection process. #### Generate Validators: - Input: num_validators - Output: validators (a dictionary mapping validator names to their initial stakes)