Class VRFRigged
- java.lang.Object
-
- com.h2tcoin.takamakachain.utils.vrf.tree.VRFRigged
-
- All Implemented Interfaces:
VerifiableRandomFunctionInterface
public class VRFRigged extends Object implements VerifiableRandomFunctionInterface
- Author:
- giovanni.antino@h2tcoin.com
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(NodeStakeBean sb)ConcurrentSkipListMap<String,ConcurrentSkipListSet<Integer>>createDistribution(int epoch)static VRFRiggedgetInstance()StringgetSeed(int epoch)returns the seed to be used when calculating the next VRF distributionbooleanisSeedSet()voidresetInstance()voidsetSeed(String seed)
-
-
-
Method Detail
-
getInstance
public static VRFRigged getInstance()
-
resetInstance
public void resetInstance()
- Specified by:
resetInstancein interfaceVerifiableRandomFunctionInterface
-
add
public void add(NodeStakeBean sb) throws NoSuchAlgorithmException, HashEncodeException, HashAlgorithmNotFoundException, HashProviderNotFoundException
- Specified by:
addin interfaceVerifiableRandomFunctionInterface- Parameters:
sb-- Throws:
NoSuchAlgorithmExceptionHashEncodeExceptionHashAlgorithmNotFoundExceptionHashProviderNotFoundException
-
setSeed
public void setSeed(String seed) throws NoSuchAlgorithmException, HashEncodeException, HashAlgorithmNotFoundException, HashProviderNotFoundException
- Specified by:
setSeedin interfaceVerifiableRandomFunctionInterface- Throws:
NoSuchAlgorithmExceptionHashEncodeExceptionHashAlgorithmNotFoundExceptionHashProviderNotFoundException
-
isSeedSet
public boolean isSeedSet()
- Specified by:
isSeedSetin interfaceVerifiableRandomFunctionInterface
-
createDistribution
public ConcurrentSkipListMap<String,ConcurrentSkipListSet<Integer>> createDistribution(int epoch) throws NoSuchAlgorithmException, HashEncodeException, HashAlgorithmNotFoundException, HashProviderNotFoundException
- Specified by:
createDistributionin interfaceVerifiableRandomFunctionInterface- Throws:
NoSuchAlgorithmExceptionHashEncodeExceptionHashAlgorithmNotFoundExceptionHashProviderNotFoundException
-
getSeed
public String getSeed(int epoch)
returns the seed to be used when calculating the next VRF distribution- Parameters:
epoch-slot-sid-- Returns:
-
-