Bitcoin Forum
May 04, 2024, 09:03:59 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: A minimal full node client in F#  (Read 2201 times)
hhanh00 (OP)
Sr. Member
****
Offline Offline

Activity: 467
Merit: 266


View Profile
January 21, 2015, 03:35:59 PM
 #1

Bitcoin full node in F#
An alternative full node bitcoin implementation in F#. The source code is on GitHub and this documentation was generated directly from the code.

Introduction
This project is under development and currently in alpha stage. Generally speaking, writing a fully compliant bitcoin node is extremely hard - some think impossible. The Bitcoin project is experimental and grew organically. As a result, the Satoshi client is the de-factor standard. By far the most used client on the network, it dictates what should be accepted and what should be rejected. Even the slighest deviation can cause a fork and potential loss of funds. It should go without saying

Do not use this code in production when real funds are at stake.

A lot of effort has been put into aligning its behavior with the core client but nevertheless there are almost certainly bugs that could be exploited to cause it to deviate from the reference implementation.

That being said this code has been through the "official" block acceptance test and has run from extended period of time. It implements all the consensus rules including the bugs that are now included in the blockchain since the genesis of Bitcoin.

However, Bitcoin F# has fully validated the existing mainnet blockchain and passes all the integration tests including large reorg tests. It is also the only implementation in a functional language and comes under 2.5 kLOC, making it the smallest client too.

Refer to the project page at https://github.com/bitcoinfs/bitcoinfs and its associated documentation at http://bitcoinfs.github.io/bitcoinfs

TalkImg was created especially for hosting images on bitcointalk.org: try it next time you want to post an image
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714813439
Hero Member
*
Offline Offline

Posts: 1714813439

View Profile Personal Message (Offline)

Ignore
1714813439
Reply with quote  #2

1714813439
Report to moderator
da2ce7
Legendary
*
Offline Offline

Activity: 1222
Merit: 1016


Live and Let Live


View Profile
January 24, 2015, 04:24:22 PM
 #2

Great Work!  Grin Grin

Have you picked a license for the code yet?

One off NP-Hard.
da2ce7
Legendary
*
Offline Offline

Activity: 1222
Merit: 1016


Live and Let Live


View Profile
January 24, 2015, 04:25:34 PM
 #3

If you wish to have additional exposure, you could compose and send an email to the the Bitcoin Development Mailing List.

One off NP-Hard.
hhanh00 (OP)
Sr. Member
****
Offline Offline

Activity: 467
Merit: 266


View Profile
January 25, 2015, 10:51:38 AM
 #4

Thanks, I've added the GPL v3 license.

iwilcox
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
January 25, 2015, 05:08:29 PM
 #5

It is also the only implementation in a functional language ...

Did Haskoin and Purecoin not reach full node status?  (Genuinely asking, never looked.)
hhanh00 (OP)
Sr. Member
****
Offline Offline

Activity: 467
Merit: 266


View Profile
January 25, 2015, 05:59:49 PM
 #6

I'm not sure but they seem to be focused on the client side: creating transactions, signing, getting transaction history, SPV, etc. Everything you need if you are connecting to a bitcoin core instance.

iwilcox
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
January 25, 2015, 06:24:49 PM
 #7

I'm not sure but they seem to be focused on the client side: creating transactions, signing, getting transaction history, SPV, etc. Everything you need if you are connecting to a bitcoin core instance.

On looking (slightly) closer, Haskoin seems to be SPV; harder to tell with Purecoin; and besides, "full" is ill-defined so I guess it doesn't matter too much.

Anyway, it's interesting to see another functional approach; I like the brevity and your walkthrough especially.  Thanks for sharing! Smiley
hhanh00 (OP)
Sr. Member
****
Offline Offline

Activity: 467
Merit: 266


View Profile
February 01, 2015, 05:17:53 AM
 #8

The functional approach helped keep the code short but there are still a few nasty aspects specially with a headers-first approach.
It works great though. I've tested synchronizing from/to bitcoin core and spv wallets and I now use it to monitor my Electrum/Armory/BIP32 wallets in one place.

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!