add feeRecipientDiff as return value #150
Closed
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.
In order to perform profit switching between payloads constructed from multiple sources, the profit switcher needs to be made aware of the value of a payload produced locally and be able to measure the value of a payload produced by a third party.
For this, we need to define a standard way to measure the value of a payload and include it in the engine API.
I propose we define a new value called
feeRecipientDiff
which represents a signed integer denominating the change in balance of thefeeRecipient
address defined in theExecutionPayload
object.I avoided adding
feeRecipientDiff
directly to theExecutionPayload
object as it seemed to introduce unnecessary complexity with sending the value around the network and handling it as part of block validity.Instead,
feeRecipientDiff
can be added as a return value to theengine_executePayloadV1
andengine_getPayloadV1
functions.This is currently spec'ed as a mandatory return value as I expect making it optional will cause setup confusion when users configure their nodes.