Skip to content
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

Remove Chain.databaseContent function #2791

Merged
merged 6 commits into from
Sep 28, 2022

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Sep 28, 2022

Close #2456

This PR removes the Chain.databaseContent function from the public API. Users are supposed to use the chainHead_unstable_finalizedDatabase JSON-RPC function that was added in #2749 instead.

This is an API breaking change. Since #2778 has been merged and is a breaking change, let's do other breaking changes at the same time.

Copy link
Contributor

@mergify mergify bot left a comment

Choose a reason for hiding this comment

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

Automatically approving tomaka's pull requests. This auto-approval will be removed once more maintainers are active.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 28, 2022

twiggy diff report

Difference in .wasm size before and after this pull request.


 Delta Bytes │ Item
─────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
      -11320 ┊ smoldot_light::Client<TPlat,TChain>::add_chain::h6bae6d598e43e304
      +11316 ┊ smoldot_light::Client<TPlat,TChain>::add_chain::h499ef0e7e64826b1
       +2358 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h7065e28fde98499a
       -2358 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h802cedacb1f6cb59
        -688 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h3fccc462bf05b20d
        +688 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::ha2b79c641ac57c98
        +550 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h1a7756fbbc36eadb
        -550 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::ha019be2e422f677b
        +515 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h821dacf17c6e56db
        -515 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h9a46b4d270db5b6e
        -409 ┊ database_content
        -401 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h1bd1190d0b2c874b
        -392 ┊ core::ptr::drop_in_place<futures_util::future::future::remote_handle::Remote<core::future::from_generator::GenFuture<smoldot_light::Client<smoldot_light_wasm::platform::Platform,alloc::vec::Vec<futures_util::abortable::AbortHandle>>::add_chain<alloc::vec::into_iter::IntoIter<smoldot_light::ChainId>>::{{closure}}>>>::h2da2f02512548873
        +392 ┊ core::ptr::drop_in_place<futures_util::future::future::remote_handle::Remote<core::future::from_generator::GenFuture<smoldot_light::Client<smoldot_light_wasm::platform::Platform>::add_chain<alloc::vec::into_iter::IntoIter<smoldot_light::ChainId>>::{{closure}}>>>::h7b996dfe93307331
        -367 ┊ smoldot_light::Client<TPlat,TChain>::remove_chain::h315004cddbd5eb8f
        -339 ┊ smoldot_light::Client<TPlat,TChain>::database_content::h2c4b35658feac101
        +336 ┊ smoldot_light::Client<TPlat,TChain>::remove_chain::h03458a37b14f606e
        +324 ┊ slab::Slab<T>::insert_at::hf0f727febb657083
        -321 ┊ slab::Slab<T>::insert_at::h54793b016165fc0f
        +304 ┊ <smoldot_light_wasm::cpu_rate_limiter::CpuRateLimiter<T> as core::future::future::Future>::poll::h169759c0a81dfbff
       -2010 ┊ ... and 198 more.
       -6936 ┊ Σ [218 Total Rows]

@tomaka tomaka added the automerge Automatically merge pull request as soon as possible label Sep 28, 2022
@mergify mergify bot merged commit 313eee2 into paritytech:main Sep 28, 2022
@tomaka tomaka deleted the rm-database-content branch September 28, 2022 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Automatically merge pull request as soon as possible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace databaseContent() method with JSON-RPC function
2 participants