Bitcoin Forum
May 02, 2024, 08:10:03 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 ... 65 »
  Print  
Author Topic: Nxt source code flaw reports  (Read 113306 times)
ImmortAlex
Hero Member
*****
Offline Offline

Activity: 784
Merit: 501


View Profile
January 04, 2014, 02:52:18 PM
 #241

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 Smiley
1714680603
Hero Member
*
Offline Offline

Posts: 1714680603

View Profile Personal Message (Offline)

Ignore
1714680603
Reply with quote  #2

1714680603
Report to moderator
1714680603
Hero Member
*
Offline Offline

Posts: 1714680603

View Profile Personal Message (Offline)

Ignore
1714680603
Reply with quote  #2

1714680603
Report to moderator
Even if you use Bitcoin through Tor, the way transactions are handled by the network makes anonymity difficult to achieve. Do not expect your transactions to be anonymous unless you really know what you're doing.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714680603
Hero Member
*
Offline Offline

Posts: 1714680603

View Profile Personal Message (Offline)

Ignore
1714680603
Reply with quote  #2

1714680603
Report to moderator
1714680603
Hero Member
*
Offline Offline

Posts: 1714680603

View Profile Personal Message (Offline)

Ignore
1714680603
Reply with quote  #2

1714680603
Report to moderator
xibeijan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1001


View Profile
January 04, 2014, 02:55:32 PM
 #242



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.


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

Activity: 784
Merit: 501


View Profile
January 04, 2014, 02:59:21 PM
 #243



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 Offline

Activity: 56
Merit: 0


View Profile
January 04, 2014, 02:59:40 PM
 #244



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 Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 04, 2014, 03:01:07 PM
 #245

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 Offline

Activity: 1232
Merit: 1001


View Profile
January 04, 2014, 03:02:40 PM
 #246



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.

Notable projects 2019: Semux, Dero, Wagerr, BEAM
FrictionlessCoin
Legendary
*
Offline Offline

Activity: 868
Merit: 1000


Cryptotalk.org - Get paid for every post!


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

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.

 
                                . ██████████.
                              .████████████████.
                           .██████████████████████.
                        -█████████████████████████████
                     .██████████████████████████████████.
                  -█████████████████████████████████████████
               -███████████████████████████████████████████████
           .-█████████████████████████████████████████████████████.
        .████████████████████████████████████████████████████████████
       .██████████████████████████████████████████████████████████████.
       .██████████████████████████████████████████████████████████████.
       ..████████████████████████████████████████████████████████████..
       .   .██████████████████████████████████████████████████████.
       .      .████████████████████████████████████████████████.

       .       .██████████████████████████████████████████████
       .    ██████████████████████████████████████████████████████
       .█████████████████████████████████████████████████████████████.
        .███████████████████████████████████████████████████████████
           .█████████████████████████████████████████████████████
              .████████████████████████████████████████████████
                   ████████████████████████████████████████
                      ██████████████████████████████████
                          ██████████████████████████
                             ████████████████████
                               ████████████████
                                   █████████
.CryptoTalk.org.|.MAKE POSTS AND EARN BTC!.🏆
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 04, 2014, 03:07:36 PM
 #248

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 Offline

Activity: 1232
Merit: 1001


View Profile
January 04, 2014, 03:09:04 PM
 #249

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?

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:10:45 PM
 #250

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 Offline

Activity: 868
Merit: 1000


Cryptotalk.org - Get paid for every post!


View Profile
January 04, 2014, 03:11:11 PM
 #251

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.


 
                                . ██████████.
                              .████████████████.
                           .██████████████████████.
                        -█████████████████████████████
                     .██████████████████████████████████.
                  -█████████████████████████████████████████
               -███████████████████████████████████████████████
           .-█████████████████████████████████████████████████████.
        .████████████████████████████████████████████████████████████
       .██████████████████████████████████████████████████████████████.
       .██████████████████████████████████████████████████████████████.
       ..████████████████████████████████████████████████████████████..
       .   .██████████████████████████████████████████████████████.
       .      .████████████████████████████████████████████████.

       .       .██████████████████████████████████████████████
       .    ██████████████████████████████████████████████████████
       .█████████████████████████████████████████████████████████████.
        .███████████████████████████████████████████████████████████
           .█████████████████████████████████████████████████████
              .████████████████████████████████████████████████
                   ████████████████████████████████████████
                      ██████████████████████████████████
                          ██████████████████████████
                             ████████████████████
                               ████████████████
                                   █████████
.CryptoTalk.org.|.MAKE POSTS AND EARN BTC!.🏆
xibeijan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1001


View Profile
January 04, 2014, 03:11:19 PM
 #252



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.

Notable projects 2019: Semux, Dero, Wagerr, BEAM
FrictionlessCoin
Legendary
*
Offline Offline

Activity: 868
Merit: 1000


Cryptotalk.org - Get paid for every post!


View Profile
January 04, 2014, 03:12:03 PM
 #253

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.

 
                                . ██████████.
                              .████████████████.
                           .██████████████████████.
                        -█████████████████████████████
                     .██████████████████████████████████.
                  -█████████████████████████████████████████
               -███████████████████████████████████████████████
           .-█████████████████████████████████████████████████████.
        .████████████████████████████████████████████████████████████
       .██████████████████████████████████████████████████████████████.
       .██████████████████████████████████████████████████████████████.
       ..████████████████████████████████████████████████████████████..
       .   .██████████████████████████████████████████████████████.
       .      .████████████████████████████████████████████████.

       .       .██████████████████████████████████████████████
       .    ██████████████████████████████████████████████████████
       .█████████████████████████████████████████████████████████████.
        .███████████████████████████████████████████████████████████
           .█████████████████████████████████████████████████████
              .████████████████████████████████████████████████
                   ████████████████████████████████████████
                      ██████████████████████████████████
                          ██████████████████████████
                             ████████████████████
                               ████████████████
                                   █████████
.CryptoTalk.org.|.MAKE POSTS AND EARN BTC!.🏆
xibeijan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1001


View Profile
January 04, 2014, 03:14:31 PM
 #254

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.

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:15:01 PM
 #255

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 Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 04, 2014, 03:15:54 PM
 #256

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
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
January 04, 2014, 03:15:55 PM
 #257

Code:
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
Code:
if ((amount + fee) * 100L > account.unconfirmedBalance) 

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

Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 04, 2014, 03:16:44 PM
 #258

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

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

Why?
ricot
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
January 04, 2014, 03:18:49 PM
 #259

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 Offline

Activity: 1232
Merit: 1001


View Profile
January 04, 2014, 03:19:55 PM
 #260

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?

Notable projects 2019: Semux, Dero, Wagerr, BEAM
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 ... 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!