-
Notifications
You must be signed in to change notification settings - Fork 23
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
wip: genesis tests #367
Closed
Closed
wip: genesis tests #367
Conversation
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
Co-authored-by: Torsten Schmits <git@tryp.io>
Niols
added
do-not-merge
Genesis
PRs related to Genesis testing and implementation
labels
Sep 27, 2023
Make CI happy.
We create a new module `Ouroboros.Network.AnchoredFragment.Extras` in `infra-test` that contains (for now) only the implementation of `slotLength`. We remove the implementation from `BlockTree` and we use the new location in `GenesisTest`.
`PeerSimulator.ScheduledChainSyncServer` now only implements the boilerplate of fetching the next item from an STM action (the queue) and maintaining it as shared state between the handlers, in a `ChainSyncServer`. `PeerSimulator.Handlers` contains the logic that determines the intersection and next header from the block tree. `PeerSimulator.Run` contains only the scheduler, operating on the minimal set of resources. `PeerSimulator.Resources` contains the data types and resource acquisition constructors.
- New module `Test.Ouroboros.Consensus.Genesis.Setup` - Move `genChains` from its own module to `Genesis.Setup` - Move `TestSetup`-related code from `LongRangeAttack` to `Genesis.Setup`
Two bits of it still mattered: - `defaultCfg` moves to its own file `PeerSimulator.Config` - `ConnectionThread` moves to `PeerSimulator.Run`
- `PointSchedule` now contains a `NonEmpty Tick` which guarantees at least one tick and therefore access to the list of peers. - Get rid of fragments in both `AdvertisedPoints` and `PointSchedule`. - Cleanup imports of the `PointSchedule` module
…ulator Refactors some parts of ChainGenerator to be reused by PeerSimulator Creates individual functions for the steps involved and removes most of the general logic from the property test Co-authored-by: Nicolas Jeannerod <nicolas.jeannerod@tweag.io> Co-authored-by: Facundo Dominguez <facundo.dominguez@tweag.io>
Also move the two `Extras` modules into `Test.Consensus.*`. Co-authored-by: Torsten Schmits <torsten.schmits@tweag.io>
…ble and disable them in our test
All the commits here have been squashed in #434 |
github-merge-queue bot
pushed a commit
that referenced
this pull request
Dec 5, 2023
This PR introduces an initial implementation of a Peer Simulator for Genesis tests. A simulated peer is told how to behave by a list of scheduled events that is generated for every test. In essence, it is an implementation of a ChainSync server and a BlockFetch server that behave as prescribed by the schedule. The rest of the PR provides support infrastructure in the form of: * a Praos client node that plays the role of subject under test, * an example test for long range attacks, and * minimal definitions to generate a schedule from the chain schemas introduced in #240. This is a squash of the many commits in the integration branch of #367.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See all PRs labeled with “Genesis”.