Bitcoin Forum
April 18, 2024, 12:17:21 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is there a way to see why a transaction isn't getting relayed?  (Read 1568 times)
gweedo (OP)
Legendary
*
Offline Offline

Activity: 1498
Merit: 1000


View Profile
October 11, 2013, 04:51:18 PM
 #1

I am directly connected to my bitcoind on the testnet but none of my transactions are getting relayed. Even when I send to an address the bitcoind controls it doesn't show it being unconfirmed or any balance. How can I debug these transactions?
1713399441
Hero Member
*
Offline Offline

Posts: 1713399441

View Profile Personal Message (Offline)

Ignore
1713399441
Reply with quote  #2

1713399441
Report to moderator
Activity + Trust + Earned Merit == The Most Recognized Users on Bitcointalk
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
gweedo (OP)
Legendary
*
Offline Offline

Activity: 1498
Merit: 1000


View Profile
October 11, 2013, 07:46:41 PM
 #2

I looked in my debug.log and posted it tech support board to get clear statement of why bitcoind will not relay bitcoinj transactions on the testnet. Maybe possible bug.

https://bitcointalk.org/index.php?topic=309499.new#new
Mike Hearn
Moderator
Legendary
*
Offline Offline

Activity: 1526
Merit: 1128


View Profile
October 12, 2013, 02:16:07 PM
 #3

Can you post your code please? I've not seen a case of invalid signatures before, but of course if you use the API wrong you could create such things accidentally.
Mike Hearn
Moderator
Legendary
*
Offline Offline

Activity: 1526
Merit: 1128


View Profile
October 12, 2013, 06:03:50 PM
 #4

BTW you don't need commitTx - broadcastTransaction will call it for you once the transaction propagates (which in this case it isn't, but that's a separate issue).

The issue is that the signature is being substituted with a dummy signature because the private key isn't usable. We can see this here:

Quote
INFO:   completed:   88073e5a03ceae663c587c5dd2c0cf9254429356d6da50a1e85ac8ca22261665: Unknown confidence level.
     in   [30460221010000000000000000000000000000000000000000000000000000000000000000022101000000000000000000000000000000000000000000000000000000000000000001] [02ab19d8c48d52f52e549aab88f1f178984c2a5955b43f063b4db8187937b8ddc2]  / ff0dd34050e4b62be5a46d513debc8ac6489346428441f9a8d0e964be95a7d73:0

That big run of zeros means it's using Transaction.dummySignature(), which is meant to be replaced by something else later. So the question is, why does it think it doesn't have the private key. I guess the issue is how the wallet is being encrypted. Therefore the next step is - please paste the output of wallet.toString() and ideally, the rest of your program.
Mike Hearn
Moderator
Legendary
*
Offline Offline

Activity: 1526
Merit: 1128


View Profile
October 12, 2013, 06:19:50 PM
 #5

You could look at WalletAppKit to simplify the setup code.

I can't see the issue off-hand and I'm heading out for the night in a few minutes. It's apparently a bug or at the very least, poor documentation on how to use the encryption feature. If you put a breakpoint on Transaction.signInputs() line 837:

Code:
            if (key.hasPrivKey() || key.isEncrypted()) {
                signatures[i] = calculateSignature(i, key, aesKey, connectedPubKeyScript, hashType, anyoneCanPay);
            } else {
                // Create a dummy signature to ensure the transaction is of the correct size when we try to ensure
                // the right fee-per-kb is attached. If the wallet doesn't have the privkey, the user is assumed to
                // be doing something special and that they will replace the dummy signature with a real one later.
                signatures[i] = TransactionSignature.dummy();
            }

then take a look at the key object and see why both hasPrivKey() and isEncrypted() are false. I'd expect hasPrivKey to be false and isEncrypted to be true.

If you can't see what's going wrong, send me all your code and I'll try and make time tomorrow or Monday night to debug it.
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!