cloudhead/nakamoto

Support service bit filtering

Open

#50 创建于 2021年9月18日

在 GitHub 查看
 (0 评论) (1 反应) (0 负责人)Rust (63 fork)github user discovery
good first issuehelp wanted

仓库指标

Star
 (390 star)
PR 合并指标
 (PR 指标待抓取)

描述

To have a higher chance to connect to peers with NODE_COMPACT_FILTERS support, we could use the service bit filtering functionality of DNS seeds.

This is not a very well documented feature, but there is some information here: https://bitcoin.stackexchange.com/questions/60373/dns-seeder-options

The filter we'd be interested in is NODE_NETWORK | NODE_COMPACT_FILTERS, so 1 << 0 | 1 << 6 = 65.

Since not all seeds support this functionality, we should fall back on a regular DNS query if we're unable to retrieve addresses from the seeds.

贡献者指南