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

src/chain_spec: remove code_substitutes hack #2127

Merged
merged 3 commits into from
Mar 8, 2022

Conversation

melekes
Copy link
Contributor

@melekes melekes commented Mar 8, 2022

and amend the field's docs
Closes #1844

and amend the field's docs
Closes #1844
@melekes melekes self-assigned this Mar 8, 2022
@melekes melekes requested a review from tomaka March 8, 2022 08:43
@melekes
Copy link
Contributor Author

melekes commented Mar 8, 2022

@tomaka is there anything else I've missed as a part of #1844?

@melekes melekes added the automerge Automatically merge pull request as soon as possible label Mar 8, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2022

twiggy diff report

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


 Delta Bytes │ Item
─────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       +1048 ┊ hashbrown::raw::RawTable<T,A>::reserve_rehash::h2f7a75e8efdc0153
       -1048 ┊ hashbrown::raw::RawTable<T,A>::reserve_rehash::he09bab3e2f9e44fa
        -627 ┊ <smoldot::chain_spec::structs::HashHexString as serde::de::Deserialize>::deserialize::h76e6345c9cf6408d
        +627 ┊ <smoldot::chain_spec::structs::HashHexString as serde::de::Deserialize>::deserialize::ha47a755a4e2952b5
        +533 ┊ <serde_json::de::MapAccess<R> as serde::de::MapAccess>::next_key_seed::h741a4619a8338eb7
        -533 ┊ <serde_json::de::MapAccess<R> as serde::de::MapAccess>::next_key_seed::h79ad21ef3e59ff94
        +531 ┊ <&mut serde_json::de::Deserializer<R> as serde::de::Deserializer>::deserialize_map::h0c8fc846c211baff
        -531 ┊ <&mut serde_json::de::Deserializer<R> as serde::de::Deserializer>::deserialize_map::ha07102b503700973
        -435 ┊ <smoldot::chain_spec::structs::NumberAsString as serde::de::Deserialize>::deserialize::h3848028af9553240
        +330 ┊ <hashbrown::external_trait_impls::serde::map::<impl serde::de::Deserialize for hashbrown::map::HashMap<K,V,S>>::deserialize::MapVisitor<K,V,S> as serde::de::Visitor>::visit_map::h067849e95faf8e1c
        -330 ┊ <hashbrown::external_trait_impls::serde::map::<impl serde::de::Deserialize for hashbrown::map::HashMap<K,V,S>>::deserialize::MapVisitor<K,V,S> as serde::de::Visitor>::visit_map::he1d81450e6534661
        +288 ┊ hashbrown::raw::RawTable<T,A>::clone_from_impl::h951184c2030bb306
        -288 ┊ hashbrown::raw::RawTable<T,A>::clone_from_impl::he2d490875294438d
        +272 ┊ hashbrown::map::HashMap<K,V,S,A>::insert::h2c24603d776d7459
        -272 ┊ hashbrown::map::HashMap<K,V,S,A>::insert::h8b07cfff8b6df5dc
        +252 ┊ <serde_json::de::MapKey<R> as serde::de::Deserializer>::deserialize_u64::h66a68cd40a067522
        +210 ┊ smoldot::sync::all::AllSync<TRq,TSrc,TBl>::desired_requests::hb0b63a2e4c0d37fa
        -198 ┊ <hashbrown::raw::RawIterRange<T> as core::iter::traits::iterator::Iterator>::next::h7462dd76a8922aba
        +198 ┊ <hashbrown::raw::RawIterRange<T> as core::iter::traits::iterator::Iterator>::next::h7b96aee755dfffb5
        +172 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hcd76df886a0fe929
        -103 ┊ ... and 132 more.
       -2504 ┊ Σ [152 Total Rows]

@tomaka
Copy link
Contributor

tomaka commented Mar 8, 2022

The block number is actually in the form of a string (probably to avoid precision issues with JavaScript)
You can find an example here: https://raw.githubusercontent.com/paritytech/polkadot/master/node/service/res/polkadot.json
I would appreciate a test to make sure that this parses correctly. You can probably just tweak the existing example.json.

I've removed this field from the polkadot.json spec in the smoldot repo, could you maybe put it back as part of this PR?

@melekes melekes marked this pull request as draft March 8, 2022 11:30
assert codeSubstitutes field is being parsed correctly
@melekes melekes marked this pull request as ready for review March 8, 2022 14:09
@mergify mergify bot merged commit 703ec24 into main Mar 8, 2022
@mergify mergify bot deleted the anton/1844-backport-change-to-code_substitutes branch March 8, 2022 16:23
tomaka added a commit to tomaka/substrate-lite-1 that referenced this pull request Mar 16, 2022
mergify bot pushed a commit that referenced this pull request Mar 17, 2022
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.

Backport change to code_substitutes
2 participants