Bitcoin Forum
June 30, 2024, 03:22:49 AM *
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 113312 times)
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 04, 2014, 03:21:14 PM
 #261

Even with transparent mining, I can't see how that is avoided. Peers on the forked network will just mine further blocks on the forked network and the situation will get more confusing because the block creation speed increases.

With TF such problems r resolved by extended consensus algo.
NxtChoice
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
January 04, 2014, 03:22:33 PM
 #262

where
Code:
if ((amount + fee) * 100L > account.unconfirmedBalance) 

should be
Code:
if ((amount + fee) * 100L > account.balance) 

Why?

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.
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 04, 2014, 03:22:45 PM
 #263

Perhaps you can try to solve it analytically and get an equation?

No. It should take into account non-formalized variables like network topology.
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 04, 2014, 03:23:37 PM
 #264

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.
xibeijan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1001


View Profile
January 04, 2014, 03:29:40 PM
 #265

Perhaps you can try to solve it analytically and get an equation?

No. It should take into account non-formalized variables like network topology.

Fair enough, but you still might be able to get a bound without these variables, no?  Could be helpful.

Notable projects 2019: Semux, Dero, Wagerr, BEAM
BloodyRookie
Hero Member
*****
Offline Offline

Activity: 687
Merit: 500


View Profile
January 04, 2014, 03:31:47 PM
 #266

Class UserAsyncListener:

Code:
		public void onError(AsyncEvent asyncEvent) throws IOException
{
synchronized (user)
{
user.asyncContext.getResponse().setContentType("text/plain; charset=UTF-8");

ServletOutputStream servletOutputStream = user.asyncContext.getResponse().getOutputStream();
servletOutputStream.write((new JSONObject()).toString().getBytes("UTF-8"));
servletOutputStream.close();

user.asyncContext.complete();
user.asyncContext = null;
}
}

Could this give some kind of bad behavior? The class hold a lock on the user. If the servletOutputStream.write(...) takes very long it might lock the communication with that user or even worse.

Nothing Else Matters
NEM: NALICE-LGU3IV-Y4DPJK-HYLSSV-YFFWYS-5QPLYE-ZDJJ
NXT: 11095639652683007953
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 04, 2014, 03:33:25 PM
 #267

Fair enough, but you still might be able to get a bound without these variables, no?  Could be helpful.

No. Nxt protocol uses some tricks to add as many non-formalized factors as possible.
xibeijan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1001


View Profile
January 04, 2014, 03:34:32 PM
 #268

AFAIK 1440 blocks penalty is only for new account. Account can forge 1440 blocks after first only transaction.

Right. But if u decide to add some numbers u'll see that u get no advantage, except paying fees to other miners.

What happens when min TX fee drops to 0.1 or 0.01 NXT?  Does your argument still hold?

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:34:46 PM
 #269

Class UserAsyncListener:

Code:
		public void onError(AsyncEvent asyncEvent) throws IOException
{
synchronized (user)
{
user.asyncContext.getResponse().setContentType("text/plain; charset=UTF-8");

ServletOutputStream servletOutputStream = user.asyncContext.getResponse().getOutputStream();
servletOutputStream.write((new JSONObject()).toString().getBytes("UTF-8"));
servletOutputStream.close();

user.asyncContext.complete();
user.asyncContext = null;
}
}

Could this give some kind of bad behavior? The class hold a lock on the user. If the servletOutputStream.write(...) takes very long it might lock the communication with that user or even worse.

Right. But this is a part of web interface and will be removed in future versions.
xibeijan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1001


View Profile
January 04, 2014, 03:35:11 PM
 #270

Fair enough, but you still might be able to get a bound without these variables, no?  Could be helpful.

No. Nxt protocol uses some tricks to add as many non-formalized factors as possible.

Why?   Does this preclude a formal description or whitepaper?

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:35:44 PM
 #271

What happens when min TX fee drops to 0.1 or 0.01 NXT?  Does your argument still hold?

Yes. Fee in USD will be almost the same.
ricot
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
January 04, 2014, 03:36:26 PM
 #272

So, at .99^68 we have a 50% chance of predicting which one of our accounts will mine the 68th block from now.

No. 99% is just a guess. We'll get the real number after I analyze the blockchain.

Ok, so the question is: How good can you predict 1 block into the future when you are currently forging a block. This should be quite high, because most big accounts will be forging (they'd loose out on a lot of coins if they didn't).
I'm not sure, if you can tell with 99%, but let's say you can tell with 75% accuracy.
You put your big trancaction into the block that you are currently forging. You don't announce the transaction to your peers, so that it only happens, if your block is really chosen. You get the fee for that transaction back, since you are forging it yourself. So absolutely no risk in that part.
So by how much can you influence your chances? How many accounts can you chose from? They all need to have had a transfer to them at least 1440 blocks ago. You can make those transfers without paying fees if you do it like the big transfer, you just might have to wait a bit until you can generate a block. Say, you generate 100.000 accounts like that. (You can even get the 1 NXT that you had to send out again using the method described above)
Now what does that do to you chances?
Say, you have 1% total stake (i.e. 10.000.000 NXT), making you number 24 at the moment.
Your chance of forging the next block should be around 1/100, right?
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?
BloodyRookie
Hero Member
*****
Offline Offline

Activity: 687
Merit: 500


View Profile
January 04, 2014, 03:36:42 PM
 #273

So thats now an injected bug?

Nothing Else Matters
NEM: NALICE-LGU3IV-Y4DPJK-HYLSSV-YFFWYS-5QPLYE-ZDJJ
NXT: 11095639652683007953
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 04, 2014, 03:37:35 PM
 #274

Why?   Does this preclude a formal description or whitepaper?

TF is a double-edged blade. If it's too deterministic then a big stakeholder can cheat with block generation rate.
xibeijan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1001


View Profile
January 04, 2014, 03:38:21 PM
 #275

What happens when min TX fee drops to 0.1 or 0.01 NXT?  Does your argument still hold?

Yes. Fee in USD will be almost the same.


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

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:38:32 PM
 #276

So thats now an injected bug?

No. We a looking for injected flaws in logic.
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 04, 2014, 03:39:03 PM
 #277

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

Stakeholders decide.
xibeijan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1001


View Profile
January 04, 2014, 03:40:33 PM
 #278

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

Stakeholders decide.

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

Notable projects 2019: Semux, Dero, Wagerr, BEAM
ricot
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
January 04, 2014, 03:42:34 PM
 #279

Even with transparent mining, I can't see how that is avoided. Peers on the forked network will just mine further blocks on the forked network and the situation will get more confusing because the block creation speed increases.

With TF such problems r resolved by extended consensus algo.

Ok, so you are saying that the consensus algo used in the release has the flaw pointed out by me and is different in current releases. Doesn't that qualify as an injected bug? Wink
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 04, 2014, 03:45:18 PM
 #280

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.


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?
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!