From bb1816b227c6c296a13ceed79c2ad3c60e33a517 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sun, 20 Oct 2024 23:06:23 +0200 Subject: [PATCH 1/4] openzeppeling file for alpha4 upgrade --- .../alpha4/.openzeppelin/unknown-777018.json | 1672 +++++++++++++++++ 1 file changed, 1672 insertions(+) create mode 100644 scripts/upgrades/alpha4/.openzeppelin/unknown-777018.json diff --git a/scripts/upgrades/alpha4/.openzeppelin/unknown-777018.json b/scripts/upgrades/alpha4/.openzeppelin/unknown-777018.json new file mode 100644 index 00000000..ac5fb78e --- /dev/null +++ b/scripts/upgrades/alpha4/.openzeppelin/unknown-777018.json @@ -0,0 +1,1672 @@ +{ + "manifestVersion": "3.2", + "proxies": [], + "impls": { + "f7a3896228dee477c39367d9681ce6e9b875e6de25886a2ebdc8f5dd9efda723": { + "address": "0x038D9528bC31123f8C239e5b29739c5e445F8964", + "txHash": "0x1c1e840fb067c046d8626a4405f6f188ea64e8da8c607bda9445d41595622643", + "layout": { + "solcVersion": "0.8.25", + "storage": [ + { + "label": "allowedParameterRange", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes4,t_struct(ParameterRange)13127_storage)", + "contract": "ValueGuards", + "src": "contracts/ValueGuards.sol:41" + }, + { + "label": "_epochsPoolGotRewardFor", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_array(t_uint256)dyn_storage)", + "contract": "BlockRewardHbbft", + "src": "contracts/BlockRewardHbbft.sol:34" + }, + { + "label": "epochPoolNativeReward", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_uint256))", + "contract": "BlockRewardHbbft", + "src": "contracts/BlockRewardHbbft.sol:38" + }, + { + "label": "nativeRewardUndistributed", + "offset": 0, + "slot": "3", + "type": "t_uint256", + "contract": "BlockRewardHbbft", + "src": "contracts/BlockRewardHbbft.sol:41" + }, + { + "label": "validatorMinRewardPercent", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_uint256,t_uint256)", + "contract": "BlockRewardHbbft", + "src": "contracts/BlockRewardHbbft.sol:48" + }, + { + "label": "deltaPot", + "offset": 0, + "slot": "5", + "type": "t_uint256", + "contract": "BlockRewardHbbft", + "src": "contracts/BlockRewardHbbft.sol:51" + }, + { + "label": "deltaPotPayoutFraction", + "offset": 0, + "slot": "6", + "type": "t_uint256", + "contract": "BlockRewardHbbft", + "src": "contracts/BlockRewardHbbft.sol:55" + }, + { + "label": "reinsertPot", + "offset": 0, + "slot": "7", + "type": "t_uint256", + "contract": "BlockRewardHbbft", + "src": "contracts/BlockRewardHbbft.sol:58" + }, + { + "label": "reinsertPotPayoutFraction", + "offset": 0, + "slot": "8", + "type": "t_uint256", + "contract": "BlockRewardHbbft", + "src": "contracts/BlockRewardHbbft.sol:62" + }, + { + "label": "validatorSetContract", + "offset": 0, + "slot": "9", + "type": "t_contract(IValidatorSetHbbft)14095", + "contract": "BlockRewardHbbft", + "src": "contracts/BlockRewardHbbft.sol:65" + }, + { + "label": "governancePotAddress", + "offset": 0, + "slot": "10", + "type": "t_address_payable", + "contract": "BlockRewardHbbft", + "src": "contracts/BlockRewardHbbft.sol:68" + }, + { + "label": "governancePotShareNominator", + "offset": 0, + "slot": "11", + "type": "t_uint256", + "contract": "BlockRewardHbbft", + "src": "contracts/BlockRewardHbbft.sol:72" + }, + { + "label": "governancePotShareDenominator", + "offset": 0, + "slot": "12", + "type": "t_uint256", + "contract": "BlockRewardHbbft", + "src": "contracts/BlockRewardHbbft.sol:76" + }, + { + "label": "connectivityTracker", + "offset": 0, + "slot": "13", + "type": "t_contract(IConnectivityTrackerHbbft)13581", + "contract": "BlockRewardHbbft", + "src": "contracts/BlockRewardHbbft.sol:79" + }, + { + "label": "earlyEpochEnd", + "offset": 20, + "slot": "13", + "type": "t_bool", + "contract": "BlockRewardHbbft", + "src": "contracts/BlockRewardHbbft.sol:82" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_struct(InitializableStorage)65_storage": { + "label": "struct Initializable.InitializableStorage", + "members": [ + { + "label": "_initialized", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "_initializing", + "type": "t_bool", + "offset": 8, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(OwnableStorage)14_storage": { + "label": "struct OwnableUpgradeable.OwnableStorage", + "members": [ + { + "label": "_owner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(ReentrancyGuardStorage)140_storage": { + "label": "struct ReentrancyGuardUpgradeable.ReentrancyGuardStorage", + "members": [ + { + "label": "_status", + "type": "t_uint256", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_address_payable": { + "label": "address payable", + "numberOfBytes": "20" + }, + "t_array(t_uint256)dyn_storage": { + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bytes4": { + "label": "bytes4", + "numberOfBytes": "4" + }, + "t_contract(IConnectivityTrackerHbbft)13581": { + "label": "contract IConnectivityTrackerHbbft", + "numberOfBytes": "20" + }, + "t_contract(IValidatorSetHbbft)14095": { + "label": "contract IValidatorSetHbbft", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_array(t_uint256)dyn_storage)": { + "label": "mapping(address => uint256[])", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes4,t_struct(ParameterRange)13127_storage)": { + "label": "mapping(bytes4 => struct ValueGuards.ParameterRange)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_uint256))": { + "label": "mapping(uint256 => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_uint256)": { + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32" + }, + "t_struct(ParameterRange)13127_storage": { + "label": "struct ValueGuards.ParameterRange", + "members": [ + { + "label": "getter", + "type": "t_bytes4", + "offset": 0, + "slot": "0" + }, + { + "label": "range", + "type": "t_array(t_uint256)dyn_storage", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + } + }, + "namespaces": { + "erc7201:openzeppelin.storage.ReentrancyGuard": [ + { + "contract": "ReentrancyGuardUpgradeable", + "label": "_status", + "type": "t_uint256", + "src": "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol:40", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Ownable": [ + { + "contract": "OwnableUpgradeable", + "label": "_owner", + "type": "t_address", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:24", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Initializable": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_uint64", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69", + "offset": 0, + "slot": "0" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73", + "offset": 8, + "slot": "0" + } + ] + } + } + }, + "f97edc287ef4f4729e8b20e5c06f4f1fd169be61c00c31ecef3c7a6be0a819ac": { + "address": "0x6642c3A24adc17c91d0df9Ab6Cd51880521ACfE0", + "txHash": "0x0b96d42a61d6461f98b3475d3765b967ca1405c9635099711234c4379e280d14", + "layout": { + "solcVersion": "0.8.25", + "storage": [ + { + "label": "_currentValidators", + "offset": 0, + "slot": "0", + "type": "t_array(t_address)dyn_storage", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:21" + }, + { + "label": "_pendingValidators", + "offset": 0, + "slot": "1", + "type": "t_array(t_address)dyn_storage", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:22" + }, + { + "label": "_previousValidators", + "offset": 0, + "slot": "2", + "type": "t_array(t_address)dyn_storage", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:23" + }, + { + "label": "_unused1", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_array(t_address)dyn_storage))", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:26", + "renamedFrom": "_maliceReportedForBlock" + }, + { + "label": "_unused2", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:29", + "renamedFrom": "banCounter" + }, + { + "label": "_unused3", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:32", + "renamedFrom": "bannedUntil" + }, + { + "label": "_unused4", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:35", + "renamedFrom": "bannedDelegatorsUntil" + }, + { + "label": "_unused5", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_address,t_bytes32)", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:38", + "renamedFrom": "banReason" + }, + { + "label": "blockRewardContract", + "offset": 0, + "slot": "8", + "type": "t_address", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:41" + }, + { + "label": "isValidator", + "offset": 0, + "slot": "9", + "type": "t_mapping(t_address,t_bool)", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:45" + }, + { + "label": "isValidatorPrevious", + "offset": 0, + "slot": "10", + "type": "t_mapping(t_address,t_bool)", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:49" + }, + { + "label": "miningByStakingAddress", + "offset": 0, + "slot": "11", + "type": "t_mapping(t_address,t_address)", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:53" + }, + { + "label": "randomContract", + "offset": 0, + "slot": "12", + "type": "t_address", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:56" + }, + { + "label": "_unused6", + "offset": 0, + "slot": "13", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:59", + "renamedFrom": "reportingCounter" + }, + { + "label": "_unused7", + "offset": 0, + "slot": "14", + "type": "t_mapping(t_uint256,t_uint256)", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:62", + "renamedFrom": "reportingCounterTotal" + }, + { + "label": "stakingByMiningAddress", + "offset": 0, + "slot": "15", + "type": "t_mapping(t_address,t_address)", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:66" + }, + { + "label": "stakingContract", + "offset": 0, + "slot": "16", + "type": "t_contract(IStakingHbbft)13889", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:69" + }, + { + "label": "keyGenHistoryContract", + "offset": 0, + "slot": "17", + "type": "t_contract(IKeyGenHistory)13628", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:72" + }, + { + "label": "validatorCounter", + "offset": 0, + "slot": "18", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:75" + }, + { + "label": "validatorAvailableSinceLastWrite", + "offset": 0, + "slot": "19", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:78" + }, + { + "label": "validatorAvailableSince", + "offset": 0, + "slot": "20", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:86" + }, + { + "label": "maxValidators", + "offset": 0, + "slot": "21", + "type": "t_uint256", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:89" + }, + { + "label": "_unused8", + "offset": 0, + "slot": "22", + "type": "t_uint256", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:92", + "renamedFrom": "banDuration" + }, + { + "label": "validatorInactivityThreshold", + "offset": 0, + "slot": "23", + "type": "t_uint256", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:95" + }, + { + "label": "bonusScoreSystem", + "offset": 0, + "slot": "24", + "type": "t_contract(IBonusScoreSystem)13516", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:97" + }, + { + "label": "connectivityTracker", + "offset": 0, + "slot": "25", + "type": "t_address", + "contract": "ValidatorSetHbbft", + "src": "contracts/ValidatorSetHbbft.sol:99" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_struct(InitializableStorage)65_storage": { + "label": "struct Initializable.InitializableStorage", + "members": [ + { + "label": "_initialized", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "_initializing", + "type": "t_bool", + "offset": 8, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(OwnableStorage)14_storage": { + "label": "struct OwnableUpgradeable.OwnableStorage", + "members": [ + { + "label": "_owner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IBonusScoreSystem)13516": { + "label": "contract IBonusScoreSystem", + "numberOfBytes": "20" + }, + "t_contract(IKeyGenHistory)13628": { + "label": "contract IKeyGenHistory", + "numberOfBytes": "20" + }, + "t_contract(IStakingHbbft)13889": { + "label": "contract IStakingHbbft", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_address)": { + "label": "mapping(address => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bytes32)": { + "label": "mapping(address => bytes32)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_array(t_address)dyn_storage))": { + "label": "mapping(address => mapping(uint256 => address[]))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { + "label": "mapping(address => mapping(uint256 => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_array(t_address)dyn_storage)": { + "label": "mapping(uint256 => address[])", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_uint256)": { + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + } + }, + "namespaces": { + "erc7201:openzeppelin.storage.Ownable": [ + { + "contract": "OwnableUpgradeable", + "label": "_owner", + "type": "t_address", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:24", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Initializable": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_uint64", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69", + "offset": 0, + "slot": "0" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73", + "offset": 8, + "slot": "0" + } + ] + } + } + }, + "6fb8ae7b71e5a2a9cff0b0274442efb0a920c45002388b5d94a104d587b4b492": { + "address": "0xF067e2cD0Ec8EC86d302ac616ebcb0b80f1a4F05", + "txHash": "0x8c026758cfb1a98a0bf327efdf19f64225bb2d41182e25556a3a13053a198b35", + "layout": { + "solcVersion": "0.8.25", + "storage": [ + { + "label": "validatorSetContract", + "offset": 0, + "slot": "0", + "type": "t_contract(IValidatorSetHbbft)14095", + "contract": "ConnectivityTrackerHbbft", + "src": "contracts/ConnectivityTrackerHbbft.sol:20" + }, + { + "label": "stakingContract", + "offset": 0, + "slot": "1", + "type": "t_contract(IStakingHbbft)13889", + "contract": "ConnectivityTrackerHbbft", + "src": "contracts/ConnectivityTrackerHbbft.sol:21" + }, + { + "label": "blockRewardContract", + "offset": 0, + "slot": "2", + "type": "t_contract(IBlockRewardHbbft)13475", + "contract": "ConnectivityTrackerHbbft", + "src": "contracts/ConnectivityTrackerHbbft.sol:22" + }, + { + "label": "minReportAgeBlocks", + "offset": 0, + "slot": "3", + "type": "t_uint256", + "contract": "ConnectivityTrackerHbbft", + "src": "contracts/ConnectivityTrackerHbbft.sol:24" + }, + { + "label": "earlyEpochEndToleranceLevel", + "offset": 0, + "slot": "4", + "type": "t_uint256", + "contract": "ConnectivityTrackerHbbft", + "src": "contracts/ConnectivityTrackerHbbft.sol:25" + }, + { + "label": "isEarlyEpochEnd", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_uint256,t_bool)", + "contract": "ConnectivityTrackerHbbft", + "src": "contracts/ConnectivityTrackerHbbft.sol:27" + }, + { + "label": "_flaggedValidators", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_uint256,t_struct(AddressSet)2141_storage)", + "contract": "ConnectivityTrackerHbbft", + "src": "contracts/ConnectivityTrackerHbbft.sol:29" + }, + { + "label": "_reporters", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(AddressSet)2141_storage))", + "contract": "ConnectivityTrackerHbbft", + "src": "contracts/ConnectivityTrackerHbbft.sol:30" + }, + { + "label": "_unused", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ConnectivityTrackerHbbft", + "src": "contracts/ConnectivityTrackerHbbft.sol:33", + "renamedFrom": "_disconnectTimestamp" + }, + { + "label": "_epochPenaltiesSent", + "offset": 0, + "slot": "9", + "type": "t_mapping(t_uint256,t_bool)", + "contract": "ConnectivityTrackerHbbft", + "src": "contracts/ConnectivityTrackerHbbft.sol:34" + }, + { + "label": "bonusScoreContract", + "offset": 0, + "slot": "10", + "type": "t_contract(IBonusScoreSystem)13516", + "contract": "ConnectivityTrackerHbbft", + "src": "contracts/ConnectivityTrackerHbbft.sol:36" + }, + { + "label": "_disconnectTimestamp", + "offset": 0, + "slot": "11", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_uint256))", + "contract": "ConnectivityTrackerHbbft", + "src": "contracts/ConnectivityTrackerHbbft.sol:38" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_struct(InitializableStorage)65_storage": { + "label": "struct Initializable.InitializableStorage", + "members": [ + { + "label": "_initialized", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "_initializing", + "type": "t_bool", + "offset": 8, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(OwnableStorage)14_storage": { + "label": "struct OwnableUpgradeable.OwnableStorage", + "members": [ + { + "label": "_owner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IBlockRewardHbbft)13475": { + "label": "contract IBlockRewardHbbft", + "numberOfBytes": "20" + }, + "t_contract(IBonusScoreSystem)13516": { + "label": "contract IBonusScoreSystem", + "numberOfBytes": "20" + }, + "t_contract(IStakingHbbft)13889": { + "label": "contract IStakingHbbft", + "numberOfBytes": "20" + }, + "t_contract(IValidatorSetHbbft)14095": { + "label": "contract IValidatorSetHbbft", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_struct(AddressSet)2141_storage)": { + "label": "mapping(address => struct EnumerableSet.AddressSet)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bool)": { + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_struct(AddressSet)2141_storage))": { + "label": "mapping(uint256 => mapping(address => struct EnumerableSet.AddressSet))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_uint256))": { + "label": "mapping(uint256 => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(AddressSet)2141_storage)": { + "label": "mapping(uint256 => struct EnumerableSet.AddressSet)", + "numberOfBytes": "32" + }, + "t_struct(AddressSet)2141_storage": { + "label": "struct EnumerableSet.AddressSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)1826_storage", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1826_storage": { + "label": "struct EnumerableSet.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "_positions", + "type": "t_mapping(t_bytes32,t_uint256)", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + } + }, + "namespaces": { + "erc7201:openzeppelin.storage.Ownable": [ + { + "contract": "OwnableUpgradeable", + "label": "_owner", + "type": "t_address", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:24", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Initializable": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_uint64", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69", + "offset": 0, + "slot": "0" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73", + "offset": 8, + "slot": "0" + } + ] + } + } + }, + "9fbe4cdacbae8fdcd4bd2e65f18ea317f6c3e7b920907b507dd8dce066b1bafd": { + "address": "0xE1376a8139c7E94534915CbC6aa896470A50B0fE", + "txHash": "0x81cdca55237b2d172bda64565babee8172fc9e7b0eae22d6831a1f162d6e4d7b", + "layout": { + "solcVersion": "0.8.25", + "storage": [ + { + "label": "allowedParameterRange", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes4,t_struct(ParameterRange)13127_storage)", + "contract": "ValueGuards", + "src": "contracts/ValueGuards.sol:41" + }, + { + "label": "_pools", + "offset": 0, + "slot": "1", + "type": "t_struct(AddressSet)2141_storage", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:23" + }, + { + "label": "_poolsInactive", + "offset": 0, + "slot": "3", + "type": "t_struct(AddressSet)2141_storage", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:24" + }, + { + "label": "_poolsToBeRemoved", + "offset": 0, + "slot": "5", + "type": "t_struct(AddressSet)2141_storage", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:25" + }, + { + "label": "_poolsToBeElected", + "offset": 0, + "slot": "7", + "type": "t_array(t_address)dyn_storage", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:27" + }, + { + "label": "_poolsLikelihood", + "offset": 0, + "slot": "8", + "type": "t_array(t_uint256)dyn_storage", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:28" + }, + { + "label": "_poolsLikelihoodSum", + "offset": 0, + "slot": "9", + "type": "t_uint256", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:29" + }, + { + "label": "_poolDelegators", + "offset": 0, + "slot": "10", + "type": "t_mapping(t_address,t_struct(AddressSet)2141_storage)", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:31" + }, + { + "label": "_poolDelegatorsInactive", + "offset": 0, + "slot": "11", + "type": "t_mapping(t_address,t_struct(AddressSet)2141_storage)", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:32" + }, + { + "label": "_stakeAmountByEpoch", + "offset": 0, + "slot": "12", + "type": "t_mapping(t_address,t_mapping(t_address,t_mapping(t_uint256,t_uint256)))", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:34" + }, + { + "label": "candidateMinStake", + "offset": 0, + "slot": "13", + "type": "t_uint256", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:37" + }, + { + "label": "delegatorMinStake", + "offset": 0, + "slot": "14", + "type": "t_uint256", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:40" + }, + { + "label": "maxStakeAmount", + "offset": 0, + "slot": "15", + "type": "t_uint256", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:44" + }, + { + "label": "orderedWithdrawAmount", + "offset": 0, + "slot": "16", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:49" + }, + { + "label": "orderedWithdrawAmountTotal", + "offset": 0, + "slot": "17", + "type": "t_mapping(t_address,t_uint256)", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:53" + }, + { + "label": "orderWithdrawEpoch", + "offset": 0, + "slot": "18", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:59" + }, + { + "label": "poolToBeElectedIndex", + "offset": 0, + "slot": "19", + "type": "t_mapping(t_address,t_uint256)", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:66" + }, + { + "label": "stakeAmount", + "offset": 0, + "slot": "20", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:71" + }, + { + "label": "stakingWithdrawDisallowPeriod", + "offset": 0, + "slot": "21", + "type": "t_uint256", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:75" + }, + { + "label": "stakingEpoch", + "offset": 0, + "slot": "22", + "type": "t_uint256", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:78" + }, + { + "label": "stakingFixedEpochDuration", + "offset": 0, + "slot": "23", + "type": "t_uint256", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:82" + }, + { + "label": "stakingTransitionTimeframeLength", + "offset": 0, + "slot": "24", + "type": "t_uint256", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:85" + }, + { + "label": "stakingEpochStartTime", + "offset": 0, + "slot": "25", + "type": "t_uint256", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:89" + }, + { + "label": "stakingEpochStartBlock", + "offset": 0, + "slot": "26", + "type": "t_uint256", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:96" + }, + { + "label": "currentKeyGenExtraTimeWindow", + "offset": 0, + "slot": "27", + "type": "t_uint256", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:102" + }, + { + "label": "stakeAmountTotal", + "offset": 0, + "slot": "28", + "type": "t_mapping(t_address,t_uint256)", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:107" + }, + { + "label": "totalStakedAmount", + "offset": 0, + "slot": "29", + "type": "t_uint256", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:111" + }, + { + "label": "validatorSetContract", + "offset": 0, + "slot": "30", + "type": "t_contract(IValidatorSetHbbft)14095", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:114" + }, + { + "label": "poolInfo", + "offset": 0, + "slot": "31", + "type": "t_mapping(t_address,t_struct(PoolInfo)6396_storage)", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:122" + }, + { + "label": "abandonedAndRemoved", + "offset": 0, + "slot": "32", + "type": "t_mapping(t_address,t_bool)", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:124" + }, + { + "label": "snapshotPoolTotalStakeAmount", + "offset": 0, + "slot": "33", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_uint256))", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:128" + }, + { + "label": "snapshotPoolValidatorStakeAmount", + "offset": 0, + "slot": "34", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_uint256))", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:132" + }, + { + "label": "_delegatorStakeSnapshot", + "offset": 0, + "slot": "35", + "type": "t_mapping(t_address,t_mapping(t_address,t_mapping(t_uint256,t_uint256)))", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:136" + }, + { + "label": "_stakeSnapshotLastEpoch", + "offset": 0, + "slot": "36", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:139" + }, + { + "label": "bonusScoreContract", + "offset": 0, + "slot": "37", + "type": "t_contract(IBonusScoreSystem)13516", + "contract": "StakingHbbft", + "src": "contracts/StakingHbbft.sol:141" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_struct(InitializableStorage)65_storage": { + "label": "struct Initializable.InitializableStorage", + "members": [ + { + "label": "_initialized", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "_initializing", + "type": "t_bool", + "offset": 8, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(OwnableStorage)14_storage": { + "label": "struct OwnableUpgradeable.OwnableStorage", + "members": [ + { + "label": "_owner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(ReentrancyGuardStorage)140_storage": { + "label": "struct ReentrancyGuardUpgradeable.ReentrancyGuardStorage", + "members": [ + { + "label": "_status", + "type": "t_uint256", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)dyn_storage": { + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bytes16": { + "label": "bytes16", + "numberOfBytes": "16" + }, + "t_bytes2": { + "label": "bytes2", + "numberOfBytes": "2" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes4": { + "label": "bytes4", + "numberOfBytes": "4" + }, + "t_bytes_storage": { + "label": "bytes", + "numberOfBytes": "32" + }, + "t_contract(IBonusScoreSystem)13516": { + "label": "contract IBonusScoreSystem", + "numberOfBytes": "20" + }, + "t_contract(IValidatorSetHbbft)14095": { + "label": "contract IValidatorSetHbbft", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_mapping(t_uint256,t_uint256)))": { + "label": "mapping(address => mapping(address => mapping(uint256 => uint256)))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { + "label": "mapping(address => mapping(uint256 => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(AddressSet)2141_storage)": { + "label": "mapping(address => struct EnumerableSet.AddressSet)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(PoolInfo)6396_storage)": { + "label": "mapping(address => struct StakingHbbft.PoolInfo)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes4,t_struct(ParameterRange)13127_storage)": { + "label": "mapping(bytes4 => struct ValueGuards.ParameterRange)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_uint256))": { + "label": "mapping(uint256 => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_uint256)": { + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32" + }, + "t_struct(AddressSet)2141_storage": { + "label": "struct EnumerableSet.AddressSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)1826_storage", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "64" + }, + "t_struct(ParameterRange)13127_storage": { + "label": "struct ValueGuards.ParameterRange", + "members": [ + { + "label": "getter", + "type": "t_bytes4", + "offset": 0, + "slot": "0" + }, + { + "label": "range", + "type": "t_array(t_uint256)dyn_storage", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(PoolInfo)6396_storage": { + "label": "struct StakingHbbft.PoolInfo", + "members": [ + { + "label": "publicKey", + "type": "t_bytes_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "internetAddress", + "type": "t_bytes16", + "offset": 0, + "slot": "1" + }, + { + "label": "port", + "type": "t_bytes2", + "offset": 16, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1826_storage": { + "label": "struct EnumerableSet.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "_positions", + "type": "t_mapping(t_bytes32,t_uint256)", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + } + }, + "namespaces": { + "erc7201:openzeppelin.storage.ReentrancyGuard": [ + { + "contract": "ReentrancyGuardUpgradeable", + "label": "_status", + "type": "t_uint256", + "src": "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol:40", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Ownable": [ + { + "contract": "OwnableUpgradeable", + "label": "_owner", + "type": "t_address", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:24", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Initializable": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_uint64", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69", + "offset": 0, + "slot": "0" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73", + "offset": 8, + "slot": "0" + } + ] + } + } + }, + "01cabeaeff0a44730042a30629ba93d33f08b7f6eea112daeb3362b3c73027b6": { + "address": "0xB523ba9DD6d421963D1f4eC117576Bcb99CDFbe8", + "txHash": "0xa66106ac96bb319837e50c6bd3112bdfbba4a6d04bca93a87b20ac0d67292b64", + "layout": { + "solcVersion": "0.8.25", + "storage": [ + { + "label": "allowedParameterRange", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes4,t_struct(ParameterRange)13127_storage)", + "contract": "ValueGuards", + "src": "contracts/ValueGuards.sol:41" + }, + { + "label": "_allowedSenders", + "offset": 0, + "slot": "1", + "type": "t_array(t_address)dyn_storage", + "contract": "TxPermissionHbbft", + "src": "contracts/TxPermissionHbbft.sol:34" + }, + { + "label": "certifierContract", + "offset": 0, + "slot": "2", + "type": "t_contract(ICertifier)13526", + "contract": "TxPermissionHbbft", + "src": "contracts/TxPermissionHbbft.sol:37" + }, + { + "label": "keyGenHistoryContract", + "offset": 0, + "slot": "3", + "type": "t_contract(IKeyGenHistory)13628", + "contract": "TxPermissionHbbft", + "src": "contracts/TxPermissionHbbft.sol:40" + }, + { + "label": "isSenderAllowed", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_bool)", + "contract": "TxPermissionHbbft", + "src": "contracts/TxPermissionHbbft.sol:45" + }, + { + "label": "validatorSetContract", + "offset": 0, + "slot": "5", + "type": "t_contract(IValidatorSetHbbft)14095", + "contract": "TxPermissionHbbft", + "src": "contracts/TxPermissionHbbft.sol:48" + }, + { + "label": "minimumGasPrice", + "offset": 0, + "slot": "6", + "type": "t_uint256", + "contract": "TxPermissionHbbft", + "src": "contracts/TxPermissionHbbft.sol:52" + }, + { + "label": "blockGasLimit", + "offset": 0, + "slot": "7", + "type": "t_uint256", + "contract": "TxPermissionHbbft", + "src": "contracts/TxPermissionHbbft.sol:55" + }, + { + "label": "connectivityTracker", + "offset": 0, + "slot": "8", + "type": "t_contract(IConnectivityTrackerHbbft)13581", + "contract": "TxPermissionHbbft", + "src": "contracts/TxPermissionHbbft.sol:58" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_struct(InitializableStorage)65_storage": { + "label": "struct Initializable.InitializableStorage", + "members": [ + { + "label": "_initialized", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "_initializing", + "type": "t_bool", + "offset": 8, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(OwnableStorage)14_storage": { + "label": "struct OwnableUpgradeable.OwnableStorage", + "members": [ + { + "label": "_owner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)dyn_storage": { + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bytes4": { + "label": "bytes4", + "numberOfBytes": "4" + }, + "t_contract(ICertifier)13526": { + "label": "contract ICertifier", + "numberOfBytes": "20" + }, + "t_contract(IConnectivityTrackerHbbft)13581": { + "label": "contract IConnectivityTrackerHbbft", + "numberOfBytes": "20" + }, + "t_contract(IKeyGenHistory)13628": { + "label": "contract IKeyGenHistory", + "numberOfBytes": "20" + }, + "t_contract(IValidatorSetHbbft)14095": { + "label": "contract IValidatorSetHbbft", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes4,t_struct(ParameterRange)13127_storage)": { + "label": "mapping(bytes4 => struct ValueGuards.ParameterRange)", + "numberOfBytes": "32" + }, + "t_struct(ParameterRange)13127_storage": { + "label": "struct ValueGuards.ParameterRange", + "members": [ + { + "label": "getter", + "type": "t_bytes4", + "offset": 0, + "slot": "0" + }, + { + "label": "range", + "type": "t_array(t_uint256)dyn_storage", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + } + }, + "namespaces": { + "erc7201:openzeppelin.storage.Ownable": [ + { + "contract": "OwnableUpgradeable", + "label": "_owner", + "type": "t_address", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:24", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Initializable": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_uint64", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69", + "offset": 0, + "slot": "0" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73", + "offset": 8, + "slot": "0" + } + ] + } + } + } + } +} From 5a78b6c04bf4459a4298de5251c7a0c7722ebd82 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sun, 20 Oct 2024 23:14:43 +0200 Subject: [PATCH 2/4] README.md --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index dee3fe76..68861074 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,7 @@ The algorithm provides a Sybil control mechanism for reporting malicious validat ## POSDAO Repositories and Resources -- White paper https://forum.poa.network/t/posdao-white-paper/2208 -- Backported Open Ethereum client with all POSDAO features https://github.com/poanetwork/open-ethereum/tree/posdao-backport -- Original Open Ethereum client supporting POSDAO features https://github.com/OpenEthereum/open-ethereum starting from v2.7.2 (except [posdaoTransition spec option](https://github.com/OpenEthereum/open-ethereum/pull/11245) which waits to be released in the next version) +- White paper https://github.com/DMDcoin/whitepaper/wiki ## Smart Contract Summaries @@ -28,8 +26,6 @@ Check also the [BlockRewardHbbft call graph](/docs/BlockRewardHbbft-call-graph.p - KeyGenHistory.writeAck - KeyGenHistory.writePart -- `InitializerHbbft`: used once on network startup and then destroyed. This contract is needed for initializing upgradable contracts since an upgradable contract can't have the constructor. The bytecode of this contract is written by the `scripts/make_spec_hbbft.js` into `spec.json` along with other contracts when initializing on genesis block. - - `RandomHbbft`: stores random numbers written by the HBBFT engine. Random numbers are used to form a new validator set at the beginning of each staking epoch by the `ValidatorSet` contract. There are two key functions: - `setCurrentSeed`. This is a setter that can only be called by the HBBFT engine in order to set the newly generated random number that is gonna be used for the new validator set selection. - `currentSeed`. This public getter is used by the `ValidatorSetHbbft` contract at a predefined block of each staking epoch to get the accumulated random seed for randomly choosing new validators among active pools. It can also be used by anyone who wants to use the network's random seed. @@ -49,6 +45,8 @@ Check also the [StakingHbbft call graph](/docs/StakingHbbft-call-graph.png). - `ValidatorSetHbbft`: stores the current validator set and contains the logic for choosing new validators at the beginning of each staking epoch. The logic uses a random seed stored in the `RandomHbbft` contract. Also, ValidatorSetHbbft is responsible for discovering and removing malicious validators. This contract is based on `reporting ValidatorSet` [described in Parity Wiki](https://wiki.parity.io/Validator-Set.html#reporting-contract). Check also the [ValidatorSetHbbft call graph](/docs/ValidatorSetHbbft-call-graph.png). +- `BonusScoreSystem`: Handles the Bonus Scores that validators collect during their supportive phases. + ## Usage ### Install Dependencies From e181050a3ab823c48678634ffff0ab2a85de31b6 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 21 Oct 2024 10:30:53 +0200 Subject: [PATCH 3/4] README all contracts intro --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 68861074..4c433352 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ # HBBFT - POSDAO Smart Contracts -Implementation of the HBBFT-POSDAO consensus algorithm in [Solidity](https://solidity.readthedocs.io). +Implementation of the HBBFT-POSDAO consensus algorithm in [Solidity](https://solidity.readthedocs.io), +suited for the needs of the DMD Diamond Blockchain https://github.com/DMDcoin/whitepaper/wiki ## About -POSDAO is a Proof-of-Stake (POS) algorithm implemented as a decentralized autonomous organization (DAO). It is designed to provide a decentralized, fair, and energy efficient consensus for public chains. The algorithm works as a set of smart contracts written in Solidity. POSDAO can be implemented with any general purpose BFT consensus protocol. In the current version Honeybadger BFT (HBBFT) is chosen, which is leaderless and with instant finality. It incentivizes actors to behave in the best interests of a network. +POSDAO is a Proof-of-Stake (POS) algorithm implemented as a decentralized autonomous organization (DAO). It is designed to provide a decentralized, fair, and energy efficient consensus for public chains. The algorithm works as a set of smart contracts written in Solidity. It is designed to work together with a Honeybadger BFT (HBBFT) consensus algoritm, which is leaderless and with instant finality. It incentivizes actors to behave in the best interests of a network. The algorithm provides a Sybil control mechanism for reporting malicious validators and adjusting their stake, distributing a block reward, and managing a set of validators. @@ -47,6 +48,12 @@ Check also the [ValidatorSetHbbft call graph](/docs/ValidatorSetHbbft-call-graph - `BonusScoreSystem`: Handles the Bonus Scores that validators collect during their supportive phases. +- `ConnectivityTrackerHbbft`: Tracks the notifications of individual nodes in order to handle Early Epoch Ends if the network has to many nodes that became disconnected. + +- `KeyGenHistory`: Manages the treshhold encryption shared key generation, required for epoch switches in order to pass the leadership to a new set of validators. + +- `ValueGuards`: Manages valid ranges for changes of Ecosystem Parameter changes. + ## Usage ### Install Dependencies From f01ffc16f8f90c3c236530f0cc41f64e6458fae1 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 21 Oct 2024 11:15:40 +0200 Subject: [PATCH 4/4] alpha4 hardhat config --- hardhat.config.ts | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index b862f911..432988bd 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -30,7 +30,8 @@ const mnemonic: string = process.env.MNEMONIC ? process.env.MNEMONIC : ethers.Mn const chainIds = { hardhat: 31337, - alpha2: 777012 + alpha2: 777012, + alpha4: 777018, }; const config: HardhatUserConfig = { @@ -71,6 +72,14 @@ const config: HardhatUserConfig = { browserURL: "http://185.187.170.209:4000/", }, }, + { + network: "alpha4", + chainId: 777018, + urls: { + apiURL: "http://62.171.133.46:4400/api", + browserURL: "http://62.171.133.46:4400", + }, + }, ], }, contractSizer: { @@ -146,6 +155,17 @@ const config: HardhatUserConfig = { }, gasPrice: 1000000000, }, + alpha4: { + url: "http://62.171.133.46:54100", + accounts: { + mnemonic: getMnemonic(), + path: "m/44'/60'/0'/0", + initialIndex: 0, + count: 20, + passphrase: "", + }, + gasPrice: 1000000000, + }, }, paths: { artifacts: "./artifacts",