Skip to content

Commit

Permalink
workbench: simplify genesis creation
Browse files Browse the repository at this point in the history
  • Loading branch information
andreabedini committed Dec 19, 2023
1 parent 5cadaa5 commit 9013b98
Show file tree
Hide file tree
Showing 4 changed files with 220 additions and 235 deletions.
18 changes: 2 additions & 16 deletions nix/workbench/genesis/genesis.jq
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,15 @@ def fmt_decimal_10_5($x):

def profile_cli_args($p):
{ common:
{ createSpec:
[ "--supply", fmt_decimal_10_5($p.derived.supply_total)
, "--testnet-magic", $p.genesis.network_magic
, "--gen-genesis-keys", $p.composition.n_bft_hosts
, "--gen-utxo-keys", 1
]
, createFinalIncremental:
([ "--supply", $p.genesis.funds_balance
, "--gen-utxo-keys", 1
] +
if $p.composition.dense_pool_density != 1
then
[ ]
else [] end)
, createFinalBulk:
{ createStackedArgs:
([ "--supply", fmt_decimal_10_5($p.genesis.funds_balance)
, "--gen-utxo-keys", 1
, "--gen-genesis-keys", $p.composition.n_bft_hosts
, "--supply-delegated", fmt_decimal_10_5($p.derived.supply_delegated)
, "--gen-pools", $p.composition.n_pools
, "--gen-stake-delegs", $p.derived.delegators_effective
, "--testnet-magic", $p.genesis.network_magic
, "--num-stuffed-utxo", fmt_decimal_10_5($p.derived.utxo_stuffed)
, "--testnet-magic", $p.genesis.network_magic
] +
if $p.composition.dense_pool_density != 1
then
Expand Down
Loading

0 comments on commit 9013b98

Please sign in to comment.