Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(net): Drop Firo cryptocurrency nodes from Zebra's address book, because they are not compatible with Zcash #6398

Merged
merged 1 commit into from
Mar 24, 2023
Merged
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
11 changes: 8 additions & 3 deletions zebra-network/src/peer/priority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,14 @@ fn address_is_valid_for_outbound_connections(
return Err(
"invalid peer port: port is for Regtest, but Zebra does not support that network",
);
} else if [16125, 26125].contains(&peer_addr.port()) {
// 16125/26125 is used by Flux/ZelCash, which uses the same network magic numbers as Zcash,
// so we have to reject it by port
} else if [16125, 26125, 8168, 18168, 38168].contains(&peer_addr.port()) {
// 16125/26125 are used by Flux/ZelCash, which uses the same network magic numbers as Zcash,
// so we have to reject it by port:
// - https://github.com/RunOnFlux/fluxd/blob/master/src/zelnode/zelnodeconfig.cpp#L76
// - https://github.com/RunOnFlux/fluxd/blob/master/src/init.cpp#L409
// 8168/18168/38168 are used by Firo/Zcoin, which uses the same network magic numbers as Zcash,
// so we have to reject it by port:
// - https://github.com/firoorg/firo/blob/master/src/chainparamsseeds.h
return Err("invalid peer port: port is for a non-Zcash network");
}
}
Expand Down