ouroboros-network:testlib
Safe HaskellNone
LanguageHaskell2010

Test.Ouroboros.Network.Diffusion.Testnet.Cardano.Simulation

Synopsis

Documentation

data SimArgs Source #

Diffusion Simulator Arguments

Contains all necessary randomly generated values needed to run diffusion in simulation.

Constructors

SimArgs 

Instances

Instances details
Show SimArgs Source # 
Instance details

Defined in Test.Ouroboros.Network.Diffusion.Testnet.Cardano.Simulation

mainnetSimArgs :: Int -> SimArgs Source #

Simulation arguments.

Slot length needs to be greater than 0 else we get a livelock on the IOSim.

Quota values matches mainnet, so a slot length of 1s and 1 / 20 chance that someone gets to make a block.

data DiffusionScript Source #

Multinode Diffusion Simulator Script

SimArgs with all the values needed for running the simulation, followed by a list of NodeArgs where each element represents one running node and respective Commands.

Constructors

DiffusionScript SimArgs DomainMapScript [(NodeArgs, [Command])] 

data HotDiffusionScript Source #

Multinode Hot Diffusion Simulator Script

List of SimArgs. Each element of the list represents one running node.

Constructors

HotDiffusionScript SimArgs DomainMapScript [(NodeArgs, [Command])] 

diffusionSimulation Source #

Arguments

:: (Alternative (STM m), MonadAsync m, MonadDelay m, MonadFix m, MonadFork m, MonadSay m, MonadST m, MonadEvaluate m, MonadLabelledSTM m, MonadTraceSTM m, MonadMask m, MonadTime m, MonadTimer m, MonadThrow (STM m), MonadMVar m, forall a. Semigroup a => Semigroup (m a)) 
=> BearerInfo 
-> DiffusionScript 
-> Tracer m (WithTime (WithName NtNAddr DiffusionTestTrace))

timed trace of nodes in the system

-> m Void 

Run an arbitrary topology

Tracing

iosimTracer :: forall s a. (Show a, Typeable a) => Tracer (IOSim s) (WithTime (WithName NtNAddr a)) Source #

A debug tracer which embeds events in DiffusionTestTrace.

Re-exports

newtype TestAddress addr #

Constructors

TestAddress 

Fields

Instances

Instances details
NFData addr => NFData (TestAddress addr) 
Instance details

Defined in Ouroboros.Network.Snocket

Methods

rnf :: TestAddress addr -> () #

Generic (TestAddress addr) 
Instance details

Defined in Ouroboros.Network.Snocket

Associated Types

type Rep (TestAddress addr) 
Instance details

Defined in Ouroboros.Network.Snocket

type Rep (TestAddress addr) = D1 ('MetaData "TestAddress" "Ouroboros.Network.Snocket" "ouroboros-network-framework-0.17.0.0-inplace" 'True) (C1 ('MetaCons "TestAddress" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTestAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 addr)))

Methods

from :: TestAddress addr -> Rep (TestAddress addr) x #

to :: Rep (TestAddress addr) x -> TestAddress addr #

Show addr => Show (TestAddress addr) 
Instance details

Defined in Ouroboros.Network.Snocket

Methods

showsPrec :: Int -> TestAddress addr -> ShowS #

show :: TestAddress addr -> String #

showList :: [TestAddress addr] -> ShowS #

Eq addr => Eq (TestAddress addr) 
Instance details

Defined in Ouroboros.Network.Snocket

Methods

(==) :: TestAddress addr -> TestAddress addr -> Bool #

(/=) :: TestAddress addr -> TestAddress addr -> Bool #

Ord addr => Ord (TestAddress addr) 
Instance details

Defined in Ouroboros.Network.Snocket

Methods

compare :: TestAddress addr -> TestAddress addr -> Ordering #

(<) :: TestAddress addr -> TestAddress addr -> Bool #

(<=) :: TestAddress addr -> TestAddress addr -> Bool #

(>) :: TestAddress addr -> TestAddress addr -> Bool #

(>=) :: TestAddress addr -> TestAddress addr -> Bool #

max :: TestAddress addr -> TestAddress addr -> TestAddress addr #

min :: TestAddress addr -> TestAddress addr -> TestAddress addr #

Hashable addr => Hashable (TestAddress addr) 
Instance details

Defined in Ouroboros.Network.Snocket

Methods

hashWithSalt :: Int -> TestAddress addr -> Int #

hash :: TestAddress addr -> Int #

Typeable addr => NoThunks (TestAddress addr) 
Instance details

Defined in Ouroboros.Network.Snocket

type Rep (TestAddress addr) 
Instance details

Defined in Ouroboros.Network.Snocket

type Rep (TestAddress addr) = D1 ('MetaData "TestAddress" "Ouroboros.Network.Snocket" "ouroboros-network-framework-0.17.0.0-inplace" 'True) (C1 ('MetaCons "TestAddress" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTestAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 addr)))

data RelayAccessPoint #

A relay can have either an IP address and a port number or a domain with a port number

Instances

Instances details
Arbitrary RelayAccessPoint Source # 
Instance details

Defined in Test.Ouroboros.Network.PeerSelection.Instances

FromJSON RelayAccessPoint 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

ToJSON RelayAccessPoint 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

FromCBOR RelayAccessPoint 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

ToCBOR RelayAccessPoint 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

NFData RelayAccessPoint 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

Methods

rnf :: RelayAccessPoint -> () #

Show RelayAccessPoint 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

Eq RelayAccessPoint 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

Ord RelayAccessPoint 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

newtype Script a #

Constructors

Script (NonEmpty a) 

Instances

Instances details
Functor Script 
Instance details

Defined in Test.Ouroboros.Network.Data.Script

Methods

fmap :: (a -> b) -> Script a -> Script b #

(<$) :: a -> Script b -> Script a #

Foldable Script 
Instance details

Defined in Test.Ouroboros.Network.Data.Script

Methods

fold :: Monoid m => Script m -> m #

foldMap :: Monoid m => (a -> m) -> Script a -> m #

foldMap' :: Monoid m => (a -> m) -> Script a -> m #

foldr :: (a -> b -> b) -> b -> Script a -> b #

foldr' :: (a -> b -> b) -> b -> Script a -> b #

foldl :: (b -> a -> b) -> b -> Script a -> b #

foldl' :: (b -> a -> b) -> b -> Script a -> b #

foldr1 :: (a -> a -> a) -> Script a -> a #

foldl1 :: (a -> a -> a) -> Script a -> a #

toList :: Script a -> [a] #

null :: Script a -> Bool #

length :: Script a -> Int #

elem :: Eq a => a -> Script a -> Bool #

maximum :: Ord a => Script a -> a #

minimum :: Ord a => Script a -> a #

sum :: Num a => Script a -> a #

product :: Num a => Script a -> a #

Traversable Script 
Instance details

Defined in Test.Ouroboros.Network.Data.Script

Methods

traverse :: Applicative f => (a -> f b) -> Script a -> f (Script b) #

sequenceA :: Applicative f => Script (f a) -> f (Script a) #

mapM :: Monad m => (a -> m b) -> Script a -> m (Script b) #

sequence :: Monad m => Script (m a) -> m (Script a) #

Arbitrary a => Arbitrary (Script a) 
Instance details

Defined in Test.Ouroboros.Network.Data.Script

Methods

arbitrary :: Gen (Script a) #

shrink :: Script a -> [Script a] #

Show a => Show (Script a) 
Instance details

Defined in Test.Ouroboros.Network.Data.Script

Methods

showsPrec :: Int -> Script a -> ShowS #

show :: Script a -> String #

showList :: [Script a] -> ShowS #

Eq a => Eq (Script a) 
Instance details

Defined in Test.Ouroboros.Network.Data.Script

Methods

(==) :: Script a -> Script a -> Bool #

(/=) :: Script a -> Script a -> Bool #