AIXChain Blockchain Document
  • INTRODUCTION
    • Getting started with smart contract development
    • Build a Decentralized Library
  • AIXC AND ARC TOKEN
    • ARC
      • ARX Transfer
      • Query ARX balance
    • ARC-10
      • Issue ARC-10 token
      • Participate ARC-10
      • ARC-10 Transfer
      • Query ARC-10 balance
      • ARC-10 Transfer in Smart Contracts
    • ARC-20
      • Protocol Interface
      • Contract Example
      • Issuing ARC-20 tokens tutorial
    • ARC-721
      • Protocol Interface
      • Contract Example
  • ACCOUNT MODEL
  • BUILD NODE
    • How to setup a Super node to produce Blocks
      • Recommended configuration & Environment
      • Example cloud services
      • Deployment guide
    • Super Representative
      • How to become a SR
      • Super Representatives Election
      • How to change witness name
  • HTTP API
    • Introduction
    • API Signature and Broadcast Flow
    • API List
      • Full Node API Overview
      • Address Utilities
        • GenerateAddress
        • CreateAddress
        • ValidateAddress
      • Accounts
        • CreateAccount
        • GetAccount
        • UpdateAccount
        • AccountPermissionUpdate
        • GetAccountBalance
      • Account Resources
        • GetAccountResource
        • GetAccountNet
        • FreezeBalance
        • UnfreezeBalance
        • GetDelegatedResource
        • GetDelegatedResourceAccountIndex
      • Query the Network
        • GetBlockByNum
        • GetBlockById
        • GetBlockByLatestNum
        • GetBlockByLimitNext
        • GetNowBlock
        • GetTransactionById
        • GetTransactionInfoById
        • GetTransactionInfoByBlockNum
        • ListNodes
        • GetNodeInfo
        • GetChainParameters
        • GetBlockBalance
      • ARC10 Token
        • GetAssetIssueByAccount
        • GetAssetIssueById
        • GetAssetIssueList
        • GetPaginatedAssetIssueList
        • TransferAsset
        • CreateAssetIssue
        • UnfreezeAsset
        • UpdateAsset
      • Transactions
        • GetContract
        • GetTransactionSign
        • BroadcastTransaction
        • BroadcastHex
        • EasyTransfer
        • EasyTransferByPrivate
        • CreateTransaction
      • Voting & SRs
        • ListWitnesses
        • CreateWitness
        • UpdateWitness
        • GetBrokerage
        • UpdateBrokerage
        • VoteWitnessAccount
        • GetReward
        • WithdrawBalance
        • GetNextMaintenanceTime
      • Smart Contracts
        • TriggerSmartContract
        • DeployContract
        • UpdateSetting
        • UpdateEnergyLimit
        • ClearAbi
        • GetContract
        • TriggerConstantContract
      • Proposals
      • Solidity Node API
    • RPC List
  • AIXCHAIN CLI
  • Aixchain SDK
    • Quickstart
    • Address and Signature
    • Sending Transaction
    • Smart Contract
  • Faucet Aixchain
  • Wallets
Powered by GitBook
On this page
  • 1, Create the code directory:
  • 2, Create docker-compose.yml file
  • 3, Config Mainnet
  • 4, Run node
  1. BUILD NODE
  2. How to setup a Super node to produce Blocks

Deployment guide

1, Create the code directory:

mkdir -p /project/aixc

2, Create docker-compose.yml file

cd /project/aixc

touch docker-compose.yml

Fill below content to docker-compose.yml

// docker-compose.yml
version: "3.5"

services:
  Aixchain:
    image: aixchain/corechain:latest
    ports:
      - "16666-16669:16666-16669/tcp"
      - "16666-16669:16666-16669/udp"
    volumes:
      - .:/node
    command:
      - --witness

3, Config Mainnet

cd /project/aixc

touch config.conf

Fill below configuration to config.conf

// config.conf
net {
  type = mainnet
}

storage {
  db.version = 2,
  db.engine = "LEVELDB",
  db.directory = "database",
  index.directory = "index",

  properties = []
}

# this part of config is used to node discovery.
node.discovery = {
  enable = true  # you should set this entry value with ture if you want your node can be discovered by other node.
  persist = true  # this entry is used to determined to whether storing the peers in the database or not.
  bind.ip = ""
  external.ip = null
}

# this part of config is used to set backup node for witness service.
node.backup {
  port = 10001
  priority = 8
  members = [
  ]
}

node {
  # trust node for solidity node
  # trustNode = "ip:port"
  trustNode = "127.0.0.1:16669"

  # expose extension api to public or not
  walletExtensionApi = true

  listen.port = 16666

  connection.timeout = 2

  tcpNettyWorkThreadNum = 0

  udpNettyWorkThreadNum = 1

  # Number of validate sign thread, default availableProcessors / 2
  # validateSignThreadNum = 16

  maxActiveNodes = 30

  maxActiveNodesWithSameIp = 2

  minParticipationRate = 0

  # check the peer data transfer, disconnect factor
  disconnectNumberFactor = 0.4
  maxConnectNumberFactor = 0.8
  receiveTcpMinDataLength = 2048
  isOpenFullTcpDisconnect = true

  p2p {
    version = 1001 
  }

  active = []

  passive = []

  http {
    fullNodePort = 16667
    solidityPort = 16668
  }

  rpc {
    port = 16669
    maxConnectionIdleInMillis = 60000
    minEffectiveConnection = 0
  }
}

seed.node = {
  ip.list = [
    "13.213.231.230:16666",
    "13.213.179.119:16666",
    "13.214.6.1:16666",
    "54.169.140.55:16666",
  ]
}
genesis.block = {
  # Reserve balance
  assets = [
    {
      accountName = "Zion"
      accountType = "AssetIssue"
      address = "AHGRkgemNqQpETQhCHGSS9Jmmhrt9YuDV6"
      balance = "22440000000000000"
    },
    {
      accountName = "Black"
      accountType = "AssetIssue"
      address = "AHHUxg6WaABREG8YWi75EgeCVTa8e2osTC"
      balance = "22220000000000000"
    },
    {
      accountName = "Blue"
      accountType = "AssetIssue"
      address = "ASC7Wre31DJqXXXTF9JLjRcRVcvTiUanuD"
      balance = "220000000000000"
    },
    {
      accountName = "Blackhole"
      accountType = "AssetIssue"
      address = "AWVQ4wxeeZPzTEtwcYVZRbqoYARxdjE5Rt"
      balance = "-2999999999999999"
    },
    {
      accountName = "Madagascar"
      accountType = "AssetIssue"
      address = "AX2uKnE8gUhWeyrFWTUiHivKVZXhMLWa68"
      balance = "10000"
    },
    {
      accountName = "Borneo"
      accountType = "AssetIssue"
      address = "AGbfgQrLJdQZACpn72piENSHkmKMtMjVP2"
      balance = "10000"
    },
    {
      accountName = "Victoria"
      accountType = "AssetIssue"
      address = "AS1aN6smtrWeViFdYmvvb34fzbQHhbhnfx"
      balance = "10000"
    },
    {
      accountName = "Melville"
      accountType = "AssetIssue"
      address = "ABeVtLcYApzn5bp7V8sfQ1geF97mRNFsdb"
      balance = "10000"
    },
    {
      accountName = "Palawan"
      accountType = "AssetIssue"
      address = "ASnxxtk1kaAc79uBiR9kyZXRJNpxcFGkG1"
      balance = "10000"
    },
    {
      accountName = "Hawaii"
      accountType = "AssetIssue"
      address = "AXDQr9wC9k7Cci3P8ZVjjvQdyh7bSew94N"
      balance = "10000"
    },
    {
      accountName = "Maldives"
      accountType = "AssetIssue"
      address = "ANUWxx77dkkLTyTbu8U9Dx68ixFeqMvG41"
      balance = "10000"
    },
    {
      accountName = "Ceres"
      accountType = "AssetIssue"
      address = "APwugV9siLtLTvezx5J8k3V4ADxwbsrsEb"
      balance = "10000"
    },
    {
      accountName = "Mimas"
      accountType = "AssetIssue"
      address = "AZBNnjFyMUBr4rHFh4rXJNDidMzD7Dg1Kt"
      balance = "10000"
    },
    {
      accountName = "Castaway"
      accountType = "AssetIssue"
      address = "ABn3HE7DVwQkMCX6Z4p4ba3mKYnnjo4Bj9"
      balance = "10000"
    },
  ]
  witnesses = [
    {
      address = "AX2uKnE8gUhWeyrFWTUiHivKVZXhMLWa68"
      url = "https://aixchain.com"
      voteCount = 10009
    },
    {
      address = "AGbfgQrLJdQZACpn72piENSHkmKMtMjVP2"
      url = "https://aixchain.com"
      voteCount = 10008
    },
    {
      address = "AS1aN6smtrWeViFdYmvvb34fzbQHhbhnfx"
      url = "https://aixchain.com"
      voteCount = 10007
    },
    {
      address = "ABeVtLcYApzn5bp7V8sfQ1geF97mRNFsdb"
      url = "https://aixchain.com"
      voteCount = 10006
    },
    {
      address = "ASnxxtk1kaAc79uBiR9kyZXRJNpxcFGkG1"
      url = "https://aixchain.com"
      voteCount = 10005
    },
  ]
  timestamp = "0" #2017-8-26 12:00:00

  parentHash = "957dc2d350daecc7bb6a38f3938ebde0a0c1cedafe15f0edae4256a2907449f6"
}

localwitness = [
// Place your witness private key here
]

block = {
  needSyncCheck = true
  maintenanceTimeInterval = 21600000
}

vm = {
  supportConstant = true
  minTimeRatio = 0.0
  maxTimeRatio = 5.0
}

committee = {
  allowCreationOfContracts = 1
  allowUpdateAccountName = 1
  allowSameTokenName = 1
  allowDelegateResource = 1
  allowTvmTransferTrc10 = 1
  allowAdaptiveEnergy = 1
  allowTvmConstantinople = 1
  multiSignFee = 1
  allowMultiSign = 1
  updateAccountPermissionFee = 1
}

4, Run node

cd /project/aixc

docker-compose up -d

The data will be stored into output-directory. Check the log file logs/tron.log to monitor syncing process and producing block process.

PreviousExample cloud servicesNextSuper Representative

Last updated 29 days ago