Bitcoin Forum
April 27, 2024, 04:38:29 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Problems with multisig transactions in bitcoind with default account in regtest.  (Read 915 times)
CoinBeyond (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
April 12, 2014, 02:31:29 AM
 #1

I've been attempting to do transactions to and from a multisig address for a couple of days, but I'm finding that my default account "" keeps paying for things, even though I'm explicitly saying other accounts should pay for things via the txid field in createrawtransaction.

For a quick example, if I create a transaction like:

bitcoind createrawtransaction [{\"txid\":\"504aa16418fbb871d307249448bcecdaa5699872a4d22b84d170ae64a2fe89ca\",\"vout\":0}], {\"2NASaVRks1dFupX1e6y3SK8BomjhvSv7xGh\":50}

(It's formatted this way because I'm running this in a windows command prompt at the moment, hope to be able to run linux soon!)

the account associated to the address in the transaction's vout where n=0 is "test", but after I sign and send this raw transaction and check listaccounts, "" is debited 50 instead of "test".

If it helps at all, 2NASaVRks1dFupX1e6y3SK8BomjhvSv7xGh is a 2 of 3 address of which "test" is a part of.

Am I doing something wrong, or is this just how bitcoind handles situations where all of the addresses in a (multisig) transaction are associated with accounts in my wallet? And if so, why??

It's also all being done in regtest mode, but I wouldn't expect bitcoind to handle transactions differently in that mode.
1714192709
Hero Member
*
Offline Offline

Posts: 1714192709

View Profile Personal Message (Offline)

Ignore
1714192709
Reply with quote  #2

1714192709
Report to moderator
Transactions must be included in a block to be properly completed. When you send a transaction, it is broadcast to miners. Miners can then optionally include it in their next blocks. Miners will be more inclined to include your transaction if it has a higher transaction fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714192709
Hero Member
*
Offline Offline

Posts: 1714192709

View Profile Personal Message (Offline)

Ignore
1714192709
Reply with quote  #2

1714192709
Report to moderator
1714192709
Hero Member
*
Offline Offline

Posts: 1714192709

View Profile Personal Message (Offline)

Ignore
1714192709
Reply with quote  #2

1714192709
Report to moderator
fbueller
Sr. Member
****
Offline Offline

Activity: 412
Merit: 266


View Profile
April 12, 2014, 09:36:33 AM
 #2

The accounts feature is broken, can't scale up to many users, and has even once told me all ihad a balance available using  accounts were empty (even though I had a balance on getinfo.).

So before you go and code something, don't use accounts to store keys for different users!

Bitwasp Developer.
CoinBeyond (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
April 12, 2014, 11:19:56 PM
 #3

Good to know it's a problem with accounts and not me. Has anyone filed a big report?
fbueller
Sr. Member
****
Offline Offline

Activity: 412
Merit: 266


View Profile
April 13, 2014, 09:32:47 AM
 #4

It seems to be just 'known.' - this sort of thing has happened https://bitcointalk.org/index.php?topic=550366.msg5987199#msg5987199

Also, as you have probably seen in the move command, (and although BTC are spent by redeeming an unspent BTC (and the whole TxOut must be spent in the new transaction)) you can move arbitrary amounts. What happens if your wallet has only only has one unspent outpout and keeps that money in two accounts, but you spend the balance of one?

Bitwasp Developer.
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652
Merit: 2216


Chief Scientist


View Profile WWW
April 13, 2014, 04:43:23 PM
 #5

transactions send via sendrawtransaction are always debited from the default "" account. Raw transactions and accounts are not designed to work together, use one or the other .

And preferably not accounts: unless somebody steps up and volunteers to make the accounts feature "industrial-strength" (scalable, integrates with whatever back-end database your company is using to track user information, can be robustly backed up, etc) it is very likely it will be deprecated and then dropped.

How often do you get the chance to work on a potentially world-changing project?
CoinBeyond (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
April 14, 2014, 02:58:54 AM
 #6

Thanks for the clarity!  With the rising popularity and power-limitation of multisig, I guess that the accounts feature wouldn't be worth investing to be modified to use industrially, since we may be moving away from online bitcoin hosts having direct control over one's bitcoins.

Quote
and the whole TxOut must be spent in the new transaction

I learned this the hard way too.  Does this mean that any unspent TxOut in the new transaction are sent as miner's fees?
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!