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

Lower committee/validators getters price in NEO contract #2391

Closed
roman-khimov opened this issue Mar 11, 2021 · 0 comments · Fixed by #2392
Closed

Lower committee/validators getters price in NEO contract #2391

roman-khimov opened this issue Mar 11, 2021 · 0 comments · Fixed by #2392
Labels
Discussion Initial issue state - proposed but not yet accepted

Comments

@roman-khimov
Copy link
Contributor

Summary or problem description
getCommittee and getNextBlockValidators calls cost (1 << 22) * ExecFeeFactor at the moment which in default configuration is 1_25829120 GAS. I think there are two problems with this value:

  • it's not justified by real execution cost
    Nodes cache committee in memory, so unlike getCandidates these calls don't walk through the DB, they're more like getRegisterPrice or getGasPerBlock in terms of real execution overhead. This is true for both C# and Go implementations and any other ones are likely to do this too.
  • this cost is much higher than MaxVerificationGas, so it's impossible to use these methods in verification scripts/contracts
    Both entities (committee and validators) play an important role, so there are use cases for accessing them in verification context. For example, that's the way we'd like to get NeoFS alphabet nodes for NeoFS governance by mainnet Committee #2267 implementation.

Do you have any solution you want to propose?
Change price of these calls to 1 << 16.

Neo Version

  • Neo 3

Where in the software does this update applies to?

  • Other: NEO native contract
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Initial issue state - proposed but not yet accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant