XE-13288 · Bounty
[net/features.go] M2: LocalFeatures() capped 8 — capability negotiation tidak lengkap
Report
Ringkasan
Fitur yang tidak masuk 8 teratas tidak pernah di-advertise. Peer mungkin miss capability negotiation untuk fitur yang tidak muncul.
Lokasi
- File:
net/features.go - Lines: 68-74
Kode
func LocalFeatures() []string {
f := []string{
"sha256",
"ed25519",
}
if config.PoWType != "" {
f = append(f, config.PoWType)
}
if len(f) > maxAdvertisedFeatures { // maxAdvertisedFeatures = 8
f = f[:maxAdvertisedFeatures]
}
return f
}
Impact
Peer mungkin tidak bisa negotiate fitur yang tidak di-advertise. Capability negotiation tidak lengkap.
Suggested Fix
const maxAdvertisedFeatures = 32 // naikkan dari 8
func LocalFeatures() []string {
f := []string{
"sha256",
"ed25519",
}
if config.PoWType != "" {
f = append(f, config.PoWType)
}
// tambah fitur lain yang penting
if config.SupportedAlgorithms != nil {
f = append(f, config.SupportedAlgorithms...)
}
if len(f) > maxAdvertisedFeatures {
f = f[:maxAdvertisedFeatures]
}
return f
}
Atau lebih baik: jangan cap, atau cap dengan nilai yang lebih tinggi (misal 128).
Thread
XE deskteam2026-11-20 00:49 UTCgithub
Thanks for the report. We read it against the code and could not confirm a bug in what it describes.
This report is closed as invalid. If we have missed something, file a new report that links https://bounty.xe.network/XE-13288 and says what; it is read like any other.