-
Notifications
You must be signed in to change notification settings - Fork 77
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
Update GAS distribution logic, part1 #1364
Conversation
pkg/core/native/native_neo.go
Outdated
if !n.votesChanged.Load().(bool) { | ||
return nil | ||
} | ||
pubs, err := n.GetValidatorsInternal(ic.Chain, ic.DAO) | ||
pubs, err = n.GetValidatorsInternal(ic.Chain, ic.DAO) |
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.
It'd be nice to split GetValidatorsInternal
to not call GetCommitteeMembers()
twice (it has some cost to it).
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.
Fixed (GetCommitteeMembers
is not cached)
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.
But I don't see any change wrt this issue.
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.
Added committee
caching.
Linter still isn't happy. |
Codecov Report
@@ Coverage Diff @@
## master #1364 +/- ##
==========================================
+ Coverage 70.29% 76.85% +6.56%
==========================================
Files 219 219
Lines 16890 17012 +122
==========================================
+ Hits 11873 13075 +1202
+ Misses 4295 3063 -1232
- Partials 722 874 +152
Continue to review full report at Codecov.
|
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.
Looks good now, but I'll let it hang for a while until we finish our TPS improvements (this one may affect it).
Please, rebase it. It's outdated a little wrt C# implementation, but it's a nice starting point. |
I don't see changes from neo-project/neo#1884 there (like PostPersist). Same thing with neo-project/neo#1917. |
@roman-khimov changes in neo-project/neo#1917 are overriden by ones from neo-project/neo#1920 . I wanted to do |
Update frequency depends on committee size and amount of validators. For mainnet it is 28.
It should be called for NEO contract to distribute committee bounties.
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.
We still have duplicate AER problem, but let's create a separate issue for that.
Related #1348 .
Implement distribution to NEO holders and validators.