{"id":13632365,"url":"https://github.com/lambdaclass/starknet_tendermint_sequencer","last_synced_at":"2025-10-28T00:02:54.647Z","repository":{"id":83420195,"uuid":"605686247","full_name":"lambdaclass/starknet_tendermint_sequencer","owner":"lambdaclass","description":"Starknet sequencer built with Tendermint Core","archived":false,"fork":false,"pushed_at":"2023-04-03T16:42:05.000Z","size":50269,"stargazers_count":53,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-09T23:38:30.109Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lambdaclass.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-02-23T17:25:32.000Z","updated_at":"2024-06-08T23:56:38.000Z","dependencies_parsed_at":"2024-01-14T07:06:41.060Z","dependency_job_id":"ee3e42e4-b589-42fb-89f6-dc33b65e8c40","html_url":"https://github.com/lambdaclass/starknet_tendermint_sequencer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lambdaclass/starknet_tendermint_sequencer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdaclass%2Fstarknet_tendermint_sequencer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdaclass%2Fstarknet_tendermint_sequencer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdaclass%2Fstarknet_tendermint_sequencer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdaclass%2Fstarknet_tendermint_sequencer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lambdaclass","download_url":"https://codeload.github.com/lambdaclass/starknet_tendermint_sequencer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdaclass%2Fstarknet_tendermint_sequencer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281361348,"owners_count":26487881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-27T02:00:05.855Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-08-01T22:03:01.541Z","updated_at":"2025-10-28T00:02:54.580Z","avatar_url":"https://github.com/lambdaclass.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"_Note: `main` branch contains the development version of the sequencer, for rollups integration please check branch [`rollups`](https://github.com/lambdaclass/starknet_tendermint_sequencer/tree/rollups)_\n# Tendermint-based Starknet sequencer\n\nSequencer for Starknet based in CometBFT (formerly Tendermint Core) and [starknet-in-rust](https://github.com/lambdaclass/starknet_in_rust).\n\n## Getting started\n\nFirst, install CometBFT:\n\n````\nmake consensus_install\n````\nThis will install CometBFT and leave the binary in `bin/comebft`. Additionally, it will run `cometbft init` which creates the required configuration file and stores it in `~/.cometbft/`.\n\nYou can now run the sequencer ABCI with CometBFT by just running those two binaries.\n\nRun CometBFT node on a terminal:\n\n```bash\nmake node\n```\nRun the ABCI sequencer application:\n\n```bash\nmake abci\n```\nIn order to reset CometBFT's state before rerunning it, make sure you run `make reset`\n\n### Sending a transaction\n\nTo send executions to the sequencer you need to have a compiled Cairo program (*.json files in the repo). Then you can send them like so:\n\n```bash\ncargo run --release execute sequencer/programs/fibonacci.json main\n```\n\n### Running Tendermint Core instead of CometBFT\n\nCurrent code can be run with both Tendermint and CometBFT (up to version 0.34.27). In order to use Tendermint Core the make command should include the `CONSENSUS` variable:\n\n```bash\nmake node CONSENSUS=tendermint\n```\n\nThis will run Tendermint Core instead of CometBFT (and also will install and configure it if not present).\n\n### Benchmark\n\nYou can run a benchmark with\n\n```bash\ncd sequencer\ncargo run --release --bin bench -- --nodes \"{list-of-nodes}\" --threads 4 --transactions-per-thread 1000\n```\n\nWhere `list-of-nodes` is a list of addresses that are part of the Tendermint network (in the form of `ipaddr:socket`).\nThe benchmark runs `fibonacci.json` (`fib(500)`), where requests are sent with a round-robin fashion to the list of nodes, through the number of threads you specify, with the amount of transactions per thread you desire.\n\n#### Example run\n\n```bash\n\u003e cargo run --release --bin bench -- --nodes \"127.0.0.1:26157 127.0.0.1:26057\"\n\nTime it took for all transactions to be delivered: 1308 ms\n```\n\nNote that this is the time for all transactions to return (ie; validation that they have entered the mempool), but no assumptions can be made in terms of transaction finality.\n\n### Benchmarking with Tendermint Load Testing Framework\n\nThere is an alternate way to benchmark the app: using [tm-load-test](https://github.com/informalsystems/tm-load-test). In order to do that there is a load_test command written in go in `/bench` directory. This needs Go v1.12 at least to be built.\n\nTo build it:\n\n```bash\ncd bench\ngo build -o ./build/load_test ./cmd/load_test/main.go\n```\n\nand once built move back to root directory and use\n\n```bash\n./bench/build/load_test -c 10 -T 10 -r 1000 -s 250 --broadcast-tx-method async --endpoints ws://localhost:26657/websocket --stats-output result.csv\n```\n\nto run it against a local tendermint+abci node.\n\n`-c` is the amount of connectios per endpoint\n\n`-T` is the amount of seconds to run the test\n\n`-r` is the rate of tx per second to send\n\n`-s` is the maximum size of a transaction to be sent.\n\nRun\n```bash\n./bench/build/load_test -h\n```\nto get further information.\n\nIn result.csv there will be a summary of the operation. eg:\n```bash\n\u003e cat result.csv\nParameter,Value,Units\ntotal_time,10.875,seconds\ntotal_txs,55249,count\ntotal_bytes,1242747923,bytes\navg_tx_rate,5080.169436,transactions per second\navg_data_rate,114271208.808144,bytes per second\n```\n\nTo run it against a cluster, several nodes can be provided in `--endpoints` parameter. eg:\n```bash\n./bench/build/load_test -c 5 -T 10 -r 1000 -s 250 --broadcast-tx-method async --endpoints ws://5.9.57.45:26657/websocket,ws://5.9.57.44:26657/websocket,ws://5.9.57.89:26657/websocket --stats-output result.csv\n```\n\nCheck [tm-load-test](https://github.com/informalsystems/tm-load-test) and [Tendermint Load Testing Framework](https://github.com/informalsystems/tm-load-test/tree/main/pkg/loadtest) and for more information.\n\n## Reference links\n* [Starknet sequencer](https://www.starknet.io/de/posts/engineering/starknets-new-sequencer#:~:text=What%20does%20the%20sequencer%20do%3F)\n* [Papyrus Starknet full node](https://medium.com/starkware/papyrus-an-open-source-starknet-full-node-396f7cd90202)\n* [Blockifier](https://github.com/starkware-libs/blockifier)\n* [tendermint-rs](https://github.com/informalsystems/tendermint-rs)\n* [ABCI overview](https://docs.tendermint.com/v0.34/introduction/what-is-tendermint.html#abci-overview)\n* [ABCI v0.34 reference](https://github.com/tendermint/tendermint/blob/v0.34.x/spec/abci/abci.md)\n* [CometBFT](https://github.com/cometbft/cometbft)\n* [About why app hash is needed](https://github.com/tendermint/tendermint/issues/1179). Also [this](https://github.com/tendermint/tendermint/blob/v0.34.x/spec/abci/apps.md#query-proofs).\n* [About Tendermint 0.34's future](https://github.com/tendermint/tendermint/issues/9972)\n### Starknet\n* [Starknet State](https://docs.starknet.io/documentation/architecture_and_concepts/State/starknet-state/)\n* [Starknet architecture](https://david-barreto.com/starknets-architecture-review/)\n* [Starknet transaction lifecylce](https://docs.starknet.io/documentation/architecture_and_concepts/Blocks/transaction-life-cycle/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdaclass%2Fstarknet_tendermint_sequencer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambdaclass%2Fstarknet_tendermint_sequencer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdaclass%2Fstarknet_tendermint_sequencer/lists"}