Light node vs full node
Running the Parallax client in light mode has the following advantages for users:- Syncing takes minutes rather than hours/days
- Light mode uses significantly less storage
- Light mode is lighter on CPU and other resources
- Light mode is suitable for resource-constrained devices
- Light mode can catch up much quicker after having been offline for a while
Running a light server
Full node operators that choose to enable light serving altruistically enable other users to run light clients. This is good for Parallax because it makes it easier for a wider population of users to interact with Parallax. However, there is naturally a limit to how much resource a node operator is able and willing to dedicate to serving light clients. Therefore, the command that enables light serving requires arguments that define the upper bound on resource allocation. The value given is in percent of a processing thread, for example--light.serve 300
enables light-serving and dedicates three processing threads to it.
The Parallax client unindex older transactions to save disk space. Indexing is required for looking up transactions in the Parallax client’s database. Therefore, unindexing limits the data that can be requested by light clients. This unindexing can be disabled by adding --tx.txlookuplimit 0
to make the maximum data available to light clients.
The whole command for starting the Parallax client with a light server could look as follows:
Running a light client
Running a light client simply requires the Parallax client to be started in light mode. It is likely that a user would also want to interact with the light node using, for example, RPC. This can be enabled using the--http
command.