Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: mtbitcoin on September 15, 2011, 06:43:51 AM



Title: bitcoind command parameter [minconf=1]
Post by: mtbitcoin on September 15, 2011, 06:43:51 AM
Hi

I have a question regarding the bitcoind command line parameters. I noticed in some of commands there is [minconf=1]. I know this stands for minimum confirmations for transactions like listtransactions, listreceivedbyaccount, listreceivedbyaddress,etc. But for other commands like "move" and "sendfrom" which are basically internal accounting transfers what do these represent? Why is there a need to the [minconf] here. For example


move
<fromaccount> <toaccount> <amount> [minconf=1] [comment]

sendfrom
<fromaccount> <tobitcoinaddress> <amount> [minconf=1] [comment] [comment-to]

Thanks


Title: Re: bitcoind command parameter [minconf=1]
Post by: Gavin Andresen on September 16, 2011, 10:10:22 PM
sendfrom needs the minconf to know if it should fail because of too few confirmed coins in the account.

move used to need minconf for essentially the same reason, but as of (some release in the past) it always succeeds.
E.g. if account A has 5 0-confirmation bitcoins and 5 1-confirmation bitcoins then:
  move "A" "B" 10
... used to fail, because A's 1-confirmation balance was only 5.

Now it will succeed, giving it a -5 one-confirmation balance.  move "A" "B" 100 will also now always succeed, making A's balance go negative.


Title: Re: bitcoind command parameter [minconf=1]
Post by: qwk on September 17, 2011, 10:43:01 AM
I've actually always wondered why the "move" command actually allows negative balances.
Was there someone thinking of a possible use for that, like, dunno, maybe some kind of "ledger"?
Or was it a decision like not wanting to interfere with whatever possible uses an application developer could find?
I guess i'd personally like to have a configuration option to make bitcoind only accept positive account balances.


Title: Re: bitcoind command parameter [minconf=1]
Post by: mtbitcoin on September 17, 2011, 06:40:15 PM
I've actually always wondered why the "move" command actually allows negative balances.
Was there someone thinking of a possible use for that, like, dunno, maybe some kind of "ledger"?
Or was it a decision like not wanting to interfere with whatever possible uses an application developer could find?
I guess i'd personally like to have a configuration option to make bitcoind only accept positive account balances.

Yes, I had the same question too. At first i thought it was an error on my end that the move allowed negative balances. Given that the accounts features is used as an internal ledger I would have assumed that move command would not allow negative balances. If this is by design one possible reason that i can think of is due to optimization perhaps? (so that the getbalance check would not be executed before the move is allowed)



Title: Re: bitcoind command parameter [minconf=1]
Post by: 2112 on September 17, 2011, 09:24:34 PM
I'm kinda curious who (and why) would ever run a real accounting based on the bitcoin's wallet.dat. The implementation here is obviously not compliant with anything that would be considered a GAAP (Generally Accepted Accounting Principles). I understand that some people will fly-into-the-night rather than face an audit, but is there anyone planning on running a real business that is going to have a real audit trail in their accounts?


Title: Re: bitcoind command parameter [minconf=1]
Post by: mtbitcoin on September 18, 2011, 06:43:22 AM
I'm kinda curious who (and why) would ever run a real accounting based on the bitcoin's wallet.dat. The implementation here is obviously not compliant with anything that would be considered a GAAP (Generally Accepted Accounting Principles). I understand that some people will fly-into-the-night rather than face an audit, but is there anyone planning on running a real business that is going to have a real audit trail in their accounts?

The "accounting" term that is referred here is not your standard GAAP. But instead is an implementation to track balances in bitcoin "accounts". This is especially usefull when building shared services like wallet