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

Improve synchronization when node ip changes #887

Closed
Tracked by #930
Neylix opened this issue Feb 5, 2023 · 1 comment · Fixed by #930
Closed
Tracked by #930

Improve synchronization when node ip changes #887

Neylix opened this issue Feb 5, 2023 · 1 comment · Fixed by #930
Assignees
Labels
bug Something isn't working networking Involve networking self repair Involve SelfRepair mechanism

Comments

@Neylix
Copy link
Member

Neylix commented Feb 5, 2023

Describe the problem you discovered

  • Actually there is a scheduler that runs every 5 minutes to open port and verify if node ip is changed.
    If node ip changes, it create a new node transaction with the new ip and send it to the network.
    The problem is that since the node has changed it's ip, other nodes cannot send it request. So the replication of the node transaction will never be sent to the node which changed it's ip. So this node will not load update the last public key of itself and it will result in invalid election error until the next self repair. (Last public key is used for validation node election).

  • Other issue is that this node didn't receive transaction during the time between it changes it's ip and the new transaction was replicated by other nodes. So this node may missed some network transaction, (shared secret, nodes, oracle ...)

Describe the solution you'd like

  • When a node create a transaction and send it, it should ask the transaction summary to other nodes and replicate this transaction if the summary exists. Same as in bootstrap transaction node (bootstrap/transaction_handler), but replicate the transaction.

  • After the new node transaction is validated (summary retrieved and replication done) the node should resync the network transactions, as it is done in post_bootstrap (function resync_network_chain), but it should also include node transaction (for both, post_bootstrap and in network scheduler)


Epic: #245

@Neylix Neylix added bug Something isn't working self repair Involve SelfRepair mechanism networking Involve networking labels Feb 5, 2023
@samuelmanzanera
Copy link
Member

For the 1st problem, indeed we can wait confirmations of the tx, and request replication.

For the 2nd problem, we might think of a more global solution (not only when the node's IP change). For example, during transaction validation check if the previous transaction exists (in the case of network tx), otherwise download it from authorized nodes, to be able to successfully validate the tx in the latest state.
The replication handles the repair of the sync of network tx (if the last is missing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working networking Involve networking self repair Involve SelfRepair mechanism
Projects
Status: Done 🍻
Development

Successfully merging a pull request may close this issue.

3 participants