-
Notifications
You must be signed in to change notification settings - Fork 86
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
generalize Node.run for invocation from both real node and from ThreadNet tests and refine interface used by real node #2720
Commits on Nov 12, 2020
-
network: parameterize DiffusionApplications record
Adds the following parameters to the DiIffusionApplications record type, so that it can be used both for the real diffusion layer and for a mock layer in the ThreadNet tests. * addresses: real uses RemoteAddress and LocalAddress, ThreadNet uses CoreNodeId * version data: real uses NodeToNodeVersionData and NodeToClientVersionData, ThreadNet uses UnversionedProtocolData * monad: real uses IO, ThreadNet uses IOLike m => m
Configuration menu - View commit details
-
Copy full SHA for 13a83ed - Browse repository at this point
Copy the full SHA 13a83edView commit details -
consensus: parameterize Node.run over the diffusion layer
The ThreadNet tests will run a mock diffusion layer. It's simpler than the real diffusion layer, and it's connection/disconnection timeline can be scripted according to each generated " test plan " (eg enabling shrinking to an explicitly static topology).
Configuration menu - View commit details
-
Copy full SHA for 7b11665 - Browse repository at this point
Copy the full SHA 7b11665View commit details -
Configuration menu - View commit details
-
Copy full SHA for 46535b0 - Browse repository at this point
Copy the full SHA 46535b0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 47ef31e - Browse repository at this point
Copy the full SHA 47ef31eView commit details -
consensus: decouple Node.run from ChainDB file system
The ThreadNet tests use a mock filesystem, so .run must not directly use Ouroboros.Consensus.Storage.FS.IO.ioHasFS to initialize the ChainDB. Moreover, the tests use fully separate mock FSs for each internal database, for example to better localize reporting of unclosed file handles. So .run should not even directly organize the internal databases as sibling folders.
Configuration menu - View commit details
-
Copy full SHA for d55a362 - Browse repository at this point
Copy the full SHA d55a362View commit details -
Configuration menu - View commit details
-
Copy full SHA for bfe17fb - Browse repository at this point
Copy the full SHA bfe17fbView commit details -
consensus: decouple Node.run from randomIO, including ChainSyncTimeout
Moreover, the ThreadNet tests limit the ChainSync delays by construction instead of dynamically.
Configuration menu - View commit details
-
Copy full SHA for 7f9af2a - Browse repository at this point
Copy the full SHA 7f9af2aView commit details -
consensus: parameterize Node.run over the address types
The ThreadNet tests uses CoreNodeId whereas the real node uses RemoteAddress (ie SockAddr) and LocalAddress (ie FilePath).
Configuration menu - View commit details
-
Copy full SHA for f8897d0 - Browse repository at this point
Copy the full SHA f8897d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 715c39f - Browse repository at this point
Copy the full SHA 715c39fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3749cc3 - Browse repository at this point
Copy the full SHA 3749cc3View commit details -
consensus: move customise* fields of RunNodeArgs to LowLevelRunNodeArgs
The cardano-node invocation currently uses these functions. We therefore add sufficient corresponding fields to StdRunNodeArgs so that the cardano-node invocation can be simplified: it just passes the data without having to first interpret it as these customisation functions.
Configuration menu - View commit details
-
Copy full SHA for 6284dc2 - Browse repository at this point
Copy the full SHA 6284dc2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e36e67 - Browse repository at this point
Copy the full SHA 2e36e67View commit details -
consensus: move clock skew from RunNodeArgs to LowLevelRunNodeArgs
It is not an option the real node likely has to override, better to not require them to provide it.
Configuration menu - View commit details
-
Copy full SHA for 88386d6 - Browse repository at this point
Copy the full SHA 88386d6View commit details -
consensus: change prefix of LowLevelRunNodeArgs from rn- to llrn-
For consistency.
Configuration menu - View commit details
-
Copy full SHA for 932fb0c - Browse repository at this point
Copy the full SHA 932fb0cView commit details -
Left-over from alignment in the distant past.
Configuration menu - View commit details
-
Copy full SHA for ab290ca - Browse repository at this point
Copy the full SHA ab290caView commit details -
consensus: make the protocol versions a low-level argument
In `cardano-node`, the default values for node-to-node and node-to-client versions are used. The only reason for having them in `RunNodeArgs` was to make it possible for the network team to test the node with different versions. They can still do this by using `.runWith` and `stdLowLevelRunNodeArgsIO`, and overriding the fields manually.
Configuration menu - View commit details
-
Copy full SHA for fa567f3 - Browse repository at this point
Copy the full SHA fa567f3View commit details -
consensus: don't require NetworkMagic in StdRunNodeArgs
`RunNodeArgs` contains the `ProtocolInfo`, which already contains the `NetworkMagic`. So don't require it in `StdRunNodeArgs` but derive it from the `RunNodeArgs`. This means we have to pass `RunNodeArgs` to `stdLowLevelRunNodeArgsIO`.
Configuration menu - View commit details
-
Copy full SHA for df460d0 - Browse repository at this point
Copy the full SHA df460d0View commit details