cosmos / cosmos-sdk

:chains: A Framework for Building High Value Public Blockchains :sparkles:
https://cosmos.network/
Apache License 2.0
6.24k stars 3.61k forks source link

Separate client and server #109

Closed ethanfrey closed 7 years ago

ethanfrey commented 7 years ago

Basecoin binary with all server side stuff (including relay)

Basecli binary with all client side stuff.

Everything that doesn't involve a full-node needs proofs.

ethanfrey commented 7 years ago

Big cleanup here as part of #115 Just need to port basecoin tx ibc register to basecli

ethanfrey commented 7 years ago

Okay, with @ebuchman suggestion will move it...

basecoin relay init basecoin relay start

no basecoin tx any more.

basecoin relay init will do something like:

  basecoin tx ibc --amount 10mycoin --from=$RELAY_KEY --chain_id=$CHAIN_ID_2 \
    --node=tcp://localhost:${PORT_2} \
    register --ibc_chain_id=$CHAIN_ID_1 --genesis=$BASE_DIR_1/server/genesis.json \

  basecoin tx ibc --amount 10mycoin --from=$RELAY_KEY --chain_id=$CHAIN_ID_1 \
    --node=tcp://localhost:${PORT_1} \
    register --ibc_chain_id=$CHAIN_ID_2 --genesis=$BASE_DIR_2/server/genesis.json \
ethanfrey commented 7 years ago

This all got wrapped up by a57e2d3

Lots of flags, but seems good. From the test code:

  # initialize the relay (register both chains)
  ${SERVER_EXE} relay init --chain1-id=$CHAIN_ID_1 --chain2-id=$CHAIN_ID_2 \
    --chain1-addr=tcp://localhost:${PORT_1} --chain2-addr=tcp://localhost:${PORT_2} \
    --genesis1=${BASE_DIR_1}/server/genesis.json --genesis2=${BASE_DIR_2}/server/genesis.json \
    --from=$RELAY_KEY > ${BASE_DIR_1}/../relay.log &

  # now start the relay (constantly send packets)
  ${SERVER_EXE} relay start --chain1-id=$CHAIN_ID_1 --chain2-id=$CHAIN_ID_2 \
    --chain1-addr=tcp://localhost:${PORT_1} --chain2-addr=tcp://localhost:${PORT_2} \
    --from=$RELAY_KEY > ${BASE_DIR_1}/../relay.log &