Gitcoin is GDPR complaint. Learn more in
Gitcoin's Terms & Conditions.
Check out the Issue Explorer
Looking to fund some work? You can submit a new Funded Issue here.
Create a general internal API to support Network Address Translation (NAT) technologies in [Besu](https://github.com/hyperledger/besu/). The goal of this work is to offer developers a consistent API for performing NAT tasks so that I can abstractly add support for new NAT systems (e.g. Docker, Kubernetes, etc.) with a minimum amount of code changes. As a second NAT style, explicit configuration for all ports and IP addresses would be available.
See [“Add uPnP Support”](https://github.com/PegaSysEng/pantheon/issues/1120) task for additional content.
### Acceptance Criteria
* Based on the UPNP NAT code architect the internal APIs so that other NAT technologies can use the same internal APIs (for example, administrator configured port forwarding or Docker/Container address/port mapping).
* Java APIs to determine if a node is in a NAT environment, and then identify the kind of NAT environment.
* Java APIs to determine determine local IP address and ports as well as external IP addresses and ports.
* Java APIs to enable/disable the NAT port forwarding if the environment requires it, as well as APIs to determine if such calls are needed or making the enable/disable calls a no-op when it is unneeded.
* Code for [‘AdminNodeInfo’ JSON-RPC](https://github.com/hyperledger/besu/blob/master/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/AdminNodeInfo.java) and Discovery protocol enode information uses the generalized APIs.
* Ability to explicitly configure the external IP to broadcast without regards to NAT or other considerations.
* Update besu.ports file to include local and global ip address and update downstream code that already parses this file.
* Test code to validate correct behavior
* Integration/acceptance tests
* All libraries and dependencies must use Apache 2.0 friendly licenses
### Additional Information
* Bounty amount: 1,500 DAI
* https://github.com/PegaSysEng/pantheon/issues/1120 should be completed before this.
* See Besu Contribution Guidelines [here](https://github.com/hyperledger/besu/blob/master/CONTRIBUTING.md).