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 unused fallback protocol names system #2569

Merged
merged 4 commits into from
Jul 29, 2022

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Jul 29, 2022

Ages ago, I added a dummy field called fallback_protocol_names that lets you specify a list of alternative protocol names that would be negotiated if the main one isn't supported by the remote.

Substrate has a similar feature, and it's very useful in order to do protocol upgrades. (e.g. #2116)

Unfortunately this has never been implemented.
Instead of leaving this dummy feature here, this PR just removes it. It can always be added back properly in the future.

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.

@tomaka
Copy link
Contributor Author

tomaka commented Jul 29, 2022

It turns out that this was even mis-implemented.
If a fallback name was passed, we would accept incoming substreams of that protocol then panic.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 29, 2022

twiggy diff report

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


 Delta Bytes │ Item
─────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────
        -745 ┊ <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::next::hf7a78941e21d4721
        +629 ┊ <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::next::hb1aceafb03d371e4
        -504 ┊ <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::h2d83bbebd61f304a
        +504 ┊ <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::hd2def653fc5270b5
        -435 ┊ <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::h047d572d6d2d7f79
        +435 ┊ <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::hef1b800efde7d999
        -419 ┊ core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once::hebadfbe7f6ac75f9
        -413 ┊ <core::iter::adapters::flatten::FlatMap<I,U,F> as core::iter::traits::iterator::Iterator>::next::h0a6214ba26d0de32
        +377 ┊ <core::iter::adapters::flatten::FlatMap<I,U,F> as core::iter::traits::iterator::Iterator>::next::h21a144015c6269dc
        -368 ┊ <core::iter::adapters::flatten::FlatMap<I,U,F> as core::iter::traits::iterator::Iterator>::next::h0ae42a3ccb2c6b8c
        -368 ┊ <core::iter::adapters::flatten::FlatMap<I,U,F> as core::iter::traits::iterator::Iterator>::next::hd1d6ffb3f2815b1c
        +365 ┊ core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once::he1914ceb08bb5142
        +357 ┊ smoldot::network::protocol::identify::build_identify_response::h0f423b558b108b1e
        -357 ┊ smoldot::network::protocol::identify::build_identify_response::hd1946f888a0df24d
        -324 ┊ alloc::sync::Arc<[T]>::from_iter_exact::hf518ba8d054e3386
        -323 ┊ <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter::h9e599229239ebea2
        +297 ┊ <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter::h68baf063185e3f2f
        -288 ┊ <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter::h706062332f522008
        -288 ┊ <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter::h7088c44cb47bbc97
        -285 ┊ alloc::vec::Vec<T,A>::extend_desugared::h1aaa66a0dbd41ed9
        -815 ┊ ... and 102 more.
       -5189 ┊ Σ [122 Total Rows]

@tomaka tomaka added the automerge Automatically merge pull request as soon as possible label Jul 29, 2022
@mergify mergify bot merged commit f5b1187 into paritytech:main Jul 29, 2022
@tomaka tomaka deleted the rm-fallback-system branch July 29, 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.

2 participants