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

Add support for the "fron" log item #2150

Merged
merged 3 commits into from
Mar 18, 2022
Merged

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Mar 17, 2022

Close #2139

I wanted to add a unit test, but we have no good way to obtain a SCALE-encoded header from a Substrate node.
Since the code is just copy-pasted from the one of the Beefy and Polkadot log items, it should work.

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 Mar 17, 2022

twiggy diff report

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


 Delta Bytes │ Item
─────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────
       +2450 ┊ smoldot::header::DigestItemRef::scale_encoding::h9dc96e920f4b74e6
       -2249 ┊ smoldot::header::DigestItemRef::scale_encoding::h416dbac060fc8afd
       +2144 ┊ smoldot::header::decode_item::h4c68c78889f042ee
       -2131 ┊ smoldot::executor::host::HostVmPrototype::run_vectored::h15b5542a4e086d98
       +2131 ┊ smoldot::executor::host::HostVmPrototype::run_vectored::h4b69853802ad2f51
       -2080 ┊ smoldot::header::decode_item::h0013c67d9db77ed0
       -2025 ┊ <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::next::h9f9bf13bb22dfabc
       +2025 ┊ <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::next::he1942b7180f967df
       +1960 ┊ <alloc::vec::Vec<T,A> as core::clone::Clone>::clone::h9cf93b983b596272
       -1908 ┊ <alloc::vec::Vec<T,A> as core::clone::Clone>::clone::h8b7f13a1cf9d492d
        +969 ┊ <smoldot::header::DigestItem as core::convert::From<smoldot::header::DigestItemRef>>::from::h3898fa60b74410d0
        -790 ┊ <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::fold::h84fc6d3ba7851f89
        +790 ┊ <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::fold::hc5a56bb62685d478
        +771 ┊ <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::fold::h23aee6591bd3d9b2
        -771 ┊ <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::fold::heac076db79250723
        +659 ┊ <smoldot::header::DigestItemRef as core::convert::From<&smoldot::header::DigestItem>>::from::ha3a2fda7c69f6958
        +658 ┊ smoldot::executor::runtime_host::run::h09cd88be0529e47a
        -658 ┊ smoldot::executor::runtime_host::run::h4b232ef7eda411d3
        -635 ┊ <smoldot::header::DigestItem as core::convert::From<smoldot::header::DigestItemRef>>::from::h1bd41493023ddc6f
        -615 ┊ <smoldot::header::DigestItemRef as core::convert::From<&smoldot::header::DigestItem>>::from::h9d1815cf22624ef9
         +33 ┊ ... and 80 more.
        +728 ┊ Σ [100 Total Rows]

@xcaptain
Copy link

Thanks, tested and it works.

Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

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

👍

@tomaka tomaka added the automerge Automatically merge pull request as soon as possible label Mar 18, 2022
@mergify mergify bot merged commit 05d582a into paritytech:main Mar 18, 2022
@tomaka tomaka deleted the support-fron branch March 18, 2022 08:54
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.

Add frontier support
3 participants