From ee47b3b1ca66be939e5aa943ac7d78416810e1dc Mon Sep 17 00:00:00 2001 From: rigelrozanski Date: Wed, 25 Jul 2018 16:57:33 -0400 Subject: [PATCH 1/2] rollback changes which break gen-tx --- server/init.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/server/init.go b/server/init.go index a644c0c1ae62..39f3d0b7f89a 100644 --- a/server/init.go +++ b/server/init.go @@ -48,9 +48,10 @@ var ( // genesis piece structure for creating combined genesis type GenesisTx struct { - NodeID string `json:"node_id"` - IP string `json:"ip"` - AppGenTx json.RawMessage `json:"app_gen_tx"` + NodeID string `json:"node_id"` + IP string `json:"ip"` + Validator tmtypes.GenesisValidator `json:"validator"` + AppGenTx json.RawMessage `json:"app_gen_tx"` } // Storage for init command input parameters @@ -120,15 +121,16 @@ func gentxWithConfig(cdc *wire.Codec, appInit AppInit, config *cfg.Config, genTx nodeID := string(nodeKey.ID()) pubKey := readOrCreatePrivValidator(config) - appGenTx, cliPrint, _, err := appInit.AppGenTx(cdc, pubKey, genTxConfig) + appGenTx, cliPrint, validator, err := appInit.AppGenTx(cdc, pubKey, genTxConfig) if err != nil { return } tx := GenesisTx{ - NodeID: nodeID, - IP: genTxConfig.IP, - AppGenTx: appGenTx, + NodeID: nodeID, + IP: genTxConfig.IP, + Validator: validator, + AppGenTx: appGenTx, } bz, err := wire.MarshalJSONIndent(cdc, tx) if err != nil { @@ -310,6 +312,7 @@ func processGenTxs(genTxsDir string, cdc *wire.Codec) ( genTx := genTxs[nodeID] // combine some stuff + validators = append(validators, genTx.Validator) appGenTxs = append(appGenTxs, genTx.AppGenTx) // Add a persistent peer From 5964fcb0539d91ce30c2128835225d2609ea3dd4 Mon Sep 17 00:00:00 2001 From: Christopher Goes Date: Thu, 26 Jul 2018 21:03:51 +0200 Subject: [PATCH 2/2] Update PENDING.md --- PENDING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/PENDING.md b/PENDING.md index 16286e749edc..1f431a68233b 100644 --- a/PENDING.md +++ b/PENDING.md @@ -51,3 +51,4 @@ BUG FIXES * \#1797 Fix off-by-one error in slashing for downtime * \#1787 Fixed bug where Tally fails due to revoked/unbonding validator * \#1766 Fixes bad example for keybase identity +* \#1804 Fixes gen-tx genesis generation logic temporarily until upstream updates