Bitcoin Forum
May 14, 2024, 08:02:54 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [EDIT] A more 'difficult' algorithm for POW based on area?  (Read 1269 times)
qdoop (OP)
Member
**
Offline Offline

Activity: 119
Merit: 112


_copy_improve_


View Profile WWW
October 22, 2014, 01:32:57 PM
Last edit: October 22, 2014, 04:58:33 PM by qdoop
 #1

Code:
	Block Hash (as big integer value)
|(y)
|
|  
|       -------------------------------+
|       --- *           #---#---# (C)  |
|            \         /               |
|             \       /               +---------------------(Difficulty bound)
|              \     /    
|               *---*---*---* (A)
|                \
|                 \
|                  \
|                   +---+ (B)
|
+---+---+---+---+---+---+---+---+---+---+---+---+----+---+-(x)
  n-1  n  n+1 n+2 n+3
n - Height

In the above diagram we represent three different block chains as curves where y(Block Hash as integer) and x(block Height n)

Correct me if i am wrong but according to current Bitcoin POW
Block chain (C) wins as the longest with adequate proof of work (sum of nBits)
Chains (A) and (B) although harder to generate don't count, as shorter.

What if we measured the area bellow each curve as Proof of work for a chain*?
Then a really low hash value in a chain would be taken into account making it further difficult to generate better curves given a known one.

*We would then have to minimize the area at given height.

[EDIT]
You're proposing that the total work be based on the value of the individual hashes, instead of the hash targets, is that correct?

This could incentivize a miner who happens to find a hash with an unusually low value to refrain from immediately broadcasting it. See, for example, this attack proposed a few years ago by casascius, which becomes viable with this proposed change.
Thanks to btchris for feedback

As a measure of performance of a curve/blockchain in order to avoid the above attack we could sum the sign changes between two curves +1,0,-1 comparing curve values point wise and assuming max value were a curve lucks a point.

the scores of the curves would then became

(A)-(C)=+1+1-1
(B)-(A)=+1+1-1
(B)-(C)=+1+1-1-1

 

_copy_improve_
news flow http://www.qdoop.org/
(offline) The simple bitcoin game  http://qdoop.net Testnet3 block explorer   http://pool.qdoop.net:18331/chain/Testnet3
1715673774
Hero Member
*
Offline Offline

Posts: 1715673774

View Profile Personal Message (Offline)

Ignore
1715673774
Reply with quote  #2

1715673774
Report to moderator
1715673774
Hero Member
*
Offline Offline

Posts: 1715673774

View Profile Personal Message (Offline)

Ignore
1715673774
Reply with quote  #2

1715673774
Report to moderator
1715673774
Hero Member
*
Offline Offline

Posts: 1715673774

View Profile Personal Message (Offline)

Ignore
1715673774
Reply with quote  #2

1715673774
Report to moderator
If you see garbage posts (off-topic, trolling, spam, no point, etc.), use the "report to moderator" links. All reports are investigated, though you will rarely be contacted about your reports.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715673774
Hero Member
*
Offline Offline

Posts: 1715673774

View Profile Personal Message (Offline)

Ignore
1715673774
Reply with quote  #2

1715673774
Report to moderator
btchris
Hero Member
*****
Offline Offline

Activity: 672
Merit: 504

a.k.a. gurnec on GitHub


View Profile WWW
October 22, 2014, 02:08:16 PM
 #2

You're proposing that the total work be based on the value of the individual hashes, instead of the hash targets, is that correct?

This could incentivize a miner who happens to find a hash with an unusually low value to refrain from immediately broadcasting it. See, for example, this attack proposed a few years ago by casascius, which becomes viable with this proposed change.
qdoop (OP)
Member
**
Offline Offline

Activity: 119
Merit: 112


_copy_improve_


View Profile WWW
October 22, 2014, 02:39:42 PM
Last edit: October 22, 2014, 02:50:11 PM by qdoop
 #3

You're proposing that the total work be based on the value of the individual hashes, instead of the hash targets, is that correct?
Yes but with a little twist. To compare two chains the must include blocks up to the same level.

This could incentivize a miner who happens to find a hash with an unusually low value to refrain from immediately broadcasting it. See, for example, this attack proposed a few years ago by casascius, which becomes viable with this proposed change.
Thanks for this particular case.

To compare two chains they must include blocks up to the same level. So although our friend could through such a block the rest miners lets
say if they where 10 blocks ahead would ask him to catch them up by providing the missing 10 blocks each one with hash value equal or smaller of existing ones.

PS. I try to think of what should happen when 2 separated block chains merge again.

_copy_improve_
news flow http://www.qdoop.org/
(offline) The simple bitcoin game  http://qdoop.net Testnet3 block explorer   http://pool.qdoop.net:18331/chain/Testnet3
btchris
Hero Member
*****
Offline Offline

Activity: 672
Merit: 504

a.k.a. gurnec on GitHub


View Profile WWW
October 22, 2014, 05:51:48 PM
 #4

You're proposing that the total work be based on the value of the individual hashes, instead of the hash targets, is that correct?
Yes but with a little twist. To compare two chains the must include blocks up to the same level.

This could incentivize a miner who happens to find a hash with an unusually low value to refrain from immediately broadcasting it. See, for example, this attack proposed a few years ago by casascius, which becomes viable with this proposed change.
Thanks for this particular case.

To compare two chains they must include blocks up to the same level. So although our friend could through such a block the rest miners lets
say if they where 10 blocks ahead would ask him to catch them up by providing the missing 10 blocks each one with hash value equal or smaller of existing ones.

PS. I try to think of what should happen when 2 separated block chains merge again.

I don't think that this completely eliminates casascius's attack.

Evil miner M finds a lucky block, and withholds it. During this period, evil miner M prepares double-spend attacks, and can point his mining power to his new (secret) chain.

Once good miner A publishes her new (but less lucky) block, M can take advantage of his double-spends (which now have only one confirmation), wait some short period of time and then announce his superior block.

M can therefore trick anyone who chooses to accept 1-conf transactions (which admittedly isn't all that smart, nor does M have that long to do so), plus they've also been able to mine on a secret chain while the rest of the network was wasting their time on A's shorter chain.
qdoop (OP)
Member
**
Offline Offline

Activity: 119
Merit: 112


_copy_improve_


View Profile WWW
October 22, 2014, 06:50:01 PM
 #5



[EDIT]
You're proposing that the total work be based on the value of the individual hashes, instead of the hash targets, is that correct?

This could incentivize a miner who happens to find a hash with an unusually low value to refrain from immediately broadcasting it. See, for example, this attack proposed a few years ago by casascius, which becomes viable with this proposed change.
Thanks to btchris for feedback

As a measure of performance of a curve/blockchain in order to avoid the above attack we could sum the sign changes between two curves +1,0,-1 comparing curve values point wise and assuming max value were a curve lucks a point.

the scores of the curves would then became

(A)-(C)=+1+1-1
(B)-(A)=+1+1-1
(B)-(C)=+1+1-1-1

 

I have edited the OP to take advantage of your feedback on this kind of attack
1-6 comfirmation attacks are always possible even under normal conditions although you have to be extremely lucky.

What is the issue I try to make more difficult is the possibility of long chains replacing the current

_copy_improve_
news flow http://www.qdoop.org/
(offline) The simple bitcoin game  http://qdoop.net Testnet3 block explorer   http://pool.qdoop.net:18331/chain/Testnet3
btchris
Hero Member
*****
Offline Offline

Activity: 672
Merit: 504

a.k.a. gurnec on GitHub


View Profile WWW
October 22, 2014, 07:04:51 PM
 #6

I have edited the OP to take advantage of your feedback on this king of attack
1-6 comfirmation attacks are always possible under normal conditions although you have to be extremely lucky.

What is the issue I try to make more difficult is the possibility of long chains replacing the current

There's nothing magical about the number 6, as I'm sure you're aware. 7-confirmation reorgs or attacks could happen, they're just less likely than 6 (and more likely than 8 ).

I don't think your idea is bad per-se, I just don't think that the advantages it confers outweigh the new vulnerabilities it introduces, but that's just my opinion.
qdoop (OP)
Member
**
Offline Offline

Activity: 119
Merit: 112


_copy_improve_


View Profile WWW
October 22, 2014, 07:34:58 PM
 #7

I have edited the OP to take advantage of your feedback on this king of attack
1-6 comfirmation attacks are always possible under normal conditions although you have to be extremely lucky.

What is the issue I try to make more difficult is the possibility of long chains replacing the current

There's nothing magical about the number 6, as I'm sure you're aware. 7-confirmation reorgs or attacks could happen, they're just less likely than 6 (and more likely than 8 ).

I don't think your idea is bad per-se, I just don't think that the advantages it confers outweigh the new vulnerabilities it introduces, but that's just my opinion.

Thanks for your review.

To sum up the case:

Given a block chain(curve) in order for a new block chain to replace it, one currently has to simply stay below the Difficulty bound and make it long enough.

We propose a more strict requirement (to achieve), that  the new curve has most of the points below the given bock chain(curve) and be of equal length in order to replace it.


PS.
a)The maths may be much simpler as sum of  -1,0,+1 depending on pointwise comparisons.
b)A form of mathematical "measure" of the quality between the current curve and a possible replacement is what we seek

 




_copy_improve_
news flow http://www.qdoop.org/
(offline) The simple bitcoin game  http://qdoop.net Testnet3 block explorer   http://pool.qdoop.net:18331/chain/Testnet3
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1032



View Profile WWW
October 23, 2014, 06:46:49 AM
 #8

The hash that comes out of a strong hashing algorithm has a random distribution. Although it is less likely, it doesn't take any more work to find a 000000000000000001.. hash than it does a 0000ffff.. hash, only luck.

The blockchain requires each block to meet the proof of work. To replace ten past blocks, you would have to generate ten blocks of your own. This is a much higher bar than a single lucky hash being able to replace ten blocks.

With a more-difficult-hash chain instantly winning like proposed, it would be an orphan free-for-all, you could get one lucky hash attempting to build on blocks from a week ago and replace tons of transactions. As described, a miner could attack for free by

1. constantly be transferring a large balance between new addresses in every block they mine,
2. find a "lucky" hash much smaller than the average and withhold it, and
3. make all sorts of purchases that will be wiped when they publish the chain-erasing block find that sends the money back to the miner.

OP already annoyed everyone with his great ideas based on a poor understanding of mining here: https://bitcointalk.org/index.php?topic=823544.msg9204175#msg9204175
qdoop (OP)
Member
**
Offline Offline

Activity: 119
Merit: 112


_copy_improve_


View Profile WWW
October 23, 2014, 10:28:52 AM
 #9

The hash that comes out of a strong hashing algorithm has a random distribution. Although it is less likely, it doesn't take any more work to find a 000000000000000001.. hash than it does a 0000ffff.. hash, only luck.

The blockchain requires each block to meet the proof of work. To replace ten past blocks, you would have to generate ten blocks of your own. This is a much higher bar than a single lucky hash being able to replace ten blocks.

With a more-difficult-hash chain instantly winning like proposed, it would be an orphan free-for-all, you could get one lucky hash attempting to build on blocks from a week ago and replace tons of transactions. As described, a miner could attack for free by

1. constantly be transferring a large balance between new addresses in every block they mine,
2. find a "lucky" hash much smaller than the average and withhold it, and
3. make all sorts of purchases that will be wiped when they publish the chain-erasing block find that sends the money back to the miner.

OP already annoyed everyone with his great ideas based on a poor understanding of mining here: https://bitcointalk.org/index.php?topic=823544.msg9204175#msg9204175

I am a honest miner and lets say i mine on level n.
I receive a new valid block (A) at level n+1 so i switch mining on top of this new block.
Due to network delay few seconds later i receive another valid block (B) for lever n+1.
At that particular moment part of the network is mining on top of (A) and the rest on top of (B)

So if our decision (which block to mine on?) is based solely on block's arrival time part of the network would be mining on the 'wrong' block.

Is there a way to  make nodes agree an what is the most appropriate block to mine on top of it?
For example the hash of each block could be used to make all nodes of the network agree and choose either (A) or (B)

Do we want a solution in this idiomatic case or we leave it just in luck?


PS. How reference Bitcoin Core client behaves in the above case?



_copy_improve_
news flow http://www.qdoop.org/
(offline) The simple bitcoin game  http://qdoop.net Testnet3 block explorer   http://pool.qdoop.net:18331/chain/Testnet3
btchris
Hero Member
*****
Offline Offline

Activity: 672
Merit: 504

a.k.a. gurnec on GitHub


View Profile WWW
October 23, 2014, 01:06:52 PM
 #10

Is there a way to  make nodes agree an what is the most appropriate block to mine on top of it?
For example the hash of each block could be used to make all nodes of the network agree and choose either (A) or (B)

Any such scheme would lead to exactly the same attacks mentioned above.
Pages: [1]
  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!