Bitcoin Forum
May 11, 2024, 07:54:20 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: C# bitcoin core code conversion  (Read 238 times)
jackg (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
November 19, 2018, 03:32:15 PM
 #1

I was talking with a friend a few days ago and we were looking at benchmarking times for c++ and c# and it seems that c# may be faster for coding bitcoin core in (or at least won't make too mcuh difference).

I'm considering taking on the task of converting the entire source from c/c++ to c# and I'm wondering whether it would increase node speeds b quite a bit when I publish the code. I'm realistic and would look to publish the code in around 10 months (I've had a quick look at the bitcoin core source code and since I'm not really building anything from scratch, I feel it should take about this time as a bit of a hobbyistic process - not loooking forward to doing teh gui, maybe I'll just make it console based to start with)... IS there alos a list of when each version is planned to be released or is there no such planning involved in bitcoin core's programming?
I HATE TABLES I HATE TABLES I HA(╯°□°)╯︵ ┻━┻ TABLES I HATE TABLES I HATE TABLES
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715457260
Hero Member
*
Offline Offline

Posts: 1715457260

View Profile Personal Message (Offline)

Ignore
1715457260
Reply with quote  #2

1715457260
Report to moderator
1715457260
Hero Member
*
Offline Offline

Posts: 1715457260

View Profile Personal Message (Offline)

Ignore
1715457260
Reply with quote  #2

1715457260
Report to moderator
1715457260
Hero Member
*
Offline Offline

Posts: 1715457260

View Profile Personal Message (Offline)

Ignore
1715457260
Reply with quote  #2

1715457260
Report to moderator
Elliptic23
Newbie
*
Offline Offline

Activity: 22
Merit: 3


View Profile
November 20, 2018, 03:42:42 AM
 #2

What's the point of doing a conversion? Better to build a client from scratch that is compliant with the Bitcoin protocol.
Coding Enthusiast
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
November 20, 2018, 05:59:47 AM
 #3

Programming language (in my opinion) is the last thing that is affecting speed and efficiency of a code. It is the programmer that is making it fast or slow depending on the way their implementation is.
In any case I always love to see projects that are in C♯ although I would suggest building it from scratch instead of "converting" code. That way you won't import bugs or inefficiencies in your own code. What you can do is to implement each part then compare implementations with each other to improve your code (that is what I have been doing for my library so far).

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
Piggy
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1416



View Profile WWW
November 20, 2018, 07:06:32 AM
 #4

As much as i like .Net and C# in particular ( it's great as is making much faster to develop and prototype), it will always have some overhead compared with other low level languages, in particular if you are performing heavy calculations. But in this case it may not matter indeed.

In any case I always love to see projects that are in C♯ although I would suggest building it from scratch instead of "converting" code. That way you won't import bugs or inefficiencies in your own code. What you can do is to implement each part then compare implementations with each other to improve your code (that is what I have been doing for my library so far).

There is also the chance of adding new bugs going that way Smiley, however starting from the begin with a good set of unit tests may help to avoid problems.
HeRetiK
Legendary
*
Offline Offline

Activity: 2926
Merit: 2091


Cashback 15%


View Profile
November 20, 2018, 10:09:08 AM
 #5

Seems like quite an undertaking! Despite c# being as popular as it is, I'm not sure how much usage such a project would see in practice, as I believe most c# developers are fine with simply using wrappers. I'm not a c# developer myself though, so I know little about what's commonly used. Still I could imagine such a project being a welcomed addition to the ecosystem.


not loooking forward to doing teh gui, maybe I'll just make it console based to start with)...

I think it's fine to start with a console-only version, if the project gains traction you might easily find someone else supporting you with the GUI.


IS there alos a list of when each version is planned to be released or is there no such planning involved in bitcoin core's programming?

As far as I'm aware of there's neither a planned release cycle nor an official development roadmap for Bitcoin Core.

To stay up-to-date with current developments it may make sense to join the mailing list, if you haven't already:
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev

There's little being discussed in terms of timelines though.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
jdbtracker
Hero Member
*****
Offline Offline

Activity: 727
Merit: 500


Minimum Effort/Maximum effect


View Profile
November 20, 2018, 11:04:05 PM
 #6

Great Idea! Totally go for it as a Hobby. It'll be fun... just use Microsoft Visual Studio and create a windows template so it does the layout for you. It's faster and keeps you focused on the important stuff. If you like you can learn how to make your own Windows for the UI.


If you think my efforts are worth something; I'll keep on keeping on.
I don't believe in IQ, only in Determination.
jackg (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
November 21, 2018, 12:02:20 AM
 #7

Great Idea! Totally go for it as a Hobby. It'll be fun... just use Microsoft Visual Studio and create a windows template so it does the layout for you. It's faster and keeps you focused on the important stuff. If you like you can learn how to make your own Windows for the UI.



Yes! This is what I was thinking too.

Ms vs is quite good for programming stuff and there err also compilers for Linux with c# if I manage to make anything useful. I think there are also built in things for visual studio too. I’ll have to try to spend a month designing and looking at how bitcoin core functions in order to write my code to be as compatible as possible. (It needs to be able to down,lad and validate the blockchain for a start)...
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10558



View Profile
November 21, 2018, 03:05:31 AM
 #8

Great Idea! Totally go for it as a Hobby. It'll be fun... just use Microsoft Visual Studio and create a windows template so it does the layout for you. It's faster and keeps you focused on the important stuff. If you like you can learn how to make your own Windows for the UI.



Yes! This is what I was thinking too.

Ms vs is quite good for programming stuff and there err also compilers for Linux with c# if I manage to make anything useful. I think there are also built in things for visual studio too. I’ll have to try to spend a month designing and looking at how bitcoin core functions in order to write my code to be as compatible as possible. (It needs to be able to down,lad and validate the blockchain for a start)...

if you want your code to run on multiple platforms and not just be for windows then you have to write it using .Net core and avoid anything that is windows focused (e.g. WPF is only for windows, .Net framework is only for windows,...).
my suggestion is to use .Net standard library project type for your libraries and for your GUI you can use Avalonia[1] which is a WPF like GUI that works on multiple platforms.
and good luck.

https://github.com/AvaloniaUI/Avalonia

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Piggy
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1416



View Profile WWW
November 21, 2018, 06:59:19 AM
Last edit: November 21, 2018, 07:33:12 AM by Piggy
 #9

I never used .Net core and i believe is the best way to go, but running Windows applications built with .Net it's working fairly well out of the box with Mono as well for that little i have tried. However the overhead must be pretty high i guess.

My bot is essentially just compiled in visual studio and then the same exe and libraries are just working by magic with mono on Linux.  Smiley


https://www.mono-project.com
Pages: [1]
  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!