Skip to content
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

Add fix for server verification #1094

Merged
merged 5 commits into from
Mar 13, 2024
Merged

Add fix for server verification #1094

merged 5 commits into from
Mar 13, 2024

Conversation

forgetso
Copy link
Member

@forgetso forgetso commented Mar 13, 2024

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 last n blocks are checked by the server, where n is derived from the maxVerifiedTime or 10 * 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.

@prosoponator prosoponator merged commit 0948c92 into main Mar 13, 2024
6 checks passed
@prosoponator prosoponator deleted the server-verification-fix branch March 13, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants