Bitcoin Forum
May 04, 2024, 02:33:01 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: max amount of coins to send in one transaction  (Read 14088 times)
DarthNoodle (OP)
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
February 24, 2014, 02:44:47 PM
 #1

Hi,

i have been looking into the bitcoin source and to try and understand each coin's characteristics from a code perspective.  i am having trouble in identifying the constant that determines the maximum amount of coins you are permitted to send in one go (e.g Send X amount of coins from Personal/Wallet A to Person/Wallet B).

can anyone give me any pointers as to where in the code this check is made?  i know there are checks to determine whether the maximum transaction size is too big.. i assume its somehow tied into that.  if that is the case does anyone have any rough equation i can put in to get the number out (i know the max amount varies per coin) or can they point to the lines of code that contain the upper limit checks.

my main goal is to produce a small database of various alt coins and hold stats on them (one of which is the max amount of coins permitted per transaction).. now i know each altcoin can be coded slightly different but they are all forked from the main bitcoin code so if i can understand where and why in the bitcoin code then it should be easy to identify it in the other coins.


any help would be greatly appreciated!
1714789981
Hero Member
*
Offline Offline

Posts: 1714789981

View Profile Personal Message (Offline)

Ignore
1714789981
Reply with quote  #2

1714789981
Report to moderator
1714789981
Hero Member
*
Offline Offline

Posts: 1714789981

View Profile Personal Message (Offline)

Ignore
1714789981
Reply with quote  #2

1714789981
Report to moderator
Every time a block is mined, a certain amount of BTC (called the subsidy) is created out of thin air and given to the miner. The subsidy halves every four years and will reach 0 in about 130 years.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714789981
Hero Member
*
Offline Offline

Posts: 1714789981

View Profile Personal Message (Offline)

Ignore
1714789981
Reply with quote  #2

1714789981
Report to moderator
1714789981
Hero Member
*
Offline Offline

Posts: 1714789981

View Profile Personal Message (Offline)

Ignore
1714789981
Reply with quote  #2

1714789981
Report to moderator
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4615



View Profile
February 24, 2014, 02:51:46 PM
 #2

Hi,

i have been looking into the bitcoin source and to try and understand each coin's characteristics from a code perspective.  i am having trouble in identifying the constant that determines the maximum amount of coins you are permitted to send in one go (e.g Send X amount of coins from Personal/Wallet A to Person/Wallet B).

can anyone give me any pointers as to where in the code this check is made?  i know there are checks to determine whether the maximum transaction size is too big.. i assume its somehow tied into that.  if that is the case does anyone have any rough equation i can put in to get the number out (i know the max amount varies per coin) or can they point to the lines of code that contain the upper limit checks.

my main goal is to produce a small database of various alt coins and hold stats on them (one of which is the max amount of coins permitted per transaction).. now i know each altcoin can be coded slightly different but they are all forked from the main bitcoin code so if i can understand where and why in the bitcoin code then it should be easy to identify it in the other coins.


any help would be greatly appreciated!

I'll take a look at the code and see what I can find, but I'm not aware of any "maximum value per transaction" limit coded into the protocol.  Why would there be?
DarthNoodle (OP)
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
February 24, 2014, 03:00:27 PM
 #3

ahh ok,

previously i have tried to send a large amount of coins (admittedly with altcoins) and have received errors "Transaction To Large", when i sent smaller amounts they were sent with no problem.  which lead me to believe that there is some arbitrary limit..  i am trying to compile a DB on the various characteristics of altcoins and thought this would be another neat field.

i am no C programmer but from my limited knowledge from what i see, the only restriction is possibly based on the size of the transaction? i've only been at this a couple of weeks so im just looking for confirmation whether an arbitrary value exists or if it is possible to quickly determine whether sending a large amount of coins would be successful (assuming i have the volume of coins already in my wallet).
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4615



View Profile
February 24, 2014, 03:37:02 PM
 #4

ahh ok,

previously i have tried to send a large amount of coins (admittedly with altcoins) and have received errors "Transaction To Large", when i sent smaller amounts they were sent with no problem.  which lead me to believe that there is some arbitrary limit..  i am trying to compile a DB on the various characteristics of altcoins and thought this would be another neat field.

i am no C programmer but from my limited knowledge from what i see, the only restriction is possibly based on the size of the transaction? i've only been at this a couple of weeks so im just looking for confirmation whether an arbitrary value exists or if it is possible to quickly determine whether sending a large amount of coins would be successful (assuming i have the volume of coins already in my wallet).

"Transaction Too Large" almost certainly is reporting on the size of the transaction in bytes, not the value of the transaction.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
February 24, 2014, 03:41:46 PM
Last edit: February 24, 2014, 07:10:58 PM by DeathAndTaxes
 #5

What Danny said.   If you had control of all 21 M BTC you could send them in a single transaction.

In general when someone knowledgeable is talking about transactions, "size" will refer to the actual size (in bytes of KB) of the digital transactions, and "value" will refer to the number of bitcoins in the the transaction, fee, inputs or outputs.
DarthNoodle (OP)
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
February 24, 2014, 03:50:34 PM
 #6

ok,

thanks for the clarification, so the only limit on the amount of coins is relative to how much you hold in your wallet.  i can only imagine the "Transaction To Large" error occurs when the QT client variable contains a larger number than anticipated?

What Danny said.   If you had control of all 21 M BTC you could send them in a single transaction.
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1075


Ian Knowles - CIYAM Lead Developer


View Profile WWW
February 24, 2014, 03:57:48 PM
 #7

i can only imagine the "Transaction To Large" error occurs when the QT client variable contains a larger number than anticipated?

You need to become familiar with how Bitcoin works at a lower level to understand the problem.

For simplicity think of it like this:

You wallet could either contain one $100 bill or it could contain 10,000 1 cent coins (the latter situation very likely if you are using faucets or getting tiny amounts of bitcoins from some websites "paying" you).

If you are wanting to send 10,000 1 cent coins it is a bit like the merchant going "sorry - you need to pay me in notes".

So assuming this is your "real problem" you will have to perhaps get some help to "clean out the dust" in your wallet (and maybe not continue doing the same thing).

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
beegatewood
Sr. Member
****
Offline Offline

Activity: 297
Merit: 250


View Profile
February 24, 2014, 04:35:08 PM
 #8

is there even a max amount of coins?

DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
February 24, 2014, 05:28:27 PM
Last edit: February 24, 2014, 07:06:37 PM by DeathAndTaxes
 #9

What Danny said.   If you had control of all 21 M BTC you could send them in a single transaction.
Depending on the number address that 21 M is located on, you would need to account for a transaction fee, looking at the total number of address and the average block size it wouldn't be the full 21 M.

True and there will never be 21M BTC either.  Though if you want to split some hairs, at the protocol level, the fee doesn't reduce the amount sent, only the amount received. Smiley

Quote
Maybe the OP's transaction size was too large for the default fee.

I think it is something like that.  The "default fee" can be set by the user and can be as low as 0 BTC.  The reference client will require low priority txs to pay the min mandatory fee of 0.1 mBTC.  The message for that does not use the clearest language (especially older versions which were even more cryptic).  The OP may have interpreted that to indicate there is a max tx value which is not the case.
DarthNoodle (OP)
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
February 24, 2014, 05:43:56 PM
 #10

ok i think i have the gist of things,  thank you all for your very helpful and insightful responses Smiley

ive not been doing this long so im still getting to grips.  if you have any good material on explaining the protocol in depth that would be epic!  i have read most of the parts of the main bitcoin wiki but something that can give more of an example would be awesome!

if you cant think of anything then no worries, i always like learning by playing and you guys have been more than helpful as it is Smiley
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
February 24, 2014, 05:45:07 PM
 #11

No sadly Bitcoin is pretty poorly documented outside of the codebase itself.  So if you need more detail then the wiki you probably need to take a look at the code (and know some C++).
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4615



View Profile
February 24, 2014, 05:47:11 PM
 #12

ok i think i have the gist of things,  thank you all for your very helpful and insightful responses Smiley

ive not been doing this long so im still getting to grips.  if you have any good material on explaining the protocol in depth that would be epic!  i have read most of the parts of the main bitcoin wiki but something that can give more of an example would be awesome!

if you cant think of anything then no worries, i always like learning by playing and you guys have been more than helpful as it is Smiley

If you haven't read the Bitcoin Whitepaper written by Satoshi Nakamoto, that would be a great place to start.  It always amazes me how many people go to great lengths to try to understand all the technical details of the protocol without having first at least read over the document that describes why things work the way they do.
DarthNoodle (OP)
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
February 24, 2014, 06:58:44 PM
 #13

ok thanks all, 

i have found a really good read which is exactly the type of thing i have been looking for.  the URL is:

http://www.michaelnielsen.org/ddi/how-the-bitcoin-protocol-actually-works/

i thought i would let you guys know so you can read it if you wish or pass it on to other people wanting to learn Smiley
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!