-
_epochHeaderBytes: rlp encoding epoch Header
- Note: When the Header is rlp encoded here, you need to ensure that header.Commit needs to be nil, because headerHash() does not include header.Commit
-
commitBytes: rlp encoding Commit structure
-
lookByIndex: Whether the uploaded validator signature sequence is consistent with the validator sequence in the contract
function submitHead(bytes memory _epochHeaderBytes, bytes memory commitBytes, bool lookByIndex) external
function proposedValidators() public view returns (address[] memory, uint256[] memory)
return
- validators of next epoch
- voting powers of validators of next epoch
function getCurrentEpoch() public view returns(uint256,address[] memory _epochSigners,uint256[] memory _epochVotingPowers)
return
- current epochIdx
- validators of current epoch
- voting powers of validators of current epoch
function curEpochVals() external view returns (address[] memory);
function curVotingPowers() external view returns (uint64[] memory);
function epochIdx() external view returns (uint256);
function curEpochHeight() external view returns (uint256 height);
function getNextEpochHeight() external view returns (uint256 height);
function setEpochPeriod(uint256 _epochPeriod) external;
function epochPeriod() external view returns (uint256 height);