2023-12-14 15:39:16 +00:00
|
|
|
# Consensus Rules
|
|
|
|
|
2024-05-31 00:52:12 +00:00
|
|
|
This folder contains 2 crates:
|
|
|
|
- `cuprate-consensus-rules` (`rules/` directory)
|
|
|
|
- `cuprate-consensus`
|
2023-12-14 15:39:16 +00:00
|
|
|
|
2024-05-31 00:52:12 +00:00
|
|
|
`cuprate-consensus-rules` contains the raw-rules and is built to be a more flexible library which requires the user
|
|
|
|
to give the correct data and do minimal calculations.
|
2023-12-14 15:39:16 +00:00
|
|
|
|
2024-05-31 00:52:12 +00:00
|
|
|
`cuprate-consensus` on the other hand contains multiple `tower::Service`s that handle transaction/block verification as a
|
|
|
|
whole with a `context` service that keeps track of blockchain state. `cuprate-consensus` uses `cuprate-consensus-rules` internally.
|
2024-01-10 14:44:12 +00:00
|
|
|
|
2024-05-31 00:52:12 +00:00
|
|
|
If you are looking to use Monero consensus rules it's recommended you try to integrate `cuprate-consensus` and fall back
|
|
|
|
to `cuprate-consensus-rules` if you need more flexibility.
|