Having trouble setting up burner chain with multiple validators, on the same machine

Hello everybody, I want to create a burner chain with, say, 2 validators. There will be one virtual machine for each validator, but for convenience’s sake, I want to do the Cosmos-SDK daemon setup for both validator nodes on the same machine, make some edits, and then copy the directories over to the virtual machines.

I’m having trouble with the gentx step though, and because the genesis.json will be slightly different between the two nodes, I have to copy the first node’s genesis.json to the other one. At least, that’s what I think. But I always either run into

starting ABCI with Tendermint module=main ERROR: error during handshake: error on replay: validator set is nil in genesis and still empty after InitChain

or

I[2020-09-23|12:55:35.966] starting ABCI with Tendermint                module=main 
panic: unauthorized: signature verification failed; verify correct account sequence and chain-id

This is what I’m doing so far, translated into bash script:

CLI=dist/launchpayloadcli
DAE=dist/launchpayloadd


CLI0HOME=config/0/cli
DAE0HOME=config/0/daemon
CLI1HOME=config/1/cli
DAE1HOME=config/1/daemon
GENTXDIR=config/genesis_txs


$DAE init burnerchain --home $DAE0HOME
$DAE init burnerchain --home $DAE1HOME

$CLI keys add v1@email.com -o json --keyring-backend test --home $CLI0HOME
$CLI keys add v2@email.com -o json --keyring-backend test --home $CLI1HOME

$DAE add-genesis-account $($CLI keys show v1@email.com --home $CLI0HOME --keyring-backend test -a) 1000000000atom,100000000000stake --keyring-backend test --home $DAE0HOME
$DAE add-genesis-account $($CLI keys show v2@email.com --home $CLI1HOME --keyring-backend test -a) 1000000000atom,100000000000stake --keyring-backend test --home $DAE0HOME

$DAE add-genesis-account $($CLI keys show v1@email.com --home $CLI0HOME --keyring-backend test -a) 1000000000atom,100000000000stake --keyring-backend test --home $DAE1HOME
$DAE add-genesis-account $($CLI keys show v2@email.com --home $CLI1HOME --keyring-backend test -a) 1000000000atom,100000000000stake --keyring-backend test --home $DAE1HOME


mkdir -p $GENTXDIR
$DAE gentx --name v1@email.com --home-client $CLI0HOME --home $DAE0HOME --keyring-backend test --output-document $GENTXDIR/v1email.json
$DAE gentx --name v2@email.com --home-client $CLI1HOME --home $DAE1HOME --keyring-backend test --output-document $GENTXDIR/v2email.json

$DAE collect-gentxs --gentx-dir $GENTXDIR --home $DAE0HOME
$DAE start --home $DAE0HOME

What am I doing wrong?

Not sure exactly, but trying to create the same genesis file in two places at once seems confusing. I would focus on building it once in one place, then run gentx and collect-gentxs, and see if you can start the one node. Then copy the resulting genesis file into the second home directory to run the second node.