Bitcoin Forum
September 20, 2018, 12:00:12 PM *
News: ♦♦ Bitcoin Core users must update to 0.16.3 [Torrent]. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: A minimal full node client in F#  (Read 2130 times)
hhanh00
Sr. Member
****
Offline Offline

Activity: 467
Merit: 261


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

1537444812
Hero Member
*
Offline Offline

Posts: 1537444812

View Profile Personal Message (Offline)

Ignore
1537444812
Reply with quote  #2

1537444812
Report to moderator
1537444812
Hero Member
*
Offline Offline

Posts: 1537444812

View Profile Personal Message (Offline)

Ignore
1537444812
Reply with quote  #2

1537444812
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1537444812
Hero Member
*
Offline Offline

Posts: 1537444812

View Profile Personal Message (Offline)

Ignore
1537444812
Reply with quote  #2

1537444812
Report to moderator
1537444812
Hero Member
*
Offline Offline

Posts: 1537444812

View Profile Personal Message (Offline)

Ignore
1537444812
Reply with quote  #2

1537444812
Report to moderator
1537444812
Hero Member
*
Offline Offline

Posts: 1537444812

View Profile Personal Message (Offline)

Ignore
1537444812
Reply with quote  #2

1537444812
Report to moderator
da2ce7
Legendary
*
Offline Offline

Activity: 1221
Merit: 1000


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: 1221
Merit: 1000


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
Sr. Member
****
Offline Offline

Activity: 467
Merit: 261


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
Sr. Member
****
Offline Offline

Activity: 467
Merit: 261


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
Sr. Member
****
Offline Offline

Activity: 467
Merit: 261


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:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!