Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
[DEVOPS-398] configuration.yaml: rearrange testnet sections
Browse files Browse the repository at this point in the history
 - mainnet_base - in the genesis spec protocolMagic requiresNetworkMagic
   is omitted and therefore gets the default setting NMMustBeJust.

 - mainnet_full - genesis data remains the same.

 - testnet_launch - do not inherit protocolConstants from
   mainnet_base_spec. Copy across these parameters. In this genesis
   spec, requiresNetworkMagic is explicitly stated as NMMustBeJust,
   even though that would be the default value.

 - testnet_full - new genesis data will be generated from
   testnet_launch and updated after starting the blockchain.

 - devnet, other "leaf configurations" have requiresNetworkMagic:
   NMMustBeNothing which overrides the mainnet_base setting. This is so
   that the address format of the devnets matches mainnet_full.

For testnet, the YAML "inheritance" direction is now:

  mainnet_base -> testnet_launch -> testnet_full

This ensures that testnet_full gets all the genesis spec attributes --
requiresNetworkMagic in particular.
  • Loading branch information
rvl committed Sep 26, 2018
1 parent df2a489 commit f8dbac3
Showing 1 changed file with 40 additions and 31 deletions.
71 changes: 40 additions & 31 deletions lib/configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ dev: &dev
ftsSeed: "c2tvdm9yb2RhIEdndXJkYSBib3JvZGEgcHJvdm9kYSA="
heavyDelegation: {}
avvmDistr: {}

requiresNetworkMagic: NMMustBeNothing
dbSerializeVersion: 0

ntp: &dev_ntp
Expand Down Expand Up @@ -14775,7 +14775,6 @@ mainnet_full: &mainnet_full
src:
file: mainnet-genesis.json
hash: 5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb

requiresNetworkMagic: NMMustBeNothing

mainnet_wallet_win64: &mainnet_wallet_win64
Expand Down Expand Up @@ -14815,11 +14814,47 @@ mainnet_wallet_linux64: &mainnet_wallet_linux64
## ##
##############################################################################

testnet_full: &testnet_full
# Should be used to generate genesis
testnet_launch: &testnet_launch
<<: *mainnet_base
core: &testnet_full_core
core: &testnet_gen_core
<<: *mainnet_base_core
genesis: &testnet_gen_genesis
<<: *mainnet_base_genesis
spec: &testnet_gen_spec
<<: *mainnet_base_spec
protocolConstants:
k: 2160
protocolMagic: 1097911063
vssMinTTL: 2
vssMaxTTL: 6
avvmDistr: {}
initializer:
testBalance:
poors: 100
richmen: 7
richmenShare: 0.95
totalBalance: 42000000000000000 # 42e9 ADA
useHDAddresses: True
fakeAvvmBalance:
count: 100
oneBalance: 20000000000000 # 2e7 ADA
avvmBalanceFactor: 1
useHeavyDlg: True
seed: 0 # should be overridden using --configuration-seed
blockVersionData:
<<: *mainnet_base_blockVersionData
maxHeaderSize: 2000
maxProposalSize: 70000 # 70KB
maxTxSize: 65536 # 64KiB
requiresNetworkMagic: NMMustBeJust

testnet_full: &testnet_full
<<: *testnet_launch
core: &testnet_full_core
<<: *testnet_gen_core
genesis:
<<: *testnet_gen_genesis
src:
file: testnet-genesis.json
hash: f0204568043f6cb8068a81ddc1e9ca575615aed12a3a815678afc5ca12a94eb8
Expand Down Expand Up @@ -14860,32 +14895,6 @@ testnet_wallet_linux64: &testnet_wallet_linux64
<<: *testnet_wallet_update
systemTag: linux

# Should be used to generate genesis
testnet_launch: &testnet_launch
<<: *testnet_full
core: &testnet_gen_core
<<: *testnet_full_core
genesis:
<<: *mainnet_base_genesis
spec:
<<: *mainnet_base_spec
protocolConstants:
<<: *mainnet_base_protocolConstants
protocolMagic: 1097911063
avvmDistr: *mainnet_avvmDistr
initializer:
testBalance:
poors: 100
richmen: 7
richmenShare: 0.93
totalBalance: 13887504355000000
useHDAddresses: True
fakeAvvmBalance:
count: 100
oneBalance: 1000000000000 # 1e6 ADA
avvmBalanceFactor: 0.1
useHeavyDlg: True
seed: 0 # should be overridden using --configuration-seed

##############################################################################
## ##
Expand All @@ -14901,7 +14910,6 @@ mainnet_dryrun_full: &mainnet_dryrun_full
src:
file: mainnet-genesis-dryrun-with-stakeholders.json
hash: c6a004d3d178f600cd8caa10abbebe1549bef878f0665aea2903472d5abf7323

requiresNetworkMagic: NMMustBeNothing

mainnet_dryrun_wallet_win64: &mainnet_dryrun_wallet_win64
Expand Down Expand Up @@ -15026,6 +15034,7 @@ devnet: &devnet
avvmBalanceFactor: 1
useHeavyDlg: True
seed: 0
requiresNetworkMagic: NMMustBeNothing

update: &devnet_update
applicationName: cardano-sl
Expand Down

0 comments on commit f8dbac3

Please sign in to comment.