Common RPC to check your node validator

Ok, everyone who need testnet PRV can dm me or @Peter for some

2 Likes

Hi @khanhj, I think you should make clear that for all RPCs required <private_key> should not send to Full Node or any service. It is not safe.

2 Likes

Can you explain this to me in Dummy language? Lmao. I an not a techie so I dont understand what this is about… and yet I have 5 vnodes… lol

@hieutran, the mainnet fullnode may expose user privatekey if it running in debug mode. So, im going to public another topic How to run your own fullnode

@Mike_Despo lol, let it be, the mobile app wallet is good enough to check your node status. Somehow i wrote this tutorial for those who want to develop things.

Adding Information:

  • If you use RPCs to create transactions, init new privacy token, stake/ unstake, when sending the RPC requests to the full node, it will require your private key, it’s not safe at all. I strongly recommend that you should run your own full node before using these RPCs. Tutorial is here.
  • For our incognito wallet app, we eliminate that security issue by creating go mobile framework integrated into incognito wallet app. This helps your mobile phone generate transaction, execute pdex trading, do everything without sending private key to fullnode, therefore, your private key is safely kept on your phone storage.


image


image

1 Like

Hi @Mike_Despo, this topic is for tech validator, who need to call api for doing more extra feature for their node in needing. If you are not a techie, it is enough for you by using wallet app

1 Like

A post was split to a new topic: Withdrawal didn’t end up in external wallet

Hello

is there any command to query my node - so I know what shard_id it is on?

thanks

@huglester run this command:

curl -s --header "Content-Type: application/json" --request POST --data '{ "id": 1, "jsonrpc": "2.0", "method": "getmininginfo"}' http://YOUR_NODE_IP_OR_DNS:9334 | jq ".Result.ShardID"

1 Like

thanks!

why would it mostly return -1?
“ShardID”: -1,

If the Role of your node is “waiting”, that’s normal.

You’ll see a different ShardId if the current Role of your node is pending or commitee.

1 Like

does it mean that “ShardID” is changing from time to time? or its static?

1 Like

Without running any script, you may check your node status via https://incognito.mesquka.com

Once your node enters into a shard, it remains in that shard until it is swapped out. After swapped out, you may enter into another shard. In that case, shard id of your node may change.

so basically it means I cant migrate the node by simply copying the blockchain data?
best is to let it resync?

Because if node jumps between shards means its database consists of all shards?
but what is strange their size/heigh differs?

thanks @abduraman - will try

1 Like

I have some answers to your questions but let’s wait for the core team to get more accurate answers :slight_smile: @khanhj @Peter

What do you mean by migrate?

Migrate = from old hardware - to new hardware

For example out of space :slight_smile:

Your node, for the network is actually your validator key, the account that is used to stake, and to receive the earnings. You are only on a shard when you are earning. You could be earning on different shards when earning several epochs sequentially.

The easiest way is just to stop the current node when you are in “waiting” stage. Start the new node using the same validator key, and it will resync.

Do you want to save time resyncing by copying files from the old to the new one?

1 Like

Your node, for the network is actually your validator key, the account that is used to stake, and to receive the earnings. You are only on a shard when you are earning. You could be earning on different shards when earning several epochs sequentially.

The easiest way is just to stop the current node when you are in “waiting” stage. Start the new node using the same validator key, and it will resync.

yeah, this is the right method to migrate your node.
@huglester, you can copy blockchain data to new location/machine (just make sure the file path is correct as defined in run.sh)

1 Like

@huglester, talking more about this, your observation is true but i want to explain why:
Phase 1: when staking new node, your node started to sync beacon block from zero to latest
Phase 2: a random number that gets from Bitcoin blockchain was used to determine which node to which shard. Your node is randomly assigned to a shard. Eg. shard_2, then it started to sync shard blocks, from zero to latest, let say latest block number is 1000
Phase 3: when your node become shard_2 committee validator, it started to validate block, eg.: validate block 1001 to 1200 of shard_2, your node earning reward for every block produced in shard_2, but full reward is only paid once at the end of epoch.
Phase 4: at the end of epoch, your node is swap out of committee, it stop sync shard_2 block but continue sync beacon

The process start over at phase_2, then there are 2 cases:

  1. your node assigned to shard_2 again => continue sync shard_2 block from 1200 to latest
  2. your node assigned to other shards => sync this shard block from zero to latest

That being said, you can copy chain data to another location/machine, just make sure file path is correct.

PS. Notice at Phase_3, due to internet speed, hardware specs of committee node, that made a shard produce more or less blocks than others, that why reward in each shard is different when epoch ended.

6 Likes

How can I use the getRewardAmountByPublicKey rpc?

I’m trying this without any luck:

curl --header "Content-Type: application/json" --request GET --data '{ "id":1, "jsonrpc": "1.0", "method": "getRewardAmountByPublicKey", "params": ["12FfHr8uRCb591ADUtJXhT9v2MymU5fdoGCcPkH58JqKKAVzJeB"]}' https://mainnet.incognito.org/fullnode

It’s telling me method not found.

1 Like