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

Tests: disable EOS VM OC's subjective limits during unit tests #1573

Closed
spoonincode opened this issue Aug 27, 2023 · 0 comments · Fixed by #1843 or #1874
Closed

Tests: disable EOS VM OC's subjective limits during unit tests #1573

spoonincode opened this issue Aug 27, 2023 · 0 comments · Fixed by #1843 or #1874
Assignees

Comments

@spoonincode
Copy link
Member

When nodeos uses EOS VM OC it (..except for when a special compilation flag is used..) uses OC in a tier up manner: contract execution is dispatched to the baseline runtime (EOS VM JIT) while OC is in the process of compiling the contract or potentially forever should OC decide to blacklist the contract due to it failing subjective compilation limits.

When EOS VM OC is used in unit tests it's used in a different manner: contract actions are not dispatched until EOS VM OC has finished compilation, and only EOS VM OC is used -- there is no baseline. I tend to refer to this as synchronous mode. This is an important mode of operation because generally all actions in a test need to be dispatched to OC to ensure complete test coverage with OC.

However, this means if a unit test runs afoul of EOS VM OC's subjective complication limits the unit test will fail: that unit test cannot dispatch the expected action because OC has blacklisted the contract and there is no baseline that can be used. This is most notably problematic for EOS EVM because EOS EVM's exhaustive tests run afoul of OC's subjective limits, but we'd really like to run those EVM exhaustive tests with OC to make sure everything is operating correctly with 5.0's default eos-vm-oc-enable=auto

OC's subjective limits also prevent ASAN from being used while OC is enabled, because ASAN's 16TB of virtual memory usage is flagged by OC's subjective limits.

OC's "synchronous mode" used during unit tests should disable its subjective limits. Bonus points for making the subjective limits knobs that a unit test can control as that may make it easier to ensure that the subjective limits are working properly.

@bhazzard bhazzard added 👍 lgtm and removed triage labels Sep 21, 2023
@bhazzard bhazzard added this to the Leap v5.0.0-rc1 Non Critical milestone Sep 21, 2023
@bhazzard bhazzard changed the title disable EOS VM OC's subjective limits during unit tests Tests: disable EOS VM OC's subjective limits during unit tests Sep 28, 2023
@bhazzard bhazzard modified the milestones: Leap v5.0.0-rc3, Leap v5.0.1 Oct 24, 2023
@linh2931 linh2931 self-assigned this Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment