-
Notifications
You must be signed in to change notification settings - Fork 216
Xtreme Thinblocks v12.0 #10
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
Conversation
206f8ef to
4bf5e5a
Compare
|
@gandrewstone Ok, I was able to get the SendSeededBloomFilter and HandleBlockMessage out and put into unlimited.cpp. |
4bf5e5a to
984a51e
Compare
|
@gandrewstone I've taken out all the functions and also made comments in the code referring to BU. I'm wondering though whether for the code that doesn't lend itself well to being put into functions if we should rather put in comments around the code such as //BU: Xtreme thinblocks - begin section and then // BU: Xtreme thinblocks - end section. So that on the next release we can just grep through the files looking for those BU sections? |
285f908 to
3d86b0e
Compare
0a34f51 to
01132ca
Compare
|
I think this is pretty much done...can you take another look. The only areas I really couldn't take out were starting at line 4588 and 5938 of main.cpp as there is some sort of compiler issue, something to do with the way they coded MarkBlockAsInFlight(). Areas I left in I surrounded with //BUIP010 begin and end sections. Also, I left in the four new message type in main.cpp since there should never be a merge conflict with those. Let me know what you think... |
0ca8b7b to
8950f57
Compare
|
Made an update to HaveThinBlockNodeConnections. There was a bug there that could cause nodes to form a kind of deadlock where no new blocks could get downloaded if they were cross connected using "connect-thinblock=ip" and when they had no other thinblock node connections. Now it doesn't matter how many or few connect-thinblock connections, either in/outbound there are. Also, it speeds up that part of the code because we don't have to repeatedly call "findnode" which then repeatedly locks/unlocks vNodes. |
6e39771 to
2c9e2c6
Compare
Sends a seeded bloom filter along with a getdata and receives an xthinblock transaction in return which includes all missing transactions and tx hashes. Once received the block is reconstructed. Additional bandwidth is saved by using a 64 bit Tx hash instead of all 256 bits. Hash collisions in the memory pool will be extremely rare however if one should happen then a regular thinblock will be re-requested. Transactions still missing will be re-requested and retrieved from a block rather than the mempool. They will be sent back in one thinblocktx object. Originally Inspired by Mike Hearn xthinblock + coinbase (dagurval)
2c9e2c6 to
2b9b16e
Compare
|
Hi Peter I've just built xthinkblock_0.12 branch and I got those warnings (ubuntu 14.04 64bit, gcc 4.8.4) :
|
|
closing as not needed. |
bitcoin-tx: Decouple max-tx-size from max-block-size
…n-msg Temporarily disabled pushing xthin msges in front of the send queue.
51d3ab34ba Merge BitcoinUnlimited#10: Add pushKV(key, boolean) function (replaces #5) 129bad96d5 [tests] test pushKV for boolean values b3c44c947f Pushing boolean value to univalue correctly git-subtree-dir: src/univalue git-subtree-split: 51d3ab34ba2857f0d03dc07250cb4a2b5e712e67
Here's the latest ported to v12. All working and tested.
@gandrewstone I cleaned up the thinblocks.h a bit but the classes should in future be using a template. I believe since @YarkoL is going to be working on extending xthinblocks to 32bit, 40bit etc...hashes he'll need to refactor and use a template for that anyway. For me to do it now just for the sake of one small subclass seems a bit much work and then re-testing effort on top of it.
@gandrewstone I moved some functions and declarations to unlimited.cpp. I've done the easy stuff but am having difficulty with some of them claiming that CNode is not declared but as far as I can tell it is...I'm sure I'm doing something wrong that is so simple just I can't see it. I tried with HandleBlockMessage and SendSeededBloomFilter but It seems to be a bit of a hair pulling exercise and I'm going around in circles.