ton-blockchain / mytonctrl

A tool to run and maintain a TON node/validator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

glebsam opened this issue · comments

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:

elif len(vconfig.validators) == 0:
stake = int(account.balance*sp/2)

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?

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