Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

Output ENR text representation in admin.nodeInfo RPC #5622

@gumb0

Description

@gumb0

See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-778.md#text-encoding for the relevant part of ENR spec.

  1. Adapt base64 encoding/decoding functions to support URL-safe encoding (basically use - instead of +, _ instead of / and don't pad with =)
    https://github.com/ethereum/aleth/blob/master/libdevcore/Base64.h

  2. Add method to ENR class returning string with text form of ENR (serilize to RLP and base64-encode it)

  3. Add enr field in the output of admin_net_nodeInfo

    Json::Value AdminNet::admin_net_nodeInfo(std::string const& _session)

    You'll need to extend dev::p2p::NodeInfo struct for that and fill it in the method Host::nodeInfo() with Host::enr().

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions