Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: split stake in 2 when not elected / ValidatorList in testnet #260

Open
wants to merge 2 commits into
base: mytonctrl2
Choose a base branch
from

Conversation

redref
Copy link

@redref redref commented May 19, 2024

No description provided.

@redref redref marked this pull request as ready for review May 20, 2024 09:48
@redref redref changed the title fix: split stake in 2 when not elected / ValidatorList in textnet fix: split stake in 2 when not elected / ValidatorList in testnet May 20, 2024
@redref
Copy link
Author

redref commented May 20, 2024

Not tested in mainnet yes, but if you can confirm this a right solution, I could.

@yungwine
Copy link
Contributor

Can you describe a bug that you're trying to fix?

@redref
Copy link
Author

redref commented May 20, 2024

Can you describe a bug that you're trying to fix?

Sure. FTR, this was in testnet.

  • Run mytoncore
  • First election on single nominator pool send (pool balance / 2) as expected to elector
  • Stake is too low => not elected
  • During the stake period, amount is recovered
  • Next election, as temporary validation key is present on validator, election send (pool balance) to elector, but behavior should be the same as the first election

This check temporary key is in active period and we are not an active validator to check validator was not elected, which avoids a different behavior. We could argue it gives better chance to be elected in second iteration, but in my POV, if we want to solve this issue, it would be best solved otherwise.

For testnet, I had to fix GetValidatorsList() which does not work properly (checkloadall returns nothing or raise an error, but I think that's expected).

@redref
Copy link
Author

redref commented Jun 22, 2024

Any news ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants