-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Compensation Request Proposals not deleted as expected #3610
Comments
Thanks for looking into that! Regarding your suggestions: Maybe you can try that out and see if it causes any problems. Important will be to test also the mixed cases with an old and new client (I usually have then 2 IDEA instances open, one with old version, one with new version). There might be the problem that old node creating a If we change the TempProposal we likely do not to support the old version (maintaining 2 classes and lists) as it is not part of consensus and resyncing the DAO should not have any effect on that. We have a version flag for all DAO txs (in Maybe we should make a summary of all our features how we can deal with backward compatibility. Its quite complex and there are already several features available. Re 2: But also here the main challenge will be backward compatibility. |
In this issue, I will explain the source of the bug that resulted in removed Compensation Request proposals persisting through the Proposal phase and being broadcast during the Blind Vote phase. At the end, I will throw out a design idea, but we should have a design discussion on what the options are and the best path forward to fix this in a safe way.
Repro
Root Cause
TempProposalPayload objects implement the ProtectedStoragePayload & PersistablePayload interfaces. This means that they will be stored to disk. But the current system design does not handle removes of persistable Entrys that occur when nodes are offline.
When Bob's Bisq instance is taken down, the TempProposal object is written to disk. When it is restarted it will read the on-disk instances and recreate the TempProposal that is consumed by the ProposalService.
Removes are never rebroadcast after the initial RemoveData message and the RequestData/GetData path does not handle removes, only adds. So, Bob will never learn that a RemoveData message was sent for the TempProposal that he recreated. At this point, it is only a local problem.
However, once blocks are added to move to the Blind Vote phase, maybePublishToAppendOnlyDataStore() is called on Bob which recognizes that the AppendOnlyDataStore does not have the proposal and it is broadcast to the entire network as a PersistableNetworkPayload.
So, it only takes 1 node not seeing the RemoveData that causes all nodes on the network to receive it as append-only data.
Risks & Mitigation
For now, this bug is handled through publishing the appropriate proposal tx id with the compensation request on the Github issue in the proposals repo. It is up to all voters to vote NO on any duplicates. This seems like an OK solution for the current cycle.
Designs moving forward
This would require the network to stay healthy throughout the proposal phase until the Blind Vote phase where all non-persistent proposals will be added as append-only data.
Work would be required to bootstrap this and remove any saved TempProposals on nodes that currently exist.
This is a larger design and probably worthy of its own design doc and discussion, but here is an idea off the top of my head:
Add fields to the GetData message handshake which includes hashes that have been removed:
This requires a new GetData message type field and the interop between old and new nodes would require some thorough testing.
The text was updated successfully, but these errors were encountered: