{"id":27192319,"url":"https://github.com/sameh-farouk/cometbft-custom-app","last_synced_at":"2025-04-09T18:44:31.393Z","repository":{"id":283084232,"uuid":"949956501","full_name":"sameh-farouk/cometbft-custom-app","owner":"sameh-farouk","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-18T13:05:10.000Z","size":46496,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T14:23:10.565Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sameh-farouk.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":"2025-03-17T12:06:21.000Z","updated_at":"2025-03-18T13:05:21.000Z","dependencies_parsed_at":"2025-03-19T01:15:16.651Z","dependency_job_id":null,"html_url":"https://github.com/sameh-farouk/cometbft-custom-app","commit_stats":null,"previous_names":["sameh-farouk/cometbft-custom-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameh-farouk%2Fcometbft-custom-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameh-farouk%2Fcometbft-custom-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameh-farouk%2Fcometbft-custom-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameh-farouk%2Fcometbft-custom-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sameh-farouk","download_url":"https://codeload.github.com/sameh-farouk/cometbft-custom-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248090830,"owners_count":21046154,"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","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":"2025-04-09T18:44:30.817Z","updated_at":"2025-04-09T18:44:31.379Z","avatar_url":"https://github.com/sameh-farouk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CometBFT Custom App with Multi-Database Support\n\nThis is a custom blockchain application built on top of CometBFT with support for multiple database backends.\n\n## Supported Databases\n\n- **Badger DB** (default): A fast key-value database\n- **Pebble DB**: A performance-focused key-value store used in CockroachDB\n- **TigerBeetle DB**: A specialized financial database designed for financial transactions (WIP)\n\n## Quick Start\n\n```bash\ngit clone https://github.com/sameh-farouk/cometbft-custom-app.git\ncd cometbft-custom-app\n\n# Build with default database (Badger, pebble)\nmake build-linux\n\n# start the 4 validators local network\nDB_TYPE=badger make start-localnet\n# or\nDB_TYPE=pebble make start-localnet\n\n# apply latency to simulate a real-world network environment\nmake apply-latency\n\n# when you done\nmake stop-localnet\n\n# clean up\nsudo make clean \n```\n\n## Using Different Database Backends\n\nYou can specify which database to use with the `DB_TYPE` environment variable, but TigerBeetle DB requires a specific build tag, so you need to build the binary with the `tigerbeetle` build tag.\n\n```bash\n# Build with TigerBeetle DB support\nmake build-tigerbeetle\nDB_TYPE=tigerbeetle make start-localnet\n```\n\nNote: TigerBeetle DB support is currently WIP.\n\n## Example Usage\n\nThere are 4 accounts pre-created: 1, 2, 3, 4\nprivate keys are:\n\n- \"1\": \"23e980b97c67af9b94319b6672049fbd2f9992eaf6a567a2b5a66286e527e8e9c8af5ee74756bb934c9c3f93a3ffa4125c93d8a76619a1834f4511334d83d45f\"\n- \"2\": \"11a2070b5bf25002c43d238117840fb97492266d3e0fb7637b069d5569b5d8283382d764d3e30ce4c3aab066335a558e8f632d2aaf161e6aa5615c57176cfbca\"\n- \"3\": \"376384a0c4d4ef4e95bf980acea6ec6d7b8bbdaa06d91ca68383d018e885dda204c01c7d4f6c784504fce83f97968145e8aa6ca461ec19f3a685466152f17644\"\n- \"4\": \"7403b7706deba2d8d036d00c5e1e087542fff733b1b3f1b776bf2fa64bcd5d98d06a22ce4b7a59ceac3a898504901f41e27491ed3cc90e8ee46ac43e9305d61a\"\n\n```bash\n# Send a transaction tx_id=1, sender_id=1, receiver_id=2, amount=50, signature=\u003cSIGNATURE\u003e\ncurl -s 'localhost:26657/broadcast_tx_commit?tx=\"1=1=2=50=\u003cSIGNATURE\u003e\"'\n\n# Query account balances\ncurl -s 'localhost:26657/abci_query?data=\"1\"'\necho OTk5OTk5OTUw | base64 --decode  # 999999950\n\ncurl -s 'localhost:26657/abci_query?data=\"2\"'\necho MTAwMDAwMDA1MA== | base64 --decode  # 1000000050\n\n# you can send batched transactions as well separated by `:`\ncurl -s 'localhost:26657/broadcast_tx_commit?tx=\"2=1=2=50=\u003cSIGNATURE\u003e:3=1=2=50=\u003cSIGNATURE\u003e:4=1=2=50=\u003cSIGNATURE\u003e\"'\n```\n\n## Database Configuration\n\nEach database can be configured with additional options:\n\n- **Badger DB**: Use `-db-path` to specify the database directory\n- **Pebble DB**: Use `-db-path` to specify the database directory\n- **TigerBeetle DB**: \n  - Use `-tb-addresses` to specify TigerBeetle server addresses (comma-separated)\n  - Use `-tb-cluster-id` to specify the TigerBeetle cluster ID\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameh-farouk%2Fcometbft-custom-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsameh-farouk%2Fcometbft-custom-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameh-farouk%2Fcometbft-custom-app/lists"}