Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Bft c
-
data
BftFields
c toSign =
BftFields
{
- bftSignature :: !( SignedDSIGN ( BftDSIGN c) toSign)
-
data
BftParams
=
BftParams
{
- bftSecurityParam :: ! SecurityParam
- bftNumNodes :: ! NumCoreNodes
- data BftValidationErr = BftInvalidSignature String
- forgeBftFields :: ( BftCrypto c, Signable ( BftDSIGN c) toSign) => ConsensusConfig ( Bft c) -> toSign -> BftFields c toSign
- class ( Typeable c, DSIGNAlgorithm ( BftDSIGN c), Condense ( SigDSIGN ( BftDSIGN c)), NoThunks ( SigDSIGN ( BftDSIGN c)), ContextDSIGN ( BftDSIGN c) ~ ()) => BftCrypto c where
- data BftMockCrypto
- data BftStandardCrypto
- data BftValidateView c = forall signed. Signable ( BftDSIGN c) signed => BftValidateView ( BftFields c signed) signed
- bftValidateView :: ( SignedHeader hdr, Signable ( BftDSIGN c) ( Signed hdr)) => (hdr -> BftFields c ( Signed hdr)) -> hdr -> BftValidateView c
- data family ConsensusConfig p :: Type
Documentation
Basic BFT
Basic BFT is very simple:
- No support for delegation (and hence has no need for a ledger view)
- Requires round-robin block signing throughout (and so has no need for any chain state or cryptographic leader proofs).
- Does not use any stateful crypto (and so has no need for node state)
Instances
data BftFields c toSign Source #
BftFields | |
|
Instances
BftCrypto c => Eq ( BftFields c toSign) Source # | |
BftCrypto c => Show ( BftFields c toSign) Source # | |
Generic ( BftFields c toSign) Source # | |
( BftCrypto c, Typeable toSign) => NoThunks ( BftFields c toSign) Source # | |
BftCrypto c => Condense ( BftFields c toSign) Source # | |
type Rep ( BftFields c toSign) Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT
type
Rep
(
BftFields
c toSign) =
D1
('
MetaData
"BftFields" "Ouroboros.Consensus.Protocol.BFT" "ouroboros-consensus-0.1.0.1-DT4Cvwf63DZKctsEvaJqCU" '
False
) (
C1
('
MetaCons
"BftFields" '
PrefixI
'
True
) (
S1
('
MetaSel
('
Just
"bftSignature") '
NoSourceUnpackedness
'
SourceStrict
'
DecidedStrict
) (
Rec0
(
SignedDSIGN
(
BftDSIGN
c) toSign))))
|
Protocol parameters
BftParams | |
|
Instances
Generic BftParams Source # | |
NoThunks BftParams Source # | |
type Rep BftParams Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT
type
Rep
BftParams
=
D1
('
MetaData
"BftParams" "Ouroboros.Consensus.Protocol.BFT" "ouroboros-consensus-0.1.0.1-DT4Cvwf63DZKctsEvaJqCU" '
False
) (
C1
('
MetaCons
"BftParams" '
PrefixI
'
True
) (
S1
('
MetaSel
('
Just
"bftSecurityParam") '
NoSourceUnpackedness
'
SourceStrict
'
DecidedStrict
) (
Rec0
SecurityParam
)
:*:
S1
('
MetaSel
('
Just
"bftNumNodes") '
NoSourceUnpackedness
'
SourceStrict
'
DecidedStrict
) (
Rec0
NumCoreNodes
)))
|
data BftValidationErr Source #
Instances
Eq BftValidationErr Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT (==) :: BftValidationErr -> BftValidationErr -> Bool Source # (/=) :: BftValidationErr -> BftValidationErr -> Bool Source # |
|
Show BftValidationErr Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT |
|
Generic BftValidationErr Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT from :: BftValidationErr -> Rep BftValidationErr x Source # to :: Rep BftValidationErr x -> BftValidationErr Source # |
|
NoThunks BftValidationErr Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT |
|
type Rep BftValidationErr Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT
type
Rep
BftValidationErr
=
D1
('
MetaData
"BftValidationErr" "Ouroboros.Consensus.Protocol.BFT" "ouroboros-consensus-0.1.0.1-DT4Cvwf63DZKctsEvaJqCU" '
False
) (
C1
('
MetaCons
"BftInvalidSignature" '
PrefixI
'
False
) (
S1
('
MetaSel
('
Nothing
::
Maybe
Symbol
) '
NoSourceUnpackedness
'
NoSourceStrictness
'
DecidedLazy
) (
Rec0
String
)))
|
forgeBftFields :: ( BftCrypto c, Signable ( BftDSIGN c) toSign) => ConsensusConfig ( Bft c) -> toSign -> BftFields c toSign Source #
Classes
class ( Typeable c, DSIGNAlgorithm ( BftDSIGN c), Condense ( SigDSIGN ( BftDSIGN c)), NoThunks ( SigDSIGN ( BftDSIGN c)), ContextDSIGN ( BftDSIGN c) ~ ()) => BftCrypto c Source #
Crypto primitives required by BFT
Instances
BftCrypto BftMockCrypto Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT type BftDSIGN BftMockCrypto Source # |
|
BftCrypto BftStandardCrypto Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT type BftDSIGN BftStandardCrypto Source # |
data BftMockCrypto Source #
Instances
BftCrypto BftMockCrypto Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT type BftDSIGN BftMockCrypto Source # |
|
type BftDSIGN BftMockCrypto Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT |
data BftStandardCrypto Source #
Instances
BftCrypto BftStandardCrypto Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT type BftDSIGN BftStandardCrypto Source # |
|
type BftDSIGN BftStandardCrypto Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT |
data BftValidateView c Source #
forall signed. Signable ( BftDSIGN c) signed => BftValidateView ( BftFields c signed) signed |
bftValidateView :: ( SignedHeader hdr, Signable ( BftDSIGN c) ( Signed hdr)) => (hdr -> BftFields c ( Signed hdr)) -> hdr -> BftValidateView c Source #
Convenience constructor for
BftValidateView
Type instances
data family ConsensusConfig p :: Type Source #
Static configuration required to run the consensus protocol
Every method in the
ConsensusProtocol
class takes the consensus
configuration as a parameter, so having this as a data family rather than a
type family resolves most ambiguity.
Defined out of the class so that protocols can define this type without having to define the entire protocol at the same time (or indeed in the same module).