Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
balance stake for both ton pool contracts #15
balance stake for both ton pool contracts #15
Changes from 6 commits
a8e314d
5187633
46f2bab
b5e1aea
02034c4
aa57df6
2f4bb68
49009cf
9916898
fe6272f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QQ:
Some validators bid but don't get into an active set of validators because they propose too little. Does this
min
represent the min of the active set?cc: @mikalsande coming from provider.get('past_elections', [])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it should be the active set. It fetches data from the last election, any validator that sends in too little stake should not have been part of that election. Actually, I have not verified whether this is true or not and it is difficult to verify because the elections are not full now :( Still, I think it is reasonable to use this.
If we want to really protect against using the wrong value is to check how long the list is. The chain config defines max validators in config option 16. So as long as the list is shorter or equal than that number (currently 400) it should be 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes this is the lowest of active set. For instance this is the data (using go code, but it's the same data):
And then you look at: https://tonscan.com/validation/1736724232 and see the same data with non-zero wieght for each validator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That could work, but also the validators above 400 won't be in this past elections structure. The reason is simple, this there is a hash for a validator set is present in the structure, meaning that it is calculated (and verified!) using the pubkeys / addresses in the frozen set.
At least that's how 99% of the blockchains would do, but this is TON :)