Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CAD-1393 shelley3pools: support --cardano mode (--byron regressed)
- Loading branch information
Showing
15 changed files
with
468 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
|
||
configuration/genesis | ||
configuration/genesis* | ||
configuration/start-time | ||
|
||
db/ | ||
logs/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
benchmarks/shelley3pools/configuration/byron-protocol-params.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"heavyDelThd": "300000000000", | ||
"maxBlockSize": "2000000", | ||
"maxHeaderSize": "2000000", | ||
"maxProposalSize": "700", | ||
"maxTxSize": "4096", | ||
"mpcThd": "20000000000000", | ||
"scriptVersion": 0, | ||
"slotDuration": "1000", | ||
"softforkRule": { | ||
"initThd": "900000000000000", | ||
"minThd": "600000000000000", | ||
"thdDecrement": "50000000000000" | ||
}, | ||
"txFeePolicy": { | ||
"multiplier": "43946000000", | ||
"summand": "155381000000000" | ||
}, | ||
"unlockStakeEpoch": "18446744073709551615", | ||
"updateImplicit": "10000", | ||
"updateProposalThd": "100000000000000", | ||
"updateVoteThd": "1000000000000" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/usr/bin/env bash | ||
# shellcheck disable=SC1090 | ||
|
||
set -e | ||
|
||
basedir=$(realpath "$(dirname "$0")") | ||
. "$basedir"/../../scripts/common.sh | ||
. "$basedir"/configuration/parameters | ||
|
||
cd "$basedir" | ||
|
||
gendir=$GENESISDIR_byron | ||
cli=${CLICMD:-'run cardano-cli'} | ||
|
||
umask 077 | ||
protocol_params="$basedir/configuration/byron-protocol-params.json" | ||
|
||
protocol_magic=$MAGIC | ||
total_balance=8000000000000002 | ||
|
||
parameter_k=10 | ||
n_poors=1 | ||
n_delegates=3 | ||
delegate_share=0.5 | ||
avvm_entries=0 | ||
avvm_entry_balance=10000000000000 | ||
not_so_secret=2718281828 | ||
|
||
tmpdir="`mktemp`.d" | ||
args=( | ||
--genesis-output-dir "${tmpdir}" | ||
--start-time "${start_time}" | ||
--protocol-parameters-file "${protocol_params}" | ||
--k ${parameter_k} | ||
--protocol-magic ${protocol_magic} | ||
--n-poor-addresses ${n_poors} | ||
--n-delegate-addresses ${n_delegates} | ||
--total-balance ${total_balance} | ||
--delegate-share ${delegate_share} | ||
--avvm-entry-count ${avvm_entries} | ||
--avvm-entry-balance ${avvm_entry_balance} | ||
--real-pbft | ||
--secret-seed ${not_so_secret} | ||
) | ||
|
||
$cli genesis "${args[@]}" "$@" | ||
|
||
rm -rf "$gendir" | ||
mkdir -p "$gendir" | ||
cp -ia ${tmpdir}/genesis.json $gendir/ | ||
cp -ia ${tmpdir}/delegate-keys.*.key $gendir/ | ||
cp -ia ${tmpdir}/delegation-cert.*.json $gendir/ | ||
cp -ia ${tmpdir}/genesis-keys.*.key $gendir/ | ||
cp -ia ${tmpdir}/poor-keys.*.key $gendir/ | ||
|
||
$cli shelley key convert-byron-key \ | ||
--byron-payment-key-type \ | ||
--byron-signing-key-file $gendir/poor-keys.000.key \ | ||
--out-file $gendir/poor-keys.000.skey | ||
|
||
$cli print-genesis-hash --genesis-json "$gendir"/genesis.json | | ||
tail -1 > $gendir/GENHASH |
Oops, something went wrong.