# STR-001: Cargo.toml Dependencies

| Link | Path |
|------|------|
| **Normative** | [NORMATIVE.md](../NORMATIVE.md) |
| **Verification** | [VERIFICATION.md](../VERIFICATION.md) |
| **Tracking** | [TRACKING.yaml](../TRACKING.yaml) |
| **Spec** | [SPEC.md](../../../../resources/SPEC.md) Section 1.2 |

---

## Summary

Cargo.toml MUST declare all required DIG ecosystem, Chia ecosystem, and storage/utility dependencies with the specified minimum versions.

---

## Specification

The `Cargo.toml` file at the crate root MUST include the following `[dependencies]`:

```toml
[dependencies]
# DIG ecosystem
dig-block = "0.1"
dig-epoch = "0.1"
dig-constants = "0.1"

# Chia ecosystem
chia-protocol = "0.26"
chia-bls = "0.26"
chia-sha2 = "0.26"
chia-traits = "0.26"

# Storage
rocksdb = { version = "0.22", default-features = false, features = ["zstd"] }

# Serialization & compression
zstd = "0.13"
bincode = "1"
serde = { version = "1", features = ["derive"] }

# Error handling
thiserror = "1"

# Concurrency & caching
parking_lot = "0.12"
lru = "0.12"
tokio = { version = "1", features = ["full"] }

# Memory mapping
memmap2 = "0.9"
```

Version constraints shown are minimums; compatible newer versions are acceptable.

---

## Acceptance Criteria

- [x] All 16 dependencies are listed in `[dependencies]`
- [x] `dig-block`, `dig-epoch`, `dig-constants` use version `"0.1"`
- [x] `chia-protocol`, `chia-bls`, `chia-sha2`, `chia-traits` use version `"0.26"`
- [x] `serde` has the `derive` feature enabled
- [x] `tokio` has the `full` feature enabled
- [x] `cargo check` succeeds with no missing-crate errors

---

## Implementation Notes

- RocksDB feature flags may need platform-specific tuning (e.g., `zstd` feature for compression support).
- Exact patch versions for `rocksdb`, `zstd`, `bincode`, `lru`, `memmap2` may vary; the key requirement is that the dependency is present and a compatible version is used.
- `[dev-dependencies]` for testing (`tempfile`, `rand`, `tokio` test-util) are covered by STR-005.

---

## Test Plan

| Test Name | Type | Description |
|-----------|------|-------------|
| `test_cargo_toml_has_all_deps` | unit | Parse `Cargo.toml` and assert all 16 dependency names are present |
| `test_cargo_check_succeeds` | integration | Run `cargo check` and verify exit code 0 |

---

## Expected Test Files

- `tests/str_001_tests.rs`
