-
Notifications
You must be signed in to change notification settings - Fork 5
Preparing for Testnet Deployment #378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This was migrated from #326 since we needed to change to a feature branch. Work from this PR/branch from now on. |
|
@tegefaulkes please remember to tick off anything above in case they are done, or cross out things that are no longer relevant in this PR. |
|
Change the base branch to target #374 branch. |
|
Starting rebase on feature-dep-upgrades. |
0777647 to
d28b9e0
Compare
|
I've done the first blush rebase but there are some parts that I have to fix. Most of it is just the |
d28b9e0 to
b7a48ee
Compare
|
Finished with the re-base + initial fixes. Everything is building and linting fine now. I'm going to start fixing the tests. |
|
I can't get the iterator to work properly with the |
9f4bda2 to
92a96dd
Compare
39c3c6e to
aa29fa9
Compare
489599c to
8c80f02
Compare
d45d952 to
3a9f071
Compare
8c80f02 to
c37eddb
Compare
|
This PR will need to target staging and rebase on top. However @emmacasolin is still pending some changes to the CI/CD so we can hold off on that for now. There are changes from #374 that this should rebase on, because of all the fixes to logging. |
|
@tegefaulkes is this PR's description updates to point to abort controller changes? |
|
Also please clean up the task list, and start adding ETAs into it as well. What is the final task list? |
b8c5d39 to
1246371
Compare
|
Re-based and targeting staging now. |
`nodeConnectionManager.syncNodeGraph` now refreshes all buckets above the closest node as per the kademlia spec. This means adding a lot of buckets to the refresh bucket queue when an agent is started. #345
Added support to cancel out of a `refreshBucket` operation. This is to allow faster stopping of the `NodeManager` by aborting out of a slow `refreshBucket` operation. This has been implemented with the `AbortController`/`AbortSignal` API. This is not fully supported by Node14 so we're using the `node-abort-controller` to provide functionality for now. #345
`NodeManager.setNode` and `NodeConnectionManager.syncNodeGraph` now utilise a single, shared queue to asynchronously add nodes to the node graph without blocking the main loop. These methods are both blocking by default but can be made non-blocking by setting the `block` parameter to false. #322
Renamed `queueStart` and `queuePush` since `Queue` is its own class now Simplified some logic using the `promise` utility
This contains fixes for failing tests as well as fixes for tests failing to exit when finished.
This checks if we await things that are not promises. This is not a problem per se, but we generally don't want to await random things.
…des when entering the network This tests for if the Seed node contains the new nodes when they are created. It also checks if the new nodes discover each other after being created. Includes a change to `findNode`. It will no longer throw an error when failing to find the node. This will have to be thrown by the caller now. This was required by `refreshBucket` since it's very likely that we can't find the random node it is looking for.
…stLocalNode` and `nodesHolePunchMessage`
DB and type changes using new transactions Linting Fixing timeouts
Exports moved to end of the file as part of the `export {}` block
Cleaned up TODOs and FIXMEs
Fixed index and other incorrect imports
Type fixes in utils
Abort controller functionality is included in node now.
Need to ensure validity of nodes by pinging them before adding them to the node graph. #322
Added some tests to check that a root keyPair change propagates properly. Also added tests for the change for existing and new node connections. #317
e3011da to
7253de8
Compare
|
The wip commits have now been squashed and renamed. All of the tests should still be passing, in which case this can be merged into staging and the CI commits moved on top of this. There shouldn't be anything here that relies on those changes. |
|
Ok merging into staging, afterwards @emmacasolin you can rebase and move the CI commits above this merge commit. |
|
Many of the issues didn't autoclose because PK's default branch is still master. I've closed relevant issues manually, but we will switch to staging as the default branch once the CI/CD is all fixed up in the staging branch. |
|
Some remaining issues that come out of this PR:
|
Description
Note that this has been migrated from #326.
Once #310 has been merged, we'll finally be able to move onto the deployment of our testnet into AWS.
I foresee this to be achievable in a few stages:
Issues Fixed
Fixes Support host (IP address) inbeing completed in Extracting Node Connection Management out ofparseSeedNodes#324NodeManagertoNodeConnectionManager#310Testnet deployment:
NodeGraph Structure:
NodeGraphbucket operations #244Node Adding Policies:
NodeGraph#322NodeGraph#344NodeConnectionManagermethods #363Node Removal Policies:
NodeGraph#150NodeGraphbuckets #345Tasks
[ ] 2. Complete Support host (IP address) in- being completed in Extracting Node Connection Management out ofparseSeedNodes#324NodeManagertoNodeConnectionManager#310[ ] 3. Complete Testnet Node Deployment (testnet.polykey.io) #194- Extracted out, should be finished after this PR merges[ ] 4. Complete Testnet securely maintain a pool of recovery codes #285- Extracted out, should be finished after this PR merges[ ] 5. Complete Update testnet.polykey.io to point to the list of IPs running seed keynodes #177- Extracted out, should be finished after this PR merges[ ] 6. Created automated testing that utilises the testnet- to be done in Tests for NAT-Traversal and Hole-Punching #357[ ] - NAT-Traversal Testing with testnet.polykey.io #159[ ] - Create automated tests for establishing connection via hole-punch signalling message #161nodestests Testnet Node Deployment (testnet.polykey.io) #194 (comment)nodesChainDataGetnodesClosestLocalNodenodesHolePunchMessageCmdtoEntryPointbecause PK only has 1 executable and makesdocker run ...easier.--seed-nodes='<defaults>;...'will now mean that any specified seed nodes overrides the defaults rather than the other way aroundNodeID, the ownNodeIdwill be automatically filtered.pk agent startreturn status information such asnodeIdand not justrecoveryCodeagent startand the like), it needs to be made more obvious whether we are contacting the local agent or remote agent Testnet Deployment #326 (comment)ErrorCLIClientOptions.NodeGraph: see issue Seed node not adding details of connecting node to itsNodeGraph#344NodeGraphfor a connecting node[ ] a. No output provided on- moved this to https://github.com/MatrixAI/js-polykey/issues/334#issuecomment-1043779027pk identities trust? However, I understand that we've previously shied away from providing "success" output on every single one of our commands. It can be tricky to diagnose problems when this is the case though.[ ] b.- moved this to https://github.com/MatrixAI/js-polykey/issues/334#issuecomment-1043779027pk identities trustseemingly not adding a node to the gestalt graph when it doesn't already exist inGestaltGraph/NodeGraph- see Testnet Deployment #326 (comment) and https://matrixai.slack.com/archives/CEAUUV5QX/p1645069875382019SyntaxError: Unexpected end of dataon an "invalid" node ID when usingdecodeNodeId- rebased on master has new js-id 3.3.1 that catches syntax errors when decoding multibase encoded stringsNodeGraphstructureNodeGraphbucket operations #244bucketssublevel will contain each bucket, where each bucket sublevel containsNodeIdtoNodeDatametasublevel contains each bucket, where each bucket sublevel is a config structure, currently onlycountlastUpdatedorindexsublevel that contains each bucket, and each bucket sublevel containslexi(lastUpdated)-NodeIdtoNodeId, the key is a compound index, allowing us to efficiently acquire the most up-to-date or least up-to-date node entrygetNodesandgetBucketswill allow us to interrogate the state of theNodeGraphefficiently, by streaming data out of theNodeGraph, this will be important for debugging, and later analyticsDBTransactionand new iterator feature of sublevels that allow us to maintain a snapshot of the DB at a point in timegetClosestNodemethod based on newNodeGraphstructureNodeGraphandNodeManagershould be tightly coupled due to the adding and removal policies of nodes, maintaining the bucket limit must involving pinging old nodesFinal checklist