-
Notifications
You must be signed in to change notification settings - Fork 36
创世文件genesis.json说明
erick yan edited this page Sep 2, 2019
·
5 revisions
{
"config": {
"bootnodes": [], // 其它节点信息,节点启动时,将会从此处配置的节点上同步历史区块
"chainId": 1, // 链id,通过此值来确定是否是同一条链
"chainName": "fractal", // 链名称
"chainUrl": "https://fractalproject.com",
"accountParams": { // 账户配置信息
"level": 0, // 子账户最大级数,0表示不支持子账户,1表示支持1级子账户(如fractal.admin),以此类推(2级:fractal.admin.abc)
"length": 16, // 主账户最大长度
"subLength": 8 // 子账户最大长度
},
"assetParams": { // 资产名配置信息
"level": 2, // 子资产最大级数,0表示不支持子资产,1表示支持1级子资产,以此类推
"length": 16, // 主资产最大长度
"subLength": 8 // 子资产最大长度
},
"chargeParams": { // 手续费分配比例
"assetRatio": 80, // 80表示资产创办者分80%手续费
"contractRatio": 80 // 80表示合约创办者分80%手续费
},
"upgradeParams": {
"blockCnt": 10000,
"upgradeRatio": 80
},
"dposParams": {
"maxURLLen": 512, // url最大长度
"unitStake": 1000, // 1000指每1000ft作为一票,譬如你有10000个FT,就可以投10票
"candidateAvailableMinQuantity": 10, // 候选者可以被投票的最小快照票数,低于这个数就无法被其他人投票
"candidateMinQuantity": 10, // 注册候选者所需的最小抵押票数,也就是生产者给自己的投票数
"voterMinQuantity": 1, // 用户最小投票数
"activatedMinCandidate": 3, // 激活dpos共识所需最少的候选者数量,只有达到这个数,dpos共识才会启动
// 此数一般要大于等于candidateScheduleSize + backupScheduleSize
"activatedMinQuantity": 100, // 激活dpos的最小总投票数(包后选择的抵押票数)
"blockInterval": 3000, // 出块间隔
"blockFrequency": 6, // 每个出块节点可连续出块数
"candidateScheduleSize": 3, // 每一周期所需出块节点总数
"backupScheduleSize": 0, // 备份的出块节点数,当正常的出块节点由于异常问题无法出块,就由备份节点顶上
"epochInterval": 10800000, // 一个出块周期的时长,单位是毫秒,这里就是三小时作为一个出块周期
"freezeEpochSize": 3, // 生产者注销后,只有在经过3个周期后才能取回抵押金额
"extraBlockReward": 1, // 区块额外增发奖励
"blockReward": 5 // 区块增发奖励
},
"snapshotInterval": 3600000, // 快照周期,单位毫秒,即1小时做一次数据快照
"systemName": "fractal.admin", // 以下fractal.***是各个系统账户名,在具体交易场景中会用到
"accountName": "fractal.account",
"assetName": "fractal.asset",
"dposName": "fractal.dpos",
"feeName": "fractal.fee",
"systemToken": "ftoken" // 平台token名称
},
"timestamp": 1555776000000, // 创世块启动时间戳
"gasLimit": 30000000, // 每个区块可消耗的最大gas数
"difficulty": 131072, // 出块难度
"allocAccounts": [{ // 对各个系统账户配置公钥和founder
"name": "fractal.founder", // 待创建账户名
"founder": "fractal.founder", // 创建者,注:当创建者账户名跟待创建账户名不同时,创建者账号必须已经存在
"pubKey": "0x047db227d7094ce215c3a0f57e1bcc732551fe351f94249471934567e0f5dc1bf795962b8cccb87a2eb56b29fbe37d614e2f4c3c45b789ae4f1f51f4cb21972ffd" // 新建账户绑定的公钥
}, {
"name": "fractal.account",
"founder": "fractal.founder",
"pubKey": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" // 新建账户绑定的公钥如果为全0,表示此账户无法发送交易(因私钥不可知)
}, {
"name": "fractal.asset",
"founder": "fractal.founder",
"pubKey": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}, {
"name": "fractal.dpos",
"founder": "fractal.founder",
"pubKey": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}, {
"name": "fractal.fee",
"founder": "fractal.founder",
"pubKey": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}],
"allocCandidates": [],
"allocAssets": [{ // 配置平台token信息
"name": "ftoken",
"symbol": "ft",
"amount": 10000000000000000000000000000,
"decimals": 18,
"founder": "fractal.founder",
"owner": "fractal.founder",
"upperLimit": 10000000000000000000000000000
}]
}