Bitcoin Forum
May 13, 2024, 03:32:42 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: BIP70 : Test vectors ?  (Read 1072 times)
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 621


View Profile
May 24, 2014, 10:53:52 AM
 #1

I'm going to implement BIP70 in NBitcoin, the big problem is that I see nowhere any tests vector to ensure I process correctly the payments messages.
The bitcoin core source does not have any tests about that, and I see no reference implementation in the BIP.

Does someone know where I can find such test vectors ?

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
1715571162
Hero Member
*
Offline Offline

Posts: 1715571162

View Profile Personal Message (Offline)

Ignore
1715571162
Reply with quote  #2

1715571162
Report to moderator
1715571162
Hero Member
*
Offline Offline

Posts: 1715571162

View Profile Personal Message (Offline)

Ignore
1715571162
Reply with quote  #2

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

Posts: 1715571162

View Profile Personal Message (Offline)

Ignore
1715571162
Reply with quote  #2

1715571162
Report to moderator
telepatheic
Jr. Member
*
Offline Offline

Activity: 56
Merit: 1


View Profile
May 24, 2014, 03:24:13 PM
 #2

I don't think there are any test vectors. I think the best you can do is compare against bitcoinj and modify bitcoinj's tests to test your implementation.
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 621


View Profile
May 24, 2014, 03:28:41 PM
 #3

This suck Sad
I would prefer having less, or no explanation page for a BIP but some rudimentary test vectors, than a novel without one. Sad

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652
Merit: 2216


Chief Scientist


View Profile WWW
May 25, 2014, 02:55:06 PM
 #4

This suck Sad
I would prefer having less, or no explanation page for a BIP but some rudimentary test vectors, than a novel without one. Sad

Feel free to create some; code here: https://github.com/gavinandresen/paymentrequest

How often do you get the chance to work on a potentially world-changing project?
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 621


View Profile
May 25, 2014, 06:15:25 PM
 #5

This suck Sad
I would prefer having less, or no explanation page for a BIP but some rudimentary test vectors, than a novel without one. Sad

Feel free to create some; code here: https://github.com/gavinandresen/paymentrequest

Gavin, I will, thanks to point out your utils, I will use that to make some test messages.
Will update the BIP once I implemented a compliant port on NBitcoin.

Maybe you can include your tool as reference in the BIP, this would help implementers.

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
Mike Hearn
Legendary
*
expert
Offline Offline

Activity: 1526
Merit: 1129


View Profile
May 26, 2014, 06:13:50 PM
 #6

We should add a link to Gavin's tool in the new developer guide I think. And yes, test vectors are badly needed!
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 621


View Profile
May 26, 2014, 10:10:16 PM
 #7

Sadly, between the protobuf package not existing anymore (I guess protobuf-compiler is the new name), and the make that does not work, I can't try out. (pushd, popd command not found)
Not sure it is a big problem, but it is definitively not for a linux illiterate like me, I'll run an eclipse and the BitcoinJ implementation instead.

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 621


View Profile
May 27, 2014, 03:58:39 PM
 #8

holy cow Gavin host a running paymentrequest generator at https://bitcoincore.org/~gavin/createpaymentrequest.php,
Lucky enough to came accross it thanks to https://bitcoinj.github.io/payment-protocol#user-interface-considerations
Would have saved me so much time if I knew Sad

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
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!