Const
Default system configuration. These are not meant to be changed by the user. These constants are tuned for optimal operation by the developers.
Timeout for the transport connecting to the client service.
This bounds the amount of time that the client transport will wait to establish a connection to the client service of a Polykey Agent.
Interval for the keep alive of the transport connection to the client service.
This is the minimum interval time because transport optimisations may increase the effective interval time when a keep alive message is not necessary, possibly due to other data being sent or received on the connection.
Timeout for the keep alive of the transport connection to the client service.
It is reset upon sending or receiving any data on the client service transport connection.
This is the default for both sides (client and server) of the connection.
This should always be greater than the connect timeout.
Timeout for establishing a node connection.
This applies to both normal "forward" connections and "reverse" connections started by hole punching. Reverse connections is started by signalling requests that result in hole punching.
This is the default for both client and server sides of the connection.
Due to transport layer implementation peculiarities, this should never be greater than the keep alive timeout.
Concurrency pool limit when finding other nodes.
This is the parallel constant in the kademlia algorithm. It controls how many parallel connections when attempting to find a node across the network.
Interval for hole punching reverse node connections.
Timeout for idle node connections.
A node connection is idle, if nothing is using the connection. A connection is being used when its resource counter is above 0.
The resource counter of node connections is incremented above 0 when a reference to the node connection is maintained, usually with the bracketing pattern.
This has nothing to do with the data being sent or received on the connection. It's intended as a way of garbage collecting unused connections.
This should always be greater than the keep alive timeout.
Interval for the keep alive of the node connection.
This is the minimum interval time because transport optimisations may increase the effective interval time when a keep alive message is not necessary, possibly due to other data being sent or received on the connection.
Timeout for the keep alive of the node connection.
It is reset upon sending or receiving any data on the connection.
This is the default for both sides (client and server) of the connection.
This should always be greater than the connect timeout.
Timeout for each RPC stream.
The semantics of this timeout changes depending on the context of how it is used.
It is reset upon sending or receiving any data on the stream. This is a one-shot timer on unary calls. This repeats for every chunk of data on streaming calls.
This is the default for both client calls and server handlers. Both the client callers and server handlers can optionally override this default.
When the server handler receives a desired timeout from the client call, the server handler will always choose the minimum of the timeouts between the client call and server handler.
With respect to client calls, this timeout bounds the time that the client will wait for responses from the server, as well as the time to wait for additional to be sent to the server.
With respect to server handlers, this timeout bounds the time that the server waits to send data back to the client, as well as the time to wait for additional client data.
Therefore it is expected that specific clients calls and server handlers will override this timeout to cater to their specific circumstances.
Buffer size of the JSON RPC parser.
This limits the largest parseable JSON message. Any JSON RPC message greater than this byte size will be rejecte by closing the RPC stream with an error.
This has no effect on raw streams as raw streams do not use any parser.
Default user configuration. These are meant to be changed by the user. However the defaults here provide the average user experience.
Agent host defaults to ::
dual stack.
This is because the agent service is supposed to be public.
Client host defaults to localhost
.
This will depend on the OS configuration.
Usually it will be IPv4 127.0.0.1
or IPv6 ::1
.
This is because the client service is private most of the time.
If using dual stack ::
, then this forces only IPv6 bindings.
Seed nodes.
This is defaulted to {}
at the object-level.
However Polykey-CLI will use use the network
to fill this.
Number of workers to spin up by default.
Using undefined
means all cores. Using 0
means no workers at all.
This is not used by the PolykeyAgent
which defaults to {}
In the future this will be replaced by mainnet.polykey.com
and testnet.polykey.com
.
Along with the domain we will have the root public key too.
Information that is pre-configured during distribution:
Information that is discovered over DNS (Authenticated DNS is optional):
As long as the root public key is provided, it is sufficient to defeat poisoning the network. The root public key should also be changed often to reduce the impact of compromises. Finally the root public key can also be signed by a third party CA providing an extra level of confidence. However this is not required.
Polykey OIDs These are used by the root X.509 certificates These are managed by Matrix AI and Polykey developers Starts on 1.3.6.1.4.1.57167.2 See: http://oid-info.com/get/1.3.6.1.4.1.57167
File/directory paths
Default provider configuration These are managed by Matrix AI and Polykey developers
Version of the RPC and HTTP service It is only incremented on breaking changes Use this to know if you must upgrade your service client
Version of source code This must match the package.json
Version of the state, persisted into the node state It is only incremented on breaking changes Use this to know if you have to do a schema-upgrade
Generated using TypeDoc
Polykey static configuration This is intended only for static properties These properties are embedded in the source code And they are not to be changed during runtime