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

Network protocol keeps requesting data the peer does not have #2138

Open
gerardsn opened this issue May 10, 2023 · 3 comments
Open

Network protocol keeps requesting data the peer does not have #2138

gerardsn opened this issue May 10, 2023 · 3 comments

Comments

@gerardsn
Copy link
Member

gerardsn commented May 10, 2023

Situation:

  • Alice tries to handleTransactionList received from Bob
  • While adding one of the transactions to the DAG, it fails with dag.ErrPreviousTransactionMissing
  • Alice immediately sends a State message to Bob to restart the set reconciliation
  • Bob does not have the missing transaction so ends up sending the same transactionList as before (DB is corrupt? attacker?)
  • go back to step 1

It's unlikely that Bob is going to send a different result than last time, so it's likely to fail again.

This generates a lot of traffic since there is no delay between the two attempts. A solution is not obvious to me since adding a delay is just reducing the amount of spam a bit, but permanently blocking is not an option either.

@woutslakhorst
Copy link
Member

It might be best to stop processing when a transaction is missing? Most likely you'll just get it from a different node.

@gerardsn
Copy link
Member Author

I agree. This is a very specific example, but requesting the same data again is unlikely to result in a different outcome. The only plausible situation I can think of is when a DID needed to validate a transaction has been added to the DAG, but not yet processed by the VDR.

Stopping the conversation/reconciliation adds a retry interval equal to the length of the gossip interval.

@woutslakhorst
Copy link
Member

We'll need to change RFC017 first...
nuts-foundation/nuts-specification#262

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

No branches or pull requests

2 participants