Skip to content

Commit af6f482

Browse files
authored
docs: fix stale project-structure paths in README and CONTRIBUTING (#1169)
The documented project structure referenced directories that no longer exist (src/lean_spec/subspecs/, poseidon1/, tests/lean_spec/subspecs/, tests/consensus/devnet/). Align README and CONTRIBUTING with the actual src/lean_spec/{spec,node,cli}/ layout: Poseidon now lives at spec/crypto/poseidon.py, and fork specs are tested via consensus vectors under tests/consensus/lstar/. Docs only; no code changes.
1 parent cb862c0 commit af6f482

2 files changed

Lines changed: 17 additions & 18 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,16 @@
2727

2828
## Adding New Subspecifications
2929

30-
New subspecs belong in `src/lean_spec/subspecs/`. Follow the pattern of existing subspecs like `poseidon1`:
30+
Cryptographic subspecs live under `src/lean_spec/spec/crypto/`. Follow the pattern of an existing one like the `xmss` package:
3131

3232
```bash
33-
mkdir -p src/lean_spec/subspecs/my_new_subspec
34-
touch src/lean_spec/subspecs/my_new_subspec/__init__.py
35-
mkdir -p tests/subspecs/my_new_subspec
33+
mkdir -p src/lean_spec/spec/crypto/my_new_subspec
34+
touch src/lean_spec/spec/crypto/my_new_subspec/__init__.py
35+
mkdir -p tests/spec/crypto/my_new_subspec
3636
```
3737

38+
Tests mirror the source layout one-to-one (see `tests/spec/crypto/xmss/`).
39+
3840
## Testing
3941

4042
- Write tests that mirror the source structure

‎README.md‎

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,21 +83,18 @@ just test
8383
```
8484
├── src/
8585
│ └── lean_spec/ # Main specifications
86-
│ ├── __init__.py
87-
│ └── subspecs/ # Sub-specifications
88-
│ ├── poseidon1/
89-
│ │ ├── __init__.py
90-
│ │ ├── permutation.py
91-
│ │ └── constants.py
92-
│ ├── ...
93-
│ └── ...
86+
│ ├── cli/ # Command-line entry points
87+
│ ├── node/ # Node implementation (chain, networking, sync, validator, ...)
88+
│ └── spec/ # Protocol specifications
89+
│ ├── crypto/ # Cryptographic subspecs (poseidon, koalabear, xmss, ...)
90+
│ ├── forks/ # Fork specifications (tested via consensus vectors)
91+
│ ├── ssz/ # SSZ serialization
92+
│ └── observability/ # Observability spec
9493
├── tests/ # Test suite
95-
| ├── consensus/ # Tests for consensus
96-
| | └── devnet/ # Tests for devnet
97-
| | ├── fc/ # Tests for fork-choice
98-
| | └── state_transition/ # Tests for stf
99-
│ └── lean_spec/ # Tests for main specs
100-
│ └── subspecs/ # Tests for subspecs
94+
│ ├── consensus/ # Consensus test vectors
95+
│ │ └── lstar/ # e.g. fork_choice, state_transition, ssz, ...
96+
│ ├── spec/ # Unit tests mirroring src/lean_spec/spec/
97+
│ └── node/ # Unit tests mirroring src/lean_spec/node/
10198
├── docs/ # Documentation
10299
└── pyproject.toml # Project configuration
103100
```

0 commit comments

Comments
 (0)