Open nfrisby opened 4 years ago
I think this is a problem in the tests only.
ouroboros-consensus-shelley-test
uses ConcreteCrypto
.
cardano-ledger-specs
defines ConcreteCrypto
to use FakeVRF
.
type VRF (ConcreteCrypto h) = FakeVRF
cardano-ledger-specs
defines FakeVRF
so that the signing key does not influence the output.
evalVRF' ::
SneakilyContainResult a =>
a ->
SignKeyVRF FakeVRF ->
(OutputVRF FakeVRF, CertVRF FakeVRF)
evalVRF' a (SignKeyFakeVRF n) =
let y = sneakilyExtractResult a
p = unsneakilyExtractPayload a
realValue = fromIntegral . fromHash . hashWithSerialiser @MD5 id $ toCBOR p
in (y, CertFakeVRF n realValue)
The key fact about VRFs here is that the signing key is the only part of the leader check that is specific to each node.
@nc6 is going to fix this in cardano-ledger-specs
: the key will be taken into account in evalVRF'
.
I'm labeling this as
testing
for now. However, this is urgent because we're not yet sure if it's localized to the tests. I'll update this description once we know more. (Edit: I believe it is localized to the tests.)When the OBFT overlay is in control, active slots have one leader. But when Praos determines leaders, every active slot is lead by all nodes. Specifically, the argument to
checkLeaderValue
called fromcheckIsLeader
is the same for all nodes (as observed viaDebug.Trace
).cc: @edsko @mrBliss @nc6