input-output-hk / cardano-sl

Cryptographic currency implementing Ouroboros PoS protocol
Apache License 2.0
3.78k stars 632 forks source link

Enable custom configuration when starting demo cluster #4196

Closed Sam-Jeston closed 4 years ago

Sam-Jeston commented 4 years ago

Description

It can be convenient to start the cardano-sl demo cluster with a custom configuration file, rather than the default file defined at lib/configuration.yaml.

I've updated the demo cluster nix tooling such that:

Type of change

Non-breaking extension to existing nix behaviour

How to merge

Send the message bors r+ to merge this PR. For more information, see docs/how-to/bors.md.

Sam-Jeston commented 4 years ago

Do you guys see any issues with this change @rvl @disassembler ?

Sam-Jeston commented 4 years ago

@rvl it's a duplicate of this: https://github.com/input-output-hk/cardano-wallet/blob/master/lib/http-bridge/test/data/cardano-node-simple/configuration.yaml

So it allows Daedalus to connect to a demo cluster, using the genesis setup used in the tests of cardano-wallet, which we know the mnemonics for. In general I considered it a place where alternate configurations could be placed. Not sure of the history of confusion in this regard, I don't mind where the files live.

rvl commented 4 years ago

The configuration system is just really confusing in general, so adding another file which isn't actually used within cardano-sl is going to confuse things more. If you could add a readme in the configurations directory to explain it that would help.

Does the demo-nix.sh -c option need to refer to something within ${configFiles}/configurations, or could it more simply be an absolute path?

Sam-Jeston commented 4 years ago

@rvl you're right, absolute path is cleaner. It does remove confusion from the repo

Sam-Jeston commented 4 years ago

bors r+

iohk-bors[bot] commented 4 years ago

Build succeeded