-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathblake3_powhash_test_vectors.json
89 lines (89 loc) · 4.83 KB
/
blake3_powhash_test_vectors.json
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{
"comments": [
"Each test consists of block header fields to serialize for constructing a",
"BLAKE3 Proof of Work hash along with the expected hash.",
"A serialized field is also provided for convenience so implementations",
"can cross check the expected input to the hash function if they do not",
"get the expected PoW hash.",
"",
"Note that all fields that are hashes are provided as they are displayed",
"to humans. In other words, the prevHash, merkleRoot, commitmentRoot, and",
"powHash fields are provided as if they were hex-encoded big-endian unsigned",
"256-bit integers versus the actual unmodified 32 bytes that are produced",
"by the hash function. In practice, this means implementations will need",
"to reverse them when parsing them.",
"",
"The version field is an is a signed 32-bit integer.",
"The voteBits and numVoters fields are unsigned 16-bit integers.",
"The finalState, extraData, and serialized fields are hex-encoded bytes.",
"The freshStake and revocations fields are unsigned 8-bit integers.",
"The poolSize, diffBits, blockHeight, blockSize, timestamp, and stakeVersion ",
"fields are unsigned 32-bit integers.",
"The stakeDiff field is a signed 64-bit integer."
],
"tests": [
{
"version": 11,
"prevHash": "000000b396bfeaa6ae6fa9e3cee441d7215191630bdaa9b979a872985caed727",
"merkleRoot": "40f7cb366f45e0f8e4029ed53296632ab2a19f38267b4cf11972083c28fd7132",
"commitmentRoot": "5a0b00fa6ca03fd118c56dcd8718422684c7d6078f859dca037d576041a8bbe9",
"voteBits": 1,
"finalState": "0b4e00a52a77",
"numVoters": 5,
"freshStake": 4,
"revocations": 0,
"poolSize": 5076,
"diffBits": 503382015,
"stakeDiff": 3897717149,
"blockHeight": 1170048,
"blockSize": 4327,
"timestamp": 1689542408,
"extraData": "f9a00f009cb73ed0429619d1000000000000000000000000000000000000000000000000",
"stakeVersion": 11,
"serialized": "0b00000027d7ae5c9872a879b9a9da0b63915121d741e4cee3a96faea6eabf96b30000003271fd283c087219f14c7b26389fa1b22a639632d59e02e4f8e0456f36cbf740e9bba84160577d03ca9d858f07d6c78426421887cd6dc518d13fa06cfa000b5a01000b4e00a52a7705000400d4130000ffff001e9d7152e80000000080da1100e7100000085fb464f9a00f009cb73ed0429619d10000000000000000000000000000000000000000000000000b000000",
"powHash": "000000ce3005dbe95398f16f682438e298ff6301cc691e5df58839bd90351e33"
},
{
"version": 11,
"prevHash": "e0ac7d4092e577d75575465287735cb0eefb8f400ab2f06c924e465514bde232",
"merkleRoot": "1f5ea67cf974635f03461f28f6cd5dd6da7b75fa42b24cd34ddab64d369f0798",
"commitmentRoot": "ce9ad1e69124945baee97c89ab9afb7c2ad911dfe454b2cc82788bb638cf3731",
"voteBits": 1,
"finalState": "a351eaabd26d",
"numVoters": 4,
"freshStake": 4,
"revocations": 1,
"poolSize": 5074,
"diffBits": 503369661,
"stakeDiff": 3897717149,
"blockHeight": 1170050,
"blockSize": 4478,
"timestamp": 1689542427,
"extradata": "e6fa0100e402beb6fe6c04e7000000000000000000000000000000000000000000000000",
"stakeVersion": 11,
"serialized": "0b00000032e2bd1455464e926cf0b20a408ffbeeb05c738752467555d777e592407dace098079f364db6da4dd34cb242fa757bdad65dcdf6281f46035f6374f97ca65e1f3137cf38b68b7882ccb254e4df11d92a7cfb9aab897ce9ae5b942491e6d19ace0100a351eaabd26d04000401d2130000bdcf001e9d7152e80000000082da11007e1100001b5fb464e6fa0100e402beb6fe6c04e70000000000000000000000000000000000000000000000000b000000",
"powHash": "000000970c7a6ff94ea13c5ec730427bc3713151b67120558376e23fff4c01e8"
},
{
"version": 11,
"prevHash": "d16dfa5d3ed880ca9f217a43bcbd1acc84b54d0fba3dd8f789104908dc8b7670",
"merkleRoot": "db4b0a0eefcf3db8aa92da16de5d0f4f075b7dda7f78a374fd825ebfb205ec19",
"commitmentRoot": "67d4829c3ab5f2bc4a70622d2917ae4c3e30f5b0dfe1a3fa6fd9670675c6add5",
"voteBits": 1,
"finalState": "0f7bee6788fb",
"numVoters": 4,
"freshStake": 4,
"revocations": 1,
"poolSize": 5073,
"diffBits": 503364083,
"stakeDiff": 3897717149,
"blockHeight": 1170051,
"blockSize": 29387,
"timestamp": 1689542990,
"extraData": "7481000520188d50a8f77781000000000000000000000000000000000000000000000000",
"stakeVersion": 11,
"serialized": "0b00000070768bdc08491089f7d83dba0f4db584cc1abdbc437a219fca80d83e5dfa6dd119ec05b2bf5e82fd74a3787fda7d5b074f0f5dde16da92aab83dcfef0e0a4bdbd5adc6750667d96ffaa3e1dfb0f5303e4cae17292d62704abcf2b53a9c82d46701000f7bee6788fb04000401d1130000f3b9001e9d7152e80000000083da1100cb7200004e61b4647481000520188d50a8f777810000000000000000000000000000000000000000000000000b000000",
"powHash": "000000a81bd56eab88983d4f01fc50245a5a0ba0f6196360d52dae03e7cb8fc8"
}
]
}