New full-node Question

I bootstrapped node-0 as a full node. But now, it doesn’t sync all nodes (according to the node monitor)


what else do I need to do?

What settings did you use when you configured this node to be a fullnode? Most likely you will need to docker exec into the container and change some settings and then restart it. You can run a fullnode as a vNode as well, with the correct configuration.

sudo docker exec -it inc_mainnet_0 /bin/bash (change container name to your fullnode)

Then cat cmd.sh and send the output via either here or a support ticket. Make sure you remove personal information (vkey, infura info, etc).

I used the default indexer access token when I ran blink.sh. Here is the requested output:

craig@Incognito:~/go/bin$ sudo docker exec -it inc_mainnet_0 /bin/bash
[sudo] password for craig:
root@eae04e744d40:/# cat cmd.sh
./incognito --relayshards --usecoindata --coindatapre=coins --numindexerworkers=0 --indexeraccesstoken=edeaaff3f1774ad2888673770c6d64097e391bc362d7d6fb34982ddf0efd18cb --limitfee 1000000 --discoverpeers --discoverpeersaddress mainnet-bootnode.incognito.org:9330 --miningkeys (redacted) --datadir /data --listen 0.0.0.0:9433 --externaladdress (redacted):9433 --norpcauth --enablewallet --wallet incognito --walletpassphrase (redacted) --walletautoinit --rpclisten 0.0.0.0:8334 --rpcwslisten 0.0.0.0:19334 --loglevel info
root@eae04e744d40:/#

Your --relayshards should be --relayshards all.

My --coindatapre= is --coindatapre=__coins__.

You’ll want to change --numindexworkers to 100.

Make those changes, save, exit the container, restart your node and wait for it to come online on the Node Monitor. Check to make sure all shards are syncing.

OK I’ll try that. What is indexeraccesstoken used for?

You’ll use that to interact with your fullnode. Feel free to change that to any random 64 bit hex code, I use https://numbergenerator.org/random-64-digit-hex-codes-generator to generate mine.

after making the changes, this is what cmd.sh looks like:

./incognito --relayshards --usecoindata --coindatapre=coins --numindexerworkers=100 --indexeraccesstoken=### --limitfee 1000000 --discoverpeers --discoverpeersaddress mainnet-bootnode.incognito.org:9330 --miningkeys ### --datadir /data --listen 0.0.0.0:9433 --externaladdress ###:9433 --norpcauth --enablewallet --wallet incognito --walletpassphrase ### --walletautoinit --rpclisten 0.0.0.0:8334 --rpcwslisten 0.0.0.0:19334 --loglevel info

still only syncs the relevant shard:

Now, keep in mind this is originally a staked node that I’m just now converting into a full node. If there is a better way to start a full node, pleas tell

Your relayshards is not showing all.

You can stop the container, remove it and then restart with the following flags added:

sudo docker stop inc_mainnet_#
sudo docker rm inc_mainnet_#

-e NUM_INDEXER_WORKERS=100
-e INDEXER_ACCESS_TOKEN=cc3d46946bXXXX
-e RELAY_SHARD=all

I’m having trouble figuring out where to pass the -e flag?

Also. After I stop and remove the container, it no longer exists to restart it.
Before, the way I changed NUM_INDEXER_WORKERS and INDEXER_ACCESS_TOKEN is from running blink.sh again. But there was no option for relay_shard

I tried changing blink.sh settings to FULLNODE=“1”, but that didn’t come online.

Hey @GoldFella,

Here is the command i tried

docker pull incognitochain/incognito-mainnet:20230905_1
docker run -d --name inc_fullnode -v A12:/data -e TESTNET=false -e RELAY_SHARD=all -e MININGKEY=1cL4HqchBNdTi5kkbtkkeQoPHjMWLATDKNeGD2dpzrp2Uzi4gZ -e INDEXER_ACCESS_TOKEN=edeaaff3f1774ad2888673770c6d64097e391bc362d7d6fb34982ddf0efd18cb -e BOOTNODE_IP=mainnet-bootnode.incognito.org:9330 -e NUM_INDEXER_WORKERS=9 incognitochain/incognito-mainnet:20230905_1

here is the log

so in short, you need to add

-e RELAY_SHARD=all -e MININGKEY=1cL4HqchBNdTi5kkbtkkeQoPHjMWLATDKNeGD2dpzrp2UzzzzZ -e INDEXER_ACCESS_TOKEN=edeaaff3f1774ad2888673770c6d64097e391bc362d7d6fb34982ddf0efd18cb  -e NUM_INDEXER_WORKERS=9

replace with your params

1 Like

Oh, is this a full node that doubles as a validator? I run my full node with just -e FULLNODE=1 -e MININGKEY= -e INDEXER_ACCESS_...

What does RELAY_SHARD do? (Well I can guess what it does, but when is it needed?)

RELAY_SHARD=all to force a validator sync data of all shards.
Or you can set a specific shard number, eg.
RELAY_SHARD="7" # sync data of shard 7 only
RELAY_SHARD="3,5" # sync data of shard 3 and 5

1 Like

Cool, I assume that FULLNODE=1 ignores this because a full node will require all shards?

Yes FULLNODE=1 will sync all shards, but this container no longer a validator, cant vote for blocks (-e MININGKEY=xxx will be ignored).

3 Likes

I want my node_0 validator to go RELAY_SHARD=all, but leave it off for the rest of my nodes. Every time I try to do it I end up syncing from 0 on the monitor. Please help!

It sounds like whenever you recreate the container you’re not specifying the same directory to store the data.

Are both the old container and new container pointing to the same directory? You could also stop the new container and just move (mv) the data over to the new directory if that’s the case.

@GoldFella
You can use this modified version of blink script. (copy the code, save with extension .sh and execute)

At the step input indexer key, input your own key

one question: why do the ports start with a 1? Must I open those ports now?

put any port number you want, in common case, most validator running at port 9334 8334 up, so i would recommend fullnode start at 19xxx 18xxx