zawy12 / difficulty-algorithms

See the Issues for difficulty algorithms
MIT License
107 stars 25 forks source link

can you help me with one qustion at LWMA 3 #78

Closed mraksoll4 closed 1 month ago

mraksoll4 commented 3 months ago

as example situation when plane use 3 algo

at sctructure POW is Algo A or algo B or Algo C (using out of order)

and qustion how will it handle LWMA as POW limite will be diffrent for each algo.

we can add some flag to say LWMA what algo we use , but then we will have gaps with time.

the very essence of using 3 algorithms at once to test work with self-regulation of diff between them at expcted time periond ( example 1M)

mraksoll4 commented 3 months ago

first idea was find only blocks for one one algo , but there we have time problem.

as example situation when next blocks was found at time window as example at algo C . so we lose that time window for algo A and algo B.

mraksoll4 commented 3 months ago

there was some idea as use some another windows "algo priority window" to keep rate like a b c, a b c but not use any explicit logic for alternating blocks, since alternating blocks has a vulnerability that can lead to a stuck network - for example, a situation where a miner mined the algorithm "C" on ASIC and then left, and the network is waiting for a block in this algorithm

zawy12 commented 3 months ago

This article in the 2nd paragraph has my comments on how to do it. Also important in the article are how to calculate chain work. Basically the same difficulty algorithm can be used, but all of the time and difficulty inputs to the algorithm have to be for 1 POW at a time. The difficulty calculation for each PoW has to be completely separate and completely unaware of what the other PoWs and other difficulty calculations.

mraksoll4 commented 3 months ago

i was think about another way ok we have gaps time at other algos , but that gaps maybe will do self some work to make balance. if think it drop diff C if last blocks was A B A B so possible that will work. The solution for most coins is to simply alternate algorithms

mraksoll4 commented 3 months ago

I'm trying to find an elegant solution, since the pow in my plans is checked only for headers, the indexes will not be hashed like at LTC to determine, use the block version , or maybe possible more elegant solution. in other way as we are not find any solution at "C" algo , we can make rule what will do decrease diff if more than 6 bloks is not found at it. why 6 , i don't know :)

so idea A B C if we see A B 4 6 blocks , then we decrease diff for C for regulation. So we at other algos looks at this.

mraksoll4 commented 3 months ago

I understood your idea, but the main goal is still to create equal competition between algorithms and, if possible, without using versions or switching algorithms

market price is generally an uncontrollable variable; it cannot be used as a value