How to open up your node for publishing

Help publishers by providing API access to the DKG and increase your node reward potential

One way to increase your Node Power is to make your DKG Core node endpoint publicly accessible to enable publisher access to the DKG. This servers a useful purpose to the network by opening access to the DKG, enabling easier usage and sharing resources, for which Core nodes are incentivised through increasing Node power.

To make your DKG Core node endpoint publicly accessible, all you need to do is disable both IP-based and token-based authentication. This is done by setting ipBasedAuthEnabled and tokenBasedAuthEnabled to false in the .origintrail_noderc file located inside your ot-node directory.

ipBasedAuthEnabled and tokenBasedAuthEnabled fields are not present by default, so you must add them manually.

Below is an example of how your "auth" section should be configured in order to disable IP-based and token-based authentication.

...
    },
    "auth": {
        "ipBasedAuthEnabled": false,
        "tokenBasedAuthEnabled": false,
        "ipWhitelist": [
            "::1",
            "127.0.0.1",
            "<any_whitelist_ip_of_choice>"
        ]
    }
...

Changes to .origintrail_noderc only take effect after a restart. Once the node is back online, its endpoint will be accessible without authentication restrictions.

Anyone can now use one of the dkg clients to connect to your Core node an publish through it. So if for example your node URL is https://super-dkg-node.com, this is how dkg.js can connect to it:

const dkg = new DKG({
    endpoint: 'https://super-dkg-node.com',  // your node URL
    port: 8900 // your node DKG Port
});

const nodeInfo = await dkg.node.info(); 
// if successfully connected, the will return an object indicating the node version
// { 'version': '8.X.X' }

Last updated

Was this helpful?