-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fixed some opcode price #2020
Fixed some opcode price #2020
Conversation
Ping |
Wait 24 hours to see other people's opinions. |
Can we postpone this and change all opcodes in a single PR? It does improve some things, but at the same time we have a lot of other clear proven mismatches between execution cost and opcode price (and opcodes also have a lot of inter-relations, so modifying some without touching another is a bit inconsistent, like not changing obviously overpriced PICKITEM or HASKEY here). So maybe we're better changing them all once, of course with proper discussion for every change and actually starting with simpler things like pushes/stack management (that are also quite consistent across two VM implementations) and then moving on to more complex ones like things touched here. This change can also then be easily weighted against preview3 testnet transaction set (just as a reality check), doing that with full instruction set is easier. As for particular changes:
|
@roman-khimov Hey folk, ur tests are upon neo-go, which might be not enough as a proof due to code difference & difference between C# and Go. |
If I were to use neo-go only to build the table it would look quite different from what it looks like. Both implementations matter and both should be accounted for. But even that is not the main point. The main point is that we have consistent reproducible (at least for neo-go, I don't know what code has tested neo-vm) results that reliably show things like (proven by two VM implementations):
Should we ignore these? I don't think so. I think that's where we can and should set prices very close to actual execution cost. But of course then there are more complicated instructions. Things where the difference between typical and worst-case cost can be 100- or even 1000-fold. And where implementations differ. These can be additionally discussed, tested and wheighted. Setting all of them using worst-case only data for one implementation is wrong, but at the same time we probably can all agree that we can't use 1/100 of this worst-case cost too. And,
It's important to evaluate the effect of these changes using at least some transaction set we have. |
@roman-khimov I think u'd better re-test tests of neo-go in neo-vm C# and see what's the difference. In the result u listed in #1875 , there are some opcodes whose exhausted time period are totally different from possible cases in neo C# (i.e. DUP). I don't know how u write neo-vm in GO, but it's worthy to examine how much differences there can be between the 2 solutions, to make sure that we are talking about the same matter. |
Ping |
…rices Resolve opcode price conflict (neo-project#2020).
Changes ported from neo-project/neo#2020.
Close #2004
Fixed some opcode prices which can be used for DOS attack.