Skip to content

Instantly share code, notes, and snippets.

@antsankov
Created February 24, 2021 03:12
Show Gist options
  • Save antsankov/d82e0be3a98255fc51432e03fe3dbed8 to your computer and use it in GitHub Desktop.
Save antsankov/d82e0be3a98255fc51432e03fe3dbed8 to your computer and use it in GitHub Desktop.
ECIP-1049-Keccak256-Mining-Test-Vectors
Nonce: 0x0000000000000038
Mining Hash Hex: 0xec1e0af050c8c5b9e2b59c65da7d9dd62eaf5a17f9ff6a91da60858a0233e444
Keccak Header Input: 0xec1e0af050c8c5b9e2b59c65da7d9dd62eaf5a17f9ff6a91da60858a0233e4440000000000000038
Keccak Result: 0x0116ad248e0dc3f7f843f73a62803c5f6b7c0427700b70c8b1aab39db404089f
Hash (int):492378471644473844779041230572681759021515627522456897855697138922293561503
Difficulty (int):1157920892373161954235709850086879078532699846656405640394575840079131296399
Difference (hash - diff): -665542420728688109456668619514197319511184219133948742538878701156837734896
@antsankov
Copy link
Author

So I tried to run keccak256(Keccak Header Input) line 3, and I got a different result, can someone verify if I am misreading it?

Also I am assuming Line 2 is the mixhash?

Screen Shot 2021-02-23 at 20 20 12

@jpc0mps
Copy link

jpc0mps commented Feb 24, 2021

Changing input type to hex will produce the correct hash.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment