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.
When a user has an existing local storage provider entry, the provider is contacted directly to provide the payload. The blockNumber was not provided with the payload. This PR changes the provider API so that
blockNumber
(the block at which the challenge was requested), is included in the verify response from the provider. This allows the server side to check that the provider was chosen at the specific block time.There are also changes made to the server to handle the case where no
blockNumber
is passed. in this case, the lastn
blocks are checked by the server, wheren
is derived from themaxVerifiedTime
or10 * expectedBlockTime
.The
maxVerifiedTime
could technically be set very high, causing delays in responding, but this value is only set on the server side so that would be a user error.