Skip to content

Commit

Permalink
multistream: Dialer deny multiple /multistream/1.0.0 headers (#61)
Browse files Browse the repository at this point in the history
This PR ensures that the `/multistream/1.0.0` header can only be
received once during a protocol negotiation.
This is fixed for both the V1 and V1Lazy variations.


While at it, have added a few tests to check:
- protocol negotiation
- protocol negotiation failure due to unsupported protocols
- lazy protocol negotiation awaits protocol message before closing (to
be fixed by: #60)
- low level protocol listener that writes the expected messages
- low level protocol listener that submits multiple headers, both for V1
and V1 lazy

Closes: #59

cc @paritytech/networking

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
  • Loading branch information
lexnv authored Apr 24, 2024
1 parent 5aafb80 commit 2f5cfbc
Show file tree
Hide file tree
Showing 4 changed files with 457 additions and 22 deletions.
22 changes: 22 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ sc-network = "0.28.0"
sc-utils = "8.0.0"
serde_json = "1.0.108"
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
futures_ringbuf = "0.4.0"

[features]
custom_sc_network = []
Expand Down
Loading

0 comments on commit 2f5cfbc

Please sign in to comment.