ImmortAlex
|
|
January 04, 2014, 02:52:18 PM |
|
If announcedAddress is not null, it adds it as a member variable to object peer. Afterwards it checks if peer is not null. Could there be a null pointer exception? Or is announcedAdress only not null when peer is not null?
Looks like a non-critical bug, I'll check it, thx. This is not the flaw. https://bitcointalk.org/index.php?topic=397214.msg4288242#msg4288242
|
|
|
|
xibeijan
Legendary
Offline
Activity: 1232
Merit: 1001
|
|
January 04, 2014, 02:55:32 PM |
|
What was new for me, is that target doesn't directly depend on time your previous generation. There's no "coin days" like in PPC or NVC.
No coin days, so miners can game the system since with what they call 'transparent mining' they know beforehand if it is there turn to mine, so they can move around their coins to the miner that is going to get its turn. So to game this system, you have a bunch of say N miners and then you have a balance of M that you move around to the miner that will be mining next. So effectively you get N*M more profitability. Fortunately, your idea won't work because when you move your coins there's a penalty of 1440 blocks before they can be used for mining again. N.B. the account to mine the next block also depends on the previous blocks, so you'd have something like 1439 unknown blocks to predict.
|
|
|
|
ImmortAlex
|
|
January 04, 2014, 02:59:21 PM |
|
What was new for me, is that target doesn't directly depend on time your previous generation. There's no "coin days" like in PPC or NVC.
No coin days, so miners can game the system since with what they call 'transparent mining' they know beforehand if it is there turn to mine, so they can move around their coins to the miner that is going to get its turn. So to game this system, you have a bunch of say N miners and then you have a balance of M that you move around to the miner that will be mining next. So effectively you get N*M more profitability. Sadly, that won't work because when you move your coins there's a penalty of 1440 blocks before they can be used for mining again. AFAIK 1440 blocks penalty is only for new account. Account can forge 1440 blocks after first only transaction.
|
|
|
|
ricot
Newbie
Offline
Activity: 56
Merit: 0
|
|
January 04, 2014, 02:59:40 PM |
|
What was new for me, is that target doesn't directly depend on time your previous generation. There's no "coin days" like in PPC or NVC.
No coin days, so miners can game the system since with what they call 'transparent mining' they know beforehand if it is there turn to mine, so they can move around their coins to the miner that is going to get its turn. So to game this system, you have a bunch of say N miners and then you have a balance of M that you move around to the miner that will be mining next. So effectively you get N*M more profitability. Sadly, that won't work because when you move your coins there's a penalty of 1440 blocks before they can be used for mining again. The penalty is 1 block, not 1440 blocks. 1440 blocks is only for new accounts.
|
|
|
|
Come-from-Beyond (OP)
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
January 04, 2014, 03:01:07 PM |
|
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.
|
|
|
|
xibeijan
Legendary
Offline
Activity: 1232
Merit: 1001
|
|
January 04, 2014, 03:02:40 PM |
|
What was new for me, is that target doesn't directly depend on time your previous generation. There's no "coin days" like in PPC or NVC.
No coin days, so miners can game the system since with what they call 'transparent mining' they know beforehand if it is there turn to mine, so they can move around their coins to the miner that is going to get its turn. So to game this system, you have a bunch of say N miners and then you have a balance of M that you move around to the miner that will be mining next. So effectively you get N*M more profitability. Sadly, that won't work because when you move your coins there's a penalty of 1440 blocks before they can be used for mining again. AFAIK 1440 blocks penalty is only for new account. Account can forge 1440 blocks after first only transaction. I thought it's once the coins are moved. Thought I saw that in source. Anyway, no reason it couldn't/shouldn't be a 1440 penalty. Would make forging a lot more interesting and possibly more secure.
|
|
|
|
FrictionlessCoin
Legendary
Offline
Activity: 868
Merit: 1000
Cryptotalk.org - Get paid for every post!
|
|
January 04, 2014, 03:04:50 PM |
|
Then what is rationale behind it? Pretty much the main point of proof-of-work is that this can't be done.
This can be done in PoW too. No. In PoW the cumulative work clearly decides the valid branch, there is no option that you see two branches and can't decide which one is the "real one" accepted as the consensus. Not sure how it should work here since nobody has provided a spec. Anyway, for Nakamoto's bitcoin, no single miner has exclusive right to mine a block. So you see competing blocks submitted to the network and eventually the block that is in the longest chain gets committed and the rest become orphaned. With this system, it appears that a single miner gets the right to mine a block. So there is an assumption that you never see competing blocks commited to the network and you never need to decide which is the longest block. I honestly think this is a bad assumption, and the protocol should allow for competing blocks to be submitted.
|
|
|
|
Come-from-Beyond (OP)
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
January 04, 2014, 03:07:36 PM |
|
Not sure how it should work here since nobody has provided a spec.
Anyway, for Nakamoto's bitcoin, no single miner has exclusive right to mine a block. So you see competing blocks submitted to the network and eventually the block that is in the longest chain gets committed and the rest become orphaned.
With this system, it appears that a single miner gets the right to mine a block. So there is an assumption that you never see competing blocks commited to the network and you never need to decide which is the longest block.
I honestly think this is a bad assumption, and the protocol should allow for competing blocks to be submitted.
U r wrong. The only difference that in Nxt u can predict who will forge next block. That's the main point of Transparent Forging.
|
|
|
|
xibeijan
Legendary
Offline
Activity: 1232
Merit: 1001
|
|
January 04, 2014, 03:09:04 PM |
|
Not sure how it should work here since nobody has provided a spec.
Anyway, for Nakamoto's bitcoin, no single miner has exclusive right to mine a block. So you see competing blocks submitted to the network and eventually the block that is in the longest chain gets committed and the rest become orphaned.
With this system, it appears that a single miner gets the right to mine a block. So there is an assumption that you never see competing blocks commited to the network and you never need to decide which is the longest block.
I honestly think this is a bad assumption, and the protocol should allow for competing blocks to be submitted.
U r wrong. The only difference that in Nxt u can predict who will forge next block. That's the main point of Transparent Forging. Is the account that forges the next block is still randomised? How far ahead can one predict?
|
|
|
|
Come-from-Beyond (OP)
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
January 04, 2014, 03:10:45 PM |
|
Is the account that forges the next block is still randomised? How far ahead can one predict?
Yes, accounts r randomized. Next block u can predict with 99% chance, 2nd - 99%*99%, 3rd - 0.99^3 and so on.
|
|
|
|
FrictionlessCoin
Legendary
Offline
Activity: 868
Merit: 1000
Cryptotalk.org - Get paid for every post!
|
|
January 04, 2014, 03:11:11 PM |
|
Not sure how it should work here since nobody has provided a spec.
Anyway, for Nakamoto's bitcoin, no single miner has exclusive right to mine a block. So you see competing blocks submitted to the network and eventually the block that is in the longest chain gets committed and the rest become orphaned.
With this system, it appears that a single miner gets the right to mine a block. So there is an assumption that you never see competing blocks commited to the network and you never need to decide which is the longest block.
I honestly think this is a bad assumption, and the protocol should allow for competing blocks to be submitted.
U r wrong. The only difference that in Nxt u can predict who will forge next block. That's the main point of Transparent Forging. That is exactly what I am saying, if you can predict which miner is allowed to forge the block then you trust that miner to forge the block correctly. What I am saying is that this assumption is problematic. You cannot trust miners to be available or to be trust worthy, so you need other competing blocks.
|
|
|
|
xibeijan
Legendary
Offline
Activity: 1232
Merit: 1001
|
|
January 04, 2014, 03:11:19 PM |
|
What was new for me, is that target doesn't directly depend on time your previous generation. There's no "coin days" like in PPC or NVC.
No coin days, so miners can game the system since with what they call 'transparent mining' they know beforehand if it is there turn to mine, so they can move around their coins to the miner that is going to get its turn. So to game this system, you have a bunch of say N miners and then you have a balance of M that you move around to the miner that will be mining next. So effectively you get N*M more profitability. Sadly, that won't work because when you move your coins there's a penalty of 1440 blocks before they can be used for mining again. The penalty is 1 block, not 1440 blocks. 1440 blocks is only for new accounts. If this does turn out to be a weakness, then I would suggest changing penalty from 1 block to 1440 blocks. Then an adversary would need to predict 1439 blocks into the future, because the account to mine the next block depends on the who mined (and what the contents were of) the previous block.
|
|
|
|
FrictionlessCoin
Legendary
Offline
Activity: 868
Merit: 1000
Cryptotalk.org - Get paid for every post!
|
|
January 04, 2014, 03:12:03 PM |
|
Not sure how it should work here since nobody has provided a spec.
Anyway, for Nakamoto's bitcoin, no single miner has exclusive right to mine a block. So you see competing blocks submitted to the network and eventually the block that is in the longest chain gets committed and the rest become orphaned.
With this system, it appears that a single miner gets the right to mine a block. So there is an assumption that you never see competing blocks commited to the network and you never need to decide which is the longest block.
I honestly think this is a bad assumption, and the protocol should allow for competing blocks to be submitted.
U r wrong. The only difference that in Nxt u can predict who will forge next block. That's the main point of Transparent Forging. Is the account that forges the next block is still randomised? How far ahead can one predict? Again, still no spec. But I think with transparent mining, you can predict forever into the future.
|
|
|
|
xibeijan
Legendary
Offline
Activity: 1232
Merit: 1001
|
|
January 04, 2014, 03:14:31 PM |
|
Is the account that forges the next block is still randomised? How far ahead can one predict?
Yes, accounts r randomized. Next block u can predict with 99% chance, 2nd - 99%*99%, 3rd - 0.99^3 and so on. So, at 0.99^68 an adversary has a 50% chance of predicting which one of his M accounts will mine the 68th block from now. I think you should seriously consider raising the forging penalty for moving NXT from 1 block to 1440 blocks. This means the probability of an adversary predicting which of his M accounts will mine block 1440 is only 5.18e-7.
|
|
|
|
Come-from-Beyond (OP)
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
January 04, 2014, 03:15:01 PM |
|
But I think with transparent mining, you can predict forever into the future.
Thank u for ur competent opinion.
|
|
|
|
Come-from-Beyond (OP)
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
January 04, 2014, 03:15:54 PM |
|
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.
|
|
|
|
NxtChoice
|
|
January 04, 2014, 03:15:55 PM |
|
Account account = accounts.get(Account.getId(publicKey)); if (account == null) { response.put("errorCode", 6); response.put("errorDescription", "Not enough funds"); } else { if ((amount + fee) * 100L > account.unconfirmedBalance) { response.put("errorCode", 6); response.put("errorDescription", "Not enough funds"); }
where if ((amount + fee) * 100L > account.unconfirmedBalance)
should be if ((amount + fee) * 100L > account.balance)
|
|
|
|
Come-from-Beyond (OP)
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
January 04, 2014, 03:16:44 PM |
|
where if ((amount + fee) * 100L > account.unconfirmedBalance)
should be if ((amount + fee) * 100L > account.balance)
Why?
|
|
|
|
ricot
Newbie
Offline
Activity: 56
Merit: 0
|
|
January 04, 2014, 03:18:49 PM |
|
But it doesn't work like a check-pointing... it just gives an angle of attack on the network and I can see no benefit at all...
The code was written with TF in mind. When TF is on it's supposed to work as a checkpoint. 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.
|
|
|
|
xibeijan
Legendary
Offline
Activity: 1232
Merit: 1001
|
|
January 04, 2014, 03:19:55 PM |
|
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. Perhaps you can try to solve it analytically and get an equation?
|
|
|
|
|