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

Kill the light client, CHTs and change tries. #10080

Merged
merged 9 commits into from
Nov 12, 2021
Merged

Conversation

arkpar
Copy link
Member

@arkpar arkpar commented Oct 21, 2021

This PR removes:

  • Light client leftovers
  • CHTs. These are not used currently. Smoldot uses warp sync proofs instead.
  • Change tries. Not used by any existing chains. Will probably require a new implementation anyway.

polkadot companion: paritytech/polkadot#4191

@arkpar arkpar added the A3-in_progress Pull request is in progress. No review needed at this stage. label Oct 21, 2021
@gilescope
Copy link
Contributor

gilescope commented Oct 30, 2021

This should be unblocked now. #9684 has landed and now the diff looks a fair bit smaller.

@arkpar arkpar added B3-apinoteworthy C1-low PR touches the given topic and has a low impact on builders. labels Nov 1, 2021
@arkpar arkpar marked this pull request as ready for review November 1, 2021 06:47
@github-actions github-actions bot added A0-please_review Pull request needs code review. and removed A3-in_progress Pull request is in progress. No review needed at this stage. labels Nov 1, 2021
@arkpar arkpar requested a review from bkchr November 1, 2021 06:48
self.storage_changes_root(parent_hash)
.expect("Invalid `parent_hash` given to `changes_root`.")
/// Always returns `None`. This function exists for compatibility reasons.
fn changes_root(&mut self, _parent_hash: &[u8]) -> Option<Vec<u8>> {
Copy link
Member Author

Choose a reason for hiding this comment

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

@bkchr Is there a way to remove this without breaking compatibility with existing chains? E.g. when loading polkadot genesis wasm, we check that the host function must exist, even though it is never called.

@arkpar arkpar added the D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit label Nov 1, 2021
@@ -69,7 +69,6 @@ struct InnerValue<V> {
/// Current value. None if value has been deleted.
value: V,
/// The set of extrinsic indices where the values has been changed.
/// Is filled only if runtime has announced changes trie support.
extrinsics: Extrinsics,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we just remove this Extrinsics field (I remember thinking of some optimization to it, but not having it is a better optimization).

Copy link
Member Author

Choose a reason for hiding this comment

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

I thinks this is also involved in supporting transactions in the runtime. I.e. to revert storage changes when extrinsic fails. In any case I'd rather do complex logic changes and optimisations in a separate PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 for separate, IIRC transaction stuff just merge extrinsic when commiting (it is just additional computation).

@dvdplm
Copy link
Contributor

dvdplm commented Nov 8, 2021

@andresilva @bkchr @sorpaas @adoerr Would be fantastic to see this land soon, anything we can do to help clear up the remaining doubts? :)

@arkpar
Copy link
Member Author

arkpar commented Nov 8, 2021

@joao-paulo-parity Not sure why the companion check fails here with Failed to detect our crate "sc-light" referenced in polkadot. sc-light crate has been removed from substrate in this PR, and the companion PR also removes its usage in polkadot.

@bkchr
Copy link
Member

bkchr commented Nov 8, 2021

@arkpar I think we can ignore. Just let us merge this and then update the companion using the old school way ;)

@dvdplm dvdplm mentioned this pull request Nov 8, 2021
8 tasks
@arkpar arkpar merged commit c45c1cb into master Nov 12, 2021
@arkpar arkpar deleted the a-remove-lc-stuff branch November 12, 2021 13:15
ordian added a commit that referenced this pull request Nov 12, 2021
* master: (27 commits)
  Bump rustversion from 1.0.4 to 1.0.5 (#10243)
  Kill the light client, CHTs and change tries. (#10080)
  tuple to struct event variants (#10206)
  Bump thiserror from 1.0.26 to 1.0.30 (#10240)
  Warn about usage of pallet collective set members call. (#10156)
  Bump git2 from 0.13.22 to 0.13.23 (#10238)
  Add group name in task metrics  (#10196)
  Bump proc-macro-crate from 1.0.0 to 1.1.0 (#10237)
  Bump parity-util-mem from 0.10.0 to 0.10.2 (#10236)
  Bump substrate-bip39 from 0.4.2 to 0.4.4 (#10213)
  Upgrade jsonrpsee to v0.4.1 (#10022)
  expose substrate-cli service (#10229)
  Intend to reactivate cargo-unleash check (#10167)
  CI: build docs with deps (#9884)
  use CountedMap in pallet-bags-list (#10179)
  Move all example pallets under `examples` folder. (#10215)
  Upgrade wasm builder (#10226)
  upgrade ss58-registry with additional networks. (#10224)
  move wiki -> docs (#10225)
  new remote-ext mode: (#10192)
  ...
JoshOrndorff added a commit to moonbeam-foundation/nimbus that referenced this pull request Dec 6, 2021
JoshOrndorff added a commit to moonbeam-foundation/nimbus that referenced this pull request Dec 6, 2021
JoshOrndorff added a commit to moonbeam-foundation/nimbus that referenced this pull request Dec 8, 2021
* Update cargo.lock

* rust version 2021

* Reflect paritytech/substrate#10080

* all builds

* more changes related to DigestItem

* service changes
grishasobol pushed a commit to gear-tech/substrate that referenced this pull request Mar 28, 2022
* Remove light client, change tries and CHTs

* Update tests

* fmt

* Restore changes_root

* Fixed benches

* Cargo fmt

* fmt

* fmt
AurevoirXavier added a commit to darwinia-network/darwinia-common that referenced this pull request Aug 4, 2022
AurevoirXavier added a commit to darwinia-network/darwinia-common that referenced this pull request Aug 4, 2022
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
* Remove light client, change tries and CHTs

* Update tests

* fmt

* Restore changes_root

* Fixed benches

* Cargo fmt

* fmt

* fmt
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. C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants