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

Comments

Remove Old Service, 2nd try#1732

Merged
12 commits merged intomasterfrom
prgn-remove-old-service-second-try
Sep 28, 2020
Merged

Remove Old Service, 2nd try#1732
12 commits merged intomasterfrom
prgn-remove-old-service-second-try

Conversation

@coriolinus
Copy link
Contributor

#1630 was immediately reverted in #1731 due to insufficient testing. This PR contains the same changeset from #1630 in a form which can be merged after future testing.

i.e.
Revert "Revert "Remove service, migrate all to service-new (#1630)" (#1731)"

This reverts commit c68aee3.

This allows us to get the changeset from #1630 into a new branch
which can be merged sometime in the future after appropriate burnin
tests have completed.
@coriolinus coriolinus 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. A1-needsburnin labels Sep 18, 2020
@coriolinus coriolinus self-assigned this Sep 18, 2020
coriolinus and others added 3 commits September 18, 2020 12:36
* master:
  Bump jsonrpc-core to v15 (#1737)
  Companion PR for #6215 (#1654)
  Companion PR for #7138 (WeightInfo for Scheduler) (#1734)
  Companion PR for Bounties #5715 (#1336)
…ytech/polkadot into prgn-remove-old-service-second-try

* 'prgn-remove-old-service-second-try' of github.com:paritytech/polkadot:
  rename polkadot-service-new -> polkadot-service
Copy link

@ordian ordian left a comment

Choose a reason for hiding this comment

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

The code changes were already reviewed in #1630.

This PR has been on burnin since the last Friday. With the help of @mxinden I was not able to spot any anomalies. Please approve if you have no objections to merge it.

@ordian ordian requested review from andresilva and bkchr September 22, 2020 09:57
* master:
  Update to substrate 2.0 (#1744)
  Companion: Handle construct_runtime breaking change. (#1692)
  Companion for `ModuleToIndex` to `PalletInfo` rename (#1743)
  Companion for substrate/pull/7161 (#1739)
  Companion for 7155 (WeightInfo for Babe and Grandpa) (#1736)
  Companion PR for #7136 (WeightInfo for Session / Offences) (#1735)
@bkchr
Copy link
Member

bkchr commented Sep 23, 2020

The code changes were already reviewed in #1630.

This PR has been on burnin since the last Friday. With the help of @mxinden I was not able to spot any anomalies. Please approve if you have no objections to merge it.

Was it now also tested on Polkadot?

Copy link
Member

@bkchr bkchr left a comment

Choose a reason for hiding this comment

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

Besides my comments, I think it is okay.

A general note, the old service file should have been copied to the node/service directory and the 3 changes related to the new architecture should have been applied. Now it was much more complicated to review this, to make sure nothing was forgotten.

/// This is an advanced feature and not recommended for general use. Generally, `build_full` is
/// a better choice.
#[cfg(feature = "full-node")]
pub fn new_full<RuntimeApi, Executor>(
Copy link
Member

Choose a reason for hiding this comment

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

In the old service this also got a parameter "test" which was forgotten here.

Copy link
Member

Choose a reason for hiding this comment

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

This should be brought back.

Copy link

@ordian ordian Sep 24, 2020

Choose a reason for hiding this comment

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

Could you elaborate why is it needed. I see it used in two places:

polkadot/service/src/lib.rs

Lines 149 to 154 in 3b37ea6

if !test {
// If we're using prometheus, use a registry with a prefix of `polkadot`.
if let Some(PrometheusConfig { registry, .. }) = config.prometheus_config.as_mut() {
*registry = Registry::new_custom(Some("polkadot".into()), None)?;
}
}

polkadot/service/src/lib.rs

Lines 171 to 175 in 3b37ea6

let grandpa_hard_forks = if config.chain_spec.is_kusama() && !test {
crate::grandpa_support::kusama_hard_forks()
} else {
Vec::new()
};

Is it only to set the prometheus prefix/hardfork kusama or am I missing something?

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can ignore it, I'm not sure. I don't have implemented this.

@cecton was this AFAIK.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's because the test service uses the test runtime and don't need prometheus.

But for the second place with kusama hard forks I think the condition !test can safely be removed because the test config.chain_spec.is_kusama() will be false for the test runtime anyway.

Originally there was one important other thing: the ValidationPool is built differently for the test node: https://github.com/paritytech/polkadot/blob/rococo-branch/service/src/lib.rs#L414

Copy link

Choose a reason for hiding this comment

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

It's because the test service uses the test runtime and don't need prometheus.

but if prometheus_config.is_none(), this line will not be executed anyway, so it seems redundant

Originally there was one important other thing: the ValidationPool is built differently for the test node: https://github.com/paritytech/polkadot/blob/rococo-branch/service/src/lib.rs#L414

do you think it's worth adding back to master or it can be taken care of in the rococo-branch?

Copy link
Contributor

Choose a reason for hiding this comment

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

do you think it's worth adding back to master or it can be taken care of in the rococo-branch?

I'm pretty sure rococo-branch is temporary (@bkchr correct me if I'm wrong). We will need to get it back or add a feature of some sort.

but if prometheus_config.is_none(), this line will not be executed anyway, so it seems redundant

You're right!! I think it's because new_full used to be a macro so the code was compiled on cumulus where we don't have the dependency for that. Now it's not an issue anymore. 🎉

🤔 comes to think of it... it was the same thing for the kusama forks thingy.

Cool!! We can drop this safely

@ordian
Copy link

ordian commented Sep 24, 2020

Was it now also tested on Polkadot?

Yes, it was tested on a sentry node, also sentry and validator on kusama.

Thanks for the review, I'll apply the changes while Peter is out.

@bkchr
Copy link
Member

bkchr commented Sep 24, 2020

It should also be tested on a Polkadot validator.

ordian and others added 3 commits September 24, 2020 13:01
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* master:
  provisioner tests: remove tokio from dev-dependencies (#1745)
Copy link
Member

@bkchr bkchr left a comment

Choose a reason for hiding this comment

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

After it is tested on a Polkadot validator, it should be fine to merge.

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
@coriolinus
Copy link
Contributor Author

coriolinus commented Sep 28, 2020

Burnin on a Polkadot validator has been running for four days now, and it seems to be operating normally.

@coriolinus
Copy link
Contributor Author

bot merge

@ghost
Copy link

ghost commented Sep 28, 2020

Trying merge.

@ghost ghost merged commit 42fbca6 into master Sep 28, 2020
@ghost ghost deleted the prgn-remove-old-service-second-try branch September 28, 2020 08:23
coriolinus added a commit that referenced this pull request Sep 28, 2020
ghost pushed a commit that referenced this pull request Sep 28, 2020
ordian added a commit that referenced this pull request Sep 28, 2020
* master:
  Collator protocol followup (#1741)
  Revert "Remove Old Service, 2nd try (#1732)" (#1758)
  Remove Old Service, 2nd try (#1732)
  collation-generation: guide and tidying (#1753)
  Companion for #7111 (Introduce `cancel_proposal` and `blacklist`) (#1728)
  Parachains: Introduce a dummy module to include the Origin. (#1749)
  provisioner tests: remove tokio from dev-dependencies (#1745)
coriolinus added a commit that referenced this pull request Oct 2, 2020
i.e.
Revert "Revert "Remove Old Service, 2nd try (#1732)" (#1758)"

This reverts commit c80f7b6.

Closes #1757.

We now have some evidence that the polkadot validator was producing
blocks after all; the reason the blocks_constructed metric was 0 was
that as a new metric it hadn't yet been incorporated into that
branch's codebase. See
#1757 (comment)

As this PR is based on a newer `master` branch than the previous one,
that should hopefully no longer be an issue.
coriolinus added a commit that referenced this pull request Oct 8, 2020
* Remove old service, 3rd try

i.e.
Revert "Revert "Remove Old Service, 2nd try (#1732)" (#1758)"

This reverts commit c80f7b6.

Closes #1757.

We now have some evidence that the polkadot validator was producing
blocks after all; the reason the blocks_constructed metric was 0 was
that as a new metric it hadn't yet been incorporated into that
branch's codebase. See
#1757 (comment)

As this PR is based on a newer `master` branch than the previous one,
that should hopefully no longer be an issue.

* paras trait now has an Origin type

* initial work running a two node local net

* use the right incantations so the nodes produce blocks together

* improve internal documentation

Co-authored-by: Bastian Köcher <git@kchr.de>
This pull request was closed.
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants