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

Set protocolId for live networks #2659

Merged
merged 2 commits into from
Feb 19, 2024
Merged

Set protocolId for live networks #2659

merged 2 commits into from
Feb 19, 2024

Conversation

librelois
Copy link
Collaborator

@librelois librelois commented Feb 19, 2024

What does it do?

Set the protocolId field on the chain spec for live networks (moonbase-alpha, moonriver and moonbeam).

The current implementation of polkadot-sdk create 2 networks protocols that work both in parallel, one based on the genesis hash and another one based on the protocolId name.

The problem is that when the protocolId is not set, polkadot-sdk use the default value "sub", that is used by thousand of nodes on internet, and then we try to join this big worldwide useless network.

The goal of this PR is to reduce log noises and useless connection traffic by setting the protocolId to a different value.

What important points reviewers should know?

Is there something left for follow-up PRs?

What alternative implementations were considered?

Are there relevant PRs or issues in other repositories (Substrate, Polkadot, Frontier, Cumulus)?

What value does it bring to the blockchain users?

@librelois librelois added B5-clientnoteworthy Changes should be mentioned in any downstream projects' release notes D3-trivial PR contains trivial changes in a runtime directory that do not require an audit not-breaking Does not need to be mentioned in breaking changes labels Feb 19, 2024
@crystalin
Copy link
Collaborator

We should change the alphanet relay too

@librelois librelois mentioned this pull request Feb 19, 2024
12 tasks
@librelois librelois merged commit 6c05c01 into master Feb 19, 2024
27 checks passed
@librelois librelois deleted the elois-protocol-id branch February 19, 2024 13:23
Copy link
Contributor

Coverage Report

@@                  Coverage Diff                  @@
##           master   elois-protocol-id      +/-   ##
=====================================================
+ Coverage   74.14%              80.47%   +6.33%     
+ Files         223                 292      +69     
+ Lines       71483               93149   +21666     
=====================================================
+ Hits        52995               74959   +21964     
- Misses      18488               18190     -298     
Files Changed Coverage
/client/rpc/finality/src/lib.rs 100.00% (+100.00%) 🔼
/client/rpc/manual-xcm/src/lib.rs 84.62% (+84.62%) 🔼
/client/rpc/txpool/src/lib.rs 65.38% (+65.38%) 🔼
/client/rpc-core/txpool/src/lib.rs 100.00% (+100.00%) 🔼
/client/rpc-core/txpool/src/types/content.rs 70.37% (+70.37%) 🔼
/client/rpc-core/txpool/src/types/inspect.rs 88.89% (+88.89%) 🔼
/client/rpc-core/txpool/src/types/mod.rs 100.00% (+100.00%) 🔼
/client/vrf/src/lib.rs 96.00% (+96.00%) 🔼
/node/cli-opt/src/account_key.rs 32.79% (+1.64%) 🔼
/node/cli-opt/src/lib.rs 48.00% (+48.00%) 🔼
/pallets/asset-manager/src/lib.rs 83.90% (+7.64%) 🔼
/pallets/asset-manager/src/mock.rs 93.81% (-4.09%) 🔽
/pallets/asset-manager/src/tests.rs 100.00% (+0.21%) 🔼
/pallets/erc20-xcm-bridge/src/erc20_matcher.rs 97.65% (+4.88%) 🔼
/pallets/erc20-xcm-bridge/src/lib.rs 12.16% (+3.26%) 🔼
/pallets/erc20-xcm-bridge/src/mock.rs 4.51% (+3.55%) 🔼
/pallets/erc20-xcm-bridge/src/xcm_holding_ext.rs 94.87% (+13.67%) 🔼
/pallets/ethereum-xcm/src/lib.rs 84.78% (+2.69%) 🔼
/pallets/ethereum-xcm/src/mock.rs 39.17% (+6.88%) 🔼
/pallets/ethereum-xcm/src/tests/v1/eip1559.rs 99.42% (+0.01%) 🔼
/pallets/ethereum-xcm/src/tests/v1/eip2930.rs 99.44% (+0.01%) 🔼
/pallets/moonbeam-lazy-migrations/src/lib.rs 91.67% (+1.67%) 🔼
/pallets/moonbeam-lazy-migrations/src/mock.rs 18.75% (+13.88%) 🔼
/pallets/moonbeam-orbiters/src/lib.rs 74.19% (+4.39%) 🔼
/pallets/moonbeam-orbiters/src/mock.rs 97.21% (-1.98%) 🔽
/pallets/moonbeam-orbiters/src/types.rs 64.65% (-0.61%) 🔽
/pallets/moonbeam-xcm-benchmarks/src/weights/fungible.rs 24.24% (+24.24%) 🔼
/pallets/moonbeam-xcm-benchmarks/src/weights/generic.rs 2.96% (+2.96%) 🔼
/pallets/moonbeam-xcm-benchmarks/src/weights/mod.rs 13.11% (+13.11%) 🔼
/pallets/parachain-staking/src/auto_compound.rs 95.67% (+0.03%) 🔼
/pallets/parachain-staking/src/delegation_requests.rs 91.94% (+0.02%) 🔼
/pallets/parachain-staking/src/inflation.rs 87.50% (+1.52%) 🔼
/pallets/parachain-staking/src/lib.rs 90.62% (+0.38%) 🔼
/pallets/parachain-staking/src/mock.rs 99.42% (+0.14%) 🔼
/pallets/parachain-staking/src/set.rs 40.74% (+0.74%) 🔼
/pallets/parachain-staking/src/tests.rs 91.59% (+0.02%) 🔼
/pallets/parachain-staking/src/types.rs 77.91% (+0.56%) 🔼
/pallets/proxy-genesis-companion/src/lib.rs 81.82% (+24.68%) 🔼
/pallets/proxy-genesis-companion/src/mock.rs 27.68% (+19.70%) 🔼
/pallets/xcm-transactor/src/encode.rs 100.00% (+9.68%) 🔼
/pallets/xcm-transactor/src/lib.rs 88.48% (+2.84%) 🔼
/pallets/xcm-transactor/src/mock.rs 92.08% (-2.96%) 🔽
/precompiles/assets-erc20/src/mock.rs 68.85% (+58.90%) 🔼
/precompiles/author-mapping/src/mock.rs 18.28% (+12.57%) 🔼
/precompiles/balances-erc20/src/mock.rs 97.33% (-2.27%) 🔽
/precompiles/batch/src/mock.rs 98.88% (-0.80%) 🔽
/precompiles/call-permit/src/lib.rs 97.84% (+0.01%) 🔼
/precompiles/call-permit/src/mock.rs 23.27% (+17.27%) 🔼
/precompiles/collective/src/mock.rs 94.26% (-2.60%) 🔽
/precompiles/conviction-voting/src/lib.rs 93.40% (-0.01%) 🔽
/precompiles/conviction-voting/src/mock.rs 93.33% (-3.72%) 🔽
/precompiles/crowdloan-rewards/src/mock.rs 98.07% (-1.10%) 🔽
/precompiles/crowdloan-rewards/src/tests.rs 98.48% (+0.01%) 🔼
/precompiles/gmp/src/mock.rs 8.35% (+2.73%) 🔼
/precompiles/identity/src/mock.rs 97.09% (-1.93%) 🔽
/precompiles/pallet-democracy/src/mock.rs 97.96% (-1.06%) 🔽
/precompiles/pallet-democracy/src/tests.rs 89.33% (+0.04%) 🔼
/precompiles/parachain-staking/src/mock.rs 97.81% (-1.04%) 🔽
/precompiles/precompile-registry/src/mock.rs 24.52% (+18.36%) 🔼
/precompiles/preimage/src/mock.rs 97.63% (-1.72%) 🔽
/precompiles/proxy/src/mock.rs 94.14% (-3.72%) 🔽
/precompiles/proxy/src/tests.rs 96.81% (+0.02%) 🔼
/precompiles/randomness/src/mock.rs 95.48% (-2.90%) 🔽
/precompiles/referenda/src/mock.rs 97.52% (-1.00%) 🔽
/precompiles/relay-encoder/src/mock.rs 8.94% (+3.69%) 🔼
/precompiles/utils/src/precompile_set.rs 77.27% (+16.21%) 🔼
/precompiles/utils/src/solidity/codec/xcm.rs 68.09% (+0.14%) 🔼
/precompiles/utils/src/testing/modifier.rs 88.31% (+0.64%) 🔼
/precompiles/utils/tests-external/lib.rs 49.15% (+15.93%) 🔼
/precompiles/xcm-transactor/src/mock.rs 93.01% (-2.50%) 🔽
/precompiles/xcm-utils/src/lib.rs 89.34% (+0.82%) 🔼
/precompiles/xcm-utils/src/mock.rs 95.67% (-1.17%) 🔽
/precompiles/xtokens/src/mock.rs 23.72% (+7.47%) 🔼
/precompiles/xtokens/src/tests.rs 99.53% (+0.01%) 🔼
/primitives/account/src/lib.rs 63.71% (-0.52%) 🔽
/primitives/ext/src/lib.rs 48.28% (+3.45%) 🔼
/primitives/rpc/debug/src/lib.rs 84.85% (+84.85%) 🔼
/primitives/rpc/txpool/src/lib.rs 83.33% (+83.33%) 🔼
/primitives/xcm/src/asset_id_conversions.rs 66.67% (+66.67%) 🔼
/primitives/xcm/src/ethereum_xcm.rs 94.87% (+1.80%) 🔼
/primitives/xcm/src/fee_handlers.rs 98.42% (+2.85%) 🔼
/primitives/xcm/src/origin_conversion.rs 74.07% (+74.07%) 🔼
/runtime/common/src/migrations.rs 67.63% (+67.63%) 🔼
/runtime/common/src/weights/pallet_assets.rs 9.04% (+9.04%) 🔼
/runtime/common/src/weights/pallet_author_mapping.rs 80.00% (+80.00%) 🔼
/runtime/common/src/weights/pallet_balances.rs 12.05% (+12.05%) 🔼
/runtime/common/src/weights/pallet_collective.rs 11.25% (+11.25%) 🔼
/runtime/common/src/weights/pallet_crowdloan_rewards.rs 66.18% (+66.18%) 🔼
/runtime/common/src/weights/pallet_moonbeam_orbiters.rs 9.26% (+9.26%) 🔼
/runtime/common/src/weights/pallet_parachain_staking.rs 19.83% (+19.83%) 🔼
/runtime/common/src/weights/pallet_utility.rs 44.00% (+44.00%) 🔼
/runtime/common/src/weights/pallet_xcm_transactor.rs 11.90% (+11.90%) 🔼
/runtime/evm_tracer/src/lib.rs 65.96% (+65.96%) 🔼

Coverage generated Mon Feb 19 13:47:59 UTC 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B5-clientnoteworthy Changes should be mentioned in any downstream projects' release notes D3-trivial PR contains trivial changes in a runtime directory that do not require an audit not-breaking Does not need to be mentioned in breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants