Pages:
Author

Topic: Nxt source code flaw reports - page 52. (Read 113369 times)

legendary
Activity: 2142
Merit: 1010
Newbie
January 04, 2014, 10:45:18 AM
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?
newbie
Activity: 56
Merit: 0
January 04, 2014, 10:42:34 AM
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
legendary
Activity: 1232
Merit: 1001
January 04, 2014, 10:40:33 AM
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?
legendary
Activity: 2142
Merit: 1010
Newbie
January 04, 2014, 10:39:03 AM
So, the fee is constant in USD.  What do you think the fee in USD should be?

Stakeholders decide.
legendary
Activity: 2142
Merit: 1010
Newbie
January 04, 2014, 10:38:32 AM
So thats now an injected bug?

No. We a looking for injected flaws in logic.
legendary
Activity: 1232
Merit: 1001
January 04, 2014, 10:38:21 AM
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?
legendary
Activity: 2142
Merit: 1010
Newbie
January 04, 2014, 10:37:35 AM
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.
hero member
Activity: 687
Merit: 500
January 04, 2014, 10:36:42 AM
So thats now an injected bug?
newbie
Activity: 56
Merit: 0
January 04, 2014, 10:36:26 AM
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?
legendary
Activity: 2142
Merit: 1010
Newbie
January 04, 2014, 10:35:44 AM
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.
legendary
Activity: 1232
Merit: 1001
January 04, 2014, 10:35:11 AM
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?
legendary
Activity: 2142
Merit: 1010
Newbie
January 04, 2014, 10:34:46 AM
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.
legendary
Activity: 1232
Merit: 1001
January 04, 2014, 10:34:32 AM
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?
legendary
Activity: 2142
Merit: 1010
Newbie
January 04, 2014, 10:33:25 AM
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.
hero member
Activity: 687
Merit: 500
January 04, 2014, 10:31:47 AM
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.
legendary
Activity: 1232
Merit: 1001
January 04, 2014, 10:29:40 AM
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.
legendary
Activity: 2142
Merit: 1010
Newbie
January 04, 2014, 10:23:37 AM
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.
legendary
Activity: 2142
Merit: 1010
Newbie
January 04, 2014, 10:22:45 AM
Perhaps you can try to solve it analytically and get an equation?

No. It should take into account non-formalized variables like network topology.
full member
Activity: 238
Merit: 100
January 04, 2014, 10:22:33 AM
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.
legendary
Activity: 2142
Merit: 1010
Newbie
January 04, 2014, 10:21:14 AM
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.
Pages:
Jump to: