Bitcoin Forum
May 13, 2024, 09:14:12 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 [13]  All
  Print  
Author Topic: [20 BTC] Multithreaded Keep-alive Implementation in Bitcoind  (Read 31401 times)
c_k
Donator
Full Member
*
Offline Offline

Activity: 242
Merit: 100



View Profile
November 25, 2011, 10:36:48 AM
 #241

http://davids.webmaster.com/~davids/bitcoin-4diff-5beta.txt

This is a "first working version". It patches cleanly, compiles, and passes my basic functional tests.

Quite a few of my optimizations were already made. Yay!

I guess I'll have to start working on some new ones.


Hi David,

What are your thoughts on the final 0.5.0 release?

1715634852
Hero Member
*
Offline Offline

Posts: 1715634852

View Profile Personal Message (Offline)

Ignore
1715634852
Reply with quote  #2

1715634852
Report to moderator
1715634852
Hero Member
*
Offline Offline

Posts: 1715634852

View Profile Personal Message (Offline)

Ignore
1715634852
Reply with quote  #2

1715634852
Report to moderator
Even in the event that an attacker gains more than 50% of the network's computational power, only transactions sent by the attacker could be reversed or double-spent. The network would not be destroyed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715634852
Hero Member
*
Offline Offline

Posts: 1715634852

View Profile Personal Message (Offline)

Ignore
1715634852
Reply with quote  #2

1715634852
Report to moderator
1715634852
Hero Member
*
Offline Offline

Posts: 1715634852

View Profile Personal Message (Offline)

Ignore
1715634852
Reply with quote  #2

1715634852
Report to moderator
JoelKatz
Legendary
*
Offline Offline

Activity: 1596
Merit: 1012


Democracy is vulnerable to a 51% attack.


View Profile WWW
November 25, 2011, 09:17:33 PM
 #242

Hi David,

What are your thoughts on the final 0.5.0 release?
Unfortunately, I've been completely swamped with work lately, and I haven't had a chance to look at it yet.

I am an employee of Ripple. Follow me on Twitter @JoelKatz
1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
c_k
Donator
Full Member
*
Offline Offline

Activity: 242
Merit: 100



View Profile
January 04, 2012, 11:56:59 PM
 #243

Results when attempting to apply bitcoin-4diff-5beta.txt to bitcoin v0.5.1:

Quote
patching file orig/bitcoinrpc.cpp
Hunk #3 succeeded at 52 (offset 2 lines).
Hunk #4 succeeded at 1610 (offset -4 lines).
Hunk #5 succeeded at 1640 (offset -4 lines).
Hunk #6 succeeded at 1660 (offset -4 lines).
Hunk #7 succeeded at 1974 (offset -4 lines).
Hunk #8 succeeded at 2003 (offset -4 lines).
Hunk #9 succeeded at 2012 (offset -4 lines).
Hunk #10 succeeded at 2026 (offset -4 lines).
Hunk #11 succeeded at 2064 (offset -4 lines).
Hunk #12 succeeded at 2080 (offset -4 lines).
Hunk #13 FAILED at 2109.
Hunk #14 succeeded at 2142 (offset -9 lines).
Hunk #15 succeeded at 2210 (offset -9 lines).
Hunk #16 succeeded at 2310 (offset -6 lines).
Hunk #17 succeeded at 2375 (offset -6 lines).
Hunk #18 succeeded at 2421 (offset -6 lines).
Hunk #19 succeeded at 2430 (offset -6 lines).
Hunk #20 succeeded at 2481 (offset -6 lines).
Hunk #21 succeeded at 2514 (offset -6 lines).
Hunk #22 succeeded at 2542 (offset -6 lines).
1 out of 22 hunks FAILED -- saving rejects to file orig/bitcoinrpc.cpp.rej
patching file orig/init.cpp
Hunk #1 FAILED at 189.
Hunk #2 succeeded at 222 (offset 11 lines).
Hunk #3 succeeded at 258 (offset 11 lines).
1 out of 3 hunks FAILED -- saving rejects to file orig/init.cpp.rej
patching file orig/main.cpp
Hunk #1 succeeded at 1149 (offset 20 lines).
Hunk #2 succeeded at 1192 (offset 20 lines).
Hunk #3 succeeded at 1206 (offset 20 lines).
patching file orig/net.cpp
Hunk #2 succeeded at 82 (offset 1 line).
Hunk #3 succeeded at 99 (offset 1 line).
Hunk #4 succeeded at 977 (offset 1 line).
Hunk #5 succeeded at 1007 (offset 1 line).
Hunk #6 succeeded at 1046 (offset 1 line).
Hunk #7 succeeded at 1108 (offset 1 line).
Hunk #8 succeeded at 1146 (offset 1 line).
Hunk #9 succeeded at 1415 (offset 42 lines).
Hunk #10 succeeded at 1449 (offset 42 lines).
Hunk #11 succeeded at 1515 (offset 42 lines).
Hunk #12 succeeded at 1522 (offset 42 lines).
Hunk #13 succeeded at 1554 (offset 42 lines).
Hunk #14 succeeded at 1572 (offset 42 lines).
Hunk #15 succeeded at 1630 (offset 42 lines).
Hunk #6 succeeded at 1046 (offset 1 line).
Hunk #7 succeeded at 1108 (offset 1 line).
Hunk #8 succeeded at 1146 (offset 1 line).
Hunk #9 succeeded at 1415 (offset 42 lines).
Hunk #10 succeeded at 1449 (offset 42 lines).
Hunk #11 succeeded at 1515 (offset 42 lines).
Hunk #12 succeeded at 1522 (offset 42 lines).
Hunk #13 succeeded at 1554 (offset 42 lines).
Hunk #14 succeeded at 1572 (offset 42 lines).
Hunk #15 succeeded at 1630 (offset 42 lines).
Hunk #16 succeeded at 1654 (offset 42 lines).
Hunk #17 succeeded at 1706 (offset 42 lines).
Hunk #18 succeeded at 1718 (offset 42 lines).
Hunk #19 succeeded at 1746 (offset 42 lines).
Hunk #20 succeeded at 1953 (offset 48 lines).
Hunk #21 succeeded at 1968 with fuzz 2 (offset 48 lines).
patching file orig/net.h
Hunk #2 succeeded at 79 (offset -1 lines).
Hunk #3 succeeded at 123 (offset -1 lines).
Hunk #4 succeeded at 185 (offset -1 lines).
patching file orig/util.cpp
patching file orig/util.h
Hunk #4 succeeded at 710 (offset 10 lines).

backburn
Member
**
Offline Offline

Activity: 111
Merit: 10


★Trash&Burn [TBC/TXB]★


View Profile
January 12, 2012, 06:35:28 AM
 #244

Results when attempting to apply bitcoin-4diff-5beta.txt to bitcoin v0.5.1:

Quote
patching file orig/bitcoinrpc.cpp
Hunk #3 succeeded at 52 (offset 2 lines).
Hunk #4 succeeded at 1610 (offset -4 lines).
Hunk #5 succeeded at 1640 (offset -4 lines).
Hunk #6 succeeded at 1660 (offset -4 lines).
Hunk #7 succeeded at 1974 (offset -4 lines).
Hunk #8 succeeded at 2003 (offset -4 lines).
Hunk #9 succeeded at 2012 (offset -4 lines).
Hunk #10 succeeded at 2026 (offset -4 lines).
Hunk #11 succeeded at 2064 (offset -4 lines).
Hunk #12 succeeded at 2080 (offset -4 lines).
Hunk #13 FAILED at 2109.
Hunk #14 succeeded at 2142 (offset -9 lines).
Hunk #15 succeeded at 2210 (offset -9 lines).
Hunk #16 succeeded at 2310 (offset -6 lines).
Hunk #17 succeeded at 2375 (offset -6 lines).
Hunk #18 succeeded at 2421 (offset -6 lines).
Hunk #19 succeeded at 2430 (offset -6 lines).
Hunk #20 succeeded at 2481 (offset -6 lines).
Hunk #21 succeeded at 2514 (offset -6 lines).
Hunk #22 succeeded at 2542 (offset -6 lines).
1 out of 22 hunks FAILED -- saving rejects to file orig/bitcoinrpc.cpp.rej
patching file orig/init.cpp
Hunk #1 FAILED at 189.
Hunk #2 succeeded at 222 (offset 11 lines).
Hunk #3 succeeded at 258 (offset 11 lines).
1 out of 3 hunks FAILED -- saving rejects to file orig/init.cpp.rej
patching file orig/main.cpp
Hunk #1 succeeded at 1149 (offset 20 lines).
Hunk #2 succeeded at 1192 (offset 20 lines).
Hunk #3 succeeded at 1206 (offset 20 lines).
patching file orig/net.cpp
Hunk #2 succeeded at 82 (offset 1 line).
Hunk #3 succeeded at 99 (offset 1 line).
Hunk #4 succeeded at 977 (offset 1 line).
Hunk #5 succeeded at 1007 (offset 1 line).
Hunk #6 succeeded at 1046 (offset 1 line).
Hunk #7 succeeded at 1108 (offset 1 line).
Hunk #8 succeeded at 1146 (offset 1 line).
Hunk #9 succeeded at 1415 (offset 42 lines).
Hunk #10 succeeded at 1449 (offset 42 lines).
Hunk #11 succeeded at 1515 (offset 42 lines).
Hunk #12 succeeded at 1522 (offset 42 lines).
Hunk #13 succeeded at 1554 (offset 42 lines).
Hunk #14 succeeded at 1572 (offset 42 lines).
Hunk #15 succeeded at 1630 (offset 42 lines).
Hunk #6 succeeded at 1046 (offset 1 line).
Hunk #7 succeeded at 1108 (offset 1 line).
Hunk #8 succeeded at 1146 (offset 1 line).
Hunk #9 succeeded at 1415 (offset 42 lines).
Hunk #10 succeeded at 1449 (offset 42 lines).
Hunk #11 succeeded at 1515 (offset 42 lines).
Hunk #12 succeeded at 1522 (offset 42 lines).
Hunk #13 succeeded at 1554 (offset 42 lines).
Hunk #14 succeeded at 1572 (offset 42 lines).
Hunk #15 succeeded at 1630 (offset 42 lines).
Hunk #16 succeeded at 1654 (offset 42 lines).
Hunk #17 succeeded at 1706 (offset 42 lines).
Hunk #18 succeeded at 1718 (offset 42 lines).
Hunk #19 succeeded at 1746 (offset 42 lines).
Hunk #20 succeeded at 1953 (offset 48 lines).
Hunk #21 succeeded at 1968 with fuzz 2 (offset 48 lines).
patching file orig/net.h
Hunk #2 succeeded at 79 (offset -1 lines).
Hunk #3 succeeded at 123 (offset -1 lines).
Hunk #4 succeeded at 185 (offset -1 lines).
patching file orig/util.cpp
patching file orig/util.h
Hunk #4 succeeded at 710 (offset 10 lines).

You'll need to do the diffs in bitcoinrpc.cpp.rej and init.cpp.rej by hand.
- means remove this line.
+ means add this line.
no sign is a reference point ( leave line alone)

have fun Smiley
backburn
Member
**
Offline Offline

Activity: 111
Merit: 10


★Trash&Burn [TBC/TXB]★


View Profile
January 13, 2012, 01:51:45 AM
 #245

Some observations on the http://davids.webmaster.com/~davids/bitcoin-4diff-beta.txt patch.

bitcoind v0.4.0 + 4diff-beta seems to use about 5% more CPU and 3% less memory when compared to bitcoind v0.3.24 + 4diff.

Other than that, v0.4.0 has been stable for almost a week in a live environment. ( And a week before that on testnet.) We have some private 0.3.24 based pools that have been taking a stable 50+ Ghash for 5 months without a restart. I assume that will be the case with v0.4.0 Cheesy

We though about messing with the .5 branch + Joel's patch. However, with the rapid release schedule of late and massive changes coming with the 0.6 release of bitcoin. We decided to hold off until .6 is stable before upgrading again.


Joel, thanks so much for all of your hard work. I'm glad to see many of your changes have been mainlined Cheesy
JoelKatz
Legendary
*
Offline Offline

Activity: 1596
Merit: 1012


Democracy is vulnerable to a 51% attack.


View Profile WWW
January 13, 2012, 02:59:02 AM
 #246

Joel, thanks so much for all of your hard work. I'm glad to see many of your changes have been mainlined Cheesy
Thanks. I've been completely swamped with Real Work (TM) lately or I would have merged the remaining changes into the 0.5 branch.

I am an employee of Ripple. Follow me on Twitter @JoelKatz
1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
btcx
VIP
Sr. Member
*
Offline Offline

Activity: 302
Merit: 253



View Profile WWW
April 27, 2012, 06:36:37 AM
Last edit: April 27, 2012, 02:38:24 PM by btcx
 #247

For anyone that still wants to use this for the 0.6.0 release, I've made some patches with slight modifications to David's code.  It's split up into two parts.  The first part should still be relevant for pool operators (keep-alive connections, hub mode, USR1 signals on block changes).  The second part is mostly obsolete now with merged mining and better pooling software (faster getwork).

You can find the patches at http://pastebin.com/viJV1NLi and http://pastebin.com/UXep0r3c

Some of the updates from 0.4 to 0.6 are non-trivial so this should help.  This particular patch hasn't been tested much but a different one for 0.6.0 rc4 has been running without any problems.

Edit: Oops, the patches were for the current head instead of 0.6.0.
Edit2: Updated the above links for the right patches.

For future reference, these may give you a head start on patching against 0.6.1: http://pastebin.com/XSBqRAaP and http://pastebin.com/5R9N29aA.

Bitcoin, Ethereum, Litecoin, Namecoin, Dogecoin, Ripple, Stellar, US dollar, euro, British pound, Canadian dollar and Japanese yen exchange:  https://www.kraken.com
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 [13]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!