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

Nonce improvment (v4) #270

Closed
alexcos20 opened this issue Dec 3, 2021 · 1 comment · Fixed by #279
Closed

Nonce improvment (v4) #270

alexcos20 opened this issue Dec 3, 2021 · 1 comment · Fixed by #279
Assignees
Labels
Type: Enhancement New feature or request
Milestone

Comments

@alexcos20
Copy link
Member

alexcos20 commented Dec 3, 2021

Right now, provider is using a fixed nonce (meaning all requests must have a nonce = provider_stored_nonce)
This is cumbersome, what endpoint are incrementing that and what endpoints do not ?
An additional enpoint call is needed, in order to get the nonce from provider, increasing bandwith usage & using provider workers

Solution:

  • make nonce a float , so we can use timestamps with microseconds
  • all calls requiring a nonce should check if the incoming nonce (specified in the request) is higher (and not equal to) then provider_stored_nonce. If yes, request is valid and provider_stored_nonce = new_received_nonce
  • all clients (ocean.js/.py, market) can use timestamp (with microseconds) as nonce, thus not worrying about getting the last nonce
  • keep getNonce endpoint, if client wants to build custom nonce tracking

Con:

  • an address cannot have more then one call per microsecond, but we can live with that
@alexcos20 alexcos20 added the Type: Enhancement New feature or request label Dec 3, 2021
@alexcos20 alexcos20 added this to the V4 milestone Dec 3, 2021
@LoznianuAnamaria LoznianuAnamaria linked a pull request Dec 7, 2021 that will close this issue
@calina-c calina-c mentioned this issue Dec 8, 2021
@calina-c
Copy link
Contributor

Closed by #279

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants