ton-blockchain / mytonctrl

A tool to run and maintain a TON node/validator
GNU General Public License v3.0
262 stars 146 forks source link

Re-staking with a single-nominator (stakePercent config) works weird #286

Open glebsam opened 3 months ago

glebsam commented 3 months ago

Re-staking with a single-nominator (the stakePercent config) works weird. Sometimes it works, sometimes it just submits a half of the single-nominator balance. In result validator loses rewards 🔴. Don't understand reasons, but I've found this code:

https://github.com/ton-blockchain/mytonctrl/blob/a4b8bf246c6cda6f270a186a080d35ad3157d1cf/mytoncore/mytoncore.py#L1338-L1339

Seems like vconfig here is file /var/ton-work/db/config.json and frankly speaking I don't understand under which circumstances it can have empty validators list (it has and had one) if validator works fine, participates in elections, receives rewards.

@igroman787 seems like this "divide by two" instruction is 4-years old, can it be obsolete now? Should it be removed? Maybe something wrong with the validator instead?

glebsam commented 1 month ago

The situation worsened, probably because quantity of validator nodes on the network fluctuates around 400, which means the node will sometimes submits full amount, sometimes half and loses cycles in between. Google Chrome 2024-08-16 14 49 59