[bisq-network/bisq] Add irregular txType, add check for total balance, prevent proposal withhold attack (#2587)

Manfred Karrer notifications at github.com
Sat Mar 30 15:31:52 UTC 2019


ManfredKarrer commented on this pull request.



> @@ -219,12 +222,14 @@ private void publishToAppendOnlyDataStore() {
                 .filter(proposal -> validatorProvider.getValidator(proposal).isValidAndConfirmed(proposal))
                 .map(ProposalPayload::new)
                 .forEach(proposalPayload -> {
-                    boolean success = p2PService.addPersistableNetworkPayload(proposalPayload, true);
-                    if (success)
-                        log.info("We published a ProposalPayload to the P2P network as append-only data. proposalTxId={}",
-                                proposalPayload.getProposal().getTxId());
-                    else
-                        log.warn("publishToAppendOnlyDataStore failed for proposal " + proposalPayload.getProposal());
+                    UserThread.runAfterRandomDelay(() -> {
+                        boolean success = p2PService.addPersistableNetworkPayload(proposalPayload, true);
+                        if (success)
+                            log.info("We published a ProposalPayload to the P2P network as append-only data. proposalTxId={}",
+                                    proposalPayload.getProposal().getTxId());
+                        else
+                            log.warn("publishToAppendOnlyDataStore failed for proposal " + proposalPayload.getProposal());
+                    }, 100, 5000, TimeUnit.MILLISECONDS);

Yes, maybe we need a more sophisticated solution here... or just increase the delay?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/2587#discussion_r270630345
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190330/ffa9f00b/attachment.html>


More information about the bisq-github mailing list