Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Comments

Chain Selection: Follow-ups#3328

Merged
rphmeier merged 15 commits intomasterfrom
rh-chain-selection-db-and-stagnant
Jul 6, 2021
Merged

Chain Selection: Follow-ups#3328
rphmeier merged 15 commits intomasterfrom
rh-chain-selection-db-and-stagnant

Conversation

@rphmeier
Copy link
Contributor

@rphmeier rphmeier commented Jun 21, 2021

This implements the follow-ups to #3277 and closes #3293 .

I don't yet plug it into overseer as that'll take a DB migration, for which we should do the migration of dispute coordinator at the same time. I'd like to wait until #2581 is implemented before that, just in case there are further changes we want to make to the coordinator.

So this PR:

  • Implements the DbBackend fulfilling the Backend trait.
  • Implements the stagnation checking loop
  • Configures Approval Voting to send ChainSelectionMessage::Approved
  • Tests the database backend on an in-memory KVDB.
  • Tests stagnation using a mockable clock

and is ready for review when these checkboxes are all done.

@rphmeier rphmeier added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed. labels Jun 21, 2021
@rphmeier rphmeier mentioned this pull request Jun 21, 2021
6 tasks
@rphmeier rphmeier force-pushed the rh-chain-selection-db-and-stagnant branch from 5b29541 to 7909fbd Compare June 21, 2021 17:50
rphmeier and others added 4 commits June 23, 2021 01:58
* master: (33 commits)
  Update all weights, add run_all_benches.sh script (#3400)
  Enable over-bridge-messaging in Rococo/Wococo runtime (#3377)
  paras.rs to FRAME V2 (#3403)
  Add XCM Tracing (#3353)
  Use MaxEncodedLen trait from new parity-scale-codec v2.2 (#3412)
  bump a bunch of deps in parity-common (#3402)
  Warn on low connectivity. (#3408)
  origin to frame v2 (#3405)
  Enable logging in the puppet worker (#3411)
  make it easier to dbg stalls (#3351)
  XCM `canonicalize` + `prepend_with` fix (#3269)
  cleanup stream polls (#3397)
  Staking Miner (#3141)
  Companion for Substrate#8953 (#3140)
  Bump version, specs & substrate in prep for v0.9.8 (#3387)
  Fix busy loops. (#3392)
  Minor refactor (#3386)
  add simnet tests (#3381)
  BEEFY: adjust gossip (#3372)
  Companion for #9193 (#3376)
  ...
fn load_stagnant_at_up_to(&self, up_to: crate::Timestamp)
-> Result<Vec<(crate::Timestamp, Vec<Hash>)>, Error>
{
let stagnant_at_iter = self.inner.iter_with_prefix(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a note, that this adds another reliance on iter_with_prefix which needs to be removed if we're to migrate off kvdb interface

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. I think that's fine for now based on discussions in Element

@rphmeier rphmeier merged commit 6cc70a8 into master Jul 6, 2021
@rphmeier rphmeier deleted the rh-chain-selection-db-and-stagnant branch July 6, 2021 21:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement remainder of Chain Selection Subsystem

2 participants