Skip to content

[FEATURE] Add DNS resolver to acquire seed peers #382

@alexeykiselev

Description

@alexeykiselev

Аbstract
A gowaves node knows IP addresses of seed nodes (initial nodes to connect to) from the built-in configuration. Also the initial nodes could be provided by the command line parameter -peers. It seems better to replace or the built-in seed peers with the DNS record lookup.

Specification
Built-in configuration should support domain names along with seed nodes IP addresses. Those domain names should be resolved to underlying IP addresses and those addresses should be treated as usual seed nodes IP addresses.
The argument of -peers command line parameter should be parsed the same way as built-in configuration.

Backwards Compatibility
Configuration and -peers command line parameter should support IP addresses passing for backward compatibility.

Examples and Implementation
Bitcoin operates the same way.
https://github.com/btcsuite/btcd/blob/535f25593d47297f2c7f27fac7725c3b9b05727d/connmgr/seed.go#L33

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions