-
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
Allow to rotate dynamos for blockfetch #1123
Conversation
6dbb8cd
to
450f24d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
...boros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/MiniProtocol/ChainSync/Client.hs
Outdated
Show resolved
Hide resolved
-- Interactions with the BlockFetch logic | ||
-- -------------------------------------- | ||
-- | ||
-- When syncing, the BlockFetch logic will fetch blocks from the dynamo. If the | ||
-- dynamo is responding too slowly, the BlockFetch logic can ask to change the | ||
-- dynamo with a call to 'rotateDynamo'. | ||
-- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we mention here that this is only allowed to happen on honest peers (with “honest” defined as the peer from the HAA)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This text needs to be revised, as it may not always be the case that blocks are downloaded from the dynamo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. Frankly, I also don't understand my initial message. I suppose it is missing a negation, rotateDynamo
is supposed to not be used on the honest peer.
...nsensus/src/ouroboros-consensus/Ouroboros/Consensus/MiniProtocol/ChainSync/Client/Jumping.hs
Outdated
Show resolved
Hide resolved
...nsensus/src/ouroboros-consensus/Ouroboros/Consensus/MiniProtocol/ChainSync/Client/Jumping.hs
Outdated
Show resolved
Hide resolved
...consensus/src/ouroboros-consensus/Ouroboros/Consensus/MiniProtocol/ChainSync/Client/State.hs
Show resolved
Hide resolved
...nsensus/src/ouroboros-consensus/Ouroboros/Consensus/MiniProtocol/ChainSync/Client/Jumping.hs
Outdated
Show resolved
Hide resolved
241f00d
to
bbcd6e3
Compare
fae3e08
to
a36c25b
Compare
This also involves some fairly important changes to the leaky bucket and to the leaky bucket API. These changes make the leaky bucket significantly more robust. Co-authored-by: Alexander Esgen <[email protected]>
a36c25b
to
ff489f0
Compare
* Rewrite `Peers` to accept arbitrary number of peers * Actually generate honest peers in CSJ happy path * Support a field for extra honest peers in `GenesisTest` * Allow `uniformPoints` to generate schedules with multiple honest peers * Adapt CSJ test to use native multiple honest peers generation * Share partial accessor functions used in tests * Use partial accessor to retrieve the only honest peer
Also: * Remove ill-defined LoELimit * Remove unused updateLoEFragStall * Rename runGdd to runGDDGovernor * Print GDD in traces instead of GDG * Remove the UpdateLoEFrag callback * Reorder functions in the Governor module
…' and disable timeouts as they are supposed to be
ff489f0
to
db11bc1
Compare
Also: * LoEEnabled: make payload strict to avoid NoThunks failures * LoE: allow to dynamically en-/disable * Depending on the state of the GSM, we want to either en- or disable the LoE. * Refactor `runGdd` to use `Watcher`, share trigger logic Previously, we would duplicate the logic for when to trigger the GDD between the NodeKernel and the peer simulator. * Add GDD tracing The `Show` instances are probably way too large ATM, but there are currently unused, so that isn't a pressing concern. * LoP rate: fix typo 500/s = 1/2ms, not 2/ms 🤦
Previously, it wasn't possible to eg run *just* CSJ.
Modify the honest shrinking function by no longer speeding up the other schedules when an honest tick is deleted. This simplifies a lot of code in the `Shrinking` module, at the cost of no longer ensuring that shrunk schedules preserve the overall order of events. Additionally, we re-enable shrinking in CSJ tests Also: * Extend adversarial schedules when shrinking an honest one * Document the cases when we don't use shrinking
Instead of a type alias. This could help catching bugs, but, more importantly, this paves the way to making it a data-type and adding more fields to it, although a lot of the fixes of this commit would then crumble immediately.
db11bc1
to
2acc4b3
Compare
This commit brings several LoE-related improvements, namely: - The precondition of `followsLoEFrag` stipulating that the given candidate fragment had to intersect with the LoE fragment was often violated in the code, because the candidate fragments were anchored at the tip of the selection. - `followsLoEFrag` used to accept or reject fragments depending on whether they were LoE-compliant or not. The new verson trims them to their longest LoE-compliant prefix. Following this change, `followsLoEFrag` has been renamed to `timToLoE`. It does not filter candidates out anymore. - This last change makes `computeLoEMaxExtra` redundant. We get rid of it entirely and clean up the functions `maximalCandidates` and `extendWithSuccessors` accordingly.
This commit refactors the `PointSchedule` type from a `newtype` of `Peers (PeerSchedule blk)` to a datatype containing this schedule as well as an additional field `psMinEndTime`. This field describes a minimal absolute time that the test must reach. If all ticks are executed before this time is reached, an extra delay is inserted. This allows getting rid of all the places in which we added extra ticks only for the purpose of making the test run longer. At the cost of complexifying a bit the implementation of point schedules, this makes the semantics much clearer. The fact that `PointSchedule` is now a datatype makes it easy to later add other fields, for instance a field stating the initial tip points, instead of having to add zero-duration ticks at the beginning to set those up, or a field describing the origin of the absolute clock, instead of shifting the tick times. Co-authored-by: Nicolas “Niols” Jeannerod <[email protected]>
When plugging this work to the new BlockFetch implementation, I find it very hard to provide a full |
Sounds good to me. |
Co-authored-by: Nicolas Jeannerod <[email protected]>
5680c0b
to
53ea76c
Compare
superseded by #1179 |
No description provided.