-
Notifications
You must be signed in to change notification settings - Fork 49
Add Mithril end to end instructions for --skip-cardano-bin-download
command
#1331
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
Add Mithril end to end instructions for --skip-cardano-bin-download
command
#1331
Conversation
a35a1b6
to
cfbdd8f
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.
LGTM 👍
@scarmuega, @falcucci this is an update on the documentation that explains how to run the |
cfbdd8f
to
6aff3ff
Compare
@jpraynaud @dlachaumepalo thank you for the new instructions, really helpful. I'll bring a report from my perspective to run the tests on macOS. I got some issues that I would like to know if one of you could reproduce aswell or are already aware of? In the first attempt to run I got a sed: 1: "/ByronGenesisFile/ aCon ...": command a expects \ followed by text the code snippet that throws the error sed -i ${ROOT}/configuration.yaml \
-e 's/Protocol: RealPBFT/Protocol: Cardano\nPBftSignatureThreshold: 0.6/' \
-e 's/minSeverity: Info/minSeverity: Info/' \
-e 's/TracingVerbosity: NormalVerbosity/TracingVerbosity: MinimalVerbosity/' \
-e 's/TurnOnLogMetrics: True/TurnOnLogMetrics: False/' \
-e 's|GenesisFile: genesis.json|ByronGenesisFile: byron/genesis.json|' \
-e '/ByronGenesisFile/ aConwayGenesisFile: shelley/genesis.conway.json' \
-e '/ByronGenesisFile/ aAlonzoGenesisFile: shelley/genesis.alonzo.json' \
-e '/ByronGenesisFile/ aShelleyGenesisFile: shelley/genesis.json' \
-e 's/RequiresNoMagic/RequiresMagic/' \
-e 's/LastKnownBlockVersion-Major: 0/LastKnownBlockVersion-Major: 8/' \
-e 's/LastKnownBlockVersion-Minor: 2/LastKnownBlockVersion-Minor: 0/' \
-e 's/LastKnownBlockVersion-Alt: 0/LastKnownBlockVersion-Alt: 0/' the workaround I did to proceed: sed -i backup.yaml \
-e 's/Protocol: RealPBFT/Protocol: Cardano\nPBftSignatureThreshold: 0.6/' \
-e 's/minSeverity: Info/minSeverity: Info/' \
-e 's/TracingVerbosity: NormalVerbosity/TracingVerbosity: MinimalVerbosity/' \
-e 's/TurnOnLogMetrics: True/TurnOnLogMetrics: False/' \
-e 's|GenesisFile: genesis.json|ByronGenesisFile: byron/genesis.json|' \
-e '/ByronGenesisFile/ a\
ConwayGenesisFile: shelley/genesis.conway.json' \
-e '/ByronGenesisFile/ a\
AlonzoGenesisFile: shelley/genesis.alonzo.json' \
-e '/ByronGenesisFile/ a\
ShelleyGenesisFile: shelley/genesis.json' \
-e 's/RequiresNoMagic/RequiresMagic/' \
-e 's/LastKnownBlockVersion-Major: 0/LastKnownBlockVersion-Major: 8/' \
-e 's/LastKnownBlockVersion-Minor: 2/LastKnownBlockVersion-Minor: 0/' \
-e 's/LastKnownBlockVersion-Alt: 0/LastKnownBlockVersion-Alt: 0/' \
configuration.yaml
# copy and tweak the configuration
cp configuration.yaml ${ROOT}/configuration.yaml another sed: -I or -i may not be used with stdin due to the following code snippet also at sed -i shelley/genesis.spec.json \
-e 's/"slotLength": 1/"slotLength": '${SLOT_LENGTH}'/' \
-e 's/"activeSlotsCoeff": 5.0e-2/"activeSlotsCoeff": 0.50/' \
-e 's/"securityParam": 2160/"securityParam": '${SECURITY_PARAM}'/' \
-e 's/"epochLength": 432000/"epochLength": '${EPOCH_LENGTH}'/' \
-e 's/"maxLovelaceSupply": 0/"maxLovelaceSupply": 1000000000/' \
-e 's/"decentralisationParam": 1.0/"decentralisationParam": 0.7/' \
-e 's/"major": 0/"major": 4/' \
-e 's/"updateQuorum": 5/"updateQuorum": 2/' how I made it work? sed -i backup \
-e 's/"slotLength": 1/"slotLength": '${SLOT_LENGTH}'/' \
-e 's/"activeSlotsCoeff": 5.0e-2/"activeSlotsCoeff": 0.50/' \
-e 's/"securityParam": 2160/"securityParam": '${SECURITY_PARAM}'/' \
-e 's/"epochLength": 432000/"epochLength": '${EPOCH_LENGTH}'/' \
-e 's/"maxLovelaceSupply": 0/"maxLovelaceSupply": 1000000000/' \
-e 's/"decentralisationParam": 1.0/"decentralisationParam": 0.7/' \
-e 's/"major": 0/"major": 4/' \
-e 's/"updateQuorum": 5/"updateQuorum": 2/' \
shelley/genesis.spec.json another solution is using awk '{
gsub(/"slotLength": 1/, "\"slotLength\": '${SLOT_LENGTH}'");
gsub(/"activeSlotsCoeff": 5.0e-2/, "\"activeSlotsCoeff\": 0.50");
gsub(/"securityParam": 2160/, "\"securityParam\": '${SECURITY_PARAM}'");
gsub(/"epochLength": 432000/, "\"epochLength\": '${EPOCH_LENGTH}'");
gsub(/"maxLovelaceSupply": 0/, "\"maxLovelaceSupply\": 1000000000");
gsub(/"decentralisationParam": 1.0/, "\"decentralisationParam\": 0.7");
gsub(/"major": 0/, "\"major\": 4");
gsub(/"updateQuorum": 5/, "\"updateQuorum\": 2");
print $0;
}' shelley/genesis.spec.json > temp.json && mv temp.json shelley/genesis.spec.json TBD maybe consider to write down that having some mithril nodes compiled is a requirement here? even if those dependencies it's obvious to run the end-to-end tests, maybe would be a good reminder. the last error I got: poke SockAddr: path is too long in SockAddr Unix As adding an absolute after all, the tests worked as expected! |
@falcucci thank you for this feedback! I think that @dlachaumepalo knows a fix to avoid the modification of the He will also add a mention to the fact that the Mithril nodes need to be built prior to launching the ent to end test. |
Thank you @falcucci for your detailed feedback! Regarding the For your remark on compile Mithril nodes: Concerning the third point: |
@jpraynaud @dlachaumepalo amazing, thanks!
the error basically throws when the due to that the default tmp path generated to the /private/var/folders/9x/wkxqhs851xbcrjqbbm80t9980000gn/T/mithril_end_to_end/devnet/node-bft1/ipc/node.sock adding a short absolute path for ./mithril-end-to-end --work-directory <your-path> --db-directory db/ --bin-directory ../../target/release --skip-cardano-bin-download |
…dd-instructions-for-skip-cardano-bin-download-option-in-readme Add Mithril end to end instructions for `--skip-cardano-bin-download` command
…dd-instructions-for-skip-cardano-bin-download-option-in-readme Add Mithril end to end instructions for `--skip-cardano-bin-download` command
Content
This PR includes a modification in the README file of mithril-end-to-end.
The paragraph explains how to use the
--skip-cardano-bin-download
command to run the tests.This option was added with the merge of the PR #1052.
Pre-submit checklist