-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
16 / 1616 of 16 issues completedLabels
developmentStandard developmentStandard developmentepicBig issue with multiple subissuesBig issue with multiple subissuesr&d:polykey:core activity 4End to End Networking behind Consumer NAT DevicesEnd to End Networking behind Consumer NAT Devices
Description
Specification
We need a suite of tests to cover interacting with a deployed agent, which we can do using testnet.polykey.io. These tests need to cover various different connection scenarios:
- Connecting to a deployed agent as a seed node during startup
- Pinging a deployed agent
- Using the deployed agent as a signaller (and eventually a relay once this is implemented)
- Tests for when the deployed agent is contacting an agent behind a NAT (NAT-Traversal Testing with testnet.polykey.io Polykey#159)
- Any bugs that are discovered during the above tasks
These tests should go into their own subdirectory tests/testnet and should not be run with the other tests. They should be disabled in our jest config and should only run when explicitly called (which will happen during the integration stage of our pipelines).
Required tests:
tests/testnet/testnetConnection.test.ts- Can connect to the testnet
- Within a reasonable amount of time
- Without errors/shutting down the local agent
- Without errors/shutting down the testnet
- Can disconnect from the testnet
- Within a reasonable amount of time
- Without errors/shutting down the local agent
- Without errors/shutting down the testnet
- Can reconnect to the testnet
- Able to handle different node ids (testnet is a cluster of nodes)
- Can connect to the testnet
tests/testnet/testnetPing.test.ts- Can ping the testnet
- Able to handle different node ids (testnet is a cluster of nodes)
- Can ping another node via the testnet (signaling)
- Can ping another node via the testnet (relay)
- Can attempt to ping another node that doesn't exist
- Without shutting down the testnet
- Can ping the testnet
tests/testnet/testnetNAT.test.ts- Can ping a node that is behind endpoint-independent NAT via the testnet
- From a node that is not behind a NAT (DMZ)
- From a node that is behind endpoint-independent NAT
- From a node that is behind endpoint-dependent NAT
- Can ping a node that is behind endpoint-dependent NAT via the testnet
- From a node that is not behind a NAT (DMZ)
- From a node that is behind endpoint-independent NAT
- From a node that is behind endpoint-dependent NAT
- Can ping a node that is behind endpoint-independent NAT via the testnet
- Should also incorporate tests from Testnet Deployment Polykey#326 (comment)
Additional context
- NAT-Traversal Testing with testnet.polykey.io Polykey#159 - NAT traversal tests against
testnet.polykey.io - Connection dropped/timed out when connecting to deployed agent Polykey#414 - Issue for failed connections to/from a deployed agent
- Continuous connection attempts between a deployed seed node and local agent Polykey#415 - Issue for continuous re-connection bug when connecting to deployed seed node
Starting Connection Forwardinfinite loop Polykey#413 - Issue for potential infinite loop when connecting to deployed seed node
Tasks
- 1. Attempt connections to the deployed seed node and create issues for all bugs discovered (and resolve them)
- 2. Create tests for simple connections to
testnet.polykey.io- 1 node connected to testnet.polykey.io and maintains connection
- 2 nodes connected to testnet.polykey.io and can ping each other (they will have the same IP but different ports)
[ ] 3. Create tests for edge cases and previous bugs- most edge cases will go to the simulation suite[ ] 4. Create tests for connecting to a deployed seed node from behind a NAT- this can only be done as part of a simulation suite, since we don't control host firewalls- 5. Finish off all diagrams as part of NAT testing Add diagrams to NAT Traversal tests Polykey#388
- 6. Add new INFO level logs for situations where connections are going into stopping. This is next to the debug logs.
[ ] 7. Add a logging debug filter to command line arguments to take a regular expression. Should be global option like- not relevant to integration testing, the--log='/regex/'.js-loggerdoes support REGEX filtering, but the PK CLI currently doesn't have this option.[ ] 8. Use https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerOverride.html to be able to easily try different debugging levels and filters.- cannot use container overrides in services, can be done as part of tasks though, will have to just redeploy service with different task definition each time[ ] 9.agent statuscommand needs to display useful information like the polykey version and other useful statistics like active connections, number of node graph entries etc etc.[ ] 10.- this is pending a change to being able to use--client-hostneeds to support host names.PolykeyClientto connect to a host name - which would require using the DNS-SD SRV records. This still needs to be specced out how this would work because in some cases you want to connect to a SINGLE Node, in other cases you are "discovering" a node to connect to, but it's not relevant to this epic.- 11. EC2 setup with idempotency
- 12. Multi Node Setup on AWS
- 13. Recovery Code Pool on AWS
- 14. Multi-Host DNS resolution
- 15. Multi Node Resolver
- 16. NodeGraph KeyPath to lift Host and Port to the key path
- 17. Put the trusted testnet seed nodes into the
src/config.ts- from Infrastructure setup for testnet should automate multiple instances for multiple nodes Polykey#488
Emergent bugs
- 1. Seed node is failing to establish a reverse connection back to the connecting node. The problem is somewhere in
ConnectionReverse.start()betweenStarting Connection ReverseandStarted Connection Reverse. Start by testing locally. - 2. Fixing the Random Process Termination
- 3. Verify that new timeouts are being respected
Sub-issues
Metadata
Metadata
Assignees
Labels
developmentStandard developmentStandard developmentepicBig issue with multiple subissuesBig issue with multiple subissuesr&d:polykey:core activity 4End to End Networking behind Consumer NAT DevicesEnd to End Networking behind Consumer NAT Devices