How to setup your own node in a blink of an eye (Now support multi-nodes per host)

It could take a week for a full node to sync all the data and you must wait for your node to be fully synced before you can use it.
The command I gave you is to get the current sync status of a node, so yes, you have to run it every time you want to check.

2 Likes

Would it be possible to add a field for --RewardAddress when folks wants all nodes to go to a single address?

1 Like

Sorry, but it’s not possible.
This script only helps to set up and upgrade nodes, it does not affect how you stake your nodes.
So if you want all your rewards to go to a single wallet, you have to get to know how to use the staking RPC to get that.

1 Like

Or using incognito-cli instead, much easier :grinning:
image

2 Likes

I’ll take a look at the cli, I haven’t messed with it yet. Is it as simple as sending the stake command with the right private key and reward address?

1 Like

Yupp. I used to do it over RPC with Python, but after sending the wrong parameter by mistake once, I started using the CLI instead. :sweat_smile:

https://we.incognito.org/t/option-in-app-to-funnel-rewards-to-a-signle-account/15519/5?u=fredlee

1 Like

for example, all your fund is in account A, you have accounts V1, V2, V3… to set up with your node and you want all the reward go to account B, then run:

incognito-cli stake --privateKey A_private_key --miningKey V1_mining_key --candidateAddress V1_payment_key --rewardAddress B_payment_key
incognito-cli stake --privateKey A_private_key --miningKey V2_mining_key --candidateAddress V2_payment_key --rewardAddress B_payment_key
incognito-cli stake --privateKey A_private_key --miningKey V3_mining_key --candidateAddress V3_payment_key --rewardAddress B_payment_key
4 Likes

A post was split to a new topic: vNode setup

I’ve been using different methods in the past to stake my nodes. During the recent weeks I’ve had some hosting problems and a lot of my nodes have been slashed. I noticed that some unstake repayments goes to the funding account and some end up in the validator account. I’m not sure which nodes I’ve staked how. Lets say I want to fund a node for someone else to host. What is the correct command to make sure that the 1750 PRV funding goes back to my funding account (F) and not the validator account (V)? Right now I’m using the following method, is that correct?

incognito-cli stake \
--privateKey <F_PrivateKey> \
--rewardAddress <F_PaymentAddress> \
--candidateAddress <V_PaymentAddress> \
--miningKey <V_MiningKey>
1 Like

Wow :slight_smile: Does this command work? I use multiple funding accounts with single reward address but your case is single funding account with single reward address. This is the best. In that case, the accounts with candidateAddress and miningKey becomes just dummy account to meet the protocol’s need.

2 Likes

Hi @fredlee,

There are three separate accounts you might want to notice when it comes to staking:

  • Funding account: the account that funds 1750 PRV when staking and receives back 1750 PRV when un-staking.
  • Candidate account: the account that represents the validator on the committee.
  • Reward account: the account to receive the reward of being in the committee.

In your case, the command should be as follows:

incognito-cli stake \
--privateKey <F_PrivateKey> \ # your funding account
--rewardAddress <V_PaymentAddress> \ # rewards go to the validator account
--candidateAddress <V_PaymentAddress> \ # validator account appears on the committee list
--miningKey <V_MiningKey> # validator account appears on the committee list
4 Likes

Thanks @daniel, then I suppose it is correct and the funds should be back in the funding account after being slashed. That I set rewardAddress to funding account also is on purpose to consolidate all rewards.

1 Like

Yes, 1750 PRV will be returned back to the funding account, ensured by the protocol.

4 Likes

And also remember that, to manually un-stake, you have to use the funding account to make the request.

2 Likes

Is there a simplified updated guide for setting up a vnode? This thread is long and a bit chaotic. Was wondering if someone had an updated link to a guide. Possibly also thinking of self hosting on a home computer or NUC instead of VPS if anyone has some pointers

1 Like

Everything needed to get a node set up and running is in the first post of this guide. You can ignore everything else.

4 Likes

You need nothing else other than this guide. I use this method myself to set up my NUC as a node.

6 Likes

Hi,

Tried it in two servers already, but the container keeps restarting in loop after a few seconds leaving this at error.log:

    2022/09/15 19:46:30 Using network param file for mainnet
panic: -1006: Load key error
 invalid format: version and/or checksum bytes missing
Load key error
github.com/incognitochain/incognito-chain/consensus_v2.NewConsensusError
        /Users/autonomous/projects/incognito-chain/consensus_v2/error.go:55
github.com/incognitochain/incognito-chain/consensus_v2.GetMiningKeyFromPrivateSeed
        /Users/autonomous/projects/incognito-chain/consensus_v2/key.go:26
github.com/incognitochain/incognito-chain/consensus_v2.(*Engine).loadKeysFromMiningKey
        /Users/autonomous/projects/incognito-chain/consensus_v2/engine.go:271
github.com/incognitochain/incognito-chain/consensus_v2.(*Engine).Start
        /Users/autonomous/projects/incognito-chain/consensus_v2/engine.go:247
main.Server.Start
        /Users/autonomous/projects/incognito-chain/server.go:760
main.mainMaster
        /Users/autonomous/projects/incognito-chain/incognito.go:229
main.main
        /Users/autonomous/projects/incognito-chain/incognito.go:288
runtime.main
        /usr/local/go/src/runtime/proc.go:255
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:1581

goroutine 1 [running]:
github.com/incognitochain/incognito-chain/consensus_v2.(*Engine).loadKeysFromMiningKey(0xc0021f78f0)
        /Users/autonomous/projects/incognito-chain/consensus_v2/engine.go:273 +0x5c5
github.com/incognitochain/incognito-chain/consensus_v2.(*Engine).Start(0xc0021f78f0)
        /Users/autonomous/projects/incognito-chain/consensus_v2/engine.go:247 +0xef
main.Server.Start({0x0, 0x0, {0xc00387aa10, 0xb}, 0x1, 0xc00067e000, 0xc0000d82c0, 0xc003823f20, 0xc0033fe2d0, 0xc001a19ad0, ...})
        /Users/autonomous/projects/incognito-chain/server.go:760 +0x5c5
main.mainMaster(0x0)
        /Users/autonomous/projects/incognito-chain/incognito.go:229 +0x1018
main.main()
        /Users/autonomous/projects/incognito-chain/incognito.go:288 +0x2b6

Any ideas on how to solve this or what could I be doing wrong?

1 Like

@Jared

Also getting this issue on some of the nodes on the same server after running the patch, latest script etc.

Please use the latest blink script and then the patch will no longer be needed.

1 Like