cardano-diffusion:cardano-diffusion-tests-lib
Safe HaskellNone
LanguageHaskell2010

Test.Cardano.Network.Diffusion.Testnet.ChainedTxs

Synopsis

Documentation

data ChainedPeerTxs Source #

A randomly generated transaction forest distributed across two peers, used by chain-integrity tests at the diffusion layer.

Each tx may carry a parent pointer (getTxParent) to any earlier tx in the forest, with some probability of having no parent at all. Invalidity propagates down the chain at generation time: a descendant of an invalid tx is itself generated as invalid, matching mainnet semantics where a tx that consumes an invalid parent's output is itself invalid by construction.

Peer assignment reflects realistic mainnet conditions:

  • Each peer carries a random subset of the forest (peers may lack txs that, for example, were already included in an adopted block).
  • Well-behaved peers (the common case) advertise their subset in chain-topological order: parents before children.
  • Adversarial or buggy peers (the occasional case) advertise in a shuffled order to stress V2's handling of out-of-order streams.
  • Every tx is carried by at least one well-behaved peer so the full forest is reachable via the reliable path, even when adversarial peers misorder or mishandle their share.

Constructors

ChainedPeerTxs 

Fields