nicehash / Specifications

Protocol specifications for various algorithms used @ NiceHash
77 stars 41 forks source link

EthereumStratum/1.0.0 fix for ProgPoW #10

Open hackmod opened 5 years ago

hackmod commented 5 years ago

ProgPoW generate its kernel every 50 blocks and period_seed = height / 50 is used as a random seed.

to support ProgPoW, EthereumStratum/1.0.0 mining.notifiy need to be fixed like as follow

(for example)

original

{                                                        
  "id": null,                               
  "method": "mining.notify",
  "params": [
    "bf0488aa", // jobId
    "abad8f99f3918bf903c6a909d9bbc0fdfa5a2f4b9cb1196175ec825c6610126c", // seedhash
    "645cf20198c2f3861e947d4f67e3ab63b7b2e24dcc9095bd9123e7b33371f6cc", // headerhash
    true
  ]
}

height info added for ProgPoW

{                                                        
  "id": null,                               
  "method": "mining.notify",
  "params": [
    "bf0488aa", // jobId
    "abad8f99f3918bf903c6a909d9bbc0fdfa5a2f4b9cb1196175ec825c6610126c", // seedhash
    "645cf20198c2f3861e947d4f67e3ab63b7b2e24dcc9095bd9123e7b33371f6cc", // headerhash
    "51395a", // block height info.
    true
  ]
}

for most ethash miner cases, the last true paramter is not used (for example the opensource ethminer do not utilize it at all), so it is almost safe to add the block height info as the fourth parameter, and it can be easily detectable.

maybe the second seedhash parameter is duplicated information and one can try to replace the second parameter to the block height (like as EthereumStratum/2.0.0 https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1571.md )

Leonid-kripto commented 3 years ago

Go