You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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.
The text was updated successfully, but these errors were encountered: