Conversation
Co-authored-by: Ethan Cemer <tylercemer@gmail.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 423af7bf75
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // NOTE: 24 is somewhat arbitrary and should be tuned in the future if | ||
| // necessary. See <https://github.com/paritytech/substrate/pull/6080> | ||
| .with_per_connection_event_buffer_size(24) | ||
| .with_max_negotiating_inbound_streams(2048) |
There was a problem hiding this comment.
Keep inbound stream negotiation limit at bootnode-safe value
The swarm setup now hardcodes .with_max_negotiating_inbound_streams(2048), which reverts the previously raised limit used to absorb heavy concurrent inbound substream opens on busy nodes. In high-peer-count environments (especially bootnodes handling many simultaneous DHT/sync/notification negotiations), this lower cap can cause negotiations to be dropped or delayed, leading to intermittent discovery/sync instability under load.
Useful? React with 👍 / 👎.
|
|
||
| /// Check if a CID is supported by the bitswap protocol. | ||
| pub fn is_cid_supported(c: &Cid) -> bool { | ||
| c.version() != CidVersion::V0 && c.hash().size() == 32 |
There was a problem hiding this comment.
Restrict bitswap CIDs to Blake2b multihash
is_cid_supported now accepts any non-v0 CID with a 32-byte digest, but this handler still interprets the digest bytes as a Substrate transaction hash and (when ipfs_server is enabled) returns payload/presence using the caller-provided multihash metadata. A peer can wrap a known tx hash in an unsupported multihash code and receive protocol-inconsistent bitswap responses, so the multihash code check should remain constrained to Blake2b-256.
Useful? React with 👍 / 👎.
No description provided.