-
Notifications
You must be signed in to change notification settings - Fork 107
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
Mandatory commitments only #1138
Conversation
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.
+1
@@ -129,6 +131,21 @@ func scanCommitments(ctx context.Context, api *gsrpc.SubstrateAPI, startBlock ui | |||
return | |||
} | |||
|
|||
isMandatory := false |
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.
I would rather we go all the way and add a documented MandatoryCommitmentsOnly
config setting. Otherwise this code is going to be forgotten about it.
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.
We may not really need another config as it can be already achieved by setting
"update-period": 0 |
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.
Addressed in a791b2a.
We can use the update-period
but this is more explicit and is good for testing the mmr fix as well. Currently turning this setting on will fail untill we update from upstream polkadot-sdk. I tested this change with cherry-picking .
$ git cherry-pick e5bb11b008ca6c1b5a07cab94a2327538f3bf15c
I think this setting also works well with incentivizing beefy relayers. For instance, our relayer can run in a mode where it only sync's mandatory commitments (i.e. 1 commitment per epoch). And if there are pending messages and an incentive is provided by a user to speed up the transaction then it can sync the next commitment it sees.
89326d0
to
d18ebc2
Compare
Adds the
IsMandatory
flag toSafeScanCommitmentResult
. This is just appended to logging in this PR.But I used this flag to skip signed commitments that are not mandatory in order to test parity paritytech/polkadot-sdk#3108 .
We do not need code changes to support the fix. Leaving the IsMandatory field in here because I think its useful for logging. In the future we could use it to save costs by limiting submissions to the light client to only mandatory commitments.
Resolves: SNO-842