-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4832 from IntersectMBO/crocodile-dentist/og-genesis
Big Ledger Peer Targets for Genesis
- Loading branch information
Showing
18 changed files
with
1,193 additions
and
544 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
ouroboros-network-api/src/Ouroboros/Network/ConsensusMode.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{-# LANGUAGE DeriveAnyClass #-} | ||
{-# LANGUAGE DeriveGeneric #-} | ||
|
||
module Ouroboros.Network.ConsensusMode where | ||
|
||
import Data.Aeson | ||
import GHC.Generics (Generic) | ||
|
||
-- | Diffusion layer configuration parameter. | ||
-- | ||
-- The two modes determine which `PeerSelectionTargets` basis is used | ||
-- by churn and OG. The node's configuration sets this, and diffusion | ||
-- is initiated and remains only in this mode. | ||
-- | ||
data ConsensusMode = | ||
GenesisMode | ||
-- ^ When `LedgerStateJudgement` is `TooOld`, the targets basis is changed | ||
-- from default to one specific for this mode, which uses more big ledger peers | ||
-- until syncing is complete. | ||
|
||
| PraosMode | ||
-- ^ The legacy mode which depends on official relays and/or bootstrap peers | ||
-- configuration. This mode uses only the default target basis irrespective | ||
-- ledger state. | ||
deriving (Eq, Show, Generic, FromJSON) | ||
|
||
|
||
defaultConsensusMode :: ConsensusMode | ||
defaultConsensusMode = PraosMode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.