|
@ -96,12 +96,12 @@ func Setup(testnet *e2e.Testnet) error { |
|
|
return err |
|
|
return err |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
err = (&p2p.NodeKey{PrivKey: node.Key}).SaveAs(filepath.Join(nodeDir, "config", "node_key.json")) |
|
|
|
|
|
|
|
|
err = (&p2p.NodeKey{PrivKey: node.NodeKey}).SaveAs(filepath.Join(nodeDir, "config", "node_key.json")) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return err |
|
|
return err |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
(privval.NewFilePV(node.Key, |
|
|
|
|
|
|
|
|
(privval.NewFilePV(node.PrivvalKey, |
|
|
filepath.Join(nodeDir, PrivvalKeyFile), |
|
|
filepath.Join(nodeDir, PrivvalKeyFile), |
|
|
filepath.Join(nodeDir, PrivvalStateFile), |
|
|
filepath.Join(nodeDir, PrivvalStateFile), |
|
|
)).Save() |
|
|
)).Save() |
|
@ -194,8 +194,8 @@ func MakeGenesis(testnet *e2e.Testnet) (types.GenesisDoc, error) { |
|
|
for validator, power := range testnet.Validators { |
|
|
for validator, power := range testnet.Validators { |
|
|
genesis.Validators = append(genesis.Validators, types.GenesisValidator{ |
|
|
genesis.Validators = append(genesis.Validators, types.GenesisValidator{ |
|
|
Name: validator.Name, |
|
|
Name: validator.Name, |
|
|
Address: validator.Key.PubKey().Address(), |
|
|
|
|
|
PubKey: validator.Key.PubKey(), |
|
|
|
|
|
|
|
|
Address: validator.PrivvalKey.PubKey().Address(), |
|
|
|
|
|
PubKey: validator.PrivvalKey.PubKey(), |
|
|
Power: power, |
|
|
Power: power, |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
@ -317,6 +317,7 @@ func MakeAppConfig(node *e2e.Node) ([]byte, error) { |
|
|
"persist_interval": node.PersistInterval, |
|
|
"persist_interval": node.PersistInterval, |
|
|
"snapshot_interval": node.SnapshotInterval, |
|
|
"snapshot_interval": node.SnapshotInterval, |
|
|
"retain_blocks": node.RetainBlocks, |
|
|
"retain_blocks": node.RetainBlocks, |
|
|
|
|
|
"key_type": node.PrivvalKey.Type(), |
|
|
} |
|
|
} |
|
|
switch node.ABCIProtocol { |
|
|
switch node.ABCIProtocol { |
|
|
case e2e.ProtocolUNIX: |
|
|
case e2e.ProtocolUNIX: |
|
@ -359,7 +360,7 @@ func MakeAppConfig(node *e2e.Node) ([]byte, error) { |
|
|
for height, validators := range node.Testnet.ValidatorUpdates { |
|
|
for height, validators := range node.Testnet.ValidatorUpdates { |
|
|
updateVals := map[string]int64{} |
|
|
updateVals := map[string]int64{} |
|
|
for node, power := range validators { |
|
|
for node, power := range validators { |
|
|
updateVals[base64.StdEncoding.EncodeToString(node.Key.PubKey().Bytes())] = power |
|
|
|
|
|
|
|
|
updateVals[base64.StdEncoding.EncodeToString(node.PrivvalKey.PubKey().Bytes())] = power |
|
|
} |
|
|
} |
|
|
validatorUpdates[fmt.Sprintf("%v", height)] = updateVals |
|
|
validatorUpdates[fmt.Sprintf("%v", height)] = updateVals |
|
|
} |
|
|
} |
|
|