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

Request missing addresses while receiving a new last address #713

Closed
Neylix opened this issue Nov 24, 2022 · 0 comments · Fixed by #748
Closed

Request missing addresses while receiving a new last address #713

Neylix opened this issue Nov 24, 2022 · 0 comments · Fixed by #748
Assignees
Labels
bug Something isn't working DB Involve database

Comments

@Neylix
Copy link
Member

Neylix commented Nov 24, 2022

Describe the problem you discovered

When a node is a storage node of any transaction of a chain, it is notified when a new transaction is created in this chain.
This notification aims to append the new transaction address in the DB, so the node always know the last address of a chain it is storing.
But for some reason, it way happen that a node do not receive some notification and when it will receive the next one, the DB will append the transaction address without the ones previously missed.

Describe the solution you'd like

When a node receive a last address notification (NotifyLastTransactionAddress message), the node should verify that it's last local address is the previous address of the new last address it receive.
If it is the case, append the address in DB, if not the node should request the missing address between it's last local address and the last it received, and append them in DB in chronological order.

Edit :
In the PR #671 a new message has been created to ask the missing addresses of a chain GetNextAddresses. This message can be reused. The integration is in the repair_worker file, but it may be moved in self_repair file to have a common function for repair_worker and notify_last_address

@Neylix Neylix added bug Something isn't working DB Involve database labels Nov 24, 2022
@tenmoves tenmoves self-assigned this Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working DB Involve database
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants