Dynamic opcode pricing #1566

Open
opened 2025-12-28 17:16:52 +00:00 by sami · 2 comments
Owner

Originally created by @roman-khimov on GitHub (Oct 20, 2025).

Originally assigned to: @Turalchik on GitHub.

  1. Actualize tests from https://github.com/neo-project/neo/issues/1875#issuecomment-709599810
  2. Do preliminary local tests.
  3. Sort out which opcodes are parameter-independent and which are not.
  4. Check current fees for simple opcodes, formulate recommendations if any.
  5. Create more detailed tests for more problematic opcodes.
  6. Collect results, create a model reflecting their dependence on inputs.
  7. Check security properties of this model.
  8. Implement the model and test it.
  9. Check results on other platforms.
  10. Check results against real transactions.
  11. Iterate till we have all associated problems solved.
Originally created by @roman-khimov on GitHub (Oct 20, 2025). Originally assigned to: @Turalchik on GitHub. 1. Actualize tests from https://github.com/neo-project/neo/issues/1875#issuecomment-709599810 2. Do preliminary local tests. 3. Sort out which opcodes are parameter-independent and which are not. 4. Check current fees for simple opcodes, formulate recommendations if any. 5. Create more detailed tests for more problematic opcodes. 6. Collect results, create a model reflecting their dependence on inputs. 7. Check security properties of this model. 8. Implement the model and test it. 9. Check results on other platforms. 10. Check results against real transactions. 11. Iterate till we have all associated problems solved.
Author
Owner

@AnnaShaleva commented on GitHub (Nov 7, 2025):

While we're here it will be extremely useful to evaluate and compare native contract methods execution time/cost against VM opcodes. We may take the execution time of NOP (or x*NOP) as a base and compare the execution time of all native methods with it.

The rationale is https://github.com/neo-project/neo/issues/3894, we need to make CPU fee of native methods be balanced. Ref. https://github.com/neo-project/neo/pull/4271#discussion_r2499054639, ref. https://github.com/neo-project/neo/pull/4150#discussion_r2303274653, ref. https://github.com/neo-project/neo/pull/3898#discussion_r2048097956 and other similar issues.

@roman-khimov, what do you think?

@AnnaShaleva commented on GitHub (Nov 7, 2025): While we're here it will be extremely useful to evaluate and compare native contract methods execution time/cost against VM opcodes. We may take the execution time of NOP (or x*NOP) as a base and compare the execution time of all native methods with it. The rationale is https://github.com/neo-project/neo/issues/3894, we need to make CPU fee of native methods be balanced. Ref. https://github.com/neo-project/neo/pull/4271#discussion_r2499054639, ref. https://github.com/neo-project/neo/pull/4150#discussion_r2303274653, ref. https://github.com/neo-project/neo/pull/3898#discussion_r2048097956 and other similar issues. @roman-khimov, what do you think?
Author
Owner

@roman-khimov commented on GitHub (Nov 7, 2025):

An additional task. Let's solve opcodes first.

@roman-khimov commented on GitHub (Nov 7, 2025): An additional task. Let's solve opcodes first.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neo-go#1566
No description provided.