Skip to content
Open
Changes from all commits
Commits
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
4 changes: 1 addition & 3 deletions crates/net/p2p/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ pub async fn start_p2p(
// Taken from ream
.max_transmit_size(MAX_COMPRESSED_PAYLOAD_SIZE)
.max_messages_per_rpc(Some(500))
.validate_messages()
.allow_self_origin(true)
.flood_publish(false)
.idontwant_message_size_threshold(1000)
.build()
.expect("invalid gossipsub config");
Expand Down Expand Up @@ -155,7 +153,7 @@ pub async fn start_p2p(
.listen_on(addr)
.expect("failed to bind gossipsub listening address");

let network = "devnet3";
let network = "devnet0";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoded network name

The network identifier is hardcoded as "devnet0" (previously "devnet3"). This means every devnet migration requires a code change and rebuild. Consider making this configurable (e.g., via CLI argument, environment variable, or config file) so that the binary can be reused across devnets without source changes.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: crates/net/p2p/src/lib.rs
Line: 156

Comment:
**Hardcoded network name**

The network identifier is hardcoded as `"devnet0"` (previously `"devnet3"`). This means every devnet migration requires a code change and rebuild. Consider making this configurable (e.g., via CLI argument, environment variable, or config file) so that the binary can be reused across devnets without source changes.

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.


// Subscribe to block topic (all nodes)
let block_topic_str = format!("/leanconsensus/{network}/{BLOCK_TOPIC_KIND}/ssz_snappy");
Expand Down
Loading