OpenWeaver is a framework that provides components to easily deploy a high-performance relay network across a global cluster of nodes. Design goals include:
- Speed - Latency optimized relaying
- Efficiency - Low resource consumption
- Blockchain-agnostic - Supports multiple blockchains in the same core network
- Multilingual - Supports projects written in different languages
- Streamlined - Easy to deploy and manage
The repository has submodules, so be sure to clone recursively using
$ git clone --recurse-submodules https://github.com/marlinprotocol/OpenWeaver.git
Alternatively, you can checkout submodules after cloning as well using
$ git submodule update --init --recursive
Prerequisites: cmake >= 3.13, autoconf, automake, libtool, g++/clang++ (must support C++17, newer versions preferable), libcurl with TLS support (libcurl4-openssl-dev on Debian and Ubuntu)
The codebase is a standard C++/CMake project.
$ mkdir build && cd build # to create a build directory
$ cmake .. -DCMAKE_BUILD_TYPE=Release && make -j8 # to buildFor builds in a containterized environments with compilation toolchain separate from host machines, see ow_builder.
After building, you can find the following binaries in the build directory:
./beacon/beacon- Beacon./relay/eth_relay- Relay./goldfish/goldfish- Toy network for local testing./multicastsdk/msggen- Message flooding tool for testing/benchmarking./multicastsdk/eth_bridge- Bridge between an Ethereum consensus client (prysm-gateway) and the network./multicastsdk/eth_probe- Client that logs every message it receives, used by receivers
Clients only connect to clusters registered in the Marlin staking subgraph on Arbitrum One, and the bridge weights clusters by their stake. eth_bridge and eth_probe take the subgraph URL with --subgraph-url, over http or https, for example the subgraph on The Graph network:
--subgraph-url https://gateway.thegraph.com/api/<api_key>/subgraphs/id/GUh83DEwZWMTkKaydusdkb46mLuAC7FTL4km1bcNjugc
Without the flag they query https://graph.marlin.pro/subgraphs/name/marlinprotocol/staking-arb1. Queries go through the proxy set in https_proxy/http_proxy, if any.
- Ethereum - A bridge between Ethereum nodes and the core network is built at
./integrations/eth/onramp_eth
After building,
- Set up a beacon -
./beacon/beacon - Set up a relay -
./relay/eth_relay "127.0.0.1:8002" "127.0.0.1:8003" ./relaydata(the third argument, a data directory, is required but not used)
You now have a local network running. In a production setting, you would want to run these in different instances as a globally distributed network.
OpenWeaver has a test suite that's integrated with CTest. After building, tests can be run using
$ make test
or
$ ctest
| Topic | Link |
|---|---|
| Development | Discord |
| Research | Discourse |
| Bug(s) | Issues |
| Memes | Telegram |
| Spam | info@marlin.pro |
Copyright (c) 2020 Marlin Contributors. Licensed under the MIT license. See LICENSE for more information.
Includes third party software in the vendor directory with their own licenses.
