Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

[zombinet] initial implementation of zombienet backchannel #4377

Merged
merged 26 commits into from
Jan 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f9ef6b9
initial impl zombienet backchannel
pepoviola Nov 25, 2021
ce50d2f
clean code
pepoviola Nov 25, 2021
46c25b3
changes from feedback
pepoviola Nov 28, 2021
6a3b7c6
fmt and typo
pepoviola Nov 28, 2021
e6f73a1
remove default comment
pepoviola Nov 28, 2021
b3be116
refactor to use ws tx/rx
pepoviola Dec 7, 2021
b3eed29
fmt
pepoviola Dec 7, 2021
91b6975
Merge branch 'master' into javier-zombienet-backchannel
pepoviola Dec 7, 2021
5953051
derive Clone for ZombienetBackchannel
pepoviola Dec 7, 2021
e340d32
Revert "derive Clone for ZombienetBackchannel"
pepoviola Dec 7, 2021
0ccb705
change tracing prefix value
pepoviola Dec 9, 2021
39dae39
Merge branch 'master' into javier-zombienet-backchannel
pepoviola Dec 14, 2021
f3014e7
refactor backchannel
pepoviola Dec 14, 2021
1558d42
Update node/zombienet-backchannel/Cargo.toml
pepoviola Dec 14, 2021
bd729ae
add docs to broadcaster methods
pepoviola Dec 14, 2021
486794f
add more docs
pepoviola Dec 14, 2021
ed47fee
Merge branch 'master' into javier-zombienet-backchannel
pepoviola Dec 23, 2021
16a7b99
fmt
pepoviola Dec 23, 2021
c83269d
Merge branch 'master' into javier-zombienet-backchannel
pepoviola Jan 6, 2022
1e001cd
fix spellcheck
pepoviola Jan 6, 2022
d1e4223
update lock file
pepoviola Jan 6, 2022
1a38285
remove unused
pepoviola Jan 6, 2022
e4d9dbc
fmt
pepoviola Jan 6, 2022
c5a0791
Merge branch 'master' into javier-zombienet-backchannel
pepoviola Jan 7, 2022
9cda227
changes from feedback
pepoviola Jan 7, 2022
d14b7c8
fmt
pepoviola Jan 7, 2022
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
210 changes: 209 additions & 1 deletion 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ members = [
"node/test/polkadot-simnet/common",
"node/test/polkadot-simnet/node",
"node/test/polkadot-simnet/test",
"node/zombienet-backchannel",
"parachain/test-parachains",
"parachain/test-parachains/adder",
"parachain/test-parachains/adder/collator",
Expand Down
22 changes: 22 additions & 0 deletions node/zombienet-backchannel/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[package]
name = "zombienet-backchannel"
description = "Zombienet backchannel to notify test runner and coordinate with malus actors."
license = "GPL-3.0-only"
version = "0.9.13"
authors = ["Parity Technologies <[email protected]>"]
edition = "2021"
readme = "README.md"
publish = false

[dependencies]
tokio = { version = "1.0.0", default-features = false, features = ["macros", "net", "rt-multi-thread", "sync"] }
url = "2.0.0"
tokio-tungstenite = "0.16"
futures-util = "0.3.18"
lazy_static = "1.4.0"
parity-scale-codec = { version = "2.3.1", features = ["derive"] }
reqwest = "0.11"
thiserror = "1.0.30"
tracing = "0.1.26"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1"
39 changes: 39 additions & 0 deletions node/zombienet-backchannel/src/errors.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright 2021 Parity Technologies (UK) Ltd.
// This file is part of Polkadot.

// Polkadot is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Polkadot is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.

//! Polkadot Zombienet Backchannel error definitions.

#[derive(Debug, thiserror::Error)]
#[allow(missing_docs)]
pub enum BackchannelError {
#[error("Error connecting websocket server")]
CantConnectToWS,

#[error("Backchannel not initialized yet")]
Uninitialized,

#[error("Backchannel already initialized")]
AlreadyInitialized,

#[error("Error sending new value to backchannel")]
SendItemFail,

#[error("Invalid host for connection backchannel")]
InvalidHost,

#[error("Invalid port for connection backchannel")]
InvalidPort,
}
Loading