-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Bypass chain-selection subsystem until disputes are enabled. #3676
Conversation
(as discussed, needs to feature-gate disputes lag checking as well) |
The check labels bot is wrong. |
check_labels should be happy now |
TODO move the fallback into selection
.map_err(Error::OverseerDisconnected) | ||
.map_err(|e| ConsensusError::Other(Box::new(e)))? | ||
.unwrap_or_else(|| (subchain_number, subchain_head)); | ||
let lag = if cfg!(feature = "disputes") { |
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.
👍
01eca29
to
1015bf3
Compare
lag_disputes | ||
} else { | ||
lag | ||
}; | ||
|
||
// 4. Apply the maximum safeguard to the finality lag. | ||
if lag > MAX_FINALITY_LAG { |
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.
im reviewing without context of all the surrounding code, but the behavior here before and after is different.
This check before was always checking against lag
, and with the new code, could check against lag_disputes
with the feature flag.
Was this a bug before? or a bug now?
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.
Bug before, addressed here. Approval and disputes both apply constraints to the finalizable chain and previously the disputes lag wasn't accounted for in the 'max' check.
…ech#3676) * cleanup of rob's patch * depend on feature disputes, both lag and query * typo * make it work TODO move the fallback into selection * option * Update node/service/src/relay_chain_selection.rs * remove trait implementation and fix errors * hotfix: tests * fmt * remove unused trait * make pub(crate) for test * disable tests with disputed blocks * Fix warnings Co-authored-by: Robert Habermeier <rphmeier@gmail.com> Co-authored-by: Lldenaurois <Ljdenaurois@gmail.com>
* Bypass chain-selection subsystem until disputes are enabled. (#3676) * cleanup of rob's patch * depend on feature disputes, both lag and query * typo * make it work TODO move the fallback into selection * option * Update node/service/src/relay_chain_selection.rs * remove trait implementation and fix errors * hotfix: tests * fmt * remove unused trait * make pub(crate) for test * disable tests with disputed blocks * Fix warnings Co-authored-by: Robert Habermeier <rphmeier@gmail.com> Co-authored-by: Lldenaurois <Ljdenaurois@gmail.com> * properly gate sanity check (#3684) Co-authored-by: Bernhard Schuster <bernhard@ahoi.io> Co-authored-by: Robert Habermeier <rphmeier@gmail.com> Co-authored-by: Lldenaurois <Ljdenaurois@gmail.com>
TheUses thecfg!(feature = "fx")
does not exist yet, but it does not matter for compilation.feature = "disputes"
as gate for the relay chain selection rule.