DarthNoodle (OP)
Newbie
Offline
Activity: 50
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 24, 2014, 02:44:47 PM |
|
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!
|
|
|
|
DannyHamilton
Legendary
Offline
Activity: 3472
Merit: 4796
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 24, 2014, 02:51:46 PM |
|
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
Activity: 50
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 24, 2014, 03:00:27 PM |
|
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
Activity: 3472
Merit: 4796
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 24, 2014, 03:37:02 PM |
|
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
Activity: 1218
Merit: 1079
Gerald Davis
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 24, 2014, 03:41:46 PM Last edit: February 24, 2014, 07:10:58 PM by DeathAndTaxes |
|
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
Activity: 50
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 24, 2014, 03:50:34 PM |
|
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
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 24, 2014, 03:57:48 PM |
|
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).
|
|
|
|
beegatewood
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 24, 2014, 04:35:08 PM |
|
is there even a max amount of coins?
|
|
|
|
DeathAndTaxes
Donator
Legendary
Offline
Activity: 1218
Merit: 1079
Gerald Davis
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 24, 2014, 05:28:27 PM Last edit: February 24, 2014, 07:06:37 PM by DeathAndTaxes |
|
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](https://bitcointalk.org/Smileys/default/smiley.gif) 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
Activity: 50
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 24, 2014, 05:43:56 PM |
|
ok i think i have the gist of things, thank you all for your very helpful and insightful responses ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) 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](https://bitcointalk.org/Smileys/default/smiley.gif)
|
|
|
|
DeathAndTaxes
Donator
Legendary
Offline
Activity: 1218
Merit: 1079
Gerald Davis
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 24, 2014, 05:45:07 PM |
|
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
Activity: 3472
Merit: 4796
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 24, 2014, 05:47:11 PM |
|
ok i think i have the gist of things, thank you all for your very helpful and insightful responses ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) 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](https://bitcointalk.org/Smileys/default/smiley.gif) 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.
|
|
|
|
|
|