Common RPC to check your node validator

@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

It always gives the result as 0 for me. Maybe @khanhj could help, please :slightly_smiling_face:
Untitled

1 Like

It is case-sensitive. You should write the method in lowercase. If still not exists, this means that the method is not deployed to that full-node yet. @J053

2 Likes

Try getrewardamount with Incognito Address

3 Likes

Hey @J053,
seem like a bug with this rpc, I will report this to our team.
in the mean while, please try this RPC:

{
   "id": 1,
   "jsonrpc": "1.0",
   "method": "getrewardamount",
   "params": ["<payment_address>"]
}

4 Likes

That one works

4 Likes

Hello. What are the possible roles and their meaning when using the getincognitopublickeyrole RCP?

I have found that 0 is waiting to be selected and 1 is pending, but I want to be sure.

1 Like

Role:
-1: Not found.
0: Waiting to be selected.
1: Pending.
2: Earning.

Edit this post if something is wrong or missing, I made it a wiki post.

1 Like

Hi @J053, yours is correct:
Role:
-1 : Not found
0 : Waiting to be selected
1 : Pending
2 : Earning

1 Like

Question for the groupā€¦

I ran rpc for getmininginfo and my node is returning -2, which i thought meant waiting.

But I know its currently ā€œearningā€ per the app and Nito Bot

When I checker docker stats it doesnā€™t seem to be working any harder than the other nodes (which is not very much, so Iā€™m skeptical that its working in committee properly).

I ran getincognitopublickeyrole and its returning Role : 2, confirming it is earning right?

But that also returns shardID ā€œ2ā€, not ā€œ-2ā€. So now Iā€™m confusedā€¦

I THINK that it is earning but only because slashing isnā€™t implemented and perhaps its not syncing right in this current committee and would be cut with upcoming slashing.

In other wordsā€¦Iā€™m trying to determine if its working correctly.

Given this info what do you all think?

Depends on the reported BeaconHeight. If the BeaconHeight is below the Beacon Chainā€™s height (currently ~875,760), then the Node is still syncing the blockchain data. While the Node is syncing the blockchain, it will report the state of the Node at the block height it has synced to. So if your Node was in committee around block 872,260(100 epochs ago), then it will report status from that period, not current status. This would give you a positive integer indicating committee shard, in this case 2.

If the BeaconHeight is around/above ~875,760 then thatā€™s the current status indicating yes, it is in committee for shard 2.

3 Likes

Is there any RPC call to check node history data? Like past earnings?

1 Like

We donā€™t have that RPC. I use Nito bot to track my node history, earning status.

3 Likes

Will this never change?

Hi, @khanhj. Can you help me with this error?

@Support

yes, constant is still the same

1 Like