{"id":19964683,"url":"https://github.com/harsh-ps-2003/cunner","last_synced_at":"2026-04-16T00:31:30.237Z","repository":{"id":245831059,"uuid":"812304355","full_name":"harsh-ps-2003/cunner","owner":"harsh-ps-2003","description":"A pluggable blockchain consensus simulation framework written in Rust.","archived":false,"fork":false,"pushed_at":"2024-12-12T19:44:20.000Z","size":231,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T19:46:12.655Z","etag":null,"topics":["blockchain","consensus-protocol","libp2p","web3"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harsh-ps-2003.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-08T14:09:46.000Z","updated_at":"2024-12-12T19:44:24.000Z","dependencies_parsed_at":"2024-06-26T10:46:57.932Z","dependency_job_id":"dff8c952-51ce-4e5e-a289-da8e961d7f80","html_url":"https://github.com/harsh-ps-2003/cunner","commit_stats":null,"previous_names":["harsh-ps-2003/cunner"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/harsh-ps-2003/cunner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harsh-ps-2003%2Fcunner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harsh-ps-2003%2Fcunner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harsh-ps-2003%2Fcunner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harsh-ps-2003%2Fcunner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harsh-ps-2003","download_url":"https://codeload.github.com/harsh-ps-2003/cunner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harsh-ps-2003%2Fcunner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31866230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","consensus-protocol","libp2p","web3"],"created_at":"2024-11-13T02:24:54.455Z","updated_at":"2026-04-16T00:31:30.195Z","avatar_url":"https://github.com/harsh-ps-2003.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cunner\nA pluggable blockchain consensus simulation framework written in Rust. \n\n*When developing with your consensus algorithm, you can use Cunner framework to test things locally! You can modify the nodes in the p2p however you want in the framework and test variety of simple things making the developer experience better.*\n\nTesting and benchmarking complex consensus algorithms in existing codebases can sometimes be a pain. Cunner is solving this problem by exposing a simple blockchain behind a peer-to-peer network where consensus engines can easily be plugged in and out, basically an ability to automatically deploy a blockchain network in repeatable conditions. It provides a platform for experimenting with new or modified consensus algorithms without the risk of impacting live environments. The computational and network load on each node can vary significantly depending on the consensus algorithm used. In some consensus models, nodes may have different roles which can lead to uneven load distribution among the nodes. Algorithms requiring frequent communication between nodes (e.g., for voting or proposing blocks) can increase network load. Algorithms with high computational demands (e.g., PoW) increase the processing load on each peer, affecting performance and scalability. Some algorithms might require nodes to maintain extensive records or logs, impacting storage resources.\n\n\n### How?\n\nIn the Consenter framework, the consensus engine runs within each peer node. These engines are responsible for handling transactions and blocks that are communicated through the network. \n\nThe engine is emitting transactions each N seconds that will be relayed through the network. Each engine implementation will receive those transactions, hence engines can than operate on those transactions according to their implementation.\n\nThe consensus engine will decide on the validity of transactions, add them to the block. \n\n**Messages can be quickly bootstrapped and implemented with `protobuf`**\n\n### Use!\n\n`cargo run -- node --tcp \u003cport\u003e --engine example`\n\nin the terminal instances in which you want to run the node! \n\nYou should see the following :\n\nTerminal 1 :\n```\nListening on /ip4/127.0.0.1/tcp/50281\nListening on /ip4/172.23.33.85/tcp/50281\nDiscovered a new peer: 12D3KooWBvoGNne46P3EqqaYCj8obDqyXBXDzb6W683uPdxx8P3H\nDiscovered a new peer: 12D3KooWJGDRFt1DrFuW4QPFTEhpABjvotruSDvApSh1N62yrLFe\nReceived transaction: Transaction { nonce: 577363141628466048 }\nReceived transaction: Transaction { nonce: 11224783861343598983 }\n```\n\nTerminal 2:\n```\nListening on /ip4/127.0.0.1/tcp/50282\nListening on /ip4/172.23.33.85/tcp/50282\nDiscovered a new peer: 12D3KooWSJJyJVszzaFNyiVDHnJTcsG1Yp3qJqe1ieHXGMPBCmCB\nDiscovered a new peer: 12D3KooWJGDRFt1DrFuW4QPFTEhpABjvotruSDvApSh1N62yrLFe\nReceived transaction: Transaction { nonce: 8002480234809478522 }\nReceived transaction: Transaction { nonce: 11224783861343598983 }\n```\n\nTerminal 3:\n```\nListening on /ip4/127.0.0.1/tcp/50285\nListening on /ip4/172.23.33.85/tcp/50285\nDiscovered a new peer: 12D3KooWSJJyJVszzaFNyiVDHnJTcsG1Yp3qJqe1ieHXGMPBCmCB\nDiscovered a new peer: 12D3KooWBvoGNne46P3EqqaYCj8obDqyXBXDzb6W683uPdxx8P3H\nReceived transaction: Transaction { nonce: 577363141628466048 }\nReceived transaction: Transaction { nonce: 8002480234809478522 }\n```\n\nthe 3 peers that you just setup are now in a peer-to-peer network locally!\n\n# References\nWhile going through this [research paper](https://pure.tudelft.nl/ws/portalfiles/portal/132697278/Gromit_Benchmarking_the_Performance_and_Scalability_of_Blockchain_Systems.pdf) I got the inspiration to build this project!\n\nReferred to [Hyperledger Blockchain Performance Metrics](https://8112310.fs1.hubspotusercontent-na1.net/hubfs/8112310/Hyperledger/Printables/HL_Whitepaper_Metrics_PDF_V1.01.pdf) for benchmarking metrics of consensus algorithm.\n\n### Example\nThere is a [engine example](https://github.com/harsh-ps-2003/cunner/tree/main/src/consensus/example) that should cover the idea and get you up to speed.\n\nAlso, an [Avalanche consensus algorithm](https://github.com/harsh-ps-2003/cunner/blob/main/src/consensus/avalanche/avalanche.rs) with its corresponding engine is implemented for fun!\n\n\u003c!-- ### Todo\n- configuration\n- blockchain persistance  --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharsh-ps-2003%2Fcunner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharsh-ps-2003%2Fcunner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharsh-ps-2003%2Fcunner/lists"}