-
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
Some of VM benchmark scripts are improperly constructed #3523
Comments
is not necessary, its benchmark, we just need to know how long it could run, even if it faults, actually worse case fault is normal cause it runs until it exhaust the gas, instead of reaching a halt states. |
It is necessary for those benchmarks that are expected to end in HALT state.
As I said in the issue, for these benchmarks we need to check the exact exception message, i.e. to check that the failure reason is exactly run out of GAS. Otherwise, this benchmark is invalid.
Well, half of benchmarks from #3512 fail on something like third instruction execution, e.g.:
|
we added some limits to the vm.since those pocs. any way, you do it if you think its the best, these pocs are no.longer that importsnd to me, they helped me to rise the attention of this issue already, we can focus on benchmarking opcodes. |
BTW, those are not benchmark for opcodes, but PoCs, opcode benchmarks are different. |
Yeah. And they're broken. They are not proving anything. If you like them this way --- well, ok. |
Its not about i like it or not, its that all of those PoCs are meaningless for me now, what is important for me is the precise benchmark for opcodes, so, you can say those PoC as a bug, or you can also ignore them, i am ok with either. |
Describe the bug
Some of benchmarks added in #3512 result in FAULTed VM. It happens because these benchmarks are old, they use
NEWBUFFER
with too large argument:Whereas since neo-project/neo-vm#514 VM limit for stackitem size is
2*maxUint16
. The results corresponding with faulty benchmarks posted in #3512 (comment) are invalid.The following benchmarks must be rewritten and fixed:
NeoIssue2723
PoC_NewBuffer
PoC_Cat
PoC_Left
PoC_Right
PoC_Substr
PoC_MemCpy
To Reproduce
Take the following code that runs benchmarks:
neo/benchmarks/Neo.VM.Benchmarks/Benchmarks.POC.cs
Lines 387 to 395 in 5d2d8da
Replace
Debug.Assert(engine.State == VMState.HALT);
statement with the following:Expected behavior
All benchmarks must not use
NEWBUFFER
with invalid (too large) argument. All benchmarks should end in HALT VM state except those benchmarks that use endless cycles. Benchmarks with endless cycles must be checked against resulting execution error: the error must be caused by the end of GAS.Platform:
The text was updated successfully, but these errors were encountered: