Bitcoin Forum
May 02, 2024, 09:36:31 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Some 'technical commentary' about Core code esp. hardware utilisation  (Read 4871 times)
NewLiberty
Legendary
*
Offline Offline

Activity: 1204
Merit: 1002


Gresham's Lawyer


View Profile WWW
July 07, 2017, 03:50:33 PM
 #21


You know decades ago people invented this little thing call #ifdef right?

Just use #ifdef _MSC_VER/#else/#endif around the inline assembly if you want to bypass MSVC.

Even simple crap like switching to --i instead of ++i, will reduce assembly instructions regardless of what optimization flags you use on the compiler.

Why the hell is Core still stuck on LevelDB anyway?
The same reason BDB hasn't ever been replaced, because even after a softtfork and a hard fork, new wallets must still be backwards-compatible with already nonfunctional 2011 wallets.  Roll Eyes

Most CPU is running idle most of the time, and SSD is still expensive.
So just use RocksDB, or just toss in a lz4 lib, add an option in the config and let people with decent CPU enable compression and save 20G and more.

I just copied the entire bitcoind dir (blocks, index, exec, everything) onto a ZFS pool with lz4 compression enabled and at 256k record size it saved over 20G for me.

Works just fine, and ZFS isn't even known for its performance.

Doesn't matter how many life time people spent on it, when you see silly shit like sha256() twice, you know it's written by amateurs.

Here, your internal sha256 lib, the critical hashing function all encode/decode operation relies on, the one that hasn't been updated since 2014:

https://github.com/bitcoin/bitcoin/blob/master/src/crypto/sha256.cpp

SHA256 is one of the key pieces of Bitcoin operations, the blocks use it, the transactions use it, the addresses even use it twice.


So what's your excuse for not making use of SSE/AVX/AVX2 and the Intel SHA extension? Aesthetics? Portability? Pfft.

There are mountains of accelerated SHA2 libs out there, like this one,
Supports Intel SHA extension, supports ARMv8, even has MVSC headers:

Quote
https://github.com/noloader/SHA-Intrinsics/blob/master/sha256-x86.c

SHA-1, SHA-224 and SHA-256 compression functions using Intel SHA intrinsics and ARMv8 SHA intrinsics

For AVX2, here is one from Intel themselves:

Quote
https://patchwork.kernel.org/patch/2343841/

Optimized sha256 x86_64 routine using AVX2's RORX instructions

Provides SHA256 x86_64 assembly routine optimized with SSE, AVX and
AVX2's RORX instructions.  Speedup of 70% or more has been
measured over the generic implementation.


Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>

There is your 70% speed up for a single critical operation on your hot-path.

This isn't some advanced shit, that Intel patch was created in March 26, 2013, your sha256 lib was last updated in Dec 19, 2014, so the patch existed over a year before your last update. We have even faster stuff now using Intel SHA intrinsics.


QFT and mined for the gold.

It is very rare these days that someone outside the core team is so helpful to them as in this post.  Most outside core would be just as happy to see core fade away instead of being so very helpful as TB is being here, albeit TB was masterfully trolled by GM into doing GM's job for him, it is just as likely that GM's ego or outside incentives will prevent him from taking any of this helpful advice to heart.

Most interesting here is that TB has found where Core team have added the Big-O Quadratic Sighash bug which is their big issue of why then need SegWit and can't scale.

GM shoots Bitcoin in the leg, TB shows him the wound, the blood, the gunpowder marks on his hand and hands him the surgical kit.
GM sits there mocking him and shrugging.
Bitcoin's blood leaking out while GM stares around wondering why he doesn't get more love.

FREE MONEY1 Bitcoin for Silver and Gold NewLibertyDollar.com and now BITCOIN SPECIE (silver 1 ozt) shows value by QR
Bulk premiums as low as .0012 BTC "BETTER, MORE COLLECTIBLE, AND CHEAPER THAN SILVER EAGLES" 1Free of Government
1714685791
Hero Member
*
Offline Offline

Posts: 1714685791

View Profile Personal Message (Offline)

Ignore
1714685791
Reply with quote  #2

1714685791
Report to moderator
1714685791
Hero Member
*
Offline Offline

Posts: 1714685791

View Profile Personal Message (Offline)

Ignore
1714685791
Reply with quote  #2

1714685791
Report to moderator
"This isn't the kind of software where we can leave so many unresolved bugs that we need a tracker for them." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
tspacepilot
Legendary
*
Offline Offline

Activity: 1456
Merit: 1076


I may write code in exchange for bitcoins.


View Profile
July 07, 2017, 04:39:58 PM
 #22


I get it, Troll is a self-proclaimed close-to-the-metal ninja coder. This makes him very useful in his niche, and his advice could be taken if it is truly not just trolling. But when you're very intimate with hammers, every problem starts to look like a nail, and you wonder why other coders don't just do as you would do in their place. A broader perspective may turn up some valid reasons.


And when each response to "show us something you've worked on" or "why don't you take this on and join the project" is replied to with "You fools!  MWA HAHA", then that self-proclamation starts to look incredibly weak, imo.
zanza
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
July 07, 2017, 04:42:09 PM
 #23

Bitcoin Core Dev's are the smartest developers in the world.
hv_
Legendary
*
Offline Offline

Activity: 2506
Merit: 1055

Clean Code and Scale


View Profile WWW
July 07, 2017, 04:47:36 PM
 #24

Bitcoin Core Dev's are the smartest developers in the world.

Sure. Spending little too much time and efforts at beeing so.. Sigh

Carpe diem  -  understand the White Paper and mine honest.
Fix real world issues: Check out b-vote.com
The simple way is the genius way - Satoshi's Rules: humana veris _
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4158
Merit: 8382



View Profile WWW
July 07, 2017, 05:26:03 PM
Last edit: July 08, 2017, 12:42:17 AM by gmaxwell
 #25

It is very rare these days that someone outside the core team is so helpful to them as in this post.  Most outside core would be just as happy to see core fade away instead of being so very helpful as TB is being here, albeit TB was masterfully trolled by GM into doing GM's job for him, it is just as likely that GM's ego or outside incentives will prevent him from taking any of this helpful advice to heart.
Thanks for demonstrating your lack of either clue or integrity for the record-- some people might have been mistaking your endorsement of Wright as a moment of bamboozle rather than a deeper character flaw.

But just in case you missed the response to his claims there:

There was an incomplete PR for that, it was something like a 5% performance difference for initial sync at the time; it would be somewhat more now due to other optimizations. Instead we spent more time eliminating redundant sha256 operations in the codebase, which got a lot more speed up then this final bit of optimization will. It's used in the fibre codebase without autodetection. Please feel free to finish up the autodetection for it.  It's a perfect project for a new contributor.  We also have a new AMD host so that x86_64 sha2 extensions can be tested on it.

So, dumping some output of a google search citing code that we already had-- isn't exactly "showing us the wound", would you say?

Not to mention your highlight of the use of sha256^2 which is part of the protocol definition from day one and not something we could change without invalidating every transaction and block. (Nor is it entirely pointless...)  But I guess as Craig Wright's partner in crime you already know all about that because he's totally Satoshi. (lol)

Most interesting here is that TB has found where Core team have added the Big-O Quadratic Sighash bug which is their big issue of why then need SegWit and can't scale.

So, you're telling us that "TB" is Craig Wright?  Because that easily debunked claim is Wright's as far as I know.
wiffwaff
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
July 07, 2017, 05:26:18 PM
 #26

At this point it's pretty clear to me that Troll Buster is just here to spew bile.  It's really striking how puffed up he is about his skills and badassery and then when someone asks him to point to a project he's worked on or generally to prove his talk with something more than a google search his reply is all 'hey, look over there!'

Troll Buster is pointing out poor decisions that can be improved upon and people here are trying to find something of their's to be able to bash. This is typical Core tactics, whereby they fail to address the issue being highlighted and instead attempt to launch person attacks on the person stepping forward.

This is exactly why bitcoin development fragmented under the fifth column attacks that forced out the best and brightest, leaving us with the cesspit we have today.

Go on, fire up some BIP148 hashing power. I double-dare you.
https://bitcointalk.org/index.php?action=profile;u=221980;sa=showPosts
Quote
What is the benefit of bitcoin core?

Bitcoin Core will signal support for and recognise SegWit enabled blocks, amongst other additions. Depending on your stance in the max block size issue, you might like to consider using one of the other many bitcoin clients such as https://www.bitcoinunlimited.info/ which supports bigger maximum block sizes as a solution to the full blocks we currently are experiencing.

Gosh Roger Ver/fake satoshi Craig Wright you forked out for quite an old account.
frighted?

Wrong and wrong, sir. I am just one more bitcoin supporter. It is telling that you go for the diversion and failed to make any clear point.
Last of the V8s (OP)
Legendary
*
Offline Offline

Activity: 1652
Merit: 4392


Be a bank


View Profile
July 07, 2017, 07:39:40 PM
Last edit: July 07, 2017, 08:26:08 PM by Last of the V8s
 #27

Locking the thread now because asked and answered.
@gmaxwell's responses seemed very clear, thanks
interesting which trolls and which sane people turned up

Pages: « 1 [2]  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!