{"id":30896927,"url":"https://github.com/circlefin/malachite-mempool","last_synced_at":"2025-09-08T23:48:00.311Z","repository":{"id":306830072,"uuid":"1020817279","full_name":"circlefin/malachite-mempool","owner":"circlefin","description":"Malachite mempool implementation for efficient transaction management in consensus systems","archived":false,"fork":false,"pushed_at":"2025-08-12T18:36:08.000Z","size":342,"stargazers_count":2,"open_issues_count":2,"forks_count":4,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-21T19:06:56.532Z","etag":null,"topics":["malachite-engine"],"latest_commit_sha":null,"homepage":"","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/circlefin.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,"zenodo":null}},"created_at":"2025-07-16T12:45:01.000Z","updated_at":"2025-08-19T18:08:09.000Z","dependencies_parsed_at":"2025-08-12T14:22:58.984Z","dependency_job_id":null,"html_url":"https://github.com/circlefin/malachite-mempool","commit_stats":null,"previous_names":["informalsystems/malachite-mempool","circlefin/malachite-mempool"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/circlefin/malachite-mempool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circlefin%2Fmalachite-mempool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circlefin%2Fmalachite-mempool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circlefin%2Fmalachite-mempool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circlefin%2Fmalachite-mempool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/circlefin","download_url":"https://codeload.github.com/circlefin/malachite-mempool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circlefin%2Fmalachite-mempool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274231139,"owners_count":25245675,"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-09-08T02:00:09.813Z","response_time":121,"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":["malachite-engine"],"created_at":"2025-09-08T23:47:52.304Z","updated_at":"2025-09-08T23:48:00.296Z","avatar_url":"https://github.com/circlefin.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Malachite consensus engine mempool\n\nA mempool implementation for Malachite BFT Consensus Engine\n\n**Note: This project is currently under active development and is not yet production-ready.**\n\n## Transaction flow\n\nThe following diagram shows how a transaction flows through the mempool system:\n\n```mermaid\nsequenceDiagram\n    participant App as Enpoint\n    participant Mempool as Mempool Actor\n    participant AppActor as App Actor  \n    participant Network as Network Actor\n    \n    Note over AppActor,Mempool: Initial Setup\n    AppActor-\u003e\u003e+Mempool: Subscribe(output_port_subscriber)\n    Mempool--\u003e\u003e-AppActor: Subscription confirmed\n    \n    Note over App,Network: Transaction Processing\n    App-\u003e\u003e+Mempool: Add { tx, reply }\n    \n    Note over Mempool: Check if mempool is full\u003cbr/\u003e(max_pool_size)\n    \n    alt Mempool Full\n        Mempool-\u003e\u003eApp: Error(MempoolFull)\n    else Space Available\n        Mempool-\u003e\u003e+AppActor: CheckTx { tx, reply } (via output_port)\n        \n        AppActor-\u003e\u003e+AppActor: check_tx(tx)\n        Note over AppActor: Deserialize \u0026 validate transaction\u003cbr/\u003eAlways returns outcome if validation succeeds\n        \n        AppActor-\u003e\u003e+Mempool: CheckTxResult { tx, result, reply }\n        \n        alt Validation Failed\n            Mempool-\u003e\u003eApp: Error(InvalidTransaction)\n        else Validation Successul\n            Note over Mempool: Outcome received\u003cbr/\u003eCheck if transaction is valid\n            \n            alt Transaction Invalid (outcome.is_valid() = false)\n                Note over Mempool: Transaction not added to mempool\u003cbr/\u003ebut still reply with success\n                Mempool-\u003e\u003eApp: Success(tx invalid)\n            else Transaction Valid (outcome.is_valid())\n                Note over Mempool: Check for duplicates\u003cbr/\u003eusing tx_hash\n            \n                alt Duplicate Transaction\n                    Note over Mempool: Transaction already exists\u003cbr/\u003ein mempool\n                    Mempool-\u003e\u003eApp: Error(TxAlreadyExists)\n                else Not Duplicate\n                    Mempool-\u003e\u003eMempool: Add to to mempool\n                    \n                    alt Local Transaction\n                        Mempool-\u003e\u003e+Network: Broadcast(tx) (gossip)\n                        Network--\u003e\u003e-Mempool: Gossip to peers\n                    end\n                    \n                    Mempool-\u003e\u003eApp: Success(tx valid)\n                end\n            end\n        end\n    end\n```\n\n**Key behaviors:**\n- **Network transactions**: Transactions received from peer nodes follow the same validation flow but are not re-gossiped to prevent network loops and duplicate transaction.\n- **Individual gossip**: Each transaction is currently gossiped individually without batching optimization\n- **Error types**: The mempool returns specific `MempoolError` variants:\n  - `MempoolFull`: When the mempool has reached its maximum capacity\n  - `InvalidTransaction`: When transaction validation fails \n  - `TxAlreadyExists`: When attempting to add a duplicate transaction\n\n## License\n\nCopyright 2025 Circle Internet Financial, Inc. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcirclefin%2Fmalachite-mempool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcirclefin%2Fmalachite-mempool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcirclefin%2Fmalachite-mempool/lists"}