-
Notifications
You must be signed in to change notification settings - Fork 715
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
[NET] Invalid blocks from forks stored on disk fix + blocks DoS spam filter. #803
[NET] Invalid blocks from forks stored on disk fix + blocks DoS spam filter. #803
Conversation
loop through forked blocks fix Invalid blocks from forks stored on disk Fix + Blocks DoS spam filter minor re organization minor cosmetic changes comments
… prev split main chain
66ed1e6
to
c2e5459
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah cool @cevap 👍 , we did it too. Preparing the final report and a new test suite that contains an expanded coverage of the characteristics of our blockchain. Hopefully will be ready soon. The published vulnerability report is just the tip of this, not really covering our full specs. |
I tested your code main.cpp.zip on the Safeinsure blockchain, which contains this exception, with bootstrap and does not work properly, make the infinite loop! |
Sorry @pwte , i cannot download external files or check other blockchain code. PIVX has plenty of forks, impossible to know what everyone is doing. Here it's working fine the PR and solves the base attack scenarios (still a work in progress and lots of tests that needs to be done) |
You just can just look on the logs(debug.log) |
@pwte last night I bootstrapped a PIVX wallet without problems, so your exception is most probably related to your changes of the code. |
I'm glad to hear that. |
Everything you've done until now it's theoretical, you haven't tested on real situations |
Actually, I have. This is not theoretical at all, we have a new test suite that it's running most of the possible scenarios. And it's working fine using this code. Only zerocoin scenarios left to be completed and will be pushed here too. And again, will not open logs from other projects. Impossible to know what code you have there. If you can replicate it on PIVX paste the log here, no files. |
…de the same block
…ttps://github.com/furszy/PIVX into invalid_blocks_storage_and_blocks_DoS_spam_filter
d90d307
to
0d49570
Compare
preparing 3.2.0.5 Addresses https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-6250 Merge PIVX-Project/PIVX#803, addressing fake stake attack https://medium.com/@dsl_uiuc/fake-stake-attacks-on-chain-based-proof-of-stake-cryptocurrencies-b8b05723f806 # Conflicts: # src/main.cpp PR #803 Fake Stake merge Update "fake stake" patch Updating PR#803 from PIVX-Core addressing Fake Stake attack # Conflicts: # src/main.cpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 61a6ea7
…ks DoS spam filter. 61a6ea7 AcceptBlock() for-each loops variables moved to const (furszy) e1974d2 AcceptBlock() check for double spent serials only on main chain flag. (furszy) babdfb0 remove extra debug lines in AcceptBlock (random-zebra) a9178bc AcceptBlock: contextual zcspend check on main chain (random-zebra) 0d49570 AcceptBlock() block stored log removed (furszy) b749217 Fix bug on AcceptBlock when pindex is null (random-zebra) 45883b9 AcceptBlock() invalid isBlockFromFork flag (furszy) 6a16049 AcceptBlock() reject blocks double spending the coin stake input inside the same block (furszy) da1b683 block spam filter, validate non null nodestate (furszy) 84de55a AcceptBlock() isBlockFromFork flag not contemplating prev blocks from forks fixed (furszy) 4219339 AcceptBlock() - not accept blocks from a forked chain that exceed the max reorg limit (furszy) 47759e1 AcceptBlock(), reject invalid PoS stake (furszy) e237823 validate non null pfrom on blockspamfilter check (furszy) c2e5459 AcceptBlock(), serial double spend on the same block validation (furszy) 3f50919 zPoS validations of forked chains before store them + inputs check on prev split main chain (furszy) 64804b4 Invalid blocks from forks stored on disk fix + blocks DoS spam filter. (furszy) Tree-SHA512: 6c5a7fda3eb81dc8b030c9ba624e5101f552ef9cecc839a79237b705c314171c0e9c66ecd8bfd207081c6759272140cf3bdf0da7af6ac4695f0c09b74fb1ba45
These changes should fix the "fake stake" issue described at; https://pivx.org/fake-stake-official-pivx-report PIVX-Project#803
These changes should fix the "fake stake" issue described at; https://pivx.org/fake-stake-official-pivx-report PIVX-Project#803
This PR mitigates the following problems:
Thanks to @random-zebra for the team work on this topic.
This work will be properly detailed on the next days of QA.