Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add eos-vm-oc-enable auto mode #1322
Add eos-vm-oc-enable auto mode #1322
Changes from all commits
9229b34
a05077a
c167373
e7f1406
34fa470
360ffb5
23f6db5
1cc64a0
025bc22
f2123ea
9faefa2
8fc11f0
8706738
98e3b81
d4ee46b
dc00e24
6008c72
d373b1d
da236cb
975ad13
774fd21
b260447
a8f20ce
7c43e00
cd744f5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kind of sad about this change. Until now, the core of leap had no need to know if it was a producer or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, I guess depending how much of a purist you want to be here, maybe you could make controller take a
std::function<bool(apply_context)> tier_up_with_oc
, either as a ctor parameter or a config or something. That waychain_plugin
can decide how to set this up based on the various configs. And libtester just always passes in areturn false;
for example, I guess.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that seems a bit too far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation copied from CDT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no functionality change here, just a refactor out of controller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lost an
#ifdef EOSIO_EOS_VM_OC_RUNTIME_ENABLED
on these couple lines during the refactorThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if most of the
#ifdef EOSIO_EOS_VM_OC_RUNTIME_ENABLED
could be removed to simplify differences. For now, I'll just revert back to having them.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restored
#ifdef
sThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this refactoring. It hides those details from the controller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add some tests for
auto
,all
, andnone
options to make sure OC is enabled/disabled as configured?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any ideas on how? Unfortunately, oc is not setup to be used in unittests because the destructor of
tester
->controller
destroys oc and it can't be restarted because it forks the process on start. Seems like it would require a major refactor to allow oc to be used repeatably in unittests.We could add some logging and look for a particular log in some integration tests. Let me see what I can do for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's surprising to hear -- it was definitely originally designed so that multiple
controller
s using OC can exist simultaneously: we have unittests that do that.But, that was for the non-tier-up usage of OC. So maybe there was a shortcoming of the original impl in this area. Or maybe we've regressed some how.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Integration test added.