Exemplo n.º 1
0
        private (bool, byte[]) GetVrfProof(BigInteger stake)
        {
            var seed       = _systemContractReader.GetVrfSeed();
            var rolls      = stake / StakingContract.TokenUnitsInRoll;
            var totalRolls = _systemContractReader.GetTotalStake().ToBigInteger() / StakingContract.TokenUnitsInRoll;

            var(proof, value, j) = Vrf.Evaluate(_privateWallet.EcdsaKeyPair.PrivateKey.Buffer.ToByteArray(), seed,
                                                StakingContract.Role, StakingContract.ExpectedValidatorsCount, rolls, totalRolls);
            return(j > 0, proof);
        }