fix: improve reliability of get block template protocol in mm proxy #3141
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.
Description
The main change here is to check the tip height after retrieving the
block template but before MMR roots are calculated. When mining quickly
in cucumber tests, this race condition occurs. Previously, this would be
ok, the miner would simply mine 1 behind the current tip height. But
because we can no longer calculate MMRs prior to the tip, this MMR call
(
get_new_block
) now returns an error, which fails cucumber.get_new_block
now returns aFailedPrecondition
GRPC error status in the eventthat the block template submitted is not for the current chain tip. This allows
clients to more easily identify this case, typically by asking for a new template.
This refactor was performed because the protocol was gaining too much
complexity to exist in a single function.
Some extra changes to get all cucumbers to pass:
--daemon
flags with--non-interactive
As a user I want to change base node for a wallet
scenarioMotivation and Context
The
Verify all coinbases in hybrid mining are accounted for
cucumber test is flakeydue to change in semantics for get_new_block since #3109. The possibility of this occurring
with normal difficulties is usually tiny, but may be a symptom of a slow get_coinbase request.
How Has This Been Tested?
Merge mined on local machine
Verify all coinbases in hybrid mining are accounted for
passesSuggest that we run tests with monero pool and nodejs pool
Checklist:
development
branch.