-
Notifications
You must be signed in to change notification settings - Fork 861
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
Less strict engine QoS timer #4411
Less strict engine QoS timer #4411
Conversation
…nsitionConfiguration mismatch will only submit a debug log not a warning anymore Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
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.
LGTM, just a question,
why have not you done the common engineCallListener.executionEngineCalled()
call in the parent class? in that wat it could be inherited easily by future engine apis
@fab-10 To make it possible to unit test. There is no acceptance test to test it and not really any other good way except for unit tests. As this timer will most probably be removed in future hard forks, I thought it is a justified tradeoff. |
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.
Looks great. There is a non-blocking DRY opportunity, but otherwise 🚢
@@ -116,6 +121,7 @@ public void shouldReturnValid() { | |||
assertThat(res.getLatestValidHash().get()).isEqualTo(mockHeader.getHash()); | |||
assertThat(res.getStatusAsString()).isEqualTo(VALID.name()); | |||
assertThat(res.getError()).isNull(); | |||
verify(engineCallListener, times(1)).executionEngineCalled(); |
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.
👍
@@ -70,8 +59,7 @@ public String getName() { | |||
|
|||
@Override | |||
public JsonRpcResponse syncResponse(final JsonRpcRequestContext requestContext) { | |||
// update our QoS "last call time" | |||
getQosTimer().resetTimer(); | |||
engineCallListener.executionEngineCalled(); |
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.
Minor point, we can DRY these up by adding this call into ExecutionEngineJsonRpcMethod.response()
method rather than having it each engine api endpoint.
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.
The reason why I did not do that, was because of the unit tests. When I move it there, I am not sure if I can still test the correct behavior with the unit tests. Do you think it would still be possible?
Fabio had the same question:
#4411 (comment)
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.
The failing unit test for EngineQosTimerTest implies something outside the try block is throwing before the async can complete.
...va/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineQosTimerTest.java
Outdated
Show resolved
Hide resolved
...va/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineQosTimerTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
⛴️ |
… more than once if the verification get delayed Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
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.
🚢
…straint systems, like CI Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* reset engine QoS timer with every call to the engine API, ExchangeTransitionConfiguration mismatch will only submit a debug log not a warning anymore Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Daniel Lehrner daniel.lehrner@consensys.net
PR description
Resets engine QoS timer with every call to the engine API instead of only when
ExchangeTransitionConfiguration
is called.ExchangeTransitionConfiguration
mismatch will only submit a debug log not a warning anymore.Fixed Issue(s)
fixes #4404
Documentation
doc-change-required
label to this PR ifupdates are required.
Changelog