Explanation of config.json

Configuration free

  • config.json file is optional, you can run a ela node without a config.json file.

Change active network

Just modify the ActiveNet parameter in the config.json file.
1
{
2
"Configuration": {
3
"ActiveNet": "testnet"
4
}
5
}
Copied!
Default config for testnet
  • Peer-to-Peer network connect to ELA testnet.

Inline Explanation

1
{
2
"Configuration": {
3
"ActiveNet": "mainnet", // Network type. Choices: mainnet testnet and regnet
4
WalletPath:"keystore.dat",// WalletPath defines the wallet path used by DPoS arbiters and CR members.
5
"Magic": 2017001, // Magic Number:Segregation for different subnet. No matter the port number, as long as the magic number not matching, nodes cannot talk to each others
6
"DNSSeeds": [ // DNSSeeds. DNSSeeds defines a list of DNS seeds for the network that are used to discover peers.
7
"node-mainnet-001.elastos.org:20338"
8
],
9
"DisableDNS": false, // DisableDNS. Disable the DNS seeding function.
10
"CoinbaseMaturity": "", // CoinbaseMaturity is the number of blocks required before newly mined coins (coinbase transactions) can be spent.
11
"CheckAddressHeight": "",
12
"MinTransactionFee": "", // MinTransactionFee defines the minimum fee of a transaction.
13
"PowLimit": "", // PowLimit defines the highest allowed proof of work value for a block as a uint256.
14
"PowLimitBits": "", // PowLimitBits defines the highest allowed proof of work value for a block in compact form.
15
"TargetTimespan": "", // TargetTimespan is the desired amount of time that should elapse before the block difficulty requirement is examined to determine how it should be changed in order to maintain the desired block generation rate.
16
"TargetTimePerBlock": "",// TargetTimePerBlock is the desired amount of time to generate each block.
17
"AdjustmentFactor": "", // AdjustmentFactor is the adjustment factor used to limit the minimum and maximum amount of adjustment that can occur between difficulty retargets.
18
"RewardPerBlock": "", // RewardPerBlock is the reward amount per block.
19
"PermanentPeers": [ // PermanentPeers. Other nodes will look up this seed list to connect to any of those seed in order to get all nodes addresses, if lost connection will try to connect again
20
"127.0.0.1:20338"
21
],
22
MaxNodePerHost: 72,//MaxNodePerHost defines max nodes that one host can establish.
23
"HttpInfoPort": 20333, // Local web portal port number. User can go to http://127.0.0.1:10333/info to access the web UI
24
"HttpInfoStart": true, // Whether to enable the HTTPInfo service
25
"HttpRestPort": 20334, // Restful port number
26
"HttpRestStart": true, // Whether to enable the REST service
27
"HttpWsPort": 20335, // Websocket port number
28
"HttpWsStart": true, // Whether to enable the WebSocket service
29
"HttpJsonPort": 20336, // RPC port number
30
"EnableRPC": true, // Enable the RPC service
31
"NodePort": 20338, // P2P port number
32
"PrintLevel": 0, // Log level. Level 0 is the highest, 5 is the lowest
33
"MaxLogsSize": 0, // Max total logs size in MB
34
"MaxPerLogSize": 0, // Max per log file size in MB
35
"MinCrossChainTxFee": 10000, // Minimal cross-chain transaction fee
36
"Foundation": "", //Foundation defines the foundation address which receiving mining
37
"PowConfiguration": {
38
"PayToAddr": "", // Pay bonus to this address. Cannot be empty if AutoMining set to "true"
39
"AutoMining": true, // Start mining automatically? true or false
40
"MinerInfo": "ELA", // No need to change
41
"MinTxFee": 100, // Minimal mining fee
42
"InstantBlock": false // false: high difficulty to mine block true: low difficulty to mine block
43
},
44
"RpcConfiguration": {
45
"User": "ElaUser", // Check the username when use rpc interface, null will not check
46
"Pass": "Ela123", // Check the password when use rpc interface, null will not check
47
"WhiteIPList": [ // Check if ip in list when use rpc interface, "0.0.0.0" will not check
48
"127.0.0.1"
49
]
50
},
51
"DPoSConfiguration": {
52
"EnableArbiter": false, // EnableArbiter enables the arbiter service.
53
"Magic": 2019000, // The magic number of DPoS network
54
"IPAddress": "192.168.0.1", // The public network IP address of the node.
55
"DPoSPort": 20339, // The node prot of DPoS network
56
"SignTolerance": 5, // The time interval of consensus in seconds
57
"OriginArbiters": [ // The publickey list of arbiters before CRCOnlyDPOSHeight
58
"02f3876d0973210d5af7eb44cc11029eb63a102e424f0dc235c60adb80265e426e",
59
"03c96f2469b43dd8d0e6fa3041a6cee727e0a3a6658a9c28d91e547d11ba8014a1",
60
"036d25d54fb7a40bc7c3e836a26c9e30d5294bc46f6918ad61d0937960f13307bc",
61
"0248ddc9ac60f1e5b9e9a26719a8a20e1447e6f2bbb0d31597646f1feb9704f291",
62
"02e34e47a06955ef1ec0d325c9edada34a0df6e519530344cc85f5942d061223b3"
63
],
64
"CRCArbiters": [ // The crc arbiters after CRCOnlyDPOSHeight
65
"02eae9164bd143eb988fcd4b7a3c9c04a44eb9a009f73e7615e80a5e8ce1e748b8",
66
"0294d85959f746b8e6e579458b41eea05afeae50f5a37a037de601673cb24133d9",
67
"03b0a3a16edfba8d9c1fed9094431c9f24c78b8ceb04b4b6eeb7706f1686b83499",
68
"0222461ae6c9671cad288f10469f9fd759912f257c64524367dc12c40c2bb4046d"
69
],
70
"NormalArbitratorsCount": 24, // The count of voted arbiters
71
"CandidatesCount": 72, // The count of candidates
72
"EmergencyInactivePenalty": 50000000000, // EmergencyInactivePenalty defines the penalty amount the emergency producer takes.
73
"MaxInactiveRounds": 1440, // MaxInactiveRounds defines the maximum inactive rounds before producer takes penalty.
74
"InactivePenalty": 10000000000, // InactivePenalty defines the penalty amount the producer takes.
75
"PreConnectOffset": 360 // PreConnectOffset defines the offset blocks to pre-connect to the block producers.
76
},
77
"CRCAddress": "", // CRCAddress defines the CRC address which receiving mining rewards.
78
"CRAssetsAddress": "", // CRAssetsAddress defines the CR assets address address.
79
"CRExpensesAddress": "", // CRExpensesAddress defines the CR committee address which receiving appropriation from CR assets address.
80
"DestroyELAAddress": "", // DestroyELAAddress defines address which receiving destroyed ELA.
81
"GenesisBlock": "", // GenesisBlock defines the first block of the chain.
82
"DPoSMagic": "", // DPoSMagic defines the magic number used in the DPoS network.
83
"SecretaryGeneral": "", // SecretaryGeneral defines the secretary general of CR by public key.
84
"CRConfiguration": {
85
"MemberCount": 12, // The count of CR committee members
86
"VotingPeriod": 21600, // CRVotingStartHeight defines the height of CR voting started
87
"DutyPeriod": 262800 // CRDutyPeriod defines the duration of a normal duty period which measured by block height
88
},
89
"MaxProposalTrackingCount": "",// MaxProposalTrackingCount defines the max count of CRC proposal tracking transaction
90
"CheckAddressHeight": 88812, // Before the height will not check that if address is ela address
91
"VoteStartHeight": 88812, // Starting height of statistical voting
92
"CRCOnlyDPOSHeight": 1008812, // The height start DPOS by CRC producers
93
"PublicDPOSHeight": 1108812, // The height start DPOS by CRCProducers and voted producers
94
"CRVotingStartHeight": 1800000,// CRVotingStartHeight defines the height of CR voting started
95
"CRCommitteeStartHeight": 2000000, // CRCommitteeStartHeight defines the height of CR Committee started
96
"EnableActivateIllegalHeight": 439000, // The start height to enable activate illegal producer though activate tx
97
"EnableUtxoDB": true, //Whether the db is enabled to store the UTXO
98
"CRClaimDPOSNodeStartHeight": 751400,// CRClaimDPOSNodeStartHeight defines the height of CR claim DPOS node started.
99
"CRClaimDPOSNodePeriod": 720 * 14, // CRClaimDPOSNodePeriod defines the period of CR claim DPOS node.
100
CheckRewardHeight: 436812, // CheckRewardHeight defines the height to check reward in coin base with new check function.
101
VoteStatisticsHeight: 512881, // VoteStatisticsHeight defines the height to deal with block with vote
102
RegisterCRByDIDHeight: 598000, // RegisterCRByDIDHeight defines the height to support register and update CR by CID and CID.
103
ToleranceDuration: 5, // ToleranceDuration defines the tolerance duration of the DPoS consensus.
104
IllegalPenalty: 0, // InactivePenalty defines the penalty amount the producer takes.
105
GeneralArbiters: 24, // GeneralArbiters defines the number of general(no-CRC) arbiters.
106
CandidateArbiters: 72, // andidateArbiters defines the number of needed candidate arbiters.
107
CRDepositLockupBlocks: 2160, // DepositLockupBlocks indicates how many blocks need to wait when cancel producer or CRC was triggered, and can submit return deposit coin request
108
ProposalCRVotingPeriod: 7 * 720, // ProposalCRVotingPeriod defines the duration of CR voting about a proposal
109
ProposalPublicVotingPeriod: 7 * 720, // ProposalPublicVotingPeriod defines the duration of all voters send reject vote about a proposal
110
CRAgreementCount: 8, // CRAgreementCount defines minimum count to let a registered proposal transfer to CRAgreed state.
111
VoterRejectPercentage: 10, // VoterRejectPercentage defines percentage about voters reject a proposal.
112
CRCAppropriatePercentage: 10, // CRCAppropriatePercentage defines percentage about CRC appropriation.
113
MaxCommitteeProposalCount: 128,// MaxCommitteeProposalCount defines per committee max proposal count.
114
EnableCORS: false,// Enable cors for http server.
115
TxCacheVolume: 100000,// TxCacheVolume defines the default volume of the transaction cache.
116
CheckVoteCRCountHeight: 658930,// CheckVoteCRCountHeight defines the height to check count of vote CR.
117
MaxCRAssetsAddressUTXOCount: 800,// MaxCRAssetsAddressUTXOCount defines the max UTXOs count of CRFoundation address
118
MinCRAssetsAddressUTXOCount: 720, // MinCRAssetsAddressUTXOCount defines the min UTXOs count of CRFoundation
119
CRAssetsRectifyTransactionHeight:751400, // CRAssetsRectifyTransactionHeight defines the CR rectify transaction start height
120
CRCProposalWithdrawPayloadV1Height: 751400,// CRCProposalWithdrawPayloadV1Height defines the CRC proposal withdraw payload height
121
CRCProposalV1Height: 751400,// CRCProposalV1Height defines the height to support ChangeProposalOwner, CloseProposal and SecretaryGeneral proposal.
122
RectifyTxFee: 10000,// RectifyTxFee defines the fee of cr rectify transaction.
123
RealWithdrawSingleFee: 10000,// RealWithdrawSingleFee defines the single fee of cr real proposal withdraw transaction.
124
NewP2PProtocolVersionHeight: 751400,// NewP2PProtocolVersionHeight defines the new p2p protocol version message height.
125
ChangeCommitteeNewCRHeight: 932530,// ChangeCommitteeNewCRHeight defines the new arbiter logic after change committee.
126
CustomIDProposalStartHeight: 932530,// CustomIDProposalStartHeight defines the height to allow custom ID related transaction.
127
NoCRCDPOSNodeHeight: 932530,// NoCRCDPOSNodeHeight indicates the height when there is no DPOS node of CRC.
128
RevertToPOWStartHeight: 932530,// RevertToPOWStartHeight defines the start height to allow to revert to POW mode.
129
RandomCandidatePeriod: 36 * 10,// RandomCandidatePeriod defines the period to get a candidate as DPOS node at random.
130
MaxInactiveRoundsOfRandomNode: 36 * 8,// MaxInactiveRoundsOfRandomNode defines the maximum inactive rounds before the producer at random takes penalty.
131
MaxReservedCustomIDLength: 255,// MaxReservedCustomIDLength defines the max length of reserved custom id.
132
CRCProposalDraftDataStartHeight: 1056600,// CRCProposalDraftDataStartHeight defines the proposal draft data start height.
133
DPOSNodeCrossChainHeight: 2000000,// DPOSNodeCrossChainHeight defines the height at which not only CR members are responsible for working across the chain.
134
RevertToPOWNoBlockTime: 12 * 3600,// RevertToPOWInterval defines how long time does it take to revert to POW mode.
135
StopConfirmBlockTime: 11 * 3600,// StopConfirmBlockTime defines how long time dose it take before stop confirm block.
136
HalvingRewardHeight: 1051200,// HalvingRewardHeight represents the height of halving reward
137
HalvingRewardInterval: 1051200, // HalvingRewardInterval represents the interval of halving reward
138
NewELAIssuanceHeight: 919800, // NewELAIssuanceHeight represents the new issuance ELA amount after proposal
139
SmallCrossTransferThreshold: 100000000,// SMALLCrossTransferThreshold indicates the minimum amount consider as Small transfer
140
ReturnDepositCoinFee: 100, // ReturnDepositCoinFee indicates the fee the
141
NewCrossChainStartHeight: 1032840,// NewCrossChainStartHeight defines the height of new cross chain transaction started.
142
ReturnCrossChainCoinStartHeight: 1032840,// ReturnCrossChainCoinStartHeight indeicates the start height of ReturnCroossChainDepositCoin transaction
143
ProhibitTransferToDIDHeight: 1032840, // Prohibit transfers to did height
144
}
145
}
Copied!