Skip to content

Acquire Internet IP from Libp2p API #5368

Description

@317787106

Rationale

At present, java-tron clients obtain external IPv4 and IPv6 through a method that accesses two certain URLs, it’s the same as libp2p. Java-tron executes this method first, and libp2p executes later when being initialized. This time-consuming method has been executed twice and may delay the startup speed of the java-tron clients.

Implementation

  1. When java-tron clients start, it obtains the external IP through Libp2p’s method/api directly.
  2. When initializing libp2p, java-tron assigns two IPs to the related fields of P2pConfig, and Libp2p does not need to acquire the external IP again. To meet this requirement we need to add a new constructor method for libp2p.

Compatibility

There is no backward compatibility concern for this issue.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions