-
Notifications
You must be signed in to change notification settings - Fork 0
Add LSQ leashing 0.30.0.1 #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: leashing-stub-branch-for-pr
Are you sure you want to change the base?
Changes from 11 commits
c65cc4b
f33caa4
5ac599d
9020145
ef8c646
4179875
4210cb3
f113d1e
be4260c
a3161f4
278cd8f
1be3526
fa25012
9f9c384
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,7 +71,7 @@ import qualified Codec.CBOR.Encoding as CBOR | |
| import Codec.Serialise (DeserialiseFailure) | ||
| import qualified Control.Concurrent.Class.MonadSTM.Strict as StrictSTM | ||
| import Control.DeepSeq (NFData) | ||
| import Control.Monad (forM_, when) | ||
| import Control.Monad (forM_, when, join) | ||
| import Control.Monad.Class.MonadTime.SI (MonadTime) | ||
| import Control.Monad.Class.MonadTimer.SI (MonadTimer) | ||
| import Control.ResourceRegistry | ||
|
|
@@ -83,6 +83,7 @@ import Data.Hashable (Hashable) | |
| import Data.Kind (Type) | ||
| import Data.Map.Strict (Map) | ||
| import qualified Data.Map.Strict as Map | ||
| import Data.Set (Set) | ||
| import Data.Maybe (fromMaybe, isNothing) | ||
| import Data.Time (NominalDiffTime) | ||
| import Data.Typeable (Typeable) | ||
|
|
@@ -172,6 +173,7 @@ import Ouroboros.Network.PeerSelection.PeerSharing.Codec | |
| ) | ||
| import Ouroboros.Network.Protocol.ChainSync.Codec (timeLimitsChainSync) | ||
| import Ouroboros.Network.RethrowPolicy | ||
| import Ouroboros.Network.Protocol.LocalStateQuery.Type(LeashID) | ||
| import qualified SafeWildCards | ||
| import System.Exit (ExitCode (..)) | ||
| import System.FS.API (SomeHasFS (..)) | ||
|
|
@@ -234,6 +236,7 @@ data RunNodeArgs m addrNTN addrNTC blk = RunNodeArgs | |
| , rnGetUseBootstrapPeers :: STM m UseBootstrapPeers | ||
| , rnGenesisConfig :: GenesisConfig | ||
| , rnMempoolTimeoutConfig :: Maybe Mempool.MempoolTimeoutConfig | ||
| , rnCrucialLsqClients :: Set LeashID | ||
| } | ||
|
|
||
| -- | Arguments that usually only tests /directly/ specify. | ||
|
|
@@ -321,6 +324,7 @@ data LowLevelRunNodeArgs m addrNTN addrNTC blk | |
| , llrnPublicPeerSelectionStateVar :: StrictSTM.StrictTVar m (PublicPeerSelectionState addrNTN) | ||
| , llrnLdbFlavorArgs :: Complete LedgerDbFlavorArgs m | ||
| -- ^ The flavor arguments | ||
| , llrnCrucialLsqClients :: Set LeashID | ||
| } | ||
|
|
||
| data NodeDatabasePaths | ||
|
|
@@ -504,8 +508,12 @@ runWith RunNodeArgs{..} encAddrNtN decAddrNtN LowLevelRunNodeArgs{..} = | |
| systemStart | ||
| (blockchainTimeTracer rnTraceConsensus) | ||
|
|
||
| (genesisArgs, setLoEinChainDbArgs) <- | ||
| mkGenesisNodeKernelArgs llrnGenesisConfig | ||
| let genesisArgs = mkGenesisNodeKernelArgs llrnGenesisConfig | ||
| varGetLoEFragment <- newTVarIO $ pure ChainDB.LoEDisabled | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO I didn't scrutinize this very much. Seems plausible as just a copy-paste from what used to be in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we always want this to start as |
||
| let setLoEinChainDbArgs argsCfg = argsCfg | ||
| { ChainDB.cdbsArgs = | ||
| (ChainDB.cdbsArgs argsCfg) { ChainDB.cdbsLoE = join $ readTVarIO varGetLoEFragment } | ||
| } | ||
|
|
||
| let maybeValidateAll | ||
| | lastShutDownWasClean = | ||
|
|
@@ -585,6 +593,8 @@ runWith RunNodeArgs{..} encAddrNtN decAddrNtN LowLevelRunNodeArgs{..} = | |
| genesisArgs | ||
| DiffusionPipeliningOn | ||
| rnMempoolTimeoutConfig | ||
| varGetLoEFragment | ||
| llrnCrucialLsqClients | ||
| nodeKernel <- initNodeKernel nodeKernelArgs | ||
| rnNodeKernelHook registry nodeKernel | ||
| churnModeVar <- StrictSTM.newTVarIO ChurnModeNormal | ||
|
|
@@ -858,9 +868,11 @@ mkNodeKernelArgs :: | |
| GSM.MarkerFileView m -> | ||
| STM m UseBootstrapPeers -> | ||
| StrictSTM.StrictTVar m (PublicPeerSelectionState addrNTN) -> | ||
| GenesisNodeKernelArgs m blk -> | ||
| GenesisNodeKernelArgs -> | ||
| DiffusionPipeliningSupport -> | ||
| Maybe Mempool.MempoolTimeoutConfig -> | ||
| StrictTVar m (ChainDB.GetLoEFragment m blk) -> | ||
| Set LeashID -> | ||
| m (NodeKernelArgs m addrNTN (ConnectionId addrNTC) blk) | ||
| mkNodeKernelArgs | ||
| registry | ||
|
|
@@ -880,7 +892,9 @@ mkNodeKernelArgs | |
| publicPeerSelectionStateVar | ||
| genesisArgs | ||
| getDiffusionPipeliningSupport | ||
| mempoolTimeoutConfig = | ||
| mempoolTimeoutConfig | ||
| varGetLoEFragment | ||
| crucialLsqClients = | ||
| do | ||
| let (kaRng, psRng) = split rng | ||
| return | ||
|
|
@@ -911,6 +925,8 @@ mkNodeKernelArgs | |
| , publicPeerSelectionStateVar | ||
| , genesisArgs | ||
| , getDiffusionPipeliningSupport | ||
| , varGetLoEFragment | ||
| , crucialLsqClients | ||
| } | ||
|
|
||
| -- | We allow the user running the node to customise the 'NodeKernelArgs' | ||
|
|
@@ -1057,6 +1073,7 @@ stdLowLevelRunNodeArgsIO | |
| Diffusion.dcPublicPeerSelectionVar srnDiffusionConfiguration | ||
| , llrnLdbFlavorArgs = | ||
| srnLdbFlavorArgs | ||
| , llrnCrucialLsqClients = mempty | ||
| } | ||
| where | ||
| networkMagic :: NetworkMagic | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.