[frame/im-online] remove network state from heartbeats (#14251)
* [frame/im-online] remove `external_addresses` from heartbeats Users should use DHT for discovering new nodes. The reason for adding external addresses was unstable work of authority discovery (see https://github.com/paritytech/substrate/issues/2719), which is now stable. Hence we can safely remove `external_addresses`. Refs https://github.com/paritytech/polkadot/issues/7181 * remove unused import * run benchmark * remove external_addresses from offchain NetworkState * add missing fn to TestNetwork * Revert "run benchmark" This reverts commit a282042c2d6bf8bae2c383f6e2699c3fe2970a3d. * update weights * address @bkchr comments * remove duplicate fn * cleanup benchmarking.rs * fix executor tests * remove peer_id from hearbeat as well https://github.com/paritytech/substrate/pull/14251#discussion_r1210887220 * remove MaxPeerDataEncodingSize * change storage value type to `()` https://github.com/paritytech/substrate/pull/14251#discussion_r1214268931 * scaffold storage migration * no need to check the type actually * remove unnecessary types from v0 mod * add a test for migration * expose Config types + pre_upgrade and post_upgrade working fn * fix test * replace dummy type with ConstU32 * add some comments to migration test * fix comment * respond to @bkchr comments * use BoundedOpaqueNetworkState::default intead of using default for each field
Showing
- substrate/bin/node/executor/tests/submit_transaction.rs 0 additions, 1 deletionsubstrate/bin/node/executor/tests/submit_transaction.rs
- substrate/bin/node/runtime/src/lib.rs 3 additions, 4 deletionssubstrate/bin/node/runtime/src/lib.rs
- substrate/client/offchain/src/api.rs 0 additions, 1 deletionsubstrate/client/offchain/src/api.rs
- substrate/frame/im-online/src/benchmarking.rs 3 additions, 14 deletionssubstrate/frame/im-online/src/benchmarking.rs
- substrate/frame/im-online/src/lib.rs 30 additions, 123 deletionssubstrate/frame/im-online/src/lib.rs
- substrate/frame/im-online/src/migration.rs 164 additions, 0 deletionssubstrate/frame/im-online/src/migration.rs
- substrate/frame/im-online/src/mock.rs 0 additions, 1 deletionsubstrate/frame/im-online/src/mock.rs
- substrate/frame/im-online/src/tests.rs 4 additions, 24 deletionssubstrate/frame/im-online/src/tests.rs
- substrate/frame/im-online/src/weights.rs 22 additions, 29 deletionssubstrate/frame/im-online/src/weights.rs
- substrate/frame/offences/benchmarking/src/mock.rs 0 additions, 1 deletionsubstrate/frame/offences/benchmarking/src/mock.rs
Please register or sign in to comment