加入星云主网

介绍

Nebulas Mainnet 2.0(Nebulas Nova)已经发布。 本教程将教您如何加入和使用星云主网。

编译

需要首先构建Nebulas Mainnet的可执行文件和依赖库。 以下重点介绍几个重要模块:

  • NBRE: 星云区块链运行时环境,运行Nebulas Protocol Representation的平台,例如DIP,NR等。
  • NEB: 星云主网的主进程。 NEBNBRE运行于独立进程中,两者通过IPC进行通信。

有关编译的详细信息,请参阅 教程.

配置文件

Mainnet配置文件位于文件夹 mainnet/conf, 包括:

genesis.conf

关于创世块的所有可配置信息都在genesis.conf中定义,包括:

  • meta.chain_id: chain identity
  • consensus.dpos.dynasty: the initial dynasty of validators
  • token_distribution: the initial allocation of tokens
注意: 不要修改 genesis.conf.

config.conf

有关运行时的所有可配置信息都在config.conf中定义。

请查看 template.conf 查找有关运行时配置的更多详细信息。

Tips: 官方种子节点信息如下,
seed:["/ip4/52.2.205.12/tcp/8680/ipfs/QmQK7W8wrByJ6So7rf84sZzKBxMYmc1i4a7JZsne93ysz5","/ip4/52.56.55.238/tcp/8680/ipfs/QmVy9AHxBpd1iTvECDR7fvdZnqXeDhnxkZJrKsyuHNYKAh","/ip4/13.251.33.39/tcp/8680/ipfs/QmVm5CECJdPAHmzJWN2X7tP335L5LguGb9QLQ78riA9gw3"]

Miner config

Nodes can participate in mining and share rewards after signing up for mining. The miner node needs to turn on the mine switch and configure both the miner address and reward address(coinbase).

miner config example:

chain {
  # mainnet chainID
  chain_id: 1
  # mainnet datadir, should be different with private chain
  datadir: "mainnet/data.db"
  keydir: "keydir"
  # mainnet genesis.conf
  genesis: "mainnet/conf/genesis.conf"
  # mainnet dynasty.conf
  dynasty: "mainnet/conf/dynasty.conf"
  
  # start mine
  start_mine: true
  # receive the mining award, must change to your address
  coinbase: "n1XkoVVjswb5Gek3rRufqjKNpwrDdsnQ7Hq"
  # block signature address, needs to be placed in the node's configuration `keydir`. Also make sure that the address is the node address at the time of registration
  miner: "n1FF1nz6tarkDVwWQkMnnwFPuPKUaQTdptE"
  # 
  passphrase: "passphrase"

  signature_ciphers: ["ECC_SECP256K1"]
}

Synchronization

Since Nebulas mainnet is running there for certain period of time, it will take quite some time to sync all the mainnet data from scratch.

For developers‘ convenience, we provided a offline data package, which already includes the data of more than 1 million blocks, you can download the package directly by following either link below (choose whichever is faster for you):

Please note that, the data package should be put under the same path of “datadir“ as specified in your config.conf file.

API 列表

Main Endpoint:

API URL Protocol
RESTful https://mainnet.nebulas.io/ HTTP

更多星云 APIs : RPC.

作出贡献

可随意加入星云主网。如果你发现了问题,请 提交Bug 或者 提交改动 来帮助社区。