Maintainer
Last updated
Last updated
Compass is the Golang implementation of cross-chain communication maintainer for MAP Protocol. It currently supports bridging between EVM based chains.
The newly designed compass version contains all the functions required to run the relay node. With this tool, you can run nodes on almost all hardware platforms.
the recommanded way to get the executable is to download it from the release page.
if you want to build it from the source code,check the section below.
fund some accounts in order to send txs on each chain, you want to provice crosse-chain service. the esaiest way is to using the same one address for every chain.
after that we need to import the account into the keystore of compass. using the private key is the simplest way,run the following command in terminal:
during the process of importing, you will be asked to input a password. the password is used to encrypt your keystore.you have to input it when unlocking your account.
to list the imported keys in the keystore, using the command below:
copy a example configure file from
modify the configuration accordingly. fill the accounts for each chain.
lauch and keep the executable runing simply by run:
you will be asked to input the password to unlock your account.(which you have inputed at step 2) if everything runs smoothly. it's all set
under the root directory of the repo
make build
: Builds compass
in ./build
.
make install
: Uses go install
to add compass
to your GOBIN.
Synchronize the information of blocks in each chain according to the information in the configuration file
Start with the following command:
the configuration file is a small JSON file.
A chain configurations take this form:
See config.json.example
for an example configuration.
Since MAP is also a EVM based chain, so the opts of the mapchain is following the options below as well Ethereum chains support the following additional options:
The blockstore is used to record the last block the maintainer processed, so it can pick up where it left off.
To disable loading from the chunk library, specify the "--fresh" flag. Add the fresh flag, and the program will execute from height 0,
In addition, the configuration file provides the "startBlock" option, and the program will execute from the startBlock
Compass requires keys to sign and submit transactions, and to identify each bridge node on chain.
To use secure keys, see compass accounts --help
. The keystore password can be supplied with the KEYSTORE_PASSWORD
environment variable.
To import external ethereum keys, such as those generated with geth, use compass accounts import --ethereum /path/to/key
.
To import private keys as keystores, use compass accounts import --privateKey key
.
Building compass requires a compiler(version 1.16 or later)
Ethereum (Solidity): The Solidity contracts required for compass. Includes scripts for deployment.
ethereum
ethereum
bsc
bsc
goerli
eth2
polygon
matic
near
near
klaytn
klaytn