Author

Topic: C# bitcoin core code conversion (Read 260 times)

hero member
Activity: 784
Merit: 1416
November 21, 2018, 01:59:19 AM
#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
legendary
Activity: 3472
Merit: 10611
November 20, 2018, 10:05:31 PM
#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
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
November 20, 2018, 07:02:20 PM
#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)...
hero member
Activity: 727
Merit: 500
Minimum Effort/Maximum effect
November 20, 2018, 06: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.

legendary
Activity: 3122
Merit: 2178
Playgram - The Telegram Casino
November 20, 2018, 05: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.
hero member
Activity: 784
Merit: 1416
November 20, 2018, 02: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.
legendary
Activity: 1042
Merit: 2805
Bitcoin and C♯ Enthusiast
November 20, 2018, 12: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).
newbie
Activity: 22
Merit: 3
November 19, 2018, 10:42:42 PM
#2
What's the point of doing a conversion? Better to build a client from scratch that is compliant with the Bitcoin protocol.
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
November 19, 2018, 10:32:15 AM
#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?
Jump to: