You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reset leios-prototype to upstream main (chunked recreation follows)
Snapshot-merge: parents are (old leios-prototype tip, origin/main tip)
but tree equals origin/main byte-for-byte. The leios-prototype branch
ref moves forward without losing the historic prototype commits — they
remain reachable as ancestors via the merge's first parent.
The chunks of the recreation land as ordinary commits on top of this
one.
-**acts-generic**: Generic instances for the `Act` type class
11
+
-**quickcheck-monoids**: QuickCheck utilities for monoids
12
+
13
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for build setup, coding standards, style guides, and contribution workflow.
14
+
15
+
## Build
16
+
17
+
```bash
18
+
cabal build all
19
+
```
20
+
21
+
Note: `cabal build` (without `all`) fails at the repo root since there is no package there.
22
+
23
+
## Testing
24
+
25
+
See CONTRIBUTING.md for test commands and patterns. Example:
26
+
27
+
```bash
28
+
cabal run ouroboros-network:ouroboros-network-sim-tests -- -p "TxSubmission"
29
+
```
30
+
31
+
## Code Formatting
32
+
33
+
The script runs `stylish-haskell` in-place and then shows a `git diff` of what changed. Only run it on files relevant to your current work — reformatting unrelated files creates noise in your diff.
34
+
35
+
```bash
36
+
./scripts/ci/run-stylish-haskell.sh -u # uncommitted changes only
37
+
./scripts/ci/run-stylish-haskell.sh -c # files in HEAD only
38
+
```
39
+
40
+
Do not run the script without flags — that reformats all `.hs` files in the repo.
41
+
42
+
Config: `.stylish-haskell-network.yaml`. Requires `fd`/`fdfind` and `stylish-haskell`.
43
+
44
+
## Important Notes
45
+
46
+
- When using si-timers from io-classes; **`threadDelay`, `timeout`, `registerDelay` take `DiffTime` (seconds), not microseconds.** Using `3_000_000` means three months, not three seconds.
47
+
48
+
## Key Architectural Patterns
49
+
50
+
### Typed Protocols
51
+
52
+
This codebase uses [typed-protocols](https://github.com/input-output-hk/typed-protocols) for protocol state machines. When modifying protocols:
53
+
1. Update the protocol type definition first
54
+
2. Ensure all state transitions are covered
55
+
3. Update `Codec.hs` for CBOR serialization
56
+
4. Add tests in the corresponding test module
57
+
58
+
### STM-based Coordination
59
+
60
+
Heavy use of `StrictTVar` from `Control.Concurrent.Class.MonadSTM.Strict`. When modifying shared state:
61
+
- Keep critical sections minimal
62
+
63
+
### Tracing
64
+
65
+
All components use `Control.Tracer`. When adding new trace events:
66
+
1. Add constructor to the relevant `Trace*` type
67
+
2. Consider performance impact (avoid expensive operations in hot paths)
0 commit comments