Bitcoin Forum
May 03, 2024, 08:19:01 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)
ZeroTheGreat
Hero Member
*****
Offline Offline

Activity: 644
Merit: 500


View Profile
January 09, 2014, 09:21:03 AM
 #741

U (and the others) should wait when Instant Transactions r implemented. Then u don't need referenced transactions, even unconfirmed transactions will be confirmed with 100% guarantee.
With ~100%, right? In any time in future no one forger can actually get 100%, but could be very close.
The grue lurks in the darkest places of the earth. Its favorite diet is adventurers, but its insatiable appetite is tempered by its fear of light. No grue has ever been seen by the light of day, and few have survived its fearsome jaws to tell the tale.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714767541
Hero Member
*
Offline Offline

Posts: 1714767541

View Profile Personal Message (Offline)

Ignore
1714767541
Reply with quote  #2

1714767541
Report to moderator
1714767541
Hero Member
*
Offline Offline

Posts: 1714767541

View Profile Personal Message (Offline)

Ignore
1714767541
Reply with quote  #2

1714767541
Report to moderator
1714767541
Hero Member
*
Offline Offline

Posts: 1714767541

View Profile Personal Message (Offline)

Ignore
1714767541
Reply with quote  #2

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

Activity: 2142
Merit: 1009

Newbie


View Profile
January 09, 2014, 09:23:13 AM
 #742

U (and the others) should wait when Instant Transactions r implemented. Then u don't need referenced transactions, even unconfirmed transactions will be confirmed with 100% guarantee.
With ~100%, right? In any time in future no one forger can actually get 100%, but could be very close.

>= 100%. < 100% can be only if a merchant is isolated from the network, which is easily detectable.
ZeroTheGreat
Hero Member
*****
Offline Offline

Activity: 644
Merit: 500


View Profile
January 09, 2014, 09:25:40 AM
 #743

Hmm. Does it mean that low stakes never'll have chance to forge, if there's big stake around? Every next block till active he'll have bigger chances up to 100%+?

If there's still game of chances, u can predict who forge next only with <100% probability. Up to any amount of "9", but lower than 100%.
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 09, 2014, 09:30:07 AM
 #744

Hmm. Does it mean that low stakes never'll have chance to forge, if there's big stake around? Every next block till active he'll have bigger chances up to 100%+?

No.
ZeroTheGreat
Hero Member
*****
Offline Offline

Activity: 644
Merit: 500


View Profile
January 09, 2014, 09:32:18 AM
 #745

Hmm. Does it mean that low stakes never'll have chance to forge, if there's big stake around? Every next block till active he'll have bigger chances up to 100%+?

No.
If there're chances for other forgers, no one can've 100%, cos in some cases, in x% cases someone else'll generate a block. So only (100-x)% achievable. Am I right?
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 09, 2014, 09:35:59 AM
 #746

Hmm. Does it mean that low stakes never'll have chance to forge, if there's big stake around? Every next block till active he'll have bigger chances up to 100%+?

No.
If there're chances for other forgers, no one can've 100%, cos in some cases, in x% cases someone else'll generate a block. So only (100-x)% achievable. Am I right?

No, it's based on another approach - https://bitcointalk.org/index.php?topic=316104.0
gimre
Legendary
*
Offline Offline

Activity: 866
Merit: 1002



View Profile WWW
January 09, 2014, 10:56:24 AM
 #747

Oh P.S, this can be done differently, and I'm actually doing it in a different way in my python code.

Share, plz.

I think it's ok for me to do, when analyzing data, but I'm not sure it it'd be ok for official client.

Basically when getting blocks, I think (but I might be wrong here) there are only two options:
  • our tail is ok
  • either our current tail is wrong and we must fix it

First case is clear, just append new blocks.

In second case:

                                our_1 .. our_2 .. our_n
                              /
id_1 . id_2 ... commonBlockId
                              \
                                recv_1 .. recv_2 .. recv_3 .. recv_m


(I'm doing check if recv chain makes any sense at all and)
I'm relying solely on length of chain, if recv is longer than mine, I'm dropping my chain.

I think that might be inacceptable for official client, as with number of *evil* nodes, bad things could happen.

The difference is NRS to "rollback", does re-load of blocks and TXes from file (which will be more and more costly, when chain will get longer and longer).
With the cost of complicating code a bit, I think that "applying changes & rollback" could be done in more lightway way


NemusExMāchinā
Catapult docs: https://docs.symbol.dev
github: https://github.com/symbol
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 09, 2014, 10:59:32 AM
 #748

The difference is NRS to "rollback", does re-load of blocks and TXes from file (which will be more and more costly, when chain will get longer and longer).

This will be changed when we get rid of *.nxt files.
gimre
Legendary
*
Offline Offline

Activity: 866
Merit: 1002



View Profile WWW
January 09, 2014, 11:05:36 AM
 #749

First block chain:
.....<--> block i <--> block i+1 <--> block i+2 <--> ..... <--> block n = last Block

Second block chein:
.....<--> block i <--> corrupted block i+1 <--> block i+2 <--> ... <--> block n = last block

block i+2 contains a hash for block i+1, so if you change any bit in i+1, the original i+2 will not fit anymore...

Can you PLEASE describe/explain what happens in the above scenario if block i is the Genesis Block?


What do you mean? we're already far after genesis block, so the question is a bit strange.

also the example above i "corrupted block" is really bad one, there is no such thing as "corrupted block" actually.
The situation described by BloodyRookie suggest, that nodes trust more nodes with bigger stake, that is NOT the case.

Even if you change the block, that doesn't make much sense, as one of the blocks will simply get orphaned...

NemusExMāchinā
Catapult docs: https://docs.symbol.dev
github: https://github.com/symbol
gimre
Legendary
*
Offline Offline

Activity: 866
Merit: 1002



View Profile WWW
January 09, 2014, 11:11:43 AM
 #750

The difference is NRS to "rollback", does re-load of blocks and TXes from file (which will be more and more costly, when chain will get longer and longer).

This will be changed when we get rid of *.nxt files.

what will there be instead of those files?

btw. I'm somewhere in the middle of the file (I'm going top to bottom), and I still haven't noticed those flaws, sigh :]

NemusExMāchinā
Catapult docs: https://docs.symbol.dev
github: https://github.com/symbol
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 09, 2014, 11:30:31 AM
 #751

what will there be instead of those files?

Jean-Luc will decide.


btw. I'm somewhere in the middle of the file (I'm going top to bottom), and I still haven't noticed those flaws, sigh :]

The flaws r very obvious, that's why it's hard to notice them. Smiley
gimre
Legendary
*
Offline Offline

Activity: 866
Merit: 1002



View Profile WWW
January 09, 2014, 11:47:17 AM
 #752

What do you mean?

Maybe what I was asking is clearer now in the Edit of my post.

As I've written, there's no such thing as "corrupt block", there's only forking block chain and orphaning blocks (well can be whole chains as well),

take a look at one of my posts above, search for "catch-up", maybe this will clear things a bit

NemusExMāchinā
Catapult docs: https://docs.symbol.dev
github: https://github.com/symbol
gimre
Legendary
*
Offline Offline

Activity: 866
Merit: 1002



View Profile WWW
January 09, 2014, 01:37:42 PM
 #753

Yes, "corrupt block" is in the forking block chain... how do/would things progress if, for example, you have enough trusted hallmark nodes forking the block chain right at nextBlock == Genesis + 1?

...just trying to understand the defense mechanism better...

Eh it doesn't work this way...
(don't mean to offend you, but this shows some lack in understanding of how blockchain works - not only in NXT)

Lets assume you are at block_x and you have adversary who first sends blockA_(x+1) and blockB_(x+1)

doesn't actually matter which one is "correct", bad one will simply get orphaned, when there will be block (x+2) available

This is important part of the code:

if (Block.getLastBlock().cumulativeDifficulty.compareTo(curCumulativeDifficulty) < 0) {


EDIT: so to answer your question if from genesis block there would go two blocks, it depends on NEXT lock which one of those split will go into the chain

NemusExMāchinā
Catapult docs: https://docs.symbol.dev
github: https://github.com/symbol
ImmortAlex
Hero Member
*****
Offline Offline

Activity: 784
Merit: 501


View Profile
January 09, 2014, 02:38:04 PM
 #754

Btw, about that restoring code...

Code:
if (Block.getLastBlock().cumulativeDifficulty.compareTo(curCumulativeDifficulty) < 0) {
    Block.loadBlocks("blocks.nxt.bak");
    Transaction.loadTransactions("transactions.nxt.bak");
    peer.blacklist();
}

On startup NRS do a some work after loading of blockchain, like block.analyse() and everything else.
Do NRS able to restore on-the-fly at all?!

And I admit that cannot find any other bug in this thread.
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 09, 2014, 02:40:01 PM
 #755

Btw, about that restoring code...

Code:
if (Block.getLastBlock().cumulativeDifficulty.compareTo(curCumulativeDifficulty) < 0) {
    Block.loadBlocks("blocks.nxt.bak");
    Transaction.loadTransactions("transactions.nxt.bak");
    peer.blacklist();
}

On startup NRS do a some work after loading of blockchain, like block.analyse() and everything else.
Do NRS able to restore on-the-fly at all?!

blocks.nxt and transactions.nxt is enough to restore complete state of the ledger, including aliases, trades, etc.
jl777
Legendary
*
Offline Offline

Activity: 1176
Merit: 1132


View Profile WWW
January 09, 2014, 02:49:37 PM
 #756

Not sure if its logic flaw, but somebody could simply change initial allocation in genesis block to give themselves a lot of NXT.

We have seen a case of altered client already, so changing genesis block's hardcoding and hypnotizing jean-luc into signing it as the official release, would be an obvious but effective way to steal a lot of NXT

James

http://www.digitalcatallaxy.com/report2015.html
100+ page annual report for SuperNET
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 09, 2014, 02:51:17 PM
 #757

Not sure if its logic flaw, but somebody could simply change initial allocation in genesis block to give themselves a lot of NXT.

We have seen a case of altered client already, so changing genesis block's hardcoding and hypnotizing jean-luc into signing it as the official release, would be an obvious but effective way to steal a lot of NXT

James

True, that's why noone knows who Jean-Luc is.
jl777
Legendary
*
Offline Offline

Activity: 1176
Merit: 1132


View Profile WWW
January 09, 2014, 02:55:48 PM
 #758

Not sure if its logic flaw, but somebody could simply change initial allocation in genesis block to give themselves a lot of NXT.

We have seen a case of altered client already, so changing genesis block's hardcoding and hypnotizing jean-luc into signing it as the official release, would be an obvious but effective way to steal a lot of NXT

James

True, that's why noone knows who Jean-Luc is.

Maybe he is BCNext!

http://www.digitalcatallaxy.com/report2015.html
100+ page annual report for SuperNET
Come-from-Beyond (OP)
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 09, 2014, 02:57:24 PM
 #759

Maybe he is BCNext!

We don't know who BCNext is... Looks like an infinite loop!
instacalm
Hero Member
*****
Offline Offline

Activity: 798
Merit: 500



View Profile
January 09, 2014, 02:58:51 PM
 #760

Not sure if its logic flaw, but somebody could simply change initial allocation in genesis block to give themselves a lot of NXT.

We have seen a case of altered client already, so changing genesis block's hardcoding and hypnotizing jean-luc into signing it as the official release, would be an obvious but effective way to steal a lot of NXT

James

True, that's why noone knows who Jean-Luc is.

Maybe he is BCNext!

Well, BCNext, "Jean-Luc" and Come-from-Beyond are all three Russian.

I'm not entirely sure who is who or whether all three are one, but that makes it more exciting Grin
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!