-
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
consensus: annotate headers with their slot's RelativeTime #1288
base: main
Are you sure you want to change the base?
Conversation
...oros-consensus-diffusion/src/ouroboros-consensus-diffusion/Ouroboros/Consensus/NodeKernel.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus-diffusion/test/consensus-test/Test/Consensus/PeerSimulator/Run.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Genesis/Governor.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Genesis/Governor.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Genesis/Governor.hs
Outdated
Show resolved
Hide resolved
...ensus/src/ouroboros-consensus/Ouroboros/Consensus/MiniProtocol/BlockFetch/ClientInterface.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HeaderValidation.hs
Outdated
Show resolved
Hide resolved
...boros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/MiniProtocol/ChainSync/Client.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus/test/consensus-test/Test/Consensus/MiniProtocol/BlockFetch/Client.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus/test/consensus-test/Test/Consensus/MiniProtocol/ChainSync/Client.hs
Outdated
Show resolved
Hide resolved
b76d77c
to
2b11f09
Compare
ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HeaderValidation.hs
Outdated
Show resolved
Hide resolved
...ensus/src/ouroboros-consensus/Ouroboros/Consensus/MiniProtocol/BlockFetch/ClientInterface.hs
Outdated
Show resolved
Hide resolved
...boros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/MiniProtocol/ChainSync/Client.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Util/AnchoredFragment.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus/src/unstable-consensus-testlib/Test/Util/HeaderValidation.hs
Outdated
Show resolved
Hide resolved
1b5a867
to
6f9c71b
Compare
7296216
to
f40c927
Compare
...nsus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Abstract/NoHardForks.hs
Outdated
Show resolved
Hide resolved
I pushed up some commits that improve some names&Haddock and also hide |
ccc97d4
to
566d1e5
Compare
I changed the representation of the fragment pair based on the conversation we had in today's office hours. I confirmed that the statemachine test fails (nicely) when I insert bugs in either ChainSel or Background's maintenance of the fragment with times. I introduced a bespoke strict pair type for clarity and to most easily satisfy the NoThunks tests (which are also enabled by the Cabal flags that enable the new invariant checking logic for the fragment pair). |
@@ -339,6 +341,39 @@ initNodeKernel args@NodeKernelArgs { registry, cfg, tracers | |||
blockForging' <- traverse (forkBlockForging st) blockForging | |||
go blockForging' | |||
|
|||
castTraceFetchClientState :: |
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.
I opened IntersectMBO/ouroboros-network#5025 to upstream this function
c625852
to
4cb2c5e
Compare
I squashed in order to rebase. I also minized the diff. The next step is to split it into two or three separate commits. |
ff91b8a
to
0ffd370
Compare
This PR will add ImmutableEraParams instances for test blocks without needing the SingleEraBlock omnibus.
GHC 9.4+ "erroneously" requires HasHeader blk. This patch prevents that. I _think_ the new local signature forces GHC to invoke the HeaderHash (Header blk) ~ HeaderHash blk rewrite _later_, thereby avoiding that undesirable Wanted constraint.
It's declared upstream in Control.ResourceRegistry now.
0ffd370
to
2effa46
Compare
- Define HeaderWithTime. - Maintain time annotations on the ChainSync candidates. - Maintain a parallel selection with time annotations since the ConsensusBlockFetch interface uses the same type argument for ChainSync candidates and the current selection. - Note that HeaderWithTime is hidden from the tracer events, at least for now. Co-authored-by: Damian Nadales <[email protected]> Co-authored-by: amesgen <[email protected]>
2effa46
to
ee2f301
Compare
|
||
instance ( HasHeader (Header blk) | ||
, StandardHash (HeaderWithTime blk) | ||
, Typeable blk |
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 is the root cause of all the additional Typeable blk
contexts in this commit. It's required to satisfy the superclass on the (upstream) HasHeader
. I don't see how to avoid it, sadly.
ee2f301
to
ba54272
Compare
ba54272
to
b4424eb
Compare
UTxO HD takes priority over this, if the conflicts are non-trivial. |
Introduce a new
HeaderWithTime
data type, which annotates each received header with the relative time of its slot as calculated by the ChainSync client.Partially addresses #1301