mirror of
https://github.com/logos-storage/logos-storage-contracts-eth.git
synced 2026-01-07 07:43:08 +00:00
Related to nim-codex/457, nim-codex/458. To cover the entire SlotId (uint256) address space, each validator must validate a portion of the SlotId space. When a slot is filled, the SlotId will be put in to a bucket, based on the value of the SlotId and the number of buckets (validators) configured. Similar to `myRequests` and `mySlots`, a function called `validationSlots` can be used to retrieve the `SlotIds` being validated for a particular bucket (validator index). This facilitates loading actively filled slots in need of validation when a validator starts.
17 lines
389 B
Solidity
17 lines
389 B
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.8.0;
|
|
|
|
import "./Validation.sol";
|
|
import "./Requests.sol";
|
|
|
|
contract TestValidation is Validation {
|
|
|
|
constructor(
|
|
ValidationConfig memory config
|
|
) Validation(config) {} // solhint-disable-line no-empty-blocks
|
|
|
|
function getValidatorIndex(SlotId slotId) public view returns (uint16) {
|
|
return _getValidatorIndex(slotId);
|
|
}
|
|
}
|