Compare commits
3 Commits
lash/kitab
...
sohail/kit
| Author | SHA1 | Date | |
|---|---|---|---|
|
616c6c6344
|
|||
|
43535882dc
|
|||
|
407add9aa5
|
161
bloxberg.json
161
bloxberg.json
@@ -1,161 +0,0 @@
|
||||
{
|
||||
"name": "Bloxberg",
|
||||
"engine": {
|
||||
"authorityRound": {
|
||||
"params": {
|
||||
"maximumUncleCountTransition": 0,
|
||||
"maximumUncleCount": 0,
|
||||
"stepDuration": "5",
|
||||
"validators": {
|
||||
"multi": {
|
||||
"0": {
|
||||
"list": [
|
||||
"0x25327e6ec0B7A0b552Fb907bD6b3726A2F3D99FE",
|
||||
"0x92db87a17af5083b3327f35b3d77d8d4abfb0cdc",
|
||||
"0x09e5abedae50639406df6c86d748fbaff66a6df1",
|
||||
"0x411636d64bb7ba6e1cc3b950bec9a837f59cd46f"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"gasLimitBoundDivisor": "0x400",
|
||||
"maximumExtraDataSize": "0x20",
|
||||
"minGasLimit": "0x7A1200",
|
||||
"networkID": "0x2325",
|
||||
|
||||
"eip140Transition": "0x0",
|
||||
"eip211Transition": "0x0",
|
||||
"eip214Transition": "0x0",
|
||||
"eip658Transition": "0x0",
|
||||
|
||||
"eip145Transition": "0x0",
|
||||
"eip1014Transition": "0x0",
|
||||
"eip1052Transition": "0x0",
|
||||
|
||||
"eip1283Transition": "0x0",
|
||||
"eip1344Transition": "0x0",
|
||||
"eip1706Transition": "0x0",
|
||||
"eip1884Transition": "0x0",
|
||||
"eip2028Transition": "0x0"
|
||||
},
|
||||
"genesis": {
|
||||
"seal": {
|
||||
"authorityRound": {
|
||||
"step": "0x0",
|
||||
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
}
|
||||
},
|
||||
"difficulty": "0x20000",
|
||||
"gasLimit": "0x7A1200"
|
||||
},
|
||||
"accounts": {
|
||||
"0x0000000000000000000000000000000000000001": {
|
||||
"balance": "1",
|
||||
"builtin": {
|
||||
"name": "ecrecover",
|
||||
"pricing": { "linear": { "base": 3000, "word": 0 } }
|
||||
}
|
||||
},
|
||||
"0x0000000000000000000000000000000000000002": {
|
||||
"balance": "1",
|
||||
"builtin": {
|
||||
"name": "sha256",
|
||||
"pricing": { "linear": { "base": 60, "word": 12 } }
|
||||
}
|
||||
},
|
||||
"0x0000000000000000000000000000000000000003": {
|
||||
"balance": "1",
|
||||
"builtin": {
|
||||
"name": "ripemd160",
|
||||
"pricing": { "linear": { "base": 600, "word": 120 } }
|
||||
}
|
||||
},
|
||||
"0x0000000000000000000000000000000000000004": {
|
||||
"balance": "1",
|
||||
"builtin": {
|
||||
"name": "identity",
|
||||
"pricing": { "linear": { "base": 15, "word": 3 } }
|
||||
}
|
||||
},
|
||||
"0x0000000000000000000000000000000000000005": {
|
||||
"builtin": {
|
||||
"name": "modexp",
|
||||
"activate_at": 0,
|
||||
"pricing": { "modexp": { "divisor": 20 } }
|
||||
}
|
||||
},
|
||||
"0x0000000000000000000000000000000000000006": {
|
||||
"builtin": {
|
||||
"name": "alt_bn128_add",
|
||||
"activate_at": 0,
|
||||
"pricing": {
|
||||
"alt_bn128_const_operations": {
|
||||
"price": 500
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"0000000000000000000000000000000000000007": {
|
||||
"builtin": {
|
||||
"name": "alt_bn128_mul",
|
||||
"pricing": {
|
||||
"0": {
|
||||
"info": "Istanbul HF",
|
||||
"price": {
|
||||
"alt_bn128_const_operations": {
|
||||
"price": 6000
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"0000000000000000000000000000000000000008": {
|
||||
"builtin": {
|
||||
"name": "alt_bn128_pairing",
|
||||
"pricing": {
|
||||
"0": {
|
||||
"info": "Istanbul HF",
|
||||
"price": {
|
||||
"alt_bn128_pairing": {
|
||||
"base": 45000,
|
||||
"pair": 34000
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"0x0000000000000000000000000000000000000009": {
|
||||
"builtin": {
|
||||
"name": "blake2_f",
|
||||
"pricing": {
|
||||
"0": {
|
||||
"info": "Istanbul HF",
|
||||
"price": {
|
||||
"blake2_f": {
|
||||
"gas_per_round": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"0x25327e6ec0B7A0b552Fb907bD6b3726A2F3D99FE": {
|
||||
"balance": "100000000000000000000000000000000"
|
||||
},
|
||||
"0x92db87a17af5083b3327f35b3d77d8d4abfb0cdc": {
|
||||
"balance": "100000000000000000000000000000000"
|
||||
},
|
||||
"0x09e5abedae50639406df6c86d748fbaff66a6df1": {
|
||||
"balance": "100000000000000000000000000000000"
|
||||
},
|
||||
"0x411636d64bb7ba6e1cc3b950bec9a837f59cd46f": {
|
||||
"balance": "100000000000000000000000000000000"
|
||||
}
|
||||
}
|
||||
}
|
||||
86
contracts/validators/KitabuValidators.sol
Normal file
86
contracts/validators/KitabuValidators.sol
Normal file
@@ -0,0 +1,86 @@
|
||||
// Author: Mohamed Sohail <mohamedsohailazim@gmail.com>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
pragma solidity >= 0.6.12;
|
||||
|
||||
contract KitabuValidators {
|
||||
address constant SYSTEM_ADDRESS = 0xffffFFFfFFffffffffffffffFfFFFfffFFFfFFfE;
|
||||
address public admissionController = 0x9F57B4A25638F3bdfFcB1F3d2902860601a1Aa65;
|
||||
|
||||
address[] bootstrapValidators = [
|
||||
0x7c5a36Cb43fC87fbB1de46eb6Cfd231c2ADe147b
|
||||
];
|
||||
|
||||
address[] validators;
|
||||
|
||||
bool public finalized;
|
||||
|
||||
mapping(address => uint256) validatorSetIndex;
|
||||
|
||||
event NewAdmissionController(address indexed old, address indexed newController);
|
||||
event InitiateChange(bytes32 indexed parentHash, address[] newSet);
|
||||
event ChangeFinalized(address[] currentSet);
|
||||
|
||||
modifier onlySystemChange {
|
||||
require(msg.sender == SYSTEM_ADDRESS);
|
||||
_;
|
||||
}
|
||||
|
||||
modifier alreadyFinalized {
|
||||
require(finalized);
|
||||
_;
|
||||
}
|
||||
|
||||
modifier onlyAdmissionController {
|
||||
require(msg.sender == admissionController);
|
||||
_;
|
||||
}
|
||||
|
||||
constructor() public {
|
||||
for (uint i = 0; i < bootstrapValidators.length; i++) {
|
||||
validators.push(bootstrapValidators[i]);
|
||||
validatorSetIndex[bootstrapValidators[i]] = i;
|
||||
}
|
||||
|
||||
finalized = true;
|
||||
}
|
||||
|
||||
function setNewAdmissionController(address newController) public onlyAdmissionController {
|
||||
emit NewAdmissionController(admissionController, newController);
|
||||
admissionController = newController;
|
||||
}
|
||||
|
||||
function getValidators() public view returns(address[] memory) {
|
||||
return validators;
|
||||
}
|
||||
|
||||
function initiateChange() private {
|
||||
finalized = false;
|
||||
emit InitiateChange(blockhash(block.number - 1), getValidators());
|
||||
}
|
||||
|
||||
function finalizeChange() public {
|
||||
finalized = true;
|
||||
emit ChangeFinalized(validators);
|
||||
}
|
||||
|
||||
|
||||
function addValidator(address newValidator) public onlyAdmissionController alreadyFinalized{
|
||||
validators.push(newValidator);
|
||||
validatorSetIndex[newValidator] = validators.length - 1;
|
||||
initiateChange();
|
||||
}
|
||||
|
||||
function removeValidator(address exValidator) public onlyAdmissionController alreadyFinalized{
|
||||
orderedRemoval(validatorSetIndex[exValidator]);
|
||||
delete validatorSetIndex[exValidator];
|
||||
initiateChange();
|
||||
}
|
||||
|
||||
function orderedRemoval(uint index) private {
|
||||
for(uint i = index; i < validators.length-1; i++){
|
||||
validators[i] = validators[i+1];
|
||||
}
|
||||
validators.pop();
|
||||
}
|
||||
}
|
||||
200
openethereum/kitabu.json
Normal file
200
openethereum/kitabu.json
Normal file
File diff suppressed because one or more lines are too long
57
openethereum/kitabu.toml
Normal file
57
openethereum/kitabu.toml
Normal file
@@ -0,0 +1,57 @@
|
||||
# File bootnode.toml
|
||||
# enode://2e7f60d1c95e4e5bb0b8e0b60dc2c093d7c270bc80ac9cddf185b33fb59321fb26353d43ef4a623b33f42e90cfdf8dbe0616bb1f6a2ca6189a038f4525146316@159.223.42.214:30303
|
||||
|
||||
[parity]
|
||||
chain = "/root/chain-1/kitabu.json"
|
||||
base_path = "/root/chain-1/.openethereum/data"
|
||||
|
||||
[network]
|
||||
port = 30303
|
||||
#reserved_peers = "/root/chain-2/bootnodes.txt"
|
||||
# reserved_only = true
|
||||
max_peers = 10
|
||||
snapshot_peers = 25
|
||||
nat = "extip:178.128.93.108"
|
||||
#nat = "extip:"
|
||||
|
||||
[rpc]
|
||||
port = 8545
|
||||
apis = [
|
||||
"web3",
|
||||
"eth",
|
||||
"net",
|
||||
"personal",
|
||||
"parity",
|
||||
"parity_set",
|
||||
"traces",
|
||||
"rpc",
|
||||
"parity_accounts",
|
||||
]
|
||||
interface = "all"
|
||||
cors = ["*"]
|
||||
|
||||
[websockets]
|
||||
disable = false
|
||||
port = 8546
|
||||
interface = "all"
|
||||
origins = ["all"]
|
||||
|
||||
[account]
|
||||
password = ["/root/chain-2/kitabu.pwd"]
|
||||
|
||||
[mining]
|
||||
#CHANGE ENGINE SIGNER TO VALIDATOR ADDRESS
|
||||
engine_signer = "0xcC66240bAdA17eb4C6313FB3FF83e19dfB20C973"
|
||||
reseal_on_txs = "none"
|
||||
force_sealing = true
|
||||
min_gas_price = 1
|
||||
gas_floor_target = "1"
|
||||
|
||||
[footprint]
|
||||
tracing = "on"
|
||||
pruning = "archive"
|
||||
pruning_history = 256
|
||||
cache_size_db = 2000
|
||||
|
||||
[misc]
|
||||
log_file = "/root/chain-1/kitabu.log"
|
||||
Reference in New Issue
Block a user