Bitcoin Forum
April 26, 2024, 10:33:04 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 [4] 5 »  All
  Print  
Author Topic: Book release : Blockchain Programming in C# (Part 1)  (Read 31970 times)
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 619


View Profile
February 17, 2015, 10:34:58 PM
 #61

Offtopic:
Odd to hear someone doesn't like R#, it's really really good.
But i'm a fan of RedGate, i do like the ANTS profile tools..

Ontopic:
I never heard about Bill Strait and can't find much about it on google or bing, because that name is not unique at all..

I do like the private key, public key and hash being written about.
Perhaps i missed about it, but i couldn't find anything in dept technical background in there..
Ofcourse that isn't C# related Smiley

Something like this
https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses


I do not go in the details, but it will be far from basic, I want developers to understand bitcoin on the conceptual and developement level.
Knowing the details about how to transform an array of byte into a base58 does not unlock any potential for innovation.
Pure source code, wiki or Mastering Bitcoin of Andreas Antonopoulos are better suited for this kind of information.

Also, this is the first part of the book. The next one (should release beginning march) talk about building more complex transaction (multi sig, DW) and colored coins.
The third part will focus on advanced scenario like Coin Share and micro payment with OP_CHECKLOCKTIMEVERIFY.

The goal of this book is to give the basic knowledge for starting innovation on bitcoin without relying on someone's else public web API (like blockchain info)
Relying on an web API blocks innovation at the web API provider level, this is the congestion I want to burst.

The lack of product in the bitcoin space is not the fault of the core developers but of API providers that got life too easy, and a lack of teaching materials easing the learning curve. Bitcoin the protocol evolves faster than we are innovating.

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
In order to achieve higher forum ranks, you need both activity points and merit points.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714127584
Hero Member
*
Offline Offline

Posts: 1714127584

View Profile Personal Message (Offline)

Ignore
1714127584
Reply with quote  #2

1714127584
Report to moderator
criptix
Legendary
*
Offline Offline

Activity: 2464
Merit: 1145


View Profile
February 18, 2015, 12:55:45 AM
 #62

Hello all,

I think that one of the way to make Bitcoin a success is to teach developers how to program it themselves, while keeping in mind the real problems they can fix with it.
Depending on public web API to do the heavy stuff is still useful, but oblige the user to look at the problem from someone else eyes.
It also block innovation, since users are stuck to what their API provider gives them, and provoke a mopya to the wild possibilities of Bitcoin.

I have way too much demand for work than I can give. However, I can spread what I know for free in a book.

My book is in public domain, and will be spread likely in 3 parts.
The first part is out now, and I am waiting for your feedback (and your work ! Smiley)

In the book, you will find coding challenges that you need to resolve to get access to the next parts when they will be out.

The range of difficulty will go from "how to create a private key", "how to make you transaction by hand, and sending by hand" to "how Dark Wallet works", "How to implement coin shuffle", "how to implement a voting system with colored coins"

Website : http://blockchainprogramming.azurewebsites.net/
Book link : https://aois.blob.core.windows.net/public/Blockchain Programming in CSharp.pdf

Nicolas,
Happy coding and make shit happens,

Hello Nicholas,

Thanks for this awesome ebook! i will take a good look at and will comment when im finished with it Smiley

                     █████
                    ██████
                   ██████
                  ██████
                 ██████
                ██████
               ██████
              ██████
             ██████
            ██████
           ██████
          ██████
         ██████
        ██████    ██████████████████▄
       ██████     ███████████████████
      ██████                   █████
     ██████                   █████
    ██████                   █████
   ██████                   █████
  ██████
 ███████████████████████████████████
██████████████████████████████████████
 ████████████████████████████████████

                      █████
                     ██████
                    ██████
                   ██████
                  ██████
                 ████████████████████
                 ▀██████████████████▀
.LATTICE - A New Paradigm of Decentralized Finance.

 

                   ▄▄████
              ▄▄████████▌
         ▄▄█████████▀███
    ▄▄██████████▀▀ ▄███▌
▄████████████▀▀  ▄█████
▀▀▀███████▀   ▄███████▌
      ██    ▄█████████
       █  ▄██████████▌
       █  ███████████
       █ ██▀ ▀██████▌
       ██▀     ▀████
                 ▀█▌
 

             ▄████▄▄   ▄
█▄          ██████████▀▄
███        ███████████▀
▐████▄     ██████████▌
▄▄██████▄▄▄▄█████████▌
▀████████████████████
  ▀█████████████████
  ▄▄███████████████
   ▀█████████████▀
    ▄▄█████████▀
▀▀██████████▀
    ▀▀▀▀▀
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 619


View Profile
March 02, 2015, 03:36:26 PM
 #63

Part 2 out https://bitcointalk.org/index.php?topic=973916 Wink

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
pabitel
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
March 02, 2015, 05:01:13 PM
 #64

Thank you for this.

Once you've finished, you might want to consider creating an ebook out of it. You can put it up on Smashwords with a price of $0 and it will get distributed to most book retailers apart from Amazon.
doof
Hero Member
*****
Offline Offline

Activity: 765
Merit: 503


View Profile WWW
March 04, 2015, 12:13:36 AM
 #65

Hi Nic,

I can't seem to send a transaction on the test network.  This code excuses without exception.  Any ideas?

Code:
                using (var node = NBitcoin.Protocol.Node.ConnectToLocal(NBitcoin.Network.TestNet))
                {
                    node.VersionHandshake();
                    NBitcoin.Transaction[] transactions = new Transaction[1];
                    transactions[0] = tx;
                    
                    //node.SendMessage(new NBitcoin.Protocol.InvPayload(transactions));
                    node.SendMessage(new NBitcoin.Protocol.TxPayload(tx));
                }

Tx = 0100000001b3efb3050cc144151f83d3caef74c7bfc88838effb9999e12f936c33839ccd7d00000 00048473044022057a1ecdd6377d25bdfcf06d97f71c6f75571f14371e55f45265a7c28a942386f 0220201732fefbcd3788b31ffbade0cd0f2785d510b9d1c84c570f8b4ec128d993bf01ffffffff0 358020000000000001976a91497422742f5c61fd2f3d3c2b2bc97ff85be8a541f88aca8def50500 000000434104d751b12b85ba098f5648723265bcf88754d8a96923b9524ca590bbaf1dad7b51526 b0d3355602b8fa8dbe6e396e7db4655a8c5dcc1e4f1b44b6e273f5389a0ffac0000000000000000 096a074f41010001140000000000

Note:  Tx passed the verification method, Debug.Assert(txBuilder.Verify(tx));
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 619


View Profile
March 04, 2015, 12:28:12 AM
 #66

Why is it commented out ?

Quote
//node.SendMessage(new NBitcoin.Protocol.InvPayload(transactions));

Because you need it.

Another common error I've seen some people did is referencing the wrong Output.
In my example, I've checked precisely which coin I wanted to spend. (I think it was the first output of the previous transaction)
In you case, it might be the second coin of the previous transaction.

I have also checked you transaction, you are referencing a previous coin from 7dcd9c83336c932fe19999fbef3888c8bfc774efcad3831f1544c10c05b3efb3
This transaction is not confirmed nor in any mempool.

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

Activity: 765
Merit: 503


View Profile WWW
March 04, 2015, 01:33:55 AM
 #67

Why is it commented out ?

Quote
//node.SendMessage(new NBitcoin.Protocol.InvPayload(transactions));

Because you need it.

Another common error I've seen some people did is referencing the wrong Output.
In my example, I've checked precisely which coin I wanted to spend. (I think it was the first output of the previous transaction)
In you case, it might be the second coin of the previous transaction.

I have also checked you transaction, you are referencing a previous coin from 7dcd9c83336c932fe19999fbef3888c8bfc774efcad3831f1544c10c05b3efb3
This transaction is not confirmed nor in any mempool.

Commented out because I was trying with and without.

Hmm, all my test net coins where received months ago. 

Does part 2 of your book have a section on the tx builder?
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 619


View Profile
March 04, 2015, 01:37:31 AM
 #68

Yes, the second part use TransactionBuilder a lot and have a part dedicated on the subject.

Quote
Hmm, all my test net coins where received months ago.  
This is false, check for yourself. 7dcd9c83336c932fe19999fbef3888c8bfc774efcad3831f1544c10c05b3efb3 do not exists, you are referencing a coin from a transaction that do not exists.

You can also check the log of bitcoin core to have more information, but right now your transaction can't possibly work with a coin that do not exist.
You made a mistake on the transaction id you are referencing.

I never saw had a bug with txBuilder.Verify(tx);
If it says it is well signed, then it is, your problem is with the input outpoint.

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

Activity: 765
Merit: 503


View Profile WWW
March 04, 2015, 05:53:59 AM
 #69

Yes, the second part use TransactionBuilder a lot and have a part dedicated on the subject.

Quote
Hmm, all my test net coins where received months ago.  
This is false, check for yourself. 7dcd9c83336c932fe19999fbef3888c8bfc774efcad3831f1544c10c05b3efb3 do not exists, you are referencing a coin from a transaction that do not exists.

You can also check the log of bitcoin core to have more information, but right now your transaction can't possibly work with a coin that do not exist.
You made a mistake on the transaction id you are referencing.

I never saw had a bug with txBuilder.Verify(tx);
If it says it is well signed, then it is, your problem is with the input outpoint.

Sorry to waste your time, not sure where that hash come form.  Triple checked and all is working now.

Will be sending a tip once I get paid Cheesy
nopara73
Member
**
Offline Offline

Activity: 99
Merit: 326


View Profile
April 26, 2015, 05:44:03 AM
 #70

Hey guys, I've just encountered this problem, posted to stackoverflow.
Maybe someone knows what to do with it: http://stackoverflow.com/questions/29874122/nbitcoin-throws-invalidoperationexception-with-the-message-mac-hmacsha256-not

Creator of Wasabi Wallet: An open-source, non-custodial, privacy focused Bitcoin wallet - https://wasabiwallet.io
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 619


View Profile
April 26, 2015, 02:13:19 PM
 #71

responded there.

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

Activity: 1582
Merit: 502


View Profile
April 29, 2015, 12:10:59 PM
 #72

Looks very interesting.
I will give it a read when I get a chance.

Thanks  Cheesy

dewdeded
Legendary
*
Offline Offline

Activity: 1232
Merit: 1011


Monero Evangelist


View Profile
July 19, 2015, 02:06:55 PM
 #73

Subbed. Have to learn in C# in my dayjob. I will buy this book, when I am able to understand it. Maybe in a year or so.

Will use this book as main goal/motivation to learn, improve and practice C#, so I can read and understand it.
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 619


View Profile
July 20, 2015, 09:17:54 AM
 #74

I don't think you need deep knowledge of C# for starting playing with it.

You don't have to buy, it is free on https://blockchainprogramming.azurewebsites.net/

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
Scaccomatt0
Legendary
*
Offline Offline

Activity: 1120
Merit: 1000


https://cryptoworld.io


View Profile WWW
July 31, 2015, 06:37:45 PM
 #75

thanks man, there are just few books about bitcoin and blockchain development in c#
great job!

       


████
████
████
████
████
████
████
████
████
████
████
████
████
████
████
               ______
          __███████████████_      █████         █████          █████           █████
       _█████████████████████      █████         █████        █████           █████
     _███████¯¯¯     ¯¯██████       █████         █████      █████           █████
   _██████¯            ¯████¯        █████         █████    █████           █████
  ██████¯                             █████          ██████████            █████
 ██████                               █████          ██████████            █████
 █████                                 █████         ██████████            █████
█████                                  █████          ████████            █████
█████                                  █████           ██████             █████
█████                                  █████           ██████             █████
█████                                  █████           ██████            █████    
█████                                   █████          ██████          █████    
 █████                                  █████          ██████          █████
 ██████                                 █████          ██████        █████
  ██████_                                █████         ██████        █████
   ¯██████_            _████_            █████        ████████       █████
     ¯███████___     __██████            █████      █████  █████     █████
       ¯█████████████████████             █████    █████    █████   █████
          ¯¯███████████████¯               ████████████      ███████████
               ¯¯¯¯¯¯                      ¯¯¯¯¯¯¯¯¯¯         ¯¯¯¯¯¯¯¯¯¯
|
  
FAUCET
ICO
ANDROID
       


████
████
████
████
████
████
████
████
████
████
████
████
████
████
████
dollarneed
Hero Member
*****
Offline Offline

Activity: 742
Merit: 500



View Profile
April 10, 2016, 10:24:03 PM
 #76

Hi Nicholas, i just wanna say thanks for this awesome book, i just download it and i think it's pretty good to learn about bitcoin and blockchain as beginner like me, wanna spend my free time with it and maybe some cofee, thanks again
mmortal03
Legendary
*
Offline Offline

Activity: 1762
Merit: 1010


View Profile
April 11, 2016, 05:35:48 PM
 #77

Was this updated recently? It has a bit more material now than when it was originally updated with part II.
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 619


View Profile
April 19, 2016, 06:29:22 AM
 #78

Hi Nicholas, i just wanna say thanks for this awesome book, i just download it and i think it's pretty good to learn about bitcoin and blockchain as beginner like me, wanna spend my free time with it and maybe some cofee, thanks again
Thanks, don't forget to tip for my coffee too Shocked)

Was this updated recently? It has a bit more material now than when it was originally updated with part II.

I added parts about segwit recently.
But yes, I update it times to times. I don't always say it because it is always in small increments that does not make sense to announce individually, but after a while it stacks up to significant changes.

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
dothebeats
Legendary
*
Offline Offline

Activity: 3626
Merit: 1352


Cashback 15%


View Profile
April 19, 2016, 08:43:35 AM
 #79

Was getting my feet wet on C++ and C# lately after learning python. I'm always fascinated on creating a bitcoin-related mechanism that could potentially help (or in a more daring statement, be a part of bitcoin's src code) bitcoin's code. This book might help me get there. Watching the thread for future developments and update. Thanks, Nicolas.

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

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

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

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

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

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











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











▄▄▄▄█
nopara73
Member
**
Offline Offline

Activity: 99
Merit: 326


View Profile
May 25, 2016, 07:23:01 AM
 #80

--UPDATE-- 
We have just moved the whole book to GitHub and fully revised it:

https://github.com/ProgrammingBlockchain/ProgrammingBlockchain

Creator of Wasabi Wallet: An open-source, non-custodial, privacy focused Bitcoin wallet - https://wasabiwallet.io
Pages: « 1 2 3 [4] 5 »  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!