Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove more trace/output/demo related constraints from RunNode (#776)
* Remove more trace/output/demo related constraints from RunNode Whenever a new constraint was needed in `cardano-node` to trace something, it was added as a super-class constraint of `RunDemo`, which required updating the `ouroboros-network` package. A better approach: In `cardano-node/Cardano/Node/CLI.hs` in `cardano-node`: ``` type DemoTracing blk = ( Condense blk , Condense [blk] , Condense (ChainHash blk) , Condense (Header blk) , Condense (HeaderHash blk) , Condense (GenTx blk) ) data SomeProtocol where SomeProtocol :: ( RunDemo blk , DemoTracing blk ) => Consensus.Protocol blk -> SomeProtocol ``` Add `DemoTracing blk` to `app/Run.hs`: ``` handleSimpleNode :: forall blk. (RunDemo blk, DemoTracing blk) .. ``` Now, whenever you need an additional constraint for tracing/demo purposes, just add it to `DemoTracing`. No changes to the consensus package will be needed, unless the constraint is not satisfied for a block type. * Remove left-over Ouroboros.Consensus.Demo.Ledger.Mock This should have been removed in #727.
- Loading branch information