Interchain

Interchain, Dragonchain’s patented approach to moving data securely between blockchains, is a cornerstone of Dragonchain’s platform. Not only does Dragon Net use Interchain to pin L1 blocks to a public network, but L1 chains can also use contracts to react to events on another blockchain.

Overview

Dragonchain provides two types of smart contracts to interact with other chains. The watcher contract waits for events to occur on another blockchain and performs some operation with the event, then ledgers the result onto the L1 chain. The publisher contract does the reverse, triggering when an event occurs on an L1 chain and pushing the event to a different chain to be ledgered. The contracts can even be used in combination, allowing an event on a public network to trigger logic on an L1 chain and then report back with the result.

Interchain Interfaces

Dragonchain aims to Interchain with every network. Currently, Dragonchain supports Binance, Bitcoin, and Ethereum Interchain interfaces. The open source Dragonchain code also demonstrates how more interfaces could be constructed, allowing the community to build their own interfaces to any network they wish.

Dragonchain Provided Interfaces

The interfaces Dragonchain maintains and provides to the community are also used to host L5 nodes. The networks listed in this section are actively pinning block hashes to public networks.

Binance Chain

The Binance Chain interface is built using privately hosted nodes. The nodes are not accessible to users who want to run their own on-premises nodes, but the RPC and API calls are useful to anyone who wants to interact with a Binance Chain based blockchain.

A record of Binance L5 broadcasts can be found here.

Dragonchain can create a Binance Chain address and attach it to an L1 chain:

$ dctl interchain binance create "myBinanceChain"
{
  "status": 201,
  "response": {
    "version": "1",
    "blockchain": "binance",
    "name": "myBinanceChain",
    "testnet": true,
    "node_url": "http://binance-node.dragonchain.com",
    "rpc_port": 26657,
    "api_port": 11699,
    "address": "tbnb1sylyjw032eajr9cyllp26n04300qzzre38qyv5"
  },
  "ok": true
}

This address will be used in Bitcoin Interchain transactions. The address must be funded to pay for transactions on Binance Chain. Funds can be transferred directly to the address provided by dctl.

$ dctl interchain binance transaction "myBinanceChain" --memo ""
{
  "jsonrpc": "2.0",
  "id": "",
  "result": {
    "check_tx": {
      "data": "eyJvcmRlcl9pZCI6IjgxM0U0OTM5RjE1NjdCMjE5NzA0RkZDMkFENERGNThCREUwMTA4NzktNDYifQ==",
      "log": "Msg 0: ",
      "tags": [
        {
          "key": "YWN0aW9u",
          "value": "b3JkZXJOZXc="
        }
      ]
    },
    "deliver_tx": {
      "data": "eyJvcmRlcl9pZCI6IjgxM0U0OTM5RjE1NjdCMjE5NzA0RkZDMkFENERGNThCREUwMTA4NzktNDYifQ==",
      "log": "Msg 0: ",
      "tags": [
        {
          "key": "YWN0aW9u",
          "value": "b3JkZXJOZXc="
        }
      ]
    },
    "hash": "008EA3C57B15E34B045F69DCEB2A5589B979B2B58BA282C15DF2AEA8B441AB6B",
    "height": "7734637"
  }
}

Dragonchain does not currently support automatically sending transactions on public networks. While this feature is in development, the signed transaction can be manually sent using a tool like BEPTools.com.

Using the Binance Chain testnet, we broadcast the above signed transaction.

Bitcoin

The Bitcoin interface is built using private RPC nodes. The nodes are not accessible to users who want to run their own on-premises nodes, but the RPC calls are useful to anyone who wants to interact with a Bitcoin based blockchain.

A record of Bitcoin L5 broadcasts can be found here.

Dragonchain can create a Bitcoin address and attach it to an L1 chain:

$ dctl interchain bitcoin create "myBtc"
{
  "status": 201,
  "response": {
    "version": "1",
    "blockchain": "bitcoin",
    "name": "myBtc",
    "rpc_address": "http://internal-Btc-Mainnet-Internal-297595751.us-west-2.elb.amazonaws.com:8332",
    "testnet": false,
    "address": "1MvesMiKiv8PEsopD8kFd7g1qkBjWb55p2"
  },
  "ok": true
}

This address will be used in Bitcoin interchain transactions. The address must be funded to pay for transactions on Bitcoin. Funds can be transferred directly to the address provided by dctl.

$ dctl interchain bitcoin transaction "myBtc" --data "hello"
{
  "status": 200,
  "response": {
    "signed": "010000000222b78dca6b100f0e22156e06f66edaa1992bca07bc7e0f4eab30c2d1a74916e2010000006b483045022100a8ebdd789aa171c1ee022c46545575173de46da4b01d110e3ba34178d1b835710220343583b63af5c277b877cee2b8016733b6b674c2f436100d6b2e37325f2b66350121023c27bf2fe8f47ac38fcdaed5c4667ad948a7a5cbccd2ed4fd126e3c6ce518df8ffffffffe713c13a937985b74d217882883340d69fcc148c5ea6867726e8bb4ff7af43a0010000006a47304402201ba781d5b979008d5a92590f7b23ad0262ba435cbe20c0d572f2d6877ced115a022030e2a96aca80e30c19713a96a76f7342c3dcf3d11ae3ba5c95808042d67d92060121023c27bf2fe8f47ac38fcdaed5c4667ad948a7a5cbccd2ed4fd126e3c6ce518df8ffffffff025e3d0000000000001976a9142e961bd1c83dc030fbccec8f23c83b135331823988ac0000000000000000076a0568656c6c6f00000000"
  },
  "ok": true
}

Dragonchain does not currently support automatically sending transactions on public networks. While this feature is in development, the signed transaction can be manually sent using a tool like Blockchain.com.

Using the Blockcypher testnet3 interface, we broadcast the above signed transaction.

Ethereum

The Ethereum interface uses private Geth nodes to interact with Ethereum and Ethereum Classic. The private RPC nodes are not accessible to users who run their own on-premises nodes, but the RPC calls will be useful to anyone who wants to interact with an Ethereum based blockchain.

A record of Ethereum L5 broadcasts can be found here. Ethereum Classic L5 broadcasts can be found here.

Dragonchain can create a Ethereum address and attach it to an L1 chain:

$ dctl interchain ethereum create "myEth" --chain-id "1" # chain id 1 is mainnet ETH
{
  "status": 201,
  "response": {
    "version": "1",
    "blockchain": "ethereum",
    "name": "myEth",
    "rpc_address": "http://internal-Parity-Ropsten-Internal-1699752391.us-west-2.elb.amazonaws.com:8545",
    "chain_id": 1,
    "address": "0x8167620eaA01F46c666Bd3B3e3e53119e32B44e3"
  },
  "ok": true
}

This address will be used in Ethereum interchain transactions. The address must be funded to pay for transactions on Ethereum. Funds can be transferred directly to the address provided by dctl.

$ dctl interchain ethereum transaction "myEth" --data "68656c6c6f" --to "0x0000000000000000000000000000000000000000" -v "0x0"
{
  "status": 200,
  "response": {
    "signed": "0xf86880844102bd5282ea60940000000000000000000000000000000000000000808568656c6c6f29a05e91ecc7592439ff62ed6442b59a30f1c983bcd37236fa80d3fce6fa39e77e1ba010fefd5598f22036a5edbf818b8feb149dc3de97340d2811d8a67a4637af3827"
  },
  "ok": true
}

Dragonchain does not currently support automatically sending transactions on public networks. While this feature is in development, the signed transaction can be manually sent using a tool like Etherscan.

Using the Etherscan ropsten interface, we broadcast the above signed transaction.

Make Your Own

L5 nodes use the actions specified in level_5_actions.py. To create a new interface to a network, or to add a new network to the open source Dragonchain project, just create a file like the ones provided by Dragonchain for the blockchain. We are always accepting PRs to extend our network capabilities and Interchain Everything!