Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

[PAN-2560] Normalize EnodeURLs #1264

Merged
merged 3 commits into from
Apr 12, 2019

Conversation

mbaxter
Copy link
Contributor

@mbaxter mbaxter commented Apr 11, 2019

PR description

Normalize EnodeURL's so that values representing the same enode will have equivalent EnodeURL representations. The spec specifies that the discport query param should only be present when the discovery port differs from the listening port. This PR centralizes EnodeURL construction so that this condition can be enforced.

Only specify discovery port explicitly when the discovery port differs
from the listening port.
@@ -71,10 +73,15 @@ public EnodeURL(
}
this.ip = address;
this.listeningPort = listeningPort;
this.discoveryPort = discoveryPort;
// Only explicitly define a discovery port if it differs from the listening port
if (discoveryPort.isPresent() && discoveryPort.getAsInt() != listeningPort) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where normalization happens.

@mbaxter mbaxter merged commit a6b9b5f into PegaSysEng:master Apr 12, 2019
usmananwar added a commit to usmananwar/pantheon that referenced this pull request Apr 15, 2019
* Normalize EnodeURLs (PegaSysEng#1264)

Only specify discovery port explicitly when the discovery port differs
from the listening port.

* Expose sync mode option (PegaSysEng#1270)

* Expose sync mode option

- remove `hidden` annotation attribute
- enable `syncModeOptionMustBeUsed` test
fix PAN-2525
fixes PAN-2525

* Update PantheonCommandTest.java

* expose fast sync min peers

* Feature/move subclass in pantheon command (PegaSysEng#1272)

* clean PantheonCommand class

- organize imports
- move `RpcApisConverter` and `RpcApisConversionException` to separate files

* spotlessApply

* register converters

* Revert "register converters"

This reverts commit aec4735.

* [PRIV-46] Use labelled timer to differentiate between rocks db metrics (PegaSysEng#1254)

* Use labelled timer to differentiate between metrics of public and private db

* Update the label names

* Keep enode nodeId stored as a BytesValue (PegaSysEng#1274)

* Refactor RocksDBStats (PegaSysEng#1266)

Move RocksDBStats to it's own module.  This also brings metrics to
metrics:core since none of our other module have nested modules but
they have peer modules.

* Create EnodeURL Builder (PegaSysEng#1275)
@usmananwar usmananwar mentioned this pull request Apr 16, 2019
notlesh pushed a commit to notlesh/pantheon that referenced this pull request Apr 24, 2019
Only specify discovery port explicitly when the discovery port differs
from the listening port.
notlesh pushed a commit to notlesh/pantheon that referenced this pull request May 4, 2019
Only specify discovery port explicitly when the discovery port differs
from the listening port.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants