-
Notifications
You must be signed in to change notification settings - Fork 727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cardano-testnet executable: take node config file as optional input #6103
base: smelc/per-genesis-file-origin
Are you sure you want to change the base?
cardano-testnet executable: take node config file as optional input #6103
Conversation
3894926
to
8e37423
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you plan to deal with conflicts in the node configuration yaml file? I think this is the wrong approach. We don't want to be forced to reconcile configuration file differences. All we should need the is the node configuration yaml file.
decodeFileThrow $ icfAlonzoGenesisConfigFile inputConfigFiles | ||
conwayGenesisFile :: ConwayGenesis StandardCrypto <- | ||
decodeFileThrow $ icfConwayGenesisConfigFile inputConfigFiles | ||
runTestnet testnetOptions $ cardanoTestnet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does runTestnet
result in a Property
??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
runTestnet
doesn't return a property but it does take a Conf -> H.Integration a
callback, as visible here:
runTestnet :: CardanoTestnetOptions -> (Conf -> H.Integration a) -> IO () |
This is a bit meh and we can probably improve that: in the case where the user provides a configuration file, we would like not be tied to the hedgehog-extras
/hedgehog
APIs like Integration
and Property
. But this is something we would better do in the future, not in this PR, because it's not required for reaching a first release of cardano-testnet
IMHO. And also, it will be some work, because our existing "backend", e.g. cardanoTestnet here is in the Integration
monad. So it's not an easy change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can return to this. Could you create an issue to track it? The issue just needs to point out its an issue 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jimbo4350> created follow-up issue: #6122
63c60a5
to
6ca79c5
Compare
For future reference, if we leave the call to > cabal run cardano-testnet -- cardano --output-dir cl-output-dir --node-config cl-example/configuration.json --testnet-magic 44
✗ <interactive> failed at src/Testnet/Start/Cardano.hs:283:3
after 1 test.
shrink path: 1:
forAll0 =
Process exited with non-zero exit-code: 1
━━━━ stdout ━━━━
Checking byron genesis file: cl-example/byron.genesis.spec.json
━━━━ stderr ━━━━
Error reading node configuration at: cl-example/byron.genesis.spec.json: Incorrect schema for GenesisData.
Error: expected field protocolConsts It seems the code is requiring too much data here when deserializing the Byron genesis. This data is actually not required to start the node [edit] Oh well, it seems the node doesn't like it either actually: ✗ <interactive> failed at src/Testnet/Start/Cardano.hs:342:5
after 1 test.
shrink path: 1:
forAll0 =
Cardano node process did not start: CardanoProtocolInstantiationError (CardanoProtocolInstantiationErrorByron (GenesisReadError "/home/churlin/dev/cardano-node/cl-example/byron.genesis.spec.json" (GenesisDataSchemaError (SchemaError {seExpected = "field protocolConsts", seActual = Nothing}))))
cardano-node: There was an error parsing the genesis file: "/home/churlin/dev/cardano-node/cl-example/byron.genesis.spec.json" Error: GenesisDataSchemaError (SchemaError {seExpected = "field protocolConsts", seActual = Nothing}) |
The node itself, when it starts, doesn't require hashes of genesis files. So it seems overkill to require it to start a testnet. See also #6103 (comment)
6ca79c5
to
d67ff61
Compare
The node itself, when it starts, doesn't require hashes of genesis files. So it seems overkill to require it to start a testnet. See also #6103 (comment)
d67ff61
to
c78c34f
Compare
The node itself, when it starts, doesn't require hashes of genesis files. So it seems overkill to require it to start a testnet. See also #6103 (comment)
c78c34f
to
1f7c3d8
Compare
The node itself, when it starts, doesn't require hashes of genesis files. So it seems overkill to require it to start a testnet. See also #6103 (comment)
18c0d3e
to
50849e1
Compare
Starting with the > cabal run cardano-testnet -- cardano --output-dir cl-output-dir --node-config nix-shell.Ai0S6G/cli-queries-test-6184168d6b9797eb/configuration.yaml --testnet-magic 44
✗ <interactive> failed at src/Testnet/Start/Cardano.hs:342:5
after 1 test.
shrink path: 1:
forAll0 =
Cardano node process did not start: CardanoProtocolInstantiationError (CardanoProtocolInstantiationErrorByron (CredentialsError DelegationCertificateNotFromGenesisKey))
cardano-node: Byron leader credentials error: DelegationCertificateNotFromGenesisKey
[edit] Solved later on, it was related to not honoring the custom configuration file everywhere |
The node itself, when it starts, doesn't require hashes of genesis files. So it seems overkill to require it to start a testnet. See also #6103 (comment)
8117ffc
to
3671f83
Compare
@Jimbo4350> Updated version of this PR now does that 👍 |
… node configuration file (it was unused) This will be done differently in #6103
… node configuration file (it was unused) This will be done differently in #6103
c25acc3
to
6dc7fb4
Compare
15b1364
to
24e09df
Compare
… for node config and genesis files
24e09df
to
ad8dbd6
Compare
e03bd74
to
1b6c518
Compare
ad8dbd6
to
70c0e00
Compare
1b6c518
to
c4aba77
Compare
70c0e00
to
9cd0ae0
Compare
c4aba77
to
4d424b6
Compare
9cd0ae0
to
72ea5dc
Compare
Note
On top of #6138
Description
Fixes #6069
With @CarlosLopezDeLara's input, I have chosen an all or nothing behavior: either you pass the configuration file and all genesis files or you pass none of them. If we choose an à la carte behavior, it's cumbersome to implement, and anyway since the node configuration file contains the hashes of genesis files, there is at least some degree of binding between all of these files.After feedback from Jordan, we finally only ask the user to provide the node configuration file. Then we read the eras' genesis files by looking at the paths specified in the node configuration file. This way, no additional flag needed, nor checking consistency between the flags and the node configuration file.TBD
How to trust this PR
TBD
Checklist