Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
d4c426a
[ci] Enable zombienet jobs in PRs (#2361)
alvicsam Nov 16, 2023
02e8061
westend: remove SessionKeys migration already applied on-chain (#2363)
acatangiu Nov 16, 2023
5e98803
implementers-guide: update github link (#2368)
Nov 16, 2023
4ac2db8
Fix Typo: `PalletXcmExtrinsicsBenchmark` (#2354)
joepetrowski Nov 16, 2023
596088a
add pallet nomination-pools versioned migration to kitchensink (#2167)
brunopgalvao Nov 17, 2023
b85c64a
fix typo (#2377)
cuteolaf Nov 17, 2023
20723ea
bump zombienet version `v1.3.80` (#2376)
pepoviola Nov 17, 2023
2e001de
[NPoS] Check if staker is exposed in paged exposure storage entries (…
Ank4n Nov 17, 2023
3ab2bc9
Beefy: small fixes (#2378)
serban300 Nov 17, 2023
5007e2d
crypto: `lazy_static` removed, light parser for address URI added (#2…
michalkucharczyk Nov 17, 2023
490fb66
[trivial] asset-hubs runtimes: fix incorrect doc-comments (#2384)
acatangiu Nov 17, 2023
079b14f
Do not panic if the `fdlimit` call to increase the file descriptor li…
nazar-pc Nov 17, 2023
0385902
Relax `force_default_xcm_version` for testnet system parachains (#2385)
bkontur Nov 17, 2023
9e34163
Make collator RPC mode non-experimental (#2381)
skunert Nov 17, 2023
82912ac
Fix migrations and add CI check for new system chains (#2336)
liamaharon Nov 17, 2023
1d1c371
Bump bandersnatch VRF revision (#2389)
davxy Nov 17, 2023
794ee98
Bump secp256k1 from 0.24.3 to 0.28.0 (#2357)
dependabot[bot] Nov 18, 2023
b585893
Preserve artifact cache unless stale (#1918)
eagr Nov 19, 2023
aa5705b
Pools: Add `MaxUnbonding` to metadata (#2397)
Nov 20, 2023
b35300c
Bump docker/build-push-action from 5.0.0 to 5.1.0 (#2404)
dependabot[bot] Nov 20, 2023
ede4a36
remove retry from backers on failed candidate validation (#2182)
jpserrat Nov 20, 2023
126f64a
bump zombienet version `v1.3.82` (#2396)
pepoviola Nov 21, 2023
2fd8c51
`chain-spec-builder`: cleanup (#2174)
michalkucharczyk Nov 21, 2023
0619049
Refactor `ValidationError` (#2406)
eagr Nov 21, 2023
40afc77
Add output positional arg to undying-collator cli (#2375)
pepoviola Nov 21, 2023
552be48
PVF worker: switch on seccomp networking restrictions (#2221)
mrcnski Nov 21, 2023
b25d29a
cumulus-consensus-common: block import: `delayed_best_block` flag add…
michalkucharczyk Nov 21, 2023
b3841b6
Different XCM builders, default one requires fee payment (#2253)
franciscoaguirre Nov 21, 2023
f5ad32e
added action to pass review bot on merge queue (#2414)
Bullrich Nov 21, 2023
50811d6
Update tick collator for async backing (#1497)
Sophia-Gold Nov 21, 2023
2183669
cumulus-test-service: block import fix (#2430)
michalkucharczyk Nov 21, 2023
7a32f4b
Deprecate `RewardDestination::Controller` (#2380)
Nov 22, 2023
a9ba1e5
Revert docker images tag naming to <prnum-shortsha> (#2434)
alvicsam Nov 22, 2023
98f9e2e
Fixes import path in benchmark macro (#2437)
gupnik Nov 22, 2023
408af9b
PVF: Fix unshare "no such file or directory" error (#2426)
mrcnski Nov 22, 2023
0d6dcb3
Make TypeInfo for SkipCheckIfFeeless transparent, too (#2449)
jsdw Nov 22, 2023
0956357
work with additional key values (#1757)
girazoki Nov 22, 2023
4987488
polkadot-node-subsystems: `ChainApiBackend` added + `polkadot-debug` …
michalkucharczyk Nov 22, 2023
ec18933
Remove `#[macro_use]` annotation from `mod service` in all nodes. (#2…
JoshOrndorff Nov 22, 2023
2d09e83
Add `on-chain-release-build` feature for Collectives Westend (#2463)
liamaharon Nov 23, 2023
12062f6
CI: Disable runtime upgrade spec name check on Westend Asset Hub and …
liamaharon Nov 23, 2023
21f1811
sp-api: Move macro related re-exports to `__private` (#2446)
bkchr Nov 23, 2023
19c05e8
Fix trait imports from sp-api (#2472)
andresilva Nov 23, 2023
c29b74d
Amend staking docs to account for state of controller deprecation (#2…
Nov 23, 2023
a00a767
Make publish CI consistant and bump to v0.3.0 (#2453)
Morganamilo Nov 24, 2023
4163152
pallet-xcm: ensure xcm outcome is always complete, revert effects oth…
xlc Nov 24, 2023
f086d54
pallet-staking: Converts all math operations to safe (#2435)
gpestana Nov 24, 2023
e3242d2
Adapt test worker to profile flag (#2450)
eagr Nov 24, 2023
471eafc
Disable any peer connections for parachain nodes in pov-recovery zom…
skunert Nov 24, 2023
7554f53
Remove dmp-queue pallet from Rococo Asset Hub and Bridge Hub (#2483)
liamaharon Nov 24, 2023
891628a
relay-chain-consensus: set a fork_choice (#2462)
michalkucharczyk Nov 24, 2023
803ea76
Improve `UnpinHandleInner` debug (#2485)
bkchr Nov 24, 2023
07ea6da
Derive `MaxEncodedLen` on `SlotDuration` (#2484)
nazar-pc Nov 24, 2023
90488ff
pallet-xcm: fix benchmarking (#2489)
acatangiu Nov 24, 2023
8af61d0
[NPoS] Use EraInfo to manipulate exposure in fast-unstake tests (#2459)
Ank4n Nov 24, 2023
d07186b
Remove `RuntimeApi` dependency on system parachain runtime code (#2455)
seadanda Nov 24, 2023
81638d4
Add missing workspace members (#2491)
ggwpez Nov 24, 2023
63f1210
bump zombienet version `v1.3.83` (#2492)
pepoviola Nov 24, 2023
5e27342
Do not pollute global base path with export genesis/wasm (#2487)
bkchr Nov 24, 2023
ffc64fd
Zombienet: add polkadot-debug image publish as needs for cumulus test…
pepoviola Nov 24, 2023
d5d15a1
polkadot-parachain: one chain-spec for all (#2457)
michalkucharczyk Nov 25, 2023
73ff1c3
Update documentation for SafeMode and TxPause Pallets (#2413)
wilwade Nov 25, 2023
cfa19c3
PVF: remove audit log access (#2461)
mrcnski Nov 25, 2023
4f8048b
New runtime `spec_version` format + backport of the bump to 1.4.0 (#2…
chevdor Nov 27, 2023
dc69dbb
Zombienet tests - disputes on finalized blocks (#2184)
Overkillus Nov 27, 2023
0317501
Decomissioned PR-Custom-Review (#2503)
Bullrich Nov 27, 2023
2610450
Build the standard library crates when building the runtimes (#2217)
koute Nov 27, 2023
4298bc6
asset-hub-westend-integration-tests: add more asset transfers tests (…
acatangiu Nov 27, 2023
fd1ed40
Remove the timestamp handler (#2506)
rcny Nov 27, 2023
838a534
Staking: `chill_other` takes stash instead of controller (#2501)
Nov 27, 2023
db29099
CI: Fix `build-and-attach-release-runtimes.yml` (#2471)
liamaharon Nov 28, 2023
2ac23d2
Fixes cumulus README instructions (#2442)
gpestana Nov 28, 2023
7506271
Pools: Add ability to configure commission claiming permissions (#2474)
Nov 28, 2023
0f7ffc6
Added NetworkId::PolkadotBulletin variant (#2517)
svyatonik Nov 28, 2023
58a1f9c
polkadot: disable block authoring backoff on production networks (#2510)
andresilva Nov 28, 2023
6dc3e6c
Set `frame_system::LastRuntimeUpgrade` after running `try-runtime` mi…
liamaharon Nov 28, 2023
6a417eb
Increase `cargo-check-each-crate-macos` timeout (#2519)
rcny Nov 28, 2023
cd8741c
Moves all test runtimes to use `derive_impl` (#2409)
gupnik Nov 28, 2023
dbd8d20
PVF: Add test instructions (#2058)
mrcnski Nov 28, 2023
f01781a
Remove `wasm-builder`'s README (#2525)
koute Nov 28, 2023
c5f211d
Remove `im-online` pallet from Rococo and Westend (#2265)
s0me0ne-unkn0wn Nov 28, 2023
b0b4451
polkadot: remove grandpa pause support (#2511)
andresilva Nov 28, 2023
ec3a61e
Remove pov-recovery race condition/Improve zombienet test (#2526)
skunert Nov 28, 2023
e71c484
Rework the event system of `sc-network` (#1370)
altonen Nov 28, 2023
aada961
[ci] Run gitspiegel trigger with merge conflicts (#2531)
alvicsam Nov 28, 2023
8201793
Remove long deprecated `AllPalletsWithoutSystemReversed` (#2509)
skunert Nov 28, 2023
a9aa2d1
Remove `dmp_queue` pallet from Westend SP runtimes (#2516)
liamaharon Nov 29, 2023
1d5d4a4
Enable parallel key scraping (#1985)
eagr Nov 29, 2023
39d6c95
substrate-node: `NativeElseWasmExecutor` is no longer used (#2521)
michalkucharczyk Nov 29, 2023
63ac247
Remove system parachains Polkadot and Kusama runtimes (#1737)
seadanda Nov 29, 2023
f2fe6a4
Improve `CodeExecutor` (#2358)
yjhmelody Nov 29, 2023
19f665f
add Rotko common good parachain nodes (#2533)
hitchhooker Nov 29, 2023
8f03570
Bump fs4 from 0.6.6 to 0.7.0 (#1844)
dependabot[bot] Nov 29, 2023
d3d301f
ParachainHost: No need to be generic over the block or hash type (#2537)
bkchr Nov 29, 2023
2858cbc
Adding LuckyFriday's Bootnodes per IBP Application (#2538)
paradox-tt Nov 29, 2023
08f29af
sp-api: Sprinkle some `automatically_derived` attributes
bkchr Nov 29, 2023
eb46b99
Disable trace-level logging from the `test-linux-stable-int` (#2546)
rcny Nov 29, 2023
ecdf343
chainHead: Backport error codes from spec (#2539)
lexnv Nov 29, 2023
c68ce6e
state-db: log_target usage fixed (#2547)
michalkucharczyk Nov 29, 2023
f69069b
Parachain Template: Prune `AuxStore` bound and corresponding crate de…
JoshOrndorff Nov 29, 2023
2135fa8
Contracts: use compiled rust tests (#2347)
pgherveou Nov 29, 2023
e41a0e7
upgraded review bot to 2.3.0 (#2549)
Bullrich Nov 30, 2023
180a6ad
Register metrics for the notification handles (#2562)
altonen Nov 30, 2023
eaf1bc5
Introduce Polkadot-Sdk `developer_hub` (#2102)
kianenigma Nov 30, 2023
64361ac
Withdraw Assets Before Checking Out in `OnReapIdentity` impl (#2552)
joepetrowski Nov 30, 2023
9a650c4
PoV Reclaim (Clawback) Node Side (#1462)
skunert Nov 30, 2023
c30ed6f
Add missing glossary to ref docs (#2572)
juangirini Nov 30, 2023
6742aba
Bump the known_good_semver group with 2 updates (#2570)
dependabot[bot] Nov 30, 2023
1f2ccae
Remove dependency on rand's SliceRandom shuffle implementation in gos…
rphmeier Nov 30, 2023
5213263
Add `recorded_keys` function to get recorded keys from the proof reco…
ParthDesai Dec 1, 2023
4a293bc
Enforce consistent and correct toml formatting (#2518)
liamaharon Dec 1, 2023
dfd7b15
Contracts: make benchmark dependencies optional in `std` feature (#2576)
ascjones Dec 1, 2023
7f0beaf
Bump proc-macro-crate from 1.3.1 to 2.0.0 (#2557)
dependabot[bot] Dec 1, 2023
095f4bd
Sassafras Consensus Pallet (#1577)
davxy Dec 1, 2023
87a73e7
Bump the known_good_semver group with 1 update (#2575)
dependabot[bot] Dec 1, 2023
5789d6a
sassafras: taplo happy (#2583)
michalkucharczyk Dec 1, 2023
ecfdb2b
Bandersnatch: ring-context generic over domain size (#2581)
davxy Dec 1, 2023
f5051c8
Removed instruction to call init.sh when buidling from source (#2580)
jonathanudd Dec 2, 2023
707dbcc
impl guide: update PVF host page; add diagrams (#2579)
mrcnski Dec 4, 2023
35c39c9
Fixes runtime type with doc parsing in derive_impl (#2594)
gupnik Dec 4, 2023
1266de3
Cleanup XCMP `QueueConfigData` (#2142)
serban300 Dec 4, 2023
ae4d24c
Merge branch 'master' into update-snowbridge
Dec 5, 2023
b03a1e7
fix tests
Dec 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rework the event system of sc-network (paritytech#1370)
This commit introduces a new concept called `NotificationService` which
allows Polkadot protocols to communicate with the underlying
notification protocol implementation directly, without routing events
through `NetworkWorker`. This implies that each protocol has its own
service which it uses to communicate with remote peers and that each
`NotificationService` is unique with respect to the underlying
notification protocol, meaning `NotificationService` for the transaction
protocol can only be used to send and receive transaction-related
notifications.

The `NotificationService` concept introduces two additional benefits:
  * allow protocols to start using custom handshakes
  * allow protocols to accept/reject inbound peers

Previously the validation of inbound connections was solely the
responsibility of `ProtocolController`. This caused issues with light
peers and `SyncingEngine` as `ProtocolController` would accept more
peers than `SyncingEngine` could accept which caused peers to have
differing views of their own states. `SyncingEngine` would reject excess
peers but these rejections were not properly communicated to those peers
causing them to assume that they were accepted.

With `NotificationService`, the local handshake is not sent to remote
peer if peer is rejected which allows it to detect that it was rejected.

This commit also deprecates the use of `NetworkEventStream` for all
notification-related events and going forward only DHT events are
provided through `NetworkEventStream`. If protocols wish to follow each
other's events, they must introduce additional abtractions, as is done
for GRANDPA and transactions protocols by following the syncing protocol
through `SyncEventStream`.

Fixes paritytech#512
Fixes paritytech#514
Fixes paritytech#515
Fixes paritytech#554
Fixes paritytech#556

---
These changes are transferred from
paritytech/substrate#14197 but there are no
functional changes compared to that PR

---------

Co-authored-by: Dmitry Markin <[email protected]>
Co-authored-by: Alexandru Vasile <[email protected]>
  • Loading branch information
3 people authored Nov 28, 2023
commit e71c484d5bd12330e16f568ad582e1fc1c878669
6 changes: 6 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions cumulus/client/relay-chain-minimal-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ array-bytes = "6.1"
tracing = "0.1.37"
async-trait = "0.1.73"
futures = "0.3.28"
parking_lot = "0.12.1"

15 changes: 12 additions & 3 deletions cumulus/client/relay-chain-minimal-node/src/collator_overseer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.

use futures::{select, StreamExt};
use std::sync::Arc;
use parking_lot::Mutex;
use std::{collections::HashMap, sync::Arc};

use polkadot_availability_recovery::AvailabilityRecoverySubsystem;
use polkadot_collator_protocol::{CollatorProtocolSubsystem, ProtocolSide};
Expand All @@ -28,7 +29,7 @@ use polkadot_node_core_chain_api::ChainApiSubsystem;
use polkadot_node_core_prospective_parachains::ProspectiveParachainsSubsystem;
use polkadot_node_core_runtime_api::RuntimeApiSubsystem;
use polkadot_node_network_protocol::{
peer_set::PeerSetProtocolNames,
peer_set::{PeerSet, PeerSetProtocolNames},
request_response::{
v1::{self, AvailableDataFetchingRequest},
v2, IncomingRequestReceiver, ReqProtocolNames,
Expand All @@ -42,7 +43,7 @@ use polkadot_overseer::{
use polkadot_primitives::CollatorPair;

use sc_authority_discovery::Service as AuthorityDiscoveryService;
use sc_network::NetworkStateInfo;
use sc_network::{NetworkStateInfo, NotificationService};
use sc_service::TaskManager;
use sc_utils::mpsc::tracing_unbounded;

Expand Down Expand Up @@ -77,6 +78,8 @@ pub(crate) struct CollatorOverseerGenArgs<'a> {
pub req_protocol_names: ReqProtocolNames,
/// Peerset protocols name mapping
pub peer_set_protocol_names: PeerSetProtocolNames,
/// Notification services for validation/collation protocols.
pub notification_services: HashMap<PeerSet, Box<dyn NotificationService>>,
}

fn build_overseer(
Expand All @@ -94,13 +97,16 @@ fn build_overseer(
collator_pair,
req_protocol_names,
peer_set_protocol_names,
notification_services,
}: CollatorOverseerGenArgs<'_>,
) -> Result<
(Overseer<SpawnGlue<sc_service::SpawnTaskHandle>, Arc<BlockChainRpcClient>>, OverseerHandle),
RelayChainError,
> {
let spawner = SpawnGlue(spawner);
let network_bridge_metrics: NetworkBridgeMetrics = Metrics::register(registry)?;
let notification_sinks = Arc::new(Mutex::new(HashMap::new()));

let builder = Overseer::builder()
.availability_distribution(DummySubsystem)
.availability_recovery(AvailabilityRecoverySubsystem::for_collator(
Expand Down Expand Up @@ -131,13 +137,16 @@ fn build_overseer(
sync_oracle,
network_bridge_metrics.clone(),
peer_set_protocol_names.clone(),
notification_services,
notification_sinks.clone(),
))
.network_bridge_tx(NetworkBridgeTxSubsystem::new(
network_service,
authority_discovery_service,
network_bridge_metrics,
req_protocol_names,
peer_set_protocol_names,
notification_sinks,
))
.provisioner(DummySubsystem)
.runtime_api(RuntimeApiSubsystem::new(
Expand Down
14 changes: 9 additions & 5 deletions cumulus/client/relay-chain-minimal-node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use cumulus_relay_chain_rpc_interface::{RelayChainRpcClient, RelayChainRpcInterf
use network::build_collator_network;
use polkadot_network_bridge::{peer_sets_info, IsAuthority};
use polkadot_node_network_protocol::{
peer_set::PeerSetProtocolNames,
peer_set::{PeerSet, PeerSetProtocolNames},
request_response::{
v1, v2, IncomingRequest, IncomingRequestReceiver, Protocol, ReqProtocolNames,
},
Expand Down Expand Up @@ -175,10 +175,13 @@ async fn new_minimal_relay_chain(
let peer_set_protocol_names =
PeerSetProtocolNames::new(genesis_hash, config.chain_spec.fork_id());
let is_authority = if role.is_authority() { IsAuthority::Yes } else { IsAuthority::No };

for config in peer_sets_info(is_authority, &peer_set_protocol_names) {
net_config.add_notification_protocol(config);
}
let notification_services = peer_sets_info(is_authority, &peer_set_protocol_names)
.into_iter()
.map(|(config, (peerset, service))| {
net_config.add_notification_protocol(config);
(peerset, service)
})
.collect::<std::collections::HashMap<PeerSet, Box<dyn sc_network::NotificationService>>>();

let request_protocol_names = ReqProtocolNames::new(genesis_hash, config.chain_spec.fork_id());
let (collation_req_receiver_v1, collation_req_receiver_v2, available_data_req_receiver) =
Expand Down Expand Up @@ -218,6 +221,7 @@ async fn new_minimal_relay_chain(
collator_pair,
req_protocol_names: request_protocol_names,
peer_set_protocol_names,
notification_services,
};

let overseer_handle =
Expand Down
25 changes: 10 additions & 15 deletions cumulus/client/relay-chain-minimal-node/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ use sc_network::{
NetworkService,
};

use sc_network::config::FullNetworkConfiguration;
use sc_network::{config::FullNetworkConfiguration, NotificationService};
use sc_network_common::{role::Roles, sync::message::BlockAnnouncesHandshake};
use sc_service::{error::Error, Configuration, NetworkStarter, SpawnTaskHandle};
use sc_utils::mpsc::tracing_unbounded;

use std::{iter, sync::Arc};

Expand All @@ -45,7 +44,7 @@ pub(crate) fn build_collator_network(
Error,
> {
let protocol_id = config.protocol_id();
let block_announce_config = get_block_announce_proto_config::<Block>(
let (block_announce_config, _notification_service) = get_block_announce_proto_config::<Block>(
protocol_id.clone(),
&None,
Roles::from(&config.role),
Expand All @@ -69,8 +68,6 @@ pub(crate) fn build_collator_network(
let peer_store_handle = peer_store.handle();
spawn_handle.spawn("peer-store", Some("networking"), peer_store.run());

// RX is not used for anything because syncing is not started for the minimal node
let (tx, _rx) = tracing_unbounded("mpsc_syncing_engine_protocol", 100_000);
let network_params = sc_network::config::Params::<Block> {
role: config.role.clone(),
executor: {
Expand All @@ -86,7 +83,6 @@ pub(crate) fn build_collator_network(
protocol_id,
metrics_registry: config.prometheus_config.as_ref().map(|config| config.registry.clone()),
block_announce_config,
tx,
};

let network_worker = sc_network::NetworkWorker::new(network_params)?;
Expand Down Expand Up @@ -150,7 +146,7 @@ fn get_block_announce_proto_config<B: BlockT>(
best_number: NumberFor<B>,
best_hash: B::Hash,
genesis_hash: B::Hash,
) -> NonDefaultSetConfig {
) -> (NonDefaultSetConfig, Box<dyn NotificationService>) {
let block_announces_protocol = {
let genesis_hash = genesis_hash.as_ref();
if let Some(ref fork_id) = fork_id {
Expand All @@ -160,24 +156,23 @@ fn get_block_announce_proto_config<B: BlockT>(
}
};

NonDefaultSetConfig {
notifications_protocol: block_announces_protocol.into(),
fallback_names: iter::once(format!("/{}/block-announces/1", protocol_id.as_ref()).into())
.collect(),
max_notification_size: 1024 * 1024,
handshake: Some(NotificationHandshake::new(BlockAnnouncesHandshake::<B>::build(
NonDefaultSetConfig::new(
block_announces_protocol.into(),
iter::once(format!("/{}/block-announces/1", protocol_id.as_ref()).into()).collect(),
1024 * 1024,
Some(NotificationHandshake::new(BlockAnnouncesHandshake::<B>::build(
roles,
best_number,
best_hash,
genesis_hash,
))),
// NOTE: `set_config` will be ignored by `protocol.rs` as the block announcement
// protocol is still hardcoded into the peerset.
set_config: SetConfig {
SetConfig {
in_peers: 0,
out_peers: 0,
reserved_nodes: Vec::new(),
non_reserved_mode: NonReservedPeerMode::Deny,
},
}
)
}
1 change: 1 addition & 0 deletions polkadot/node/network/bridge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ pub(crate) enum WireMessage<M> {
ViewUpdate(View),
}

#[derive(Debug)]
pub(crate) struct PeerData {
/// The Latest view sent by the peer.
view: View,
Expand Down
Loading