diff --git a/Cargo.toml b/Cargo.toml index 2591e1d..e4d1a18 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dig-mempool" -version = "0.1.1" +version = "0.1.2" edition = "2021" rust-version = "1.75.0" description = "DIG L2 mempool — fee-prioritized, conflict-aware transaction pool with CPFP support" diff --git a/README.md b/README.md index 34ebfd1..8d6b334 100644 --- a/README.md +++ b/README.md @@ -1 +1,25 @@ -# dig-coinstate +# dig-mempool + +A fee-prioritized, conflict-aware transaction mempool for the DIG Network L2 +blockchain. + +`dig-mempool` accepts raw `SpendBundle` submissions, validates them internally +via [`dig-clvm`](../dig-clvm), and manages their lifecycle — fee ordering, +conflict detection and replace-by-fee, timelock resolution, child-pays-for-parent +(CPFP) packaging, and capacity eviction — then selects `MempoolItem`s for block +candidate production. It does **not** build or validate blocks; that is the +caller's responsibility. + +**Boundary:** inputs are `SpendBundle` + `CoinRecord`s; output is +`Vec>`. + +## Documentation + +- [`SPEC.md`](docs/resources/SPEC.md) — the normative specification (wire model, + admission pipeline, conflict/RBF rules, CPFP semantics, fee tiers, invariants). +- [`docs/requirements/README.md`](docs/requirements/README.md) — the requirement + catalog (61 requirements across 8 domains). + +## License + +See the repository root for license terms. diff --git a/src/error.rs b/src/error.rs index 48f436f..d98f813 100644 --- a/src/error.rs +++ b/src/error.rs @@ -107,8 +107,10 @@ pub enum MempoolError { InsufficientFee { required: u64, available: u64 }, /// Fee-per-virtual-cost is too low for the current mempool utilization. - /// Returned when utilization >= 80% and the bundle doesn't meet the - /// minimum fee threshold from `estimate_min_fee()`. + /// + /// Reserved for utilization-based admission rejection: `estimate_min_fee()` + /// is currently advisory only and admission does not enforce it, so this + /// variant is **not currently constructed**. /// See: [FEE-001](docs/requirements/domains/fee_estimation/specs/FEE-001.md) #[error("fee too low for current mempool utilization")] FeeTooLow, @@ -116,9 +118,12 @@ pub enum MempoolError { // ── Conflict / RBF Errors ── // See: [CFR-001](docs/requirements/domains/conflict_resolution/specs/CFR-001.md) // through [CFR-005](docs/requirements/domains/conflict_resolution/specs/CFR-005.md) - /// A coin spent by this bundle is already spent by an active mempool item, - /// and the RBF conditions were not met. The bundle has been added to the - /// conflict cache for retry after the conflicting item is confirmed. + /// A coin spent by this bundle is already spent by an active mempool item + /// and the RBF conditions were not met. + /// + /// Reserved: unmet-RBF conflicts are currently surfaced through the specific + /// `Rbf*` variants below (superset / fee-per-cost / bump), so this catch-all + /// is **not currently constructed**. /// Chia: `MEMPOOL_CONFLICT` at [mempool_manager.py:816](https://github.com/Chia-Network/chia-blockchain/blob/6e7a4954edccd8ab83fcacf938cfc42ddfcad7f2/chia/full_node/mempool_manager.py#L816). #[error("conflicts with existing mempool item {0}")] Conflict(Bytes32),