Prebuilt binaries for the components are available here. Please use latest available binaries >3.0.0.
Running the bridge
The bridge parameters can be discovered with the
$ ./bridge_cosmos-linux-amd64 --help USAGE: bridge [OPTIONS] OPTIONS: -d, --discovery-addr <discovery_addr> -p, --pubsub-addr <pubsub_addr> -b, --beacon-addr <beacon_addr> -l, --listen-addr <listen_addr> -k, --keystore-path <keystore_path> -k, --keystore-pass_path <keystore_pass_path> -c, --contracts <contracts> -h, --help <help> -v, --version <version>
While the following flags are optional for testing the connection between the gateway and the bridge, they are required parameters for interacting with the Marlin network.
--beacon-addr- Address of the bootstrap server used for discovering other nodes in the network.
--keystore-path- Path to keystore file. Serves as the identity of the bridge.
--keystore-pass-path- Path to text file containing passphrase that can unlock the above keystore file.
--contracts- Contract set used by the bridge for fetching on-chain data. Enables choosing the network that the bridge is a part of (e.g. separate networks for testing or new upgrades). Especially important in the initial phases of the network, where it's expected that clusters will work on a testnet first before transitioning to mainnet upon maturity.
The following flags are useful for customizing the socket addresses used by the bridge in order to prevent any conflicts with other programs on the same system.
--discovery-addr- Address used for the discovery protocol to find peers in the Marlin network.
--pubsub-addr- Address used for the pubsub protocol, to send and receive message from the Marlin network.
--listen-addr- Address used for listening to connections from the gateway component.
Running the gateway
The gateway parameters can be discovered with the
--help parameters. It is advised that operators read up on https://github.com/supragya/TendermintConnector as well as below.
$ ./cosmos_gateway-linux_amd64 dataconnect -h Act as a connector between Marlin Relay and cosmos Usage: TendermintConnector dataconnect [flags] Flags: -d, --dial Connector DIALs TMCore (gaia node) if flag is set, otherwise connector LISTENs for connections. -e, --direction string Direction of connection [both/producer/consumer] (default "both") -h, --help help for dataconnect -k, --keyfile string KeyFile to use for connection -l, --listenportpeer int Port on which Connector should listen for incoming connections from cosmos peer (default 22400) -m, --marlinip string Marlin TCP Bridge IP address (default "127.0.0.1") -n, --marlinport int Marlin TCP Bridge port (default 22401) -i, --peerip string Gaia node IP address (default "127.0.0.1") -p, --peerport int Gaia node peer connection port (default 26656) -r, --rpcport int Gaia node rpc port (default 26657) -s, --rpcsanity Validate node information prior to connecting to TMCore. (RPC Sanity)
In dial mode (gateway dials TMCore), keyfile is not required however in listen more (gateway listens for incoming connections from TMCore), a keyfile is required. Create one using:
./cosmos_gateway-linux_amd64 keyfile --chain cosmos --filelocation cosmos_keyfile_ed25519.keyfile --generate
Node ID for gateway will be shown in a log line as follows:
[INFO]:2021-04-26 18:13:16 - ID for node after generating KeyPair: 6bf915b371f741f5b0aabdf84a033150a728e1ec
This can later be used in dataconnect as follows:
./cosmos_gateway-linux_amd64 dataconnect --direction producer --keyfile cosmos_keyfile_ed25519.keyfile