Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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<Arc<MempoolItem>>`.

## 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.
15 changes: 10 additions & 5 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,23 @@ 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,

// ── 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),
Expand Down
Loading