Bitcoin Forum
May 02, 2024, 08:44:43 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Warning: One or more bitcointalk.org users have reported that they believe that the creator of this topic displays some red flags which make them high-risk. (Login to see the detailed trust ratings.) While the bitcointalk.org administration does not verify such claims, you should proceed with extreme caution.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 [15] 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 »
  Print  
Author Topic: Nxt source code flaw reports  (Read 113306 times)
klee
Legendary
*
Offline Offline

Activity: 1498
Merit: 1000



View Profile
January 04, 2014, 03:46:00 PM
 #281

If you find the following post helpful. It was quite a bit of work so any donations would be very appreciated. BTC:1NjNo3pfjC2fHWRPdSNvmWiyLXsGh5Y7p6 NXT:17286747867026237511

Klee and Come-from-Beyond believe and have informed me that my interrogation of Come-from-Beyond on the issue of block authoring and my subsequent findings may make me eligible for a bounty as they may constitute an audit of the mining algorithm. I also may be uniquely qualified to provide this audit since I authored a very similar proposal here https://bitcointalk.org/index.php?topic=343923 as it turns out 1 day before BTCNext.

As a disclaimer, as you all know the code is still closed source until jan 3rd so my findings will rely on claims by BTCNext being truthful and accurate.

First a summary of my findings:
The shortcomings that face POW schemes are myriad. I don't want to get into explanations here but I will list three of those shortcomings. Hashing efficiency scales logarithmically with investment in infrastructure. In lay-terms that means a person who invests 10billion in mining infrastructure will be able to produce significantly more than 10 times as much hashing power as someone who has invested 1 billion. This creates pressure towards centralization as the capitalization of the POW coin market increases. Additionally there is the excessive warrant-less (warrant-less only because NXT exists now Grin) use of silicon, electricity, and human labor in the production and maintenance of mining hardware. Finally there is a need to keep block sizes smaller than would otherwise be the case in order to prevent incentives for centralization.

The natural solution to these problems, proof of stake, was imagined years ago. Peercoin is the most noteworthy implementation of POS and all of the other POS schemes on the market, as i understand it, are forks of Peercoin. Peercoin was an innovative step in the right direction. It solved the above mentioned problems but only at the cost of introducing new problems. Peercoin's security model relies on the assumption that large stake holders will remain honest for fear that the loss to the value of their stake would outweigh the advantages of a successful double-spend. The main problem with this assumption is that two different people will never have the same idea about what constitutes self interest. Imagine, for just one possible example, a situation where a large stake holder in peercoin is an even larger stake holder in alternative monetary schemes and stands to benefit from the peercoin capital exodus by being on the receiving end of that exodus in his other investments.

The natural solution to the problems outlined in peercoin is to introduce randomness into the selection of which stake holder wins the right to author a block. It sounds simple, but its not actually as simple as it sounds. You see, you can't just hash the previous block and use the digest as the parameter for selecting the winner of the right to author the next block because, the block authors would contrive transactions in that block that digested into a hash that gave him the the right to author the next block. In-fact you cant base it off of a digest of any part of the block that the author has free reign over or you will run into the same problem. So here is the million dollar question, how do you arrive at a series of unpredictable but consensus verifiable number without proof of work? This is NXT's key innovation. It is to BTCNext as the block chain is to Satoshi.

In essence it works by having the author of the next block be selected by comparing the public key that he is using to hold his stake to the public key of the author of the previous block. In-order to prevent the new block author from simply creating a public key that would win and loading that public key with his stake BTCNext introduced the idea of effective stake. Only stake that has remained stationary for 1440 blocks (24 hours) has the right to author a block. Would be attackers can not calculate 1440 blocks into the future because they have no idea who is going to author the very next block, let alone the next 1440 blocks. Inorder to prevent an attacker from creating a "trap" where if he manages to become lucky enough to author one block in the future than he has prepared a set of funded addresses which would "catch" the subsequent blocks, we don't only rely on the previous block authors signature alone, but build an entirely separate "block chain" which is the result of hashing every public key ever used to author a block.

That was my attempt to explain the basic idea for how it works conceptually. It of course is not a technical explanation of how it ACTUALLY works. (i may come back and add that later if there is demand but it would mostly be a copy paste job from BTCNext anyway).

I have to be honest here. The code is still closed source. It could turn out that this is all a scam. Buying nxt will continue to be a huge risk until the code is published open source. But I will tell you why I am buying. What would be the point in BTCNext conceptually solving all of these problems and creating a truly great model for how a crypto could work, and then create enough infrastructure to make a convincing facade, when he could have almost as easily as creating such a convincing facade, implemented all of the brilliant ideas he conceptually outlined?! That would be crazy! And even if NXT does turn out to be a scam, we should still build a real crypto out of these ideas.

Anyway for anyone who wants more details I will post a full transcript of my conversation with Come-from-Beyond below:

Quote
i really really really need someone to answer this question for me:

can anyone explain to me how it is determined who has the right to author the next block. i understand that the more nxt you have the higher your chance, but specifically how is the "winner" selected?

I know all of you guys who have 40k+ invested in this thing have to have figured out the answer to this question before you dropped that kind of cash.
Quote
It's very similar to Bitcoin. Who gets correct nonce wins the block.
Quote
In bitcoin a nonce is hashed with the previous block until one gets a digest that is below the target threashold. There is no POW in next so how are nonces used in this scheme? and where does the nonce come from? I really need as much detail as you can give me. I will even send a tip if i come out of this conversation understanding what i hoping to understand. Smiley
Quote
Now I got ur question and answered in https://nextcoin.org/index.php/topic,866.msg7100.html#msg7100

TL;DR: Nxt mining algo is based on ur invention.

Edit: I've seen the date of ur post, it had been posted 1 day before Nxt released. Did u write about ur invention somewhere else or earlier?
Quote
OH HECK YES! afk while i buy a million of these things Grin

oh but hey can you do me one more favor. can you link me to the original source where you got this information. i really want to read more.
Quote
Other guy has answered on nextcoin.org about that.

FROM NEXTCOIN.ORG
Quote
Each block has "generationSignature" parameter.  An active account signs "generationSignature" of the previous block with its private key.  This gives 64 bytes which are hashed with SHA256.  The first 8 bytes of the hash gives a number (I call it a "hit").  The hit is compared to the current "target" (64bit number).  If the hit is lower than the target then next block can be generated.

The target for each account is proportional to the balance.  Someone holding 1000 coins gets a 50 times bigger target than someone with 20 coins. Thus the owner of 1000 coins will generate 50 times more blocks than the owner of 20 coins (in the long run).

The target is not constant, it grows each second passed since the timestamp of the previous block.  If noone generated a block on the first second then the target becomes 2 times bigger and so on.  The base target is the target on the 60 second mark.  If there is only a few active accounts then after a long time someone will generate a block because the target will become very big.  If you open the client and log with any funded account you can see a ticking timer in BLOCKS widget.  It shows when the target will become greater than your hit.

Quote
No that was the first time and I wrote about it the same day that i thought of it. But you say that I posted it 1 day before nxt right? that technically makes it my invention right? Grin
Quote
Right. And technically this makes me to suspect that u r BCNext.

Edit: I'd like to hear ur opinion regarding https://bitcointalk.org/index.php?topic=364218.0
Quote
haha no I'm a scrub programmer. my highest programming accomplishment to date is chess in the console with no AI. I'm much better at conceptualizing higher level abstractions than the logistics of implementation.

actually this is a really common thing. inventions are more often than not invented by a half a dozen people all over the world at the same time. we probably thought of it at the exact same time and i just wrote about it first. here is wikipedia on the phenomena http://en.wikipedia.org/wiki/Multiple_discovery

ill check it out.
Quote
I think I'm starting to get it. Is it true that the generationSignatures are totally deterministic? If you wanted too you could spend computing power to calculate who would win the right to author blocks far off into the future?
Quote
Output of next signature depends only on input of previous one. For example:

F(x) = x*2

Then we have such a sequence of outcomes: 1, 2, 4, 8, 16, 32...

Transactions included into a block can't change it, there is a special "blockSignature" for them.
Quote
Great! im definitely beginning to understand.

So next question. What mechanism prevents people from purposefully creating accounts with public keys which will allow them to author an upcoming block?

*edit* there is definitely a tip in this for you if you have good answers to all of my questions  Grin
Quote
Cunicula (as attacker) and BCNext (as defender) came to the following algo:

1. Brand new accounts must wait 1440 blocks before they r given permission to forge blocks
2. Old accounts forge blocks as if their balance doesn't include coins received in the previous block

Amount that is used for forging is called "effective balance".
Quote
is it really that difficult to calculate out 1441 blocks ahead? it doesn't sound difficult. If it is so difficult now what happens when computers become faster and more powerful in the future? is the plan to just fork it from time to time?

it seems like if the generationSignature was additionally a product of the hash of the public key of the account that authored the previous block than that would add a measure of security for little additional cost. as in, unlike including phony transactions to get the result you want out of the digest of a whole block, it would be difficult to coax the result you wanted out of a public key funded with a large amount of cash 1441 blocks ahead of time.
Quote
What should be calculated ahead to be able to generate all blocks?
Quote
My understanding is that the next generationSignatureB is a digest of generationSignatureA and generationSignatureC is a digest of generationSignatureB ect... So what i mean is, what stops an attacker from calculating generationSignatures 1441 steps into the future and then creating and funding account that will win the right to author that 1441st block. It should in theory be rather simple to generate 1441 signatures if it is a purely deterministic process right?
Quote
U must predict amounts on other accounts in 1440 steps, coz time when u generate a block depends on ur effective balance. It's possible only for empty blocks. If someone's account becomes larger then he will get chance to inject his block into ur chain completely ruining all ur computations.
Quote
oooh so the generationSignature is a digest of the previous generationSignature + the time-stamp of the previous block?
Quote
No. It's digest of prevGenSignature only.

How determined the generator (account) of the next block:

1. X = digest of prevGenSignature gives 256 bits
2. First 64 bits of X is a HIT
3. Target = BaseTarget (which is the same for all accounts) * Balance * Time_since_previous_block
4. If HIT < Target then next block can be generated

Edit: Target grows each second until it "crosses" HIT of one of the accounts
Quote
All you would have to do is brute force the creation of a key pair that digested the 1440th genSignature to a hit that was below everyone elses target. It would be totally doable.

This problem is super solvable though. BTNext should make the BaseTarget adjustable with an algo similar to bitcoins re-target algo. Then Increae the 1440 block (24 hours) restriction for effectiveBalance out to about 43200 (1 month) just to be extra super safe (its best to pick absurdly safe parameters when dealing with billions or possibly even trillions of dollars someday). Then finally make the nextGenSignature a digest of the prevGenSignature + the public key of the author of the last block. You couldnt game it with intentionally selected keys because you would have to pick the key 1 month ahead of time and there would be no way to predict who would author which blocks 1 month out since miners drop in and out of the network at random.
Quote
1440 blocks is safe number coz u have to know who will sign the 1439th block which depends on the signer of the 1438th block and so forth. To know future signers u must know future balances. Even if u know future balances u must know future topology of the network to predict which blocks will be orphaned.
Quote
im so sorry to keep pestering you. but why is this the case. inorder to do this all you would have to do is brute force the creation of a key pair that digested the 1440th genSignature to a hit that was below everyone elses target. It would be totally doable. why must you need to know future signers?
Quote
Coz block 1440 winner is determined as Digest(Digest(Digest(...1435times...Digest(Signature_of_block_1)...))).
Quote
But that doesnt explain why you would need to know who future signers are. It only says that you would need to calculate the 1440th generationSignature and pre-empt it by creating an account with a key-pair that would cause your hit to be lower than everyone elses targets right? how do future signers effect that situation?
Quote
Output of the last digest depends on ur public key and generating signature of previous block. It's deterministic but still can't be guessed. Look at this example:

Alice signs block 1 - signature is A
Bob signs block 2 - signature is Digest(A + Bob_public_key)
Charlie signs block 3 - signature is Digest(Digest(A + Bob_public_key) + Charlie_public_key)

See? U can choose any Charlie_public_key but without knowing Bob_public_key in advance it gives no advantage at all.
Quote
yep! i do understand. we just weren't communicating properly. as soon as i thought i saw a problem what you wrote up there is exactly the solution i proposed. Grin bcnext is a freaking genius. I worked so hard to try to figure something out like this myself to no avail. What i proposed in my thread is a far cry from this much better solution.
If you want to be a moderator, report many posts with accuracy. You will be noticed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714682683
Hero Member
*
Offline Offline

Posts: 1714682683

View Profile Personal Message (Offline)

Ignore
1714682683
Reply with quote  #2

1714682683
Report to moderator
1714682683
Hero Member
*
Offline Offline

Posts: 1714682683

View Profile Personal Message (Offline)

Ignore
1714682683
Reply with quote  #2

1714682683
Report to moderator
1714682683
Hero Member
*
Offline Offline

Posts: 1714682683

View Profile Personal Message (Offline)

Ignore
1714682683
Reply with quote  #2

1714682683
Report to moderator
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 04, 2014, 03:46:13 PM
 #282

Do you have a personal view on what it should be, i.e., a target?

Maybe 1 cent?
xibeijan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1001


View Profile
January 04, 2014, 03:50:04 PM
 #283

Do you have a personal view on what it should be, i.e., a target?

Maybe 1 cent?


I would guess $0.2-0.4 USD because that seems to be the average TX fee for bitcoin over the months.  See https://blockchain.info

Notable projects 2019: Semux, Dero, Wagerr, BEAM
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 04, 2014, 03:52:05 PM
 #284

I would guess $0.2-0.4 USD because that seems to be the average TX fee for bitcoin over the months.  See https://blockchain.info

Will see. Just have to wait for Voting System launch.
rlh
Hero Member
*****
Offline Offline

Activity: 804
Merit: 1004


View Profile
January 04, 2014, 03:57:13 PM
Last edit: January 04, 2014, 04:25:21 PM by rlh
 #285

I've tried to follow this full thread this morning but, just in case I missed something, has anyone found any of the lesser flaws?

It looks like this exercise is serving it's purpose.  Injected bugs aside, there's been a fair amount of constructive QA.

CfB-- I know what you are doing.  This is psychologically manipulative, crowd-sourced, bug hunting at its finest! Wink

At first I was quite turned off by the fact that this is a coin written in Java.  However, what Java has provided is for you to be able to bring a 1-page "specification" in the form of easily compilable and executable code.  Also, I think that not providing unit tests is smart, too.  If you have to roll your own testing, you will do it from your unique perspective of how it should be done.

The software will be analyzed on a MUCH more thorough bases if 5-10 advanced developers take their time to hammer the code the way that they uniquely test code.

Kudos devs!  If I find some time this afternoon, there are few operations I want to look at.  They are areas where I, personally, would inject bugs if I were to develop such a public exercise.  (Hint: They would be in the most critical, but theoretical/unproven portions of code because that's where you would want your testers to spend the bulk of their time.)

A Personal Quote on BTT from 2011:
"I'd be willing to make a moderate "investment" if the value of the BTC went below $2.00.  Otherwise I'll just have to live with my 5 BTC and be happy. :/"  ...sigh.  If only I knew.
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 04, 2014, 04:00:01 PM
 #286

CfB-- I know what you are doing.  This is psychologically manipulative, crowd-sourced, bug hunting at its finest! Wink

Smiley

Edit: No flaws found yet.
opticalcarrier
Full Member
***
Offline Offline

Activity: 238
Merit: 100



View Profile
January 04, 2014, 04:00:15 PM
 #287

So, the fee is constant in USD.  What do you think the fee in USD should be?

Stakeholders decide.

UNTIE THE FEE FROM FIAT!!!

When decimal places come, I think fees should be done on a curve, starting with a base percentage of the NXT being transferred on the smallest amount possible to transfer and curving down in percentage as the transaction amount increases.  As far as the specific curve, I dont know.  I just dont like the fee being tied to any specific fiat at all.

To do this we would have to reserve the very last few decimal places for fees though.

So for example,
And I am by no means proposing use of these particular numbers (I am just using these particular ones for ease of explanation) dividing NXT down to 8 decimal places, the last 3 would only be used for fees, meaning the smallest amount of NXT that can be transferred is to 5 decimal places, or .00001.
So now, to transfer .00001 NXT (which is the smallest amount that could be transferred in this particular scheme) would cost a fee of, lets say 0.005%  So the total transferred in this case would be .00001005 and I would also suggest a curve to be used to decrease the fee as the amount to be transferred is increased. 

This removes all ties to fiat, which I think should be the goal
klee
Legendary
*
Offline Offline

Activity: 1498
Merit: 1000



View Profile
January 04, 2014, 04:02:09 PM
 #288

This removes all ties to fiat, which I think should be the goal
+1

Fiat is irrelevant and prone to lose value over time! Gimme those precious nxt decimals!
NxtChoice
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
January 04, 2014, 04:07:42 PM
 #289

The money to be sent should be compared with the balance, not the unconfirmedBalance. On the other hand, a counter example, I have an account with balance 1000 and unconfirmedBalance 0, and now I want to send 100 with fee 1. Of course 100 + 1 > 0, but I can send it.

We use unconfirmed balance to avoid spamming with double-spending transactions.

Sorry, too hard to understand it for me.
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 04, 2014, 04:09:30 PM
 #290

Sorry, too hard to understand it for me.

If we used balance instead of unconfirmed balance then an adversary could spam a lot of transactions that would never be confirmed and just consumed bandwidth of other peers.
ricot
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
January 04, 2014, 04:10:34 PM
 #291

You get the fee for that transaction back, since you are forging it yourself. So absolutely no risk in that part.

This is incorrect. If ur block is orphaned then ur transaction will be forged by other account.
Valid point, let's change that part a little:
There is a small chance that you'll loose 100,000 NXT for setting up the small accounts and another 100,000 is bound to those, and of course the 1 NXT for the big transfer. Wink
This reduces your forging chance to ~0.99 %. (~0.98 % for the budget used in attempting the increased forging chance)
And the cost for any further attempt on doing the same is just 1NXT at a small chance.
That doesn't change a lot in the methodology, actually, it's statistically irrelevant.

Now, in 25% of the cases, your NXT will just be in one "random" account, and since you couldn't predict that, your chance of forging the next block remains at 1/100.
But in 75% of the cases, you NXT actually act like 100,000 unique accounts, since you can move it to whichever of your accounts has the best chance to make the block. So actually, you suddenly have 100,000 accounts with each a 1/100 chance, i.e. a pretty much guaranteed block.


In the end, by doing some free transactions and taking no risk, we increased our forging chance from 1% to about 75%... Nice Smiley

Where am I wrong?

Bolded part doesn't look legit. could u paraphrase it?

Ok, let's start with the 25% part:
You transfered NXT into some account. This account has a forging probability of 0.98%. Nothing changes, all is well. (I really don't know, what more I can say for this situation as that one is the trivial one)

Now for the interesting 75% part:
You can calculate in advance, which nonce each of your accounts would have and then choose the best one. So statistically speaking, all your accounts are behaving like accounts with your 0.98% stake in them. And you can freely choose between any of the 100.000 accounts in advance, already knowing the nonce. The chance that one of them has a nonce so good that it's better than all the others is extremely high: If you'd (theoretically speaking) combine all of those 100,000 accounts with 0.98% stake each, you have a stake of 98,000 % (yes, I know, that's more than 100%, but that's the whole point of having the prior knowledge Smiley). So the total stake of the currency for that next block becomes 98,000 % (you) + 99.02 % (others) = 98,099.02 %. Which means, you suddenly own nearly 99.9 % of the stake and have the respective chance of forging that block.

So with that methodology, we have a forging chance of 25%*0.98%+75%*99.9% = 75.17 %.
rlh
Hero Member
*****
Offline Offline

Activity: 804
Merit: 1004


View Profile
January 04, 2014, 04:15:16 PM
 #292

So, the fee is constant in USD.  What do you think the fee in USD should be?

Stakeholders decide.

UNTIE THE FEE FROM FIAT!!!

I think it should be done on a curve, starting with a base percentage of the NXT being transferred and curving down in percentage as the transaction amount increases.  As far as the specific curve, I dont know.  I dont like the fee being tied to any specific fiat at all.

Do to this we would have to reserve the very last few decimal places for fees though.

So for example,
And I am by no means proposing use of these particular numbers (I am just using these particular ones for ease of explanation) dividing NXT down to 8 decimal places, the last 3 would only be used for fees, meaning the smallest amount of NXT that can be transferred is to 5 decimal places, or .00001.
So now, to transfer .00001 NXT (which is the smallest amount that could be transferred in this particular scheme) would cost a fee of, lets say 0.005%  So the total transferred in this case would be .00001005 and I would also suggest a curve to be used to decrease the fee as the amount to be transferred is increased.  

This removes all ties to fiat, which I think should be the goal

In theory, this sounds like a good idea but the problem is transactional/account spam.  This makes it easy to buy 10 Nxt and send near 1,000,000 transactions to random accounts.  With a fee that is set at 1 Nxt, you're not going to be able to spam the network for long which is the current setup.

Instead, I recommend an analytical system implemented that monitors the amount and value of daily transactions and then sets a new minimum fee value that changes day-to-day (or on some other period.)  You can do this using some basic statistics AND you can also use statistics to trim odd, edge-cases on the rare days that "whales" move around 10,000,000 coins.

PS- I've been following/working with Microcash for years.  My last post regarding the development of Microcash was on scaling the amount of distributed, new coins that were generated each day.  

I know that this is about fees and not generating currency, but the concept of adjusting system metrics, based off daily transactional statistics is something I've looked at and thought about for a loooooong time.  I think we could do the same type of thing here.

A Personal Quote on BTT from 2011:
"I'd be willing to make a moderate "investment" if the value of the BTC went below $2.00.  Otherwise I'll just have to live with my 5 BTC and be happy. :/"  ...sigh.  If only I knew.
NxtChoice
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
January 04, 2014, 04:17:52 PM
 #293

Sorry, too hard to understand it for me.

If we used balance instead of unconfirmed balance then an adversary could spam a lot of transactions that would never be confirmed and just consumed bandwidth of other peers.

That case is OK. So my understanding of unconfirmedBalance was wrong, so why the unconfirmedBalance is equal to the balance and effective balance from the API I just got from my account?
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 04, 2014, 04:18:41 PM
 #294

Now for the interesting 75% part:
You can calculate in advance, which nonce each of your accounts would have and then choose the best one. So statistically speaking, all your accounts are behaving like accounts with your 0.98% stake in them. And you can freely choose between any of the 100.000 accounts in advance, already knowing the nonce. The chance that one of them has a nonce so good that it's better than all the others is extremely high: If you'd (theoretically speaking) combine all of those 100,000 accounts with 0.98% stake each, you have a stake of 98,000 % (yes, I know, that's more than 100%, but that's the whole point of having the prior knowledge Smiley). So the total stake of the currency for that next block becomes 98,000 % (you) + 99.02 % (others) = 98,099.02 %. Which means, you suddenly own nearly 99.9 % of the stake and have the respective chance of forging that block.

So with that methodology, we have a forging chance of 25%*0.98%+75%*99.9% = 75.17 %.

Good catch. Looks like this trick will work if u r the only one who uses this strategy. Will freezing recently moved coins for 1440 blocks solve the issue?

PS: It's not the injected flaw, but still post ur Nxt account for 10K reward plz.
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 04, 2014, 04:23:13 PM
 #295

So my understanding of unconfirmedBalance was wrong, so why the unconfirmedBalance is equal to the balance and effective balance from the API I just got from my account?

If u sent a transaction ur unconfirmed balance would become lower.
ImmortAlex
Hero Member
*****
Offline Offline

Activity: 784
Merit: 501


View Profile
January 04, 2014, 04:31:23 PM
 #296

Good catch. Looks like this trick will work if u r the only one who uses this strategy. Will freezing recently moved coins for 1440 blocks solve the issue?
Maybe this is the reason why in Novacoin inputs that generates PoS block became frozen for 3 day?
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 04, 2014, 04:35:17 PM
 #297

Good catch. Looks like this trick will work if u r the only one who uses this strategy. Will freezing recently moved coins for 1440 blocks solve the issue?
Maybe this is the reason why in Novacoin inputs that generates PoS block became frozen for 3 day?

Maybe
gsan1
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
January 04, 2014, 04:36:13 PM
 #298

Line 2414:

Code:
int hostLength = buffer.getShort();

Should be "short hostLength"?
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 04, 2014, 04:36:54 PM
 #299

Should be "short hostLength"?

No. int works faster.
NxtChoice
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
January 04, 2014, 04:38:07 PM
 #300

So my understanding of unconfirmedBalance was wrong, so why the unconfirmedBalance is equal to the balance and effective balance from the API I just got from my account?

If u sent a transaction ur unconfirmed balance would become lower.

I checked several accounts and they all showed that unconfirmedBalance equal to the balance. Is unconfirmed balance always the same as the balance? Of course, as the balance decreases, the unconfirmed balance become lower. Is it possible that unconfirmed balance is lower than the balance?

BTW, from my experience, I found that Nxt terminologies are not so straight, and are usually opposite from the general understanding.

"unconfirmedBalance" seems to be the code internal variable and parameter for some important functions, and it may be not so important for the average joe, so is it necessary to list out in the API for the end user? Another example is the "token" concept. It's introduced for web application and the user need to fill in the website. So I'm not interested in it at the early stage a month ago. Later on, I wondered whether I can sign a message in Nxt system. Of course, in the end I leaned "token" is just the same as bitcoin message signing, but Nxt changed its terminology.

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 [15] 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 »
  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!