Skip to content
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

Fix byron-to-alonzo.sh #4240

Merged
merged 1 commit into from
Sep 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions scripts/byron-to-alonzo/mkfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -315,23 +315,6 @@ cp ../configuration/cardano/shelley_qa-alonzo-genesis.json shelley/genesis.alonz

cardano-cli genesis create --testnet-magic ${NETWORK_MAGIC} --genesis-dir shelley

# We're going to use really quick epochs (300 seconds), by using short slots 0.2s
# and K=10, but we'll keep long KES periods so we don't have to bother
# cycling KES keys
$SED -i shelley/genesis.spec.json \
-e 's/"slotLength": 1/"slotLength": 0.1/' \
-e 's/"activeSlotsCoeff": 5.0e-2/"activeSlotsCoeff": 0.1/' \
-e 's/"securityParam": 2160/"securityParam": 10/' \
-e 's/"epochLength": 432000/"epochLength": 500/' \
-e 's/"maxLovelaceSupply": 0/"maxLovelaceSupply": 1000000000000/' \
-e 's/"minFeeA": 1/"minFeeA": 44/' \
-e 's/"minFeeB": 0/"minFeeB": 155381/' \
-e 's/"minUTxOValue": 0/"minUTxOValue": 1000000/' \
-e 's/"decentralisationParam": 1.0/"decentralisationParam": 0.7/' \
-e 's/"major": 0/"major": 2/' \
-e 's/"rho": 0.0/"rho": 0.1/' \
-e 's/"tau": 0.0/"tau": 0.1/' \
-e 's/"updateQuorum": 5/"updateQuorum": 2/'

# Now generate for real:

Expand All @@ -341,6 +324,22 @@ cardano-cli genesis create \
--gen-genesis-keys ${NUM_BFT_NODES} \
--gen-utxo-keys 1

echo "What is in shelley"
echo "$(ls shelley)"

cp "shelley/genesis.json" "shelley/copy-genesis.json"

# We're going to use really quick epochs (300 seconds), by using short slots 0.2s
# and K=10, but we'll keep long KES periods so we don't have to bother
# cycling KES keys
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a note about the motivation for quick epochs?



jq -M '. + {slotLength:0.1, securityParam:10, activeSlotsCoeff:0.1, securityParam:10, epochLength:500, maxLovelaceSupply:1000000000000, updateQuorum:2}' "shelley/copy-genesis.json" > "shelley/copy2-genesis.json"
jq --raw-output '.protocolParams.protocolVersion.major = 2 | .protocolParams.minFeeA = 44 | .protocolParams.minFeeB = 155381 | .protocolParams.minUTxOValue = 1000000 | .protocolParams.decentralisationParam = 0.7 | .protocolParams.rho = 0.1 | .protocolParams.tau = 0.1' "shelley/copy2-genesis.json" > "shelley/genesis.json"

rm "shelley/copy2-genesis.json"
rm "shelley/copy-genesis.json"

cardano-cli stake-address key-gen \
--verification-key-file shelley/utxo-keys/utxo-stake.vkey \
--signing-key-file shelley/utxo-keys/utxo-stake.skey
Expand Down