Bitcoin Forum
April 27, 2024, 04:28:29 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 [3] 4 »  All
  Print  
Author Topic: NBitcoin : Almost full bitcoin implementation in .NET  (Read 30653 times)
ThePok
Full Member
***
Offline Offline

Activity: 131
Merit: 100


View Profile
July 22, 2014, 02:55:06 PM
 #41

The Payloadclass for reject is missing Sad

https://en.bitcoin.it/wiki/Protocol_specification#reject

Maybe add it when you have time Smiley
BitcoinCleanup.com: Learn why Bitcoin isn't bad for the environment
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714192109
Hero Member
*
Offline Offline

Posts: 1714192109

View Profile Personal Message (Offline)

Ignore
1714192109
Reply with quote  #2

1714192109
Report to moderator
1714192109
Hero Member
*
Offline Offline

Posts: 1714192109

View Profile Personal Message (Offline)

Ignore
1714192109
Reply with quote  #2

1714192109
Report to moderator
1714192109
Hero Member
*
Offline Offline

Posts: 1714192109

View Profile Personal Message (Offline)

Ignore
1714192109
Reply with quote  #2

1714192109
Report to moderator
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 619


View Profile
July 22, 2014, 02:56:56 PM
 #42

Making your own Payload is not complicated,
I'll add it, but if you are stuck because of that take a look at the implementation of others. It takes literally 5 minutes.

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
ThePok
Full Member
***
Offline Offline

Activity: 131
Merit: 100


View Profile
October 13, 2014, 08:36:35 PM
 #43

The lib now can handle ColoredCoins!
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 619


View Profile
October 21, 2014, 11:09:03 PM
 #44

Yes from the OpenAsset protocol, I'm working right now on NBitcoin Indexer that will also support queries over colored coin wallets and balances ! Smiley
It already support indexing of ColoredTransactions.

Here some intro on the indexer (before I implemented CC) : http://www.codeproject.com/Articles/819567/NBitcoin-Indexer-A-scalable-and-fault-tolerant-blo

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
illodin
Hero Member
*****
Offline Offline

Activity: 966
Merit: 1003


View Profile
November 13, 2014, 06:03:56 AM
 #45

Exciting news:

http://news.microsoft.com/2014/11/12/microsoft-takes-net-open-source-and-cross-platform-adds-new-development-capabilities-with-visual-studio-2015-net-2015-and-visual-studio-online/
http://www.visualstudio.com/en-us/news/vs2013-community-vs.aspx
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 619


View Profile
November 13, 2014, 12:15:35 PM
 #46


Exciting, I wonder what is the trick, because I don't see any reason to by a 5K $ msdn subscription for VS now...

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
thirdprize
Sr. Member
****
Offline Offline

Activity: 485
Merit: 274


View Profile WWW
December 16, 2014, 12:04:47 PM
 #47

If you ask, M$ will give you a free "Biz Spark" MSDN subscription, if you have a web site and pretend to be a start up.  I got one of the back of a couple of iPhone apps i wrote which i said i wanted to port to WinPhone. 

http://www.microsoft.com/bizspark/default.aspx

hhanh00
Sr. Member
****
Offline Offline

Activity: 467
Merit: 266


View Profile
December 28, 2014, 06:26:42 PM
 #48

Is it possible to run it as a full node implementation? Basically with tx relay and wallet maintenance.

Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 619


View Profile
December 28, 2014, 08:14:59 PM
 #49

Is it possible to run it as a full node implementation? Basically with tx relay and wallet maintenance.


Yes it is, here to get started (assuming you run bitcoin core locally)
Obviously, you can also connect to other node as long as you know the IP.

Quote
using(var node = Node.ConnectToLocal(Network.Main))
{
   node.VersionHandshake();
   node.MessageReceived += (node,message) => //Do your stuff when new message here;
}

If you want to make a server,

Quote
using(var server = new NodeServer(Network.Main))
{
   server.Listen();
   server.NodeAdded += (s,node)=>//do stuff when node connect (Handshakes and Ping/Pong are handled automatically)
}

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
hhanh00
Sr. Member
****
Offline Offline

Activity: 467
Merit: 266


View Profile
December 29, 2014, 03:23:32 AM
 #50

Thanks for your quick response, another question - is there support for the maintenance of the mempool and the set of unspent outputs? I couldn't find where transactions are checked for double spends for example.


Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 619


View Profile
December 29, 2014, 01:28:48 PM
Last edit: December 29, 2014, 01:48:49 PM by Nicolas Dorier
 #51

Thanks for your quick response, another question - is there support for the maintenance of the mempool and the set of unspent outputs? I couldn't find where transactions are checked for double spends for example.



No, this is yours to do.
NodeServer and Node are the class to send message and respond to messages you receive. (as a server, or as a client)
I have not coded a full node with this, but someone can.

In my code, I usually use NodeServer for mocking a fake bitcoin server (for unit testing), and I use Node to get notified from new Transactions, blocks, get the Headers chain, and download blocks.

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
hhanh00
Sr. Member
****
Offline Offline

Activity: 467
Merit: 266


View Profile
December 29, 2014, 02:28:32 PM
 #52

Got it - thanks

Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 619


View Profile
December 29, 2014, 02:44:23 PM
 #53

Got it - thanks

One advice, there is several test that are using these class.
If you have the xunit test running, they either the Trait "NodeServer" or "Network". It assume you have a local bitcoin instance on testnet.
You might learn how these class work with the tests.

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
doof
Hero Member
*****
Offline Offline

Activity: 765
Merit: 503


View Profile WWW
January 29, 2015, 02:34:10 AM
 #54

Actually, I'm a little busy to create an indexer.
So that will probably be a blockchain.info or blockexplorer.com backed by Microsoft Azure. (which is pure awesomeness)
I will release it entirely open source.

Doing a similar thing.  PM me Smiley
doof
Hero Member
*****
Offline Offline

Activity: 765
Merit: 503


View Profile WWW
January 29, 2015, 02:40:19 AM
 #55

Is it possible to run it as a full node implementation? Basically with tx relay and wallet maintenance.


Yes it is, here to get started (assuming you run bitcoin core locally)
Obviously, you can also connect to other node as long as you know the IP.

Quote
using(var node = Node.ConnectToLocal(Network.Main))
{
   node.VersionHandshake();
   node.MessageReceived += (node,message) => //Do your stuff when new message here;
}

If you want to make a server,

Quote
using(var server = new NodeServer(Network.Main))
{
   server.Listen();
   server.NodeAdded += (s,node)=>//do stuff when node connect (Handshakes and Ping/Pong are handled automatically)
}

When trying to start as server, I'm getting this exception thrown on server.Listen()

An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in NBitcoin.dll

Additional information: Only one usage of each socket address (protocol/network address/port) is normally permitted

Any ideas?
 Roll Eyes I had bitcoind running using that port.
DGulari
Legendary
*
Offline Offline

Activity: 1386
Merit: 1000


KawBet.com - Anonymous Bitcoin Casino & Sportsbook


View Profile
April 28, 2015, 01:24:05 PM
 #56

Is there a new thread somewhere?  How could 4 months go by without anyone discussing NBitcoin? 

. .KawBet . .
BITCOIN CASINO & SPORTSBOOK
|               ____
        ¦¦¦¦¦¦¦¦¦¦
      ¦¦¦¦¦¦¦¦¦¦¦¦¦¦
    ¦¦¦¦¦¦  ¦¦  ¦¦¦¦¦¦
  ¦¦¦¦¦              ¯¦¦¦¦¦
¦¦¦¦¦¦__    __    ¦¦¦¦¦¦
¦¦¦¦¦¦¦¦    ¯¯  _¦¦¦¦¦¦
¦¦¦¦¦¦¦¦    _    ¦¦¦¦¦
¦¦¦¦¦¦¯¯    ¯¯¯    ¦¦¦¦¦
  ¦¦¦¦¦                ¦¦¦¦¦
    ¦¦¦¦¦¦  ¦¦  ¦¦¦¦¦¦
      ¦¦¦¦¦¦¦¦¦¦¦¦¦¦
         ¯¦¦¦¦¦¦¦¦¦¦¯
               ¯¯¯¯¯¯

UP
TO
7BTC
WELCOME
BONUS
|
        ¦¦¦¦
    ¦¦¦¦¦¦¦¦¦
 _¦¦¦¦¦¦¦¦¦¦¦¦¦¦¯
    _¦¦¦¦¦¦¦¯
   _¦¦¦¦¦¦¦¯
  _¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
  _¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¯
           ¦¦¦¦¦¯
          ¦¦¦¦¦
         ¦¦¦¦¦
    ¯¦¦¦¦¦¦¦¦¦¦¦¦¯
    ¯¦¦¦¦¦¦¦¦¦¯
      ¦¦¦¦¦¯
      ¯¦¦¯

EASY DEPOSIT
FAST WITHDRAWAL
|
        ¦¦¦¦¦¦¦¦¦¦
      ¦                        ¦
    ¦     ¦¦¦¦  ¦    ¦     ¦
  ¦             ¦  ¦    ¦       ¦
¦         ¦¦¦¦  ¦¦¦¦         ¦
¦         ¦              ¦         ¦
¦         ¦¦¦¦                   ¦
  ¦                                ¦¦
    ¦         ¦  ¦  ¦         ¦¦¦
      ¦                         ¦¦¦¦
        ¯¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
               ¯¯¯¯¯¯          ¯¯
24H
LIVE
SUPPORT
|


¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦                          ¦¦¦¦¦¦¦¦¦¦¦¦¦
¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦              ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦      ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
¦¦¦¦¦¦¦¦¦            ¦¦¦¦¦¦¦¦¦¦¦¦¦¦            ¦¦¦¦¦¦¦
  ¦¦¦¦¦¦¦¦¦¦              ¦¦¦¦¦¦¦¦              ¦¦¦¦¦¦¦¦¦
  ¦¦¦¦¦¦¦¦¦¦¦¦          ¦¦¦¦¦¦¦¦          ¦¦¦¦¦¦¦¦¦¦¦
  ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
  ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
  ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
  ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
  ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
  ¦¦¦¦¦¦¦¦¦
  ¦¦¦¦¦

NO KYC
REQUIRED
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 619


View Profile
April 29, 2015, 12:07:54 PM
 #57

Is there a new thread somewhere?  How could 4 months go by without anyone discussing NBitcoin?  
There was some about discussion on threads about Blockchain Programming in C# about it.
The rest happens on github/stackoverflow/mails. (no specific forum thread)

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
lontivero
Full Member
***
Offline Offline

Activity: 164
Merit: 126

Amazing times are coming


View Profile
July 07, 2015, 05:03:54 AM
Last edit: July 07, 2015, 02:52:58 PM by lontivero
 #58

If you take a look at the NBitcoin repo https://github.com/NicolasDorier/NBitcoin you will see that it is a very active project. In fact, yesterday there was a new release with many improvements. For example, the latest version allows you to use the bitcoin core consensus library to validate transactions.

There are new features (see the TransactionBuilder and MoneyBag classes), improvements and, at the same time, NBitcoin is on sync with bitcoin core project. So, summarizing: there are a lot of news.      

bananas
Sr. Member
****
Offline Offline

Activity: 364
Merit: 257


View Profile
July 08, 2015, 07:59:37 AM
Last edit: July 08, 2015, 08:19:26 AM by bananas
 #59

If you take a look at the NBitcoin repo https://github.com/NicolasDorier/NBitcoin you will see that it is a very active project. In fact, yesterday there was a new release with many improvements. For example, the latest version allows you to use the bitcoin core consensus library to validate transactions.

There are new features (see the TransactionBuilder and MoneyBag classes), improvements and, at the same time, NBitcoin is on sync with bitcoin core project. So, summarizing: there are a lot of news.      



I wonder if it does have some kind of coin selector and a wallet file format?
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 619


View Profile
July 08, 2015, 08:11:42 AM
 #60

Yes, you can check the book https://blockchainprogramming.azurewebsites.net/ to see how I to use coin selector to build transactions and a sample of SPV implementation on https://github.com/NicolasDorier/NBitcoin.SPVSample

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
Pages: « 1 2 [3] 4 »  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!