Add function to toggle on/off IP Validation in Enhanced Permissioing NodeManager. #1677
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use case
We are running a 1st Quorum node in kubernetes pod with Enhanced Permissioning v2 enabled. A 2nd quorum node is hosted in another kubernetes cluster / namespace also running Enhanced Permissioning v2. The 1st and 2nd quorum node's enodeIds, ports and IP addresses were added to the list of nodes that are allowed to connect. The geth API
quorumPermission_addNode()
was used.However, the 1st and 2nd node are not able to connect to each other because, for example - the incoming connection from 2nd node's IP has changed. Based on discussion with our infra team, and due to securities in place, the IP address of incoming connection may change or re-written before the connection request finally reach the pod where the other Quorum node is running. Due to this, the
connectionAllowed()
ofv2/contract/NodeManager.sol
rejects the connection.Proposed Solution / Changes
I am proposing in this change to introduce a
setIpValidation()
function in NodeManager.sol to toggle IP validation on or off. This is enabled by default. The property can only be set before network boot status is finalized.For your review / comments. Let me know if you require further information. I will be more than happy to provide them and to help contribute further. I look forward working with you.
Thank you in advance.
Regards, John