-
Notifications
You must be signed in to change notification settings - Fork 130
Conversation
This begins work on Consensys/protocol-BountiedWork#1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good start. Before committing it to the main repository we will need to see it wired into the startup of Pantheon and see it mapping ports.
* @param type is the type descriptor of the desired service | ||
* @return the first instance of the given type, or null if none | ||
*/ | ||
@SuppressWarnings("rawtypes") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the code so that it won't throw raw type warnings. This is not a warning we generally suppress.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem here is that the underlying library (jupnp) returns raw types itself. If you have a good solution, I'll gladly implement it.
Example: the registry listener "bleeds" this rawtype through an interface method: https://github.com/jupnp/jupnp/blob/ca13ee84ae4a03be93c6bb109b27668d5406c1c5/bundles/org.jupnp/src/main/java/org/jupnp/registry/DefaultRegistryListener.java#L85
And, for reference, Device: https://github.com/jupnp/jupnp/blob/master/bundles/org.jupnp/src/main/java/org/jupnp/model/meta/Device.java
ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/upnp/UpnpNatManager.java
Outdated
Show resolved
Hide resolved
ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/upnp/UpnpNatManager.java
Outdated
Show resolved
Hide resolved
* Make the contract size limit configurable in the genesis config, making it possible to override milestone based configurations in a private network.
…SysEng#1224) * [PIE-1224] Different request limits for different request types - create `EthLimits` with max size of response according to geth (https://github.com/ethereum/go-ethereum/blob/master/eth/downloader/downloader.go) - update `EthServer` to use those constants limits instead of the default one - remove requestLimit from EthServer and EthProtocolManager constructor fix PIE-1224 * eth wire protocol request limits - add fields in `SynchronizerConfiguration` to configure per type request limit - update `EthServer` constructor to add new fields - update `EthProtocolManager` and subclasses to support new fields - update unit tests accordingly * Update SynchronizerConfiguration.java * Update EthProtocolManagerTestUtil.java * Update EthServerTest.java * Update EthProtocolManagerTest.java * Update EthServerTest.java * fix after review discussion - remove per type request limit configuration from `SynchronizerConfiguration`. - add `EthServer` constructor without new fields that use default values. - update unit tests accordingly - update instanciation of different `PantheonController` accordingly * Update EthServerTest.java * fix review - spotless - fix clean up review comment * spotlessApply
- change option name - update warning condition on dependency check
…egaSysEng#1226) * [PRIV-41] Use metrics system for private state db - Use PrivacyParametersBuilder to build PrivacyParameters - refactor PrivacyParameters to expose default options - refactor test builders to use PrivacyParameters.DEFAULT - Use URI in Enclave * Fix: enclave tests from bad merge * Fix privacy acceptance tests after db configuration changes * Switch to use nested class for PrivacyParametersBuilder
There is no need to keep entire blocks during import after they have been imported. Keep just the hashes instead.
* EWP options management - create `EthereumWireProtocolConfiguration` object to hold per request limits - add `EthereumWireProtocolConfiguration` in `SynchronizerConfiguration` - create `PositiveNumber` class to handle command line options representing a positive number (a request limit for example) - add unit tests to cover the new options fixes PIE-1502 * Update EthereumWireProtocolConfiguration.java * Update PantheonCommandTest.java * fix tests * spotlessApply * fix tests and javadoc * Update pantheon/src/main/java/tech/pegasys/pantheon/cli/PantheonCommand.java Co-Authored-By: abdelhamidbakhta <[email protected]> * Update pantheon/src/main/java/tech/pegasys/pantheon/cli/PantheonCommand.java Co-Authored-By: abdelhamidbakhta <[email protected]> * Update pantheon/src/main/java/tech/pegasys/pantheon/cli/PantheonCommand.java Co-Authored-By: abdelhamidbakhta <[email protected]> * Update pantheon/src/main/java/tech/pegasys/pantheon/cli/PantheonCommand.java Co-Authored-By: abdelhamidbakhta <[email protected]> * fix * fix PR discussion * Update EthereumWireProtocolConfiguration.java
* EWP options management - create `EthereumWireProtocolConfiguration` object to hold per request limits - add `EthereumWireProtocolConfiguration` in `SynchronizerConfiguration` - create `PositiveNumber` class to handle command line options representing a positive number (a request limit for example) - add unit tests to cover the new options fixes PIE-1502 * Update EthereumWireProtocolConfiguration.java * Update PantheonCommandTest.java * fix tests * spotlessApply * fix tests and javadoc * Update pantheon/src/main/java/tech/pegasys/pantheon/cli/PantheonCommand.java Co-Authored-By: abdelhamidbakhta <[email protected]> * Update pantheon/src/main/java/tech/pegasys/pantheon/cli/PantheonCommand.java Co-Authored-By: abdelhamidbakhta <[email protected]> * Update pantheon/src/main/java/tech/pegasys/pantheon/cli/PantheonCommand.java Co-Authored-By: abdelhamidbakhta <[email protected]> * Update pantheon/src/main/java/tech/pegasys/pantheon/cli/PantheonCommand.java Co-Authored-By: abdelhamidbakhta <[email protected]> * fix * fix PR discussion * Update EthereumWireProtocolConfiguration.java * fix PR 1246 discussion PegaSysEng#1246 (comment)
Hey @notlesh - can you ping me with a top-level comment when you're ready for another review? |
@mbaxter I have a couple questions regarding your PR review, and beyond that the only outstanding item is moving the upnp package. Can you take a quick look at the non-resolved conversations (where you'll find my questions)? You can also find me in gitter if you'd like -- I may be quiet, but I'll respond to PMs. |
@mbaxter I believe I've addressed all of your feedback from your last review, please feel free to re-review. Thanks! |
Make sure nat environment is configured before setting local node. Request discovery port forwarding for UDP port. Add a test.
Pushed up a few small changes here. I think once those are in this should be merge ready! |
UPNP Support - Minor fixes
Looks good to me. |
Talked with Meredith and it looks good to go once we fix the unit test failure. Generally we don't throw exceptions during start and stop. If we are already started we just return immediately (from a guard block) and same with stop if we are not started. In both cases we LOG.warn our failures. The impact is that this is hard to unit test the logging with Log4J2, the log results tend to be flakey. So if we fixed the start and stop methods to match the pattern in other services then the two unit tests turn into don't throw tests, verifying startup (with the two start) and no startup (with the stop before start) with the mocks. |
…sts to reflect this convention
LGTM. The build error has to do with the reference tests that were updated, there is a git submodule that may be breaking it. Those look to be unrelated to your changes and possibly may be a Jenkins issue, so I'll take the tasks to see what needs to be done to fix it. Hopefully this is the last hurdle. |
This begins work on Consensys/protocol-BountiedWork#1
PR description
My initial work to wrap jupnp functionality. This is largely pulled from my repository at https://github.com/notlesh/jupnp-igd-tools where I developed and tested this code.
This is currently a work-in-progress.