mirror of
https://github.com/arnaucube/go-ethereum.git
synced 2026-02-28 22:16:45 +01:00
Compare commits
4725 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad7b0efbd3 | ||
|
|
d98a6f85fc | ||
|
|
c2ef8682fe | ||
|
|
fe64a13cea | ||
|
|
741fa8ca9c | ||
|
|
1564f1a020 | ||
|
|
7ea76fcf99 | ||
|
|
79fa05867f | ||
|
|
d116b9595c | ||
|
|
55d85d60fd | ||
|
|
d3e84cc8b4 | ||
|
|
5cec1aad15 | ||
|
|
82c0780f81 | ||
|
|
cea1723c68 | ||
|
|
412cf98bbc | ||
|
|
f3ae8f50a5 | ||
|
|
98998534cb | ||
|
|
619e8a4f03 | ||
|
|
164ba56a60 | ||
|
|
32276e8b01 | ||
|
|
4f0d88cb02 | ||
|
|
830bdb1cfd | ||
|
|
dadf01de60 | ||
|
|
7d71a75d77 | ||
|
|
5c1a7b965c | ||
|
|
b517967f86 | ||
|
|
83226762c2 | ||
|
|
9ad515d2dc | ||
|
|
72411eb24c | ||
|
|
bcc2980179 | ||
|
|
366e9627e8 | ||
|
|
cd2fb09051 | ||
|
|
c1f0d40e34 | ||
|
|
158efbaa45 | ||
|
|
cfb2b51b74 | ||
|
|
f6669db001 | ||
|
|
b71091e337 | ||
|
|
0f76a1c6df | ||
|
|
580bae0a86 | ||
|
|
44a7f997c3 | ||
|
|
5c6540452a | ||
|
|
3ac34ee3c4 | ||
|
|
69c78ddbb4 | ||
|
|
007bced276 | ||
|
|
6bc8dec7ac | ||
|
|
4ad8f1035b | ||
|
|
12f82ab2ff | ||
|
|
559cc02313 | ||
|
|
b19bf3ec78 | ||
|
|
060a07cf69 | ||
|
|
90b94e64fc | ||
|
|
d2f119cf9b | ||
|
|
206fe25971 | ||
|
|
7fa2607bd1 | ||
|
|
691cb90284 | ||
|
|
ff87c241a7 | ||
|
|
fe87feccb1 | ||
|
|
ebf1eb9359 | ||
|
|
3eda70c64c | ||
|
|
1fa48bc5e7 | ||
|
|
a4246c2da6 | ||
|
|
7fa740996c | ||
|
|
c7a13c9be8 | ||
|
|
2b06fe3eff | ||
|
|
cdeae22356 | ||
|
|
5f706cd7f5 | ||
|
|
c14de2e973 | ||
|
|
e4aa011d23 | ||
|
|
e7c7b54b82 | ||
|
|
663d4e0aff | ||
|
|
bdec8c3e41 | ||
|
|
b24f16fa53 | ||
|
|
983f5a717a | ||
|
|
7efeb4bd96 | ||
|
|
fca3333f7f | ||
|
|
bc83761996 | ||
|
|
f7fdb4dfbe | ||
|
|
251846d65a | ||
|
|
fad21fb4a5 | ||
|
|
b2119d8931 | ||
|
|
8eef2b765a | ||
|
|
a32693770c | ||
|
|
7473c93668 | ||
|
|
56a5592ea0 | ||
|
|
3edc4698fe | ||
|
|
910a6d4e46 | ||
|
|
de3a71cafd | ||
|
|
48ee0777a5 | ||
|
|
ec57aa64cd | ||
|
|
ee0c892303 | ||
|
|
7cb0e24245 | ||
|
|
e30e9fe979 | ||
|
|
d2d5dbc6fb | ||
|
|
6dec90464d | ||
|
|
b5b53d8b32 | ||
|
|
28d6b30c0f | ||
|
|
8e24378cc1 | ||
|
|
8fe01b4bfa | ||
|
|
36ce54e5dc | ||
|
|
d6357aa616 | ||
|
|
e389585f1f | ||
|
|
231fe04f03 | ||
|
|
58d6ec689f | ||
|
|
037772fc07 | ||
|
|
8001e48115 | ||
|
|
2c1b0ff17e | ||
|
|
fe9e95a3fd | ||
|
|
940952f757 | ||
|
|
f98e002d98 | ||
|
|
313eec33ad | ||
|
|
8754f2b768 | ||
|
|
cd88295f5a | ||
|
|
29a5a92d13 | ||
|
|
ac3371bcb6 | ||
|
|
da9fe951da | ||
|
|
6b23094cff | ||
|
|
9918b6c84e | ||
|
|
f87094b660 | ||
|
|
dca290d525 | ||
|
|
ff99752ddd | ||
|
|
899df30c24 | ||
|
|
95773b9673 | ||
|
|
260536a729 | ||
|
|
b79dd188d9 | ||
|
|
66de3f0aa8 | ||
|
|
96d4a7d087 | ||
|
|
d82caa5ce3 | ||
|
|
03bf902b92 | ||
|
|
e8d701a3b2 | ||
|
|
13f8f65a58 | ||
|
|
76215ca9f3 | ||
|
|
97dd4551ef | ||
|
|
0bedf1c376 | ||
|
|
48bd48876c | ||
|
|
21e52efdfe | ||
|
|
064cf16099 | ||
|
|
d37a2559b9 | ||
|
|
70c65835f4 | ||
|
|
59bc541232 | ||
|
|
fe7e284709 | ||
|
|
0329e05823 | ||
|
|
8e77f81586 | ||
|
|
fa53c5e074 | ||
|
|
51d4566cbf | ||
|
|
ebbd8b0743 | ||
|
|
49559e6d5e | ||
|
|
685862d2ce | ||
|
|
a9e1d38612 | ||
|
|
5176fbc6fa | ||
|
|
6ecba12650 | ||
|
|
3c6c891680 | ||
|
|
df323cdb4e | ||
|
|
a2919b5e17 | ||
|
|
6674ea8d67 | ||
|
|
0ad5898c0f | ||
|
|
00280e62e3 | ||
|
|
7d69679935 | ||
|
|
7551264fa6 | ||
|
|
3874f02f1b | ||
|
|
0e211ae203 | ||
|
|
bd95871a89 | ||
|
|
05715f27cf | ||
|
|
45dc690947 | ||
|
|
e289b0a1c1 | ||
|
|
658ac3c257 | ||
|
|
7eed47fad5 | ||
|
|
e3a08875f6 | ||
|
|
a7705fc203 | ||
|
|
13ddf20bd2 | ||
|
|
cb1fa523e4 | ||
|
|
1fe70a66ba | ||
|
|
62dd9833ec | ||
|
|
3a01e3e39b | ||
|
|
c8fc4cebe6 | ||
|
|
0214cbe0fb | ||
|
|
7c678554b5 | ||
|
|
edad47bf0e | ||
|
|
a487396b76 | ||
|
|
e94aa421c6 | ||
|
|
d4f0a67323 | ||
|
|
e45d9bb29d | ||
|
|
9c0f36c46d | ||
|
|
914e57e49b | ||
|
|
23454dcfcb | ||
|
|
bd5720f480 | ||
|
|
f819ac7158 | ||
|
|
15bfae52d2 | ||
|
|
d7dabce732 | ||
|
|
f6e71b5749 | ||
|
|
351d6b0d44 | ||
|
|
03473d48c1 | ||
|
|
45c070fc8b | ||
|
|
1de1359e3b | ||
|
|
637b2415d9 | ||
|
|
69aac4d531 | ||
|
|
9d188f73b5 | ||
|
|
3593662b0c | ||
|
|
60b5a94428 | ||
|
|
dcfecebe1f | ||
|
|
258a7b9a93 | ||
|
|
b3c9b66f29 | ||
|
|
7e160a677d | ||
|
|
8735e5addd | ||
|
|
4d5a719f25 | ||
|
|
af93217775 | ||
|
|
2060bc8bac | ||
|
|
29fef349ef | ||
|
|
3953bf0031 | ||
|
|
43901c9282 | ||
|
|
79eb40fc9f | ||
|
|
009b221692 | ||
|
|
2b716aec54 | ||
|
|
45f8304f3c | ||
|
|
4800c94392 | ||
|
|
97c37356fd | ||
|
|
82ac4712f1 | ||
|
|
a0cb1945ae | ||
|
|
3e2a928caa | ||
|
|
7bc1f487b8 | ||
|
|
2808409fbd | ||
|
|
6a2fec5309 | ||
|
|
b719801db0 | ||
|
|
458d891c63 | ||
|
|
bcfd788661 | ||
|
|
fd4b75cfa8 | ||
|
|
090f593bc0 | ||
|
|
062fa049d0 | ||
|
|
24d44f35f2 | ||
|
|
323216ed85 | ||
|
|
1f26a1b863 | ||
|
|
05ac1209c7 | ||
|
|
eb4029257a | ||
|
|
5ebc22807c | ||
|
|
7fed424435 | ||
|
|
92f998c7ef | ||
|
|
03bb88dec0 | ||
|
|
054947def7 | ||
|
|
aa884c052d | ||
|
|
2adcc31bb4 | ||
|
|
c54d123b31 | ||
|
|
2e9ed6f7aa | ||
|
|
c750ef09e1 | ||
|
|
f4341c7b7f | ||
|
|
b1cc9cdc74 | ||
|
|
50659f4b48 | ||
|
|
4accc187d5 | ||
|
|
2382da4179 | ||
|
|
54db54931e | ||
|
|
ac85fdc75e | ||
|
|
37770ed0d3 | ||
|
|
1470b22e90 | ||
|
|
ba2236fa51 | ||
|
|
f2a2b2ac70 | ||
|
|
493181ea09 | ||
|
|
c5b8acbaf0 | ||
|
|
25bc88113f | ||
|
|
c6ad3aec05 | ||
|
|
b298928c49 | ||
|
|
016f152b36 | ||
|
|
e82ddd9198 | ||
|
|
413ace37d3 | ||
|
|
8595198c1b | ||
|
|
15873fafc0 | ||
|
|
701591b403 | ||
|
|
1528dbc171 | ||
|
|
14f32a0c3a | ||
|
|
679c90b873 | ||
|
|
de0549fabb | ||
|
|
d457a1187d | ||
|
|
72ab6d3255 | ||
|
|
b34a8ef624 | ||
|
|
fc747ef4a6 | ||
|
|
e4dba36892 | ||
|
|
28b39267d9 | ||
|
|
9b6e8f6195 | ||
|
|
3fef601903 | ||
|
|
30b921ef46 | ||
|
|
88292f35db | ||
|
|
2590a7dabb | ||
|
|
04c209980b | ||
|
|
01e3d694a6 | ||
|
|
9e63798d03 | ||
|
|
f8c27d7159 | ||
|
|
c930045834 | ||
|
|
dfbf580354 | ||
|
|
735b029db9 | ||
|
|
764e81bf12 | ||
|
|
bac4440e17 | ||
|
|
13364a2dcf | ||
|
|
745c368987 | ||
|
|
4e07967711 | ||
|
|
af73d1d682 | ||
|
|
4b7bdc3766 | ||
|
|
7ac24d551b | ||
|
|
9f32117457 | ||
|
|
a4b79f1dac | ||
|
|
04a09b7e2d | ||
|
|
32373e3837 | ||
|
|
f8cdff9a5d | ||
|
|
aa03e53ca8 | ||
|
|
c6b983e449 | ||
|
|
72d8878084 | ||
|
|
eb5e43022e | ||
|
|
71c28cfb0c | ||
|
|
f4e5675303 | ||
|
|
26fbea5cb7 | ||
|
|
8fcd71920a | ||
|
|
12df8565cf | ||
|
|
a6a49ccbf7 | ||
|
|
a7d894611e | ||
|
|
b569550a39 | ||
|
|
91cb8cdd2a | ||
|
|
e88b410b4d | ||
|
|
7e3b080f85 | ||
|
|
99027c79fe | ||
|
|
bac455c011 | ||
|
|
459d898705 | ||
|
|
46f63ef04f | ||
|
|
a05c420371 | ||
|
|
dd49c8e43d | ||
|
|
978ffd3097 | ||
|
|
2b9fd6b40a | ||
|
|
406e74e2af | ||
|
|
70ded4cbf0 | ||
|
|
e252dae499 | ||
|
|
db615a85ec | ||
|
|
ae4bfc3cfb | ||
|
|
15586368e5 | ||
|
|
87447f9f3f | ||
|
|
7f48eb8737 | ||
|
|
19bc4624ea | ||
|
|
7948cc0029 | ||
|
|
5aa523e32b | ||
|
|
3563c59b12 | ||
|
|
4992765032 | ||
|
|
182d484aa7 | ||
|
|
f54c2e75c8 | ||
|
|
3ad5243b18 | ||
|
|
34c94d5fcd | ||
|
|
2a61611c4f | ||
|
|
437cf4b3ac | ||
|
|
9a17dd91a4 | ||
|
|
b071e7f4db | ||
|
|
a136e2bb22 | ||
|
|
75fd738dea | ||
|
|
706da56f75 | ||
|
|
85b4b44235 | ||
|
|
8de8f61d36 | ||
|
|
0201c04b95 | ||
|
|
aa4c25778f | ||
|
|
7fd368c586 | ||
|
|
a237ff65ea | ||
|
|
145e02fc54 | ||
|
|
8d09f95bc7 | ||
|
|
ed036a2ce7 | ||
|
|
7afbd0f20d | ||
|
|
b0bf12ec87 | ||
|
|
7ce3d06402 | ||
|
|
405720b218 | ||
|
|
3bb6da9bd3 | ||
|
|
4d1887093d | ||
|
|
8646365b42 | ||
|
|
1681ee9883 | ||
|
|
c8e21a4d17 | ||
|
|
168ff36676 | ||
|
|
a9e4b96573 | ||
|
|
d84c2202e7 | ||
|
|
bd9c76097d | ||
|
|
31f82eb334 | ||
|
|
b86e7526e1 | ||
|
|
81379cbc7b | ||
|
|
f229dc8f42 | ||
|
|
8716278ca8 | ||
|
|
c5e9a0a71c | ||
|
|
f1126dbb87 | ||
|
|
cd2782f59c | ||
|
|
6b1b5a4a2a | ||
|
|
1b7c017076 | ||
|
|
be843959cb | ||
|
|
6512b23b98 | ||
|
|
7b2f25b578 | ||
|
|
22450c069b | ||
|
|
a3fb41981e | ||
|
|
9caf880ff9 | ||
|
|
31811365e0 | ||
|
|
dc62fb2ee9 | ||
|
|
92c6327593 | ||
|
|
6def110c37 | ||
|
|
971702e7a1 | ||
|
|
af923c965f | ||
|
|
5f735d6fce | ||
|
|
936c8e19ff | ||
|
|
516f49c812 | ||
|
|
b6ec1c720f | ||
|
|
f5e0388f62 | ||
|
|
abe08d7be3 | ||
|
|
24995f9ab7 | ||
|
|
154570ebd3 | ||
|
|
c12180d005 | ||
|
|
c273ed7d82 | ||
|
|
5cfa0e9187 | ||
|
|
94f2adb80a | ||
|
|
958c04e79a | ||
|
|
2f8809df40 | ||
|
|
7f14fbd579 | ||
|
|
48135657c4 | ||
|
|
d7bab21681 | ||
|
|
fba40e18d9 | ||
|
|
d3be1a2719 | ||
|
|
888ece0cb2 | ||
|
|
7edbb0110f | ||
|
|
1506e00a23 | ||
|
|
7138404cb0 | ||
|
|
4feb5f6f9c | ||
|
|
5cb5df003d | ||
|
|
498b24270a | ||
|
|
2fe54ab233 | ||
|
|
0071fbed8c | ||
|
|
67cc80ba66 | ||
|
|
8eefcb8493 | ||
|
|
359a9773a1 | ||
|
|
69788cb973 | ||
|
|
9d2a156453 | ||
|
|
7a223721a5 | ||
|
|
49da462e92 | ||
|
|
4e0a2c8e8c | ||
|
|
ec6acacc53 | ||
|
|
9834f855fa | ||
|
|
24de35ef09 | ||
|
|
5c70333a12 | ||
|
|
8ec8bff11c | ||
|
|
573bc3e05e | ||
|
|
7254278c09 | ||
|
|
c745831118 | ||
|
|
33083e6f6c | ||
|
|
73b3f2837f | ||
|
|
95f172d4dc | ||
|
|
1a0b3d8c84 | ||
|
|
41e3d01e63 | ||
|
|
20bae2b8f6 | ||
|
|
2ea2261156 | ||
|
|
35ad9febce | ||
|
|
5f6c8832af | ||
|
|
d2fab43abc | ||
|
|
39047d7d8b | ||
|
|
04e216319e | ||
|
|
35595560f0 | ||
|
|
c9e22976f5 | ||
|
|
07e85d8e14 | ||
|
|
e1f616fadf | ||
|
|
635b66acdc | ||
|
|
96e2b6bc07 | ||
|
|
9d152d6191 | ||
|
|
2f4cc72119 | ||
|
|
15550dc8c5 | ||
|
|
13dc8627b5 | ||
|
|
9e03c48d43 | ||
|
|
63c5c7fb2d | ||
|
|
41b83fe1cd | ||
|
|
4ddbf81e74 | ||
|
|
4ad8b28794 | ||
|
|
6c2b703c58 | ||
|
|
1dc91975ad | ||
|
|
f4cd66dc00 | ||
|
|
ed0817c55d | ||
|
|
8fce55b4c2 | ||
|
|
093d6d5074 | ||
|
|
1d6d42919e | ||
|
|
64e8aa6260 | ||
|
|
3ef1cd43f6 | ||
|
|
b448390889 | ||
|
|
4a240608d4 | ||
|
|
8d85e45c7d | ||
|
|
59a7405a80 | ||
|
|
4494cba489 | ||
|
|
859187931b | ||
|
|
79bef9eb16 | ||
|
|
b8160cc6d4 | ||
|
|
99e825ad96 | ||
|
|
3d7c1b8194 | ||
|
|
3b008723db | ||
|
|
f28b2bb6ed | ||
|
|
3b45fedb81 | ||
|
|
36ec42e50c | ||
|
|
c8e2b3710c | ||
|
|
805345d135 | ||
|
|
8830403acf | ||
|
|
76025cc424 | ||
|
|
72d065d491 | ||
|
|
97a9753f87 | ||
|
|
45da3e17e2 | ||
|
|
52584596d4 | ||
|
|
97b0c4b697 | ||
|
|
fa729a0c55 | ||
|
|
5caf1aa1a9 | ||
|
|
093a9106b0 | ||
|
|
2cc9211269 | ||
|
|
71c974f3eb | ||
|
|
e9874cbcc1 | ||
|
|
929428d602 | ||
|
|
b6fe9e0c83 | ||
|
|
bb793c829f | ||
|
|
d8fb834386 | ||
|
|
dba2367157 | ||
|
|
f255336c2c | ||
|
|
c4b7d4d3f7 | ||
|
|
b46e152171 | ||
|
|
8e6a068d2d | ||
|
|
b635cad9fe | ||
|
|
94489b2269 | ||
|
|
e2d333d209 | ||
|
|
ac0e5e8b6d | ||
|
|
3a540425a3 | ||
|
|
5b0ea1044a | ||
|
|
3136bae4a5 | ||
|
|
97a602864a | ||
|
|
45676382b6 | ||
|
|
d0b3536593 | ||
|
|
ea11dba00b | ||
|
|
5dd56bb474 | ||
|
|
2c1a6a349b | ||
|
|
e6d36fe356 | ||
|
|
ed07ffcde5 | ||
|
|
dcf1a1988a | ||
|
|
8eff550e8b | ||
|
|
8f3a7e41de | ||
|
|
4683f9c0a7 | ||
|
|
cce4158cfc | ||
|
|
3d497be9bd | ||
|
|
6e1aa91aaf | ||
|
|
c58918c84a | ||
|
|
61885aa965 | ||
|
|
2c229bac00 | ||
|
|
9ec56637f9 | ||
|
|
4340996572 | ||
|
|
5c59d95532 | ||
|
|
4907d28967 | ||
|
|
da4a0e0555 | ||
|
|
48f23746f0 | ||
|
|
86ecdcd5ff | ||
|
|
71aa5fe8a3 | ||
|
|
164b878854 | ||
|
|
c453f1f370 | ||
|
|
235ed7ecb9 | ||
|
|
434dea3caf | ||
|
|
2ce21cefdc | ||
|
|
50e096e627 | ||
|
|
03b4cf74a2 | ||
|
|
d34e4dc5ac | ||
|
|
84f1af6413 | ||
|
|
c8cc523d4d | ||
|
|
a1d97ea4db | ||
|
|
c6c22301fa | ||
|
|
6830ddb659 | ||
|
|
7c5d50f627 | ||
|
|
78e37e98e7 | ||
|
|
0d536734fe | ||
|
|
c2c24b3bb4 | ||
|
|
60613b57d1 | ||
|
|
ff67fbf964 | ||
|
|
525cefa37a | ||
|
|
8244825bbf | ||
|
|
eef4776b5b | ||
|
|
1bc2d83b6f | ||
|
|
8f873b762b | ||
|
|
a6c0a75f9a | ||
|
|
c39a7b5c0d | ||
|
|
89fd752659 | ||
|
|
f1ae3dc4aa | ||
|
|
12e8d9c4dd | ||
|
|
ecc74d76cc | ||
|
|
cc436c4b28 | ||
|
|
c2f410214c | ||
|
|
2339ee9910 | ||
|
|
7dc6c33873 | ||
|
|
576393550d | ||
|
|
7180699d40 | ||
|
|
9c7281c17e | ||
|
|
4d5a518a0b | ||
|
|
574d5d6ae6 | ||
|
|
cad64fb911 | ||
|
|
1e2c93aa2d | ||
|
|
6e9f8035a1 | ||
|
|
6788f955c2 | ||
|
|
509d0a8d78 | ||
|
|
eedbb1ee9a | ||
|
|
2750ec47b7 | ||
|
|
56a48101dc | ||
|
|
c35f4fd0bd | ||
|
|
4020258801 | ||
|
|
73eb8e8c20 | ||
|
|
4afc22ba6e | ||
|
|
bd14bd6c5b | ||
|
|
d3ed3285e9 | ||
|
|
5528abc795 | ||
|
|
545ff1e3f3 | ||
|
|
2c2ddcbf88 | ||
|
|
eac2df02d1 | ||
|
|
b6d1724dd9 | ||
|
|
ead3dd9759 | ||
|
|
e5a03eb066 | ||
|
|
57f93d25bd | ||
|
|
e5e91e9eb3 | ||
|
|
ee6531c5ff | ||
|
|
205378016f | ||
|
|
eda10c7317 | ||
|
|
3a51c3b584 | ||
|
|
c4678ffd77 | ||
|
|
dff39553d4 | ||
|
|
c617a6ec79 | ||
|
|
2d8a2d0c99 | ||
|
|
6388767df0 | ||
|
|
ec6cbb914b | ||
|
|
52c874a609 | ||
|
|
eaf73b55bc | ||
|
|
6ceb253f74 | ||
|
|
5d2138a2b2 | ||
|
|
ccb4722a59 | ||
|
|
46ea193a49 | ||
|
|
bcf41797ca | ||
|
|
d82aaf617c | ||
|
|
f46af4508b | ||
|
|
8db7b2374c | ||
|
|
4fb7ab5d09 | ||
|
|
86372b20c0 | ||
|
|
f6efdd8aad | ||
|
|
1a4cfc173e | ||
|
|
e2b7498c9d | ||
|
|
13eb46ea94 | ||
|
|
9800c84348 | ||
|
|
8310bcda61 | ||
|
|
474aa924ca | ||
|
|
59bff46505 | ||
|
|
5205b2f19b | ||
|
|
4af7743663 | ||
|
|
b7e1b686aa | ||
|
|
2ea98d9b74 | ||
|
|
07eebc38b2 | ||
|
|
333d4e0f27 | ||
|
|
f6f9a0d515 | ||
|
|
3a33428578 | ||
|
|
4f3c169b4e | ||
|
|
d423305f07 | ||
|
|
d61ec9ca76 | ||
|
|
0217652d1b | ||
|
|
b8aeb04f6f | ||
|
|
b9929d289d | ||
|
|
333e539ce2 | ||
|
|
1fa844aaf5 | ||
|
|
5f9346bc7a | ||
|
|
995fab2ebc | ||
|
|
97d2954e22 | ||
|
|
79a6782c1c | ||
|
|
ad4891a09a | ||
|
|
a8a2b2a488 | ||
|
|
cb707ba50c | ||
|
|
3d57e377a4 | ||
|
|
faa2747809 | ||
|
|
89358d25a4 | ||
|
|
9a53390f49 | ||
|
|
7b501906db | ||
|
|
49a513bdeb | ||
|
|
7dcb9825c3 | ||
|
|
5467e7b312 | ||
|
|
6efa8db888 | ||
|
|
acf8452c33 | ||
|
|
61db7a71dd | ||
|
|
406feee570 | ||
|
|
f047699afb | ||
|
|
3aa5437a10 | ||
|
|
36fe11378c | ||
|
|
eb75a77151 | ||
|
|
6107b53de0 | ||
|
|
5d4f69f483 | ||
|
|
92fbb61625 | ||
|
|
3d29805322 | ||
|
|
da7332a731 | ||
|
|
c5332537f5 | ||
|
|
56977c225e | ||
|
|
b3c058a9e4 | ||
|
|
f8a4cd7ec1 | ||
|
|
0e4f21fc37 | ||
|
|
7d8ce53eca | ||
|
|
99a1db2d40 | ||
|
|
145330fdf2 | ||
|
|
f1d710af00 | ||
|
|
22d1f0faf1 | ||
|
|
7be05b4b9d | ||
|
|
9cd8c96157 | ||
|
|
7e54a9c07f | ||
|
|
a4c8e947b0 | ||
|
|
6d20d634ca | ||
|
|
6dc2146ed7 | ||
|
|
9ac5671c18 | ||
|
|
1e18f4544b | ||
|
|
fc1d1f9afd | ||
|
|
3755cfccb3 | ||
|
|
20fd60902b | ||
|
|
d1729acd2b | ||
|
|
b2b1241dd7 | ||
|
|
4de1e1609a | ||
|
|
dc2b9fd458 | ||
|
|
ec9fbf09aa | ||
|
|
9f5d24be31 | ||
|
|
b0f40beea6 | ||
|
|
ab015959e1 | ||
|
|
2747df3df1 | ||
|
|
01ee012197 | ||
|
|
764a802eaa | ||
|
|
663fd8f849 | ||
|
|
46898f1e55 | ||
|
|
0636e17dbe | ||
|
|
be25396340 | ||
|
|
a009132c24 | ||
|
|
0e2bc23148 | ||
|
|
e55747a074 | ||
|
|
262714fc6c | ||
|
|
cbd0b42060 | ||
|
|
f546b486bf | ||
|
|
42fb9652f5 | ||
|
|
30830652ae | ||
|
|
c6b25a4046 | ||
|
|
8d059e54f1 | ||
|
|
558683d10c | ||
|
|
79cc3cc98e | ||
|
|
ef393da933 | ||
|
|
6da5b2fc5f | ||
|
|
a9959805e5 | ||
|
|
204ac81188 | ||
|
|
b3a3fdf9a4 | ||
|
|
6e2f78ebdd | ||
|
|
2e2860e4df | ||
|
|
6184781b49 | ||
|
|
a7750c929b | ||
|
|
f08e9cbe42 | ||
|
|
1c872ddf4b | ||
|
|
5304f43067 | ||
|
|
6284604b52 | ||
|
|
a953f3ec97 | ||
|
|
31b086f511 | ||
|
|
7c0a18edb5 | ||
|
|
09147a50ed | ||
|
|
d09d2b96fc | ||
|
|
aa4ff52d84 | ||
|
|
7f32a08b60 | ||
|
|
758205b187 | ||
|
|
f597863927 | ||
|
|
941f051358 | ||
|
|
3ddc109778 | ||
|
|
50bbdfe582 | ||
|
|
ce9a28d7bb | ||
|
|
0196a97319 | ||
|
|
3063aad7db | ||
|
|
50aa1f178c | ||
|
|
688d118c7e | ||
|
|
d0c3f127ee | ||
|
|
01b2c90179 | ||
|
|
c756633fb7 | ||
|
|
43454053b0 | ||
|
|
1aaeae292d | ||
|
|
2591883a18 | ||
|
|
3f306f63d4 | ||
|
|
d9b37b6da7 | ||
|
|
7c583f8222 | ||
|
|
99907f94dc | ||
|
|
7b6a8cc9ae | ||
|
|
f4d4f1ccb2 | ||
|
|
b09d62bac7 | ||
|
|
9c55576c7b | ||
|
|
3040296beb | ||
|
|
736aefe9b5 | ||
|
|
69ece747d3 | ||
|
|
01e1b49831 | ||
|
|
09d3f2cf2a | ||
|
|
5b9a0e7118 | ||
|
|
50edd4243e | ||
|
|
ac473a8623 | ||
|
|
053d5552ab | ||
|
|
5dc5e66986 | ||
|
|
d651ff968a | ||
|
|
f4af9e95c2 | ||
|
|
eb1c26746d | ||
|
|
eb8f0b85f7 | ||
|
|
59597d23a5 | ||
|
|
c39484bc4b | ||
|
|
5c988c8ea0 | ||
|
|
eff6a43419 | ||
|
|
7a18a39351 | ||
|
|
f9488cb763 | ||
|
|
e1ed8c33bd | ||
|
|
29f120206e | ||
|
|
0d1a9ce648 | ||
|
|
435378e953 | ||
|
|
71e62eb620 | ||
|
|
c985ce4d78 | ||
|
|
2683aac9b0 | ||
|
|
2b9b9e7704 | ||
|
|
4729826466 | ||
|
|
c20d04ca67 | ||
|
|
1889727144 | ||
|
|
218bfeb60e | ||
|
|
a0e44e3281 | ||
|
|
60e097a5f4 | ||
|
|
bc5528b165 | ||
|
|
ec8a6e0a2b | ||
|
|
f9d94c7462 | ||
|
|
11d90d9b22 | ||
|
|
36452afd4e | ||
|
|
47feff3611 | ||
|
|
4558e04c0d | ||
|
|
f6bd4b16e3 | ||
|
|
f49e398ebe | ||
|
|
a6ca3d0261 | ||
|
|
29a9c6bedd | ||
|
|
c59c826ab4 | ||
|
|
812cbff1a2 | ||
|
|
fd5c5b2969 | ||
|
|
4415a5bc68 | ||
|
|
ea606733eb | ||
|
|
24c8fdc1d0 | ||
|
|
97d6b0bab8 | ||
|
|
1f122626be | ||
|
|
3e042317ad | ||
|
|
1d74086b42 | ||
|
|
5cb1b41440 | ||
|
|
dd1791c9fd | ||
|
|
9bdf0b655d | ||
|
|
537e2cfeb6 | ||
|
|
e882ba0c29 | ||
|
|
aa71e27a3b | ||
|
|
3908590578 | ||
|
|
607fc788e3 | ||
|
|
876ce0fb12 | ||
|
|
172b34351a | ||
|
|
b9c9d6d798 | ||
|
|
b4eef59b6f | ||
|
|
1e28b424e7 | ||
|
|
015453f5b3 | ||
|
|
55b1c1546b | ||
|
|
118ad22ee5 | ||
|
|
81de8ed091 | ||
|
|
b86450aaae | ||
|
|
e402e1dc2e | ||
|
|
79828531b1 | ||
|
|
14c14fd61f | ||
|
|
2efb89d544 | ||
|
|
60da9a1289 | ||
|
|
3f4c1aaf01 | ||
|
|
0f3bf7ef4d | ||
|
|
585aec127c | ||
|
|
edfd2757d9 | ||
|
|
b10e33c040 | ||
|
|
cc45b4d8b5 | ||
|
|
f89baa73e5 | ||
|
|
85ebbc9aa5 | ||
|
|
7e13ee602e | ||
|
|
c71ca1a089 | ||
|
|
f960fc066e | ||
|
|
bb3ae3026e | ||
|
|
b8124ec791 | ||
|
|
219d94c1dd | ||
|
|
c26c8d3a44 | ||
|
|
ab5c007376 | ||
|
|
4391c38215 | ||
|
|
5d8be9c30d | ||
|
|
344b3556eb | ||
|
|
516ec28544 | ||
|
|
4e3ffbcf9b | ||
|
|
109b27b552 | ||
|
|
eac4d582d7 | ||
|
|
1045015a3c | ||
|
|
96cf776f81 | ||
|
|
f801183b8b | ||
|
|
516423cdac | ||
|
|
216ea425e4 | ||
|
|
8e961df283 | ||
|
|
fd171eff7f | ||
|
|
76218959ab | ||
|
|
a77c431e37 | ||
|
|
de7af720d6 | ||
|
|
b6f0b40037 | ||
|
|
55b9689950 | ||
|
|
92928309b2 | ||
|
|
bea3879d6f | ||
|
|
ac03ff6f05 | ||
|
|
6e8ff578f1 | ||
|
|
93f832a1a7 | ||
|
|
0ce971d9d3 | ||
|
|
101ea1a1e8 | ||
|
|
c8e5d53a39 | ||
|
|
4a4da9a24e | ||
|
|
f56fc9cd9d | ||
|
|
6ffea34d8b | ||
|
|
82da6bf4d2 | ||
|
|
d677190f39 | ||
|
|
e1be34bce1 | ||
|
|
936ddf2ad1 | ||
|
|
dbf17105f6 | ||
|
|
88f2a96ca3 | ||
|
|
1559bd9e1b | ||
|
|
dba9b83aa0 | ||
|
|
b0e09ec827 | ||
|
|
6afc5e762a | ||
|
|
720d978e35 | ||
|
|
6605d00d92 | ||
|
|
02fb83782e | ||
|
|
86ba7432a9 | ||
|
|
4e8f8cfab7 | ||
|
|
f2c6a937f3 | ||
|
|
b860b67693 | ||
|
|
f468364e4d | ||
|
|
7b7392826d | ||
|
|
0a554a1f27 | ||
|
|
d3e86f9208 | ||
|
|
25998cfc45 | ||
|
|
bbca6250ff | ||
|
|
40ea466200 | ||
|
|
7e3875b527 | ||
|
|
a2501ecfcd | ||
|
|
8f0e095f4c | ||
|
|
81aeb78976 | ||
|
|
3a948b2dba | ||
|
|
ec181b308a | ||
|
|
2ef0bc03ec | ||
|
|
8b51582b53 | ||
|
|
3453f8c5d2 | ||
|
|
653c3deaa5 | ||
|
|
6daa455243 | ||
|
|
485dcf90cd | ||
|
|
2f3a968136 | ||
|
|
9feed3f61e | ||
|
|
f23529c5cd | ||
|
|
35d00e00c5 | ||
|
|
b6fde73ef1 | ||
|
|
04a7c4ae1e | ||
|
|
24fc1f073d | ||
|
|
e1c6c01b4d | ||
|
|
b7a0bc7031 | ||
|
|
61c5edcb57 | ||
|
|
af153e7884 | ||
|
|
391d79ef44 | ||
|
|
eb79938060 | ||
|
|
2ca6a800ad | ||
|
|
82eeb5e02a | ||
|
|
129fabddb2 | ||
|
|
d9f8b1e0c1 | ||
|
|
e80ef9ff34 | ||
|
|
29930da522 | ||
|
|
3b20603eb1 | ||
|
|
779a51c047 | ||
|
|
b9ca5eef58 | ||
|
|
696ff43db3 | ||
|
|
368ebe63a9 | ||
|
|
3b7e4173ce | ||
|
|
2455e0bd18 | ||
|
|
ed6ca5d007 | ||
|
|
a4cbd1c7be | ||
|
|
47af2f02cb | ||
|
|
3ea8c7301e | ||
|
|
43d521e90e | ||
|
|
df648cbc60 | ||
|
|
8a22cd5e6c | ||
|
|
0ac346f707 | ||
|
|
9f84c78eb5 | ||
|
|
db1c52918f | ||
|
|
00f8319faf | ||
|
|
8e7549db0b | ||
|
|
eb102bf4bb | ||
|
|
86c43d97bc | ||
|
|
0b4b2b81f9 | ||
|
|
54a14d5c9d | ||
|
|
09280c5f11 | ||
|
|
2788fb4ce5 | ||
|
|
e29396b691 | ||
|
|
c38630af23 | ||
|
|
e0781c2548 | ||
|
|
3fcef54f9b | ||
|
|
b375bbee5f | ||
|
|
5838847a9a | ||
|
|
6bd1f6cc49 | ||
|
|
bb12dbe233 | ||
|
|
7eed7e1d96 | ||
|
|
2c5a32ebbc | ||
|
|
49a912ce33 | ||
|
|
b0b0939879 | ||
|
|
829240c325 | ||
|
|
1f3814141b | ||
|
|
9ca87afd0b | ||
|
|
81f36df910 | ||
|
|
ddcc8e1673 | ||
|
|
b414a1303f | ||
|
|
1f1e98f96b | ||
|
|
62ebf999bf | ||
|
|
7577d12614 | ||
|
|
abbdf41560 | ||
|
|
11d2ebc06f | ||
|
|
4ec38e3932 | ||
|
|
23e41a57ad | ||
|
|
fee224f075 | ||
|
|
d1b52efdb5 | ||
|
|
34d5a6c156 | ||
|
|
1c4c71dcff | ||
|
|
fd8d18ec28 | ||
|
|
859f1f08ca | ||
|
|
c4ea921876 | ||
|
|
e21ce9a9b4 | ||
|
|
f68ca2b6e6 | ||
|
|
3ab9f26943 | ||
|
|
658204bafc | ||
|
|
c32bca45ad | ||
|
|
d36501a6e5 | ||
|
|
6661bc35ef | ||
|
|
745dd5b7a5 | ||
|
|
f695d01354 | ||
|
|
3472823be9 | ||
|
|
cb103c089a | ||
|
|
cd6b3fd28a | ||
|
|
a49c81547c | ||
|
|
ca03e97697 | ||
|
|
a718515b3d | ||
|
|
d0fa0a234d | ||
|
|
c139af5826 | ||
|
|
4523a00b91 | ||
|
|
c33dc3e328 | ||
|
|
83b0cad766 | ||
|
|
b8a667deed | ||
|
|
4ba850639e | ||
|
|
9c4504dc41 | ||
|
|
ace5b5a1bf | ||
|
|
507830eb81 | ||
|
|
eb433731aa | ||
|
|
300d36b864 | ||
|
|
ad2089b0a3 | ||
|
|
493e0d7be8 | ||
|
|
93af30a6f6 | ||
|
|
bd1a54f076 | ||
|
|
966cfa4bdd | ||
|
|
c7dc379da5 | ||
|
|
7e1e264375 | ||
|
|
98f970ba59 | ||
|
|
88b9bc40d7 | ||
|
|
e5a0a0ef48 | ||
|
|
7e4c488717 | ||
|
|
505f1fbcbb | ||
|
|
65ea55bccd | ||
|
|
e22bcb78a5 | ||
|
|
181a21c67c | ||
|
|
ff5578fc71 | ||
|
|
a2e3bf6f30 | ||
|
|
aa1eae67ec | ||
|
|
7f0c2545a9 | ||
|
|
221f30c3aa | ||
|
|
8b32f79445 | ||
|
|
950b4a68c8 | ||
|
|
18d1569ce5 | ||
|
|
9d592c0445 | ||
|
|
a1cae93d78 | ||
|
|
2b93843d86 | ||
|
|
c956bcb13c | ||
|
|
6431d088ad | ||
|
|
ff44347ea1 | ||
|
|
dda1d60556 | ||
|
|
3301f6ecef | ||
|
|
97bf9f1521 | ||
|
|
3d5f48a160 | ||
|
|
a6e659f74b | ||
|
|
a33a325ac1 | ||
|
|
d41341f77d | ||
|
|
82b5a8af49 | ||
|
|
c38a3b4cc7 | ||
|
|
865f31018b | ||
|
|
2106a63d60 | ||
|
|
65d553d367 | ||
|
|
59b6b619a2 | ||
|
|
b9b7442b74 | ||
|
|
ad420d099a | ||
|
|
b0c4dc8df8 | ||
|
|
6d41402dce | ||
|
|
9de1ad6546 | ||
|
|
ff9d66e096 | ||
|
|
23bccbbc58 | ||
|
|
bbe795455a | ||
|
|
24066dca46 | ||
|
|
d6da533345 | ||
|
|
0ec171ccdf | ||
|
|
eab8f7355d | ||
|
|
576df064e5 | ||
|
|
58c6cc8fd7 | ||
|
|
4877e52c15 | ||
|
|
118b79eca7 | ||
|
|
a59ea7ce29 | ||
|
|
d8e21b39b3 | ||
|
|
0ee0094cc0 | ||
|
|
7b8a47f484 | ||
|
|
0eaa023ffa | ||
|
|
bfb9ed881d | ||
|
|
ebf4408d73 | ||
|
|
e88a29ad02 | ||
|
|
53af810851 | ||
|
|
f2f65c1a65 | ||
|
|
90c710fd26 | ||
|
|
c8e9ca0483 | ||
|
|
a983a215dc | ||
|
|
e954c24af0 | ||
|
|
60020add74 | ||
|
|
1cf6ca8f10 | ||
|
|
9880f99ccb | ||
|
|
1e61b75cbf | ||
|
|
03cc5df9b7 | ||
|
|
0330077d76 | ||
|
|
d7eaa97a29 | ||
|
|
211cb03f83 | ||
|
|
9562a9840f | ||
|
|
5707912e2f | ||
|
|
253ecdc8bb | ||
|
|
9be7853e34 | ||
|
|
2f8601ef38 | ||
|
|
becc503230 | ||
|
|
5d31a475e9 | ||
|
|
60de4d6dd1 | ||
|
|
08bb472c91 | ||
|
|
33c5186fd0 | ||
|
|
dc3a9379f5 | ||
|
|
3f6e1b2fd3 | ||
|
|
524f8199bf | ||
|
|
6657d544db | ||
|
|
0be6d34048 | ||
|
|
dbb2af6016 | ||
|
|
91a2275ad3 | ||
|
|
439481d177 | ||
|
|
01c0ba22ae | ||
|
|
0846e15667 | ||
|
|
ab6311c1bd | ||
|
|
d76e8cb1f1 | ||
|
|
16a58f8f2a | ||
|
|
31879eca8c | ||
|
|
3772f02569 | ||
|
|
372e1cad5b | ||
|
|
d2fa6e7753 | ||
|
|
8affdf96e2 | ||
|
|
3133372a6a | ||
|
|
59eab49cb8 | ||
|
|
8b1b9fc99d | ||
|
|
8ed4f226d1 | ||
|
|
82956df523 | ||
|
|
d186bf0dfe | ||
|
|
bf73f02fe0 | ||
|
|
360c66c65d | ||
|
|
2477d10aa0 | ||
|
|
c0741edc34 | ||
|
|
82a41a198e | ||
|
|
08b21acff1 | ||
|
|
9682a3ef3e | ||
|
|
e349fb9350 | ||
|
|
13781b922a | ||
|
|
0edb33566f | ||
|
|
78cff9e3a4 | ||
|
|
95038fc62d | ||
|
|
7f85608f30 | ||
|
|
09766d1729 | ||
|
|
fcacfabe19 | ||
|
|
83728e4b64 | ||
|
|
004f5008ff | ||
|
|
a7ad9c309b | ||
|
|
38c7c589e4 | ||
|
|
ce862ee758 | ||
|
|
4300f2a0fa | ||
|
|
c28116cb3b | ||
|
|
06697775d1 | ||
|
|
9edb9a21bc | ||
|
|
670021da15 | ||
|
|
069c87b960 | ||
|
|
7c4ff3abb4 | ||
|
|
483d43a15a | ||
|
|
a829a56587 | ||
|
|
81800ca39e | ||
|
|
b95ff54632 | ||
|
|
b41185a68f | ||
|
|
abce6804a0 | ||
|
|
f4e9638867 | ||
|
|
ecd10d2cf7 | ||
|
|
1821d1af48 | ||
|
|
54dac59285 | ||
|
|
a59bb053f4 | ||
|
|
deee9cb170 | ||
|
|
28e1971272 | ||
|
|
0cde7a4d46 | ||
|
|
efcc93e7da | ||
|
|
28ddc16a9b | ||
|
|
c161d73d42 | ||
|
|
dcb9614dfe | ||
|
|
f7d1d601e9 | ||
|
|
c388e7eac0 | ||
|
|
85acdadcfa | ||
|
|
739c36ad4d | ||
|
|
28e5fc8352 | ||
|
|
8324b683b4 | ||
|
|
7690285cbe | ||
|
|
66b29899c4 | ||
|
|
4f5b362bda | ||
|
|
91f9f355b2 | ||
|
|
41c493ace9 | ||
|
|
55fdf3e462 | ||
|
|
d7564a9a25 | ||
|
|
8987750a36 | ||
|
|
0578df9467 | ||
|
|
a578db5dae | ||
|
|
8767179d74 | ||
|
|
63cae9b9ac | ||
|
|
137a9c9365 | ||
|
|
a9926a289d | ||
|
|
391e89d70a | ||
|
|
50661f0e68 | ||
|
|
01ff0b3176 | ||
|
|
d8fe8f60e8 | ||
|
|
b3329bc698 | ||
|
|
aa3918efa7 | ||
|
|
e038a42d7a | ||
|
|
1d6451f5c3 | ||
|
|
bde161382a | ||
|
|
eb45211501 | ||
|
|
b56e20be27 | ||
|
|
754160afea | ||
|
|
c3a3d38735 | ||
|
|
3cea7d87c1 | ||
|
|
d791fe4975 | ||
|
|
19360c0079 | ||
|
|
6669ef5b70 | ||
|
|
7b45f3377f | ||
|
|
2ef2b9f2e0 | ||
|
|
1f9b93647b | ||
|
|
4b5e592656 | ||
|
|
0bda63eb76 | ||
|
|
d2e7414230 | ||
|
|
3e9632e256 | ||
|
|
84b19971fa | ||
|
|
4663a55f12 | ||
|
|
7c30716828 | ||
|
|
6c04c19eb4 | ||
|
|
12d87226a7 | ||
|
|
cdfc03dc8e | ||
|
|
0895190b64 | ||
|
|
ff657edbb6 | ||
|
|
c57eb286d6 | ||
|
|
216175c265 | ||
|
|
7e6c8a411d | ||
|
|
22546dcb55 | ||
|
|
b28e6d8306 | ||
|
|
cc91ba0add | ||
|
|
0eb9572d64 | ||
|
|
85e03217de | ||
|
|
57f6a3b5c0 | ||
|
|
6fef616870 | ||
|
|
d28cd0f040 | ||
|
|
152b37ee11 | ||
|
|
e530c960a4 | ||
|
|
3aea645106 | ||
|
|
7562bc1dbc | ||
|
|
b7745c6835 | ||
|
|
6cc02aadbf | ||
|
|
62236dd95e | ||
|
|
abc3d8d50a | ||
|
|
df5901fdc5 | ||
|
|
013427bde2 | ||
|
|
f144a95940 | ||
|
|
b4a51de602 | ||
|
|
c7b616ac14 | ||
|
|
1f2de6ecd5 | ||
|
|
d670c861d7 | ||
|
|
29eb220910 | ||
|
|
e861bbe0c1 | ||
|
|
463491f8cd | ||
|
|
b5a71d955c | ||
|
|
e540a75030 | ||
|
|
03b8ddd19c | ||
|
|
14a2f42f37 | ||
|
|
93ba3df4ff | ||
|
|
b52807f0c0 | ||
|
|
ce063e8d9c | ||
|
|
e80dda6051 | ||
|
|
b9e0b11e7d | ||
|
|
a7bced779a | ||
|
|
5ba51594c7 | ||
|
|
4811f460e7 | ||
|
|
797bbce15e | ||
|
|
554f20930a | ||
|
|
a756dbeb7b | ||
|
|
ad7e491214 | ||
|
|
d4e5747d04 | ||
|
|
cf45b939a0 | ||
|
|
e13c673980 | ||
|
|
965c9babe3 | ||
|
|
d7ab716eea | ||
|
|
8b20c3cc97 | ||
|
|
85fa3790ac | ||
|
|
e67d32b467 | ||
|
|
da427e8843 | ||
|
|
0685810ec6 | ||
|
|
e02eedb43e | ||
|
|
7cbcd81ddc | ||
|
|
5f35e6778f | ||
|
|
af9da83ce2 | ||
|
|
f0bb136099 | ||
|
|
c12046d6bf | ||
|
|
79f90bf7c1 | ||
|
|
bc5ae94384 | ||
|
|
f9a6038f5b | ||
|
|
baca0c2251 | ||
|
|
3e52c9439a | ||
|
|
60c43d1952 | ||
|
|
7c9bc8517d | ||
|
|
4d0ae8b0cb | ||
|
|
48dd601de0 | ||
|
|
064279c0ec | ||
|
|
e30c323391 | ||
|
|
d15f90645d | ||
|
|
a59dd393e7 | ||
|
|
b5b83db450 | ||
|
|
c298148a7f | ||
|
|
b94a6a0193 | ||
|
|
0a1eeca41e | ||
|
|
942980609f | ||
|
|
cd52ef315c | ||
|
|
ca8d184173 | ||
|
|
b6aa88c099 | ||
|
|
67c9d9c2fa | ||
|
|
cb009a5c4d | ||
|
|
c6f84325b1 | ||
|
|
8fd243ee23 | ||
|
|
7dbbe1bedc | ||
|
|
1872418316 | ||
|
|
142e81258c | ||
|
|
3ea99f989f | ||
|
|
048d4ec5be | ||
|
|
917050dc30 | ||
|
|
53104b09fa | ||
|
|
786a58d8b0 | ||
|
|
86661de077 | ||
|
|
c21293cd91 | ||
|
|
1513413412 | ||
|
|
b422835a59 | ||
|
|
fe819f3b9f | ||
|
|
0fa7859b94 | ||
|
|
ff55c6f5ba | ||
|
|
b0ebccb31e | ||
|
|
17c5ba2b6b | ||
|
|
9663493ba0 | ||
|
|
dffaa678f9 | ||
|
|
ee7202fa00 | ||
|
|
65eee2006d | ||
|
|
27f7aa0163 | ||
|
|
b95387a0dc | ||
|
|
e91ab84dbe | ||
|
|
515d9432fc | ||
|
|
d5de6489d7 | ||
|
|
ad78db4d62 | ||
|
|
8ce6a36478 | ||
|
|
94505146a2 | ||
|
|
843db4978e | ||
|
|
176115e22e | ||
|
|
4e181c5764 | ||
|
|
0339a13862 | ||
|
|
719effa7ec | ||
|
|
03ac0f18ae | ||
|
|
6aa390abfb | ||
|
|
91b0b14845 | ||
|
|
e5e265d024 | ||
|
|
16df850af2 | ||
|
|
13ade2ed60 | ||
|
|
64490897f3 | ||
|
|
bfcd2cf132 | ||
|
|
e620bde405 | ||
|
|
7330c97b5b | ||
|
|
17cd7a5817 | ||
|
|
b3e133dd15 | ||
|
|
73af0302be | ||
|
|
b4060da9eb | ||
|
|
5e7702fd05 | ||
|
|
76f215b0fe | ||
|
|
0dd9ac375b | ||
|
|
22893b7ac9 | ||
|
|
d338650089 | ||
|
|
5757f547a6 | ||
|
|
20b7162a62 | ||
|
|
dc864ee3a5 | ||
|
|
3cf51d5479 | ||
|
|
f486c0ae56 | ||
|
|
b523441361 | ||
|
|
8139d444f8 | ||
|
|
0b8f66ed9e | ||
|
|
22fa59f131 | ||
|
|
ece5c2aade | ||
|
|
8393dab470 | ||
|
|
d2e75cc957 | ||
|
|
ff86d7d52a | ||
|
|
7bc40aa963 | ||
|
|
c87cc59bdf | ||
|
|
8f84ddbbec | ||
|
|
0f26a62334 | ||
|
|
132e87a707 | ||
|
|
8ad0f1b8a3 | ||
|
|
e150832734 | ||
|
|
7279a485c2 | ||
|
|
16ecb1e2ea | ||
|
|
31ffca6d8a | ||
|
|
da44097800 | ||
|
|
2a5fbced7f | ||
|
|
282d8c20fd | ||
|
|
d9966d6158 | ||
|
|
12cee1377f | ||
|
|
95711bc2dd | ||
|
|
387f6bba3e | ||
|
|
44636e5b82 | ||
|
|
35bc7b0d8a | ||
|
|
532a74f50e | ||
|
|
51df765e38 | ||
|
|
9754e7aca7 | ||
|
|
991993357c | ||
|
|
f49e17eb39 | ||
|
|
67f8f83a1b | ||
|
|
e463479b6c | ||
|
|
6f8a2d6b84 | ||
|
|
58d9d98daf | ||
|
|
a80be98f31 | ||
|
|
9326541820 | ||
|
|
b927c29469 | ||
|
|
fee9aecfb2 | ||
|
|
ccda1aacb4 | ||
|
|
03403399fc | ||
|
|
a0266489b4 | ||
|
|
a76d55c83a | ||
|
|
b663e8b29a | ||
|
|
f1fcda4f2f | ||
|
|
e3b64d70c2 | ||
|
|
d3f96dc720 | ||
|
|
0932f84383 | ||
|
|
cda88ce31a | ||
|
|
aa9f981d5f | ||
|
|
e69d5b32e8 | ||
|
|
f76cc6699e | ||
|
|
d4ed66c83d | ||
|
|
094f921e50 | ||
|
|
80592f244d | ||
|
|
6051345bc9 | ||
|
|
3a88da578f | ||
|
|
fa917387e4 | ||
|
|
310ca62285 | ||
|
|
3ff7a627d1 | ||
|
|
2ae90e1eba | ||
|
|
11390a986a | ||
|
|
347cb272be | ||
|
|
412e8b0e37 | ||
|
|
d1c872bace | ||
|
|
fb71c9f6ee | ||
|
|
83cc08f670 | ||
|
|
14bdcd2c05 | ||
|
|
7235e84c75 | ||
|
|
d11fabd2ef | ||
|
|
f7c3c7eda4 | ||
|
|
b97c17f4ee | ||
|
|
2273155e7e | ||
|
|
b006b67768 | ||
|
|
26a5636424 | ||
|
|
3b3843e158 | ||
|
|
ef6706696c | ||
|
|
2a0e5888fd | ||
|
|
4418e4ea6a | ||
|
|
21fca93852 | ||
|
|
4342fe0f22 | ||
|
|
704914be08 | ||
|
|
31a95151c9 | ||
|
|
92c6150199 | ||
|
|
96496888ed | ||
|
|
7ee5cb0a81 | ||
|
|
9fb52c517b | ||
|
|
6af078bd8c | ||
|
|
d5aaf413e0 | ||
|
|
d7b5a87b3b | ||
|
|
70f6f2af07 | ||
|
|
c2181fdbf2 | ||
|
|
5a9f712144 | ||
|
|
485e37e889 | ||
|
|
587f748d92 | ||
|
|
629f4b1d3c | ||
|
|
239e17de12 | ||
|
|
c01d4c2f4c | ||
|
|
2da7af4ba0 | ||
|
|
e8d1b622d9 | ||
|
|
90f34ed40a | ||
|
|
61bf29be36 | ||
|
|
08b1154033 | ||
|
|
477815c044 | ||
|
|
6b63759ded | ||
|
|
7add66c8bb | ||
|
|
9e89c803f1 | ||
|
|
53ac85cfd3 | ||
|
|
d465e410ef | ||
|
|
99bc44cf52 | ||
|
|
6bca40274f | ||
|
|
9ce5229ddf | ||
|
|
ece29c5d8d | ||
|
|
074ee19fe5 | ||
|
|
64933321fb | ||
|
|
58909117be | ||
|
|
499f816e30 | ||
|
|
7e0ccc9de5 | ||
|
|
fda4d02f94 | ||
|
|
eba4f389a6 | ||
|
|
7d77a2ffc3 | ||
|
|
73171d18b9 | ||
|
|
eb1b4c8ffe | ||
|
|
ce595b9266 | ||
|
|
35841e5190 | ||
|
|
d9f96293be | ||
|
|
f22684439a | ||
|
|
3d6519e45b | ||
|
|
617804c327 | ||
|
|
269cfbb8ac | ||
|
|
972e2c1e31 | ||
|
|
221fae4112 | ||
|
|
2407f006ad | ||
|
|
0bb7377ebe | ||
|
|
9d4e1e8f8b | ||
|
|
c3f94a4341 | ||
|
|
4ba7871374 | ||
|
|
0f67f1e9de | ||
|
|
0395c174ca | ||
|
|
bbe8b18660 | ||
|
|
53f8f29744 | ||
|
|
0542df941f | ||
|
|
56524d13b5 | ||
|
|
b87442a9f7 | ||
|
|
c0a8e3cd34 | ||
|
|
c9b6d268b4 | ||
|
|
08d396fdba | ||
|
|
05c9351659 | ||
|
|
80985f97da | ||
|
|
3de51f76ee | ||
|
|
e6118f2d79 | ||
|
|
9b3ae1fdb7 | ||
|
|
ae38871a54 | ||
|
|
62ebce304e | ||
|
|
9f0e3bd286 | ||
|
|
395da0e7c1 | ||
|
|
0db4a0e898 | ||
|
|
0d64163fea | ||
|
|
9007f2bbdc | ||
|
|
d1e04f7388 | ||
|
|
487f68ec48 | ||
|
|
0795fd2701 | ||
|
|
9bf513e993 | ||
|
|
cd51860bf0 | ||
|
|
697f6748b8 | ||
|
|
c2e5dacf55 | ||
|
|
63758db379 | ||
|
|
6a7e02fc9f | ||
|
|
a11f1d6a7e | ||
|
|
73d1ebe244 | ||
|
|
b4fa94c4b1 | ||
|
|
2ee88a220a | ||
|
|
2dacb51fb0 | ||
|
|
a7538d0020 | ||
|
|
27c42ea934 | ||
|
|
8560004f38 | ||
|
|
676a0de58d | ||
|
|
9723191b19 | ||
|
|
fb23a0cfe0 | ||
|
|
20741a96ac | ||
|
|
738d6e20f2 | ||
|
|
3deb470b2d | ||
|
|
21fd722abc | ||
|
|
19efebe91e | ||
|
|
c1cafb56d5 | ||
|
|
93cdffca3a | ||
|
|
41a89e18f6 | ||
|
|
51eed7964e | ||
|
|
e2c75b0fa1 | ||
|
|
30584c7cfb | ||
|
|
5dfc67efbd | ||
|
|
0743d68d4c | ||
|
|
97dc4edb45 | ||
|
|
6684ef201a | ||
|
|
fb53a9362e | ||
|
|
3750ec7b7d | ||
|
|
f6df3740a8 | ||
|
|
07955b3041 | ||
|
|
405c0ca4b0 | ||
|
|
e189758d55 | ||
|
|
8ea0444655 | ||
|
|
69920c735a | ||
|
|
e26ebc3110 | ||
|
|
d6a7332993 | ||
|
|
afc530ea41 | ||
|
|
fda7b4c79d | ||
|
|
fca652eeea | ||
|
|
70cbfb199d | ||
|
|
a2810c06d7 | ||
|
|
d66f93cecd | ||
|
|
c27c2be584 | ||
|
|
22b493a6ff | ||
|
|
e157147253 | ||
|
|
cd856cb213 | ||
|
|
ed84b58af5 | ||
|
|
dc7022cd61 | ||
|
|
548e104171 | ||
|
|
8d9be18b29 | ||
|
|
bc45e5c6de | ||
|
|
e64f727529 | ||
|
|
a91bf01429 | ||
|
|
71e510540e | ||
|
|
de86403f33 | ||
|
|
b72ca57775 | ||
|
|
2393de5d6b | ||
|
|
23ad2f02c0 | ||
|
|
5da3d911cf | ||
|
|
18b076861e | ||
|
|
03dc760ca0 | ||
|
|
ef9d825cfa | ||
|
|
38f6d60e6e | ||
|
|
bae7e93a9c | ||
|
|
b67ded9f27 | ||
|
|
f9c6bc63df | ||
|
|
bdba044a80 | ||
|
|
5f4a6069c5 | ||
|
|
94e543bc39 | ||
|
|
580d09084d | ||
|
|
e089478a1c | ||
|
|
88ff13c241 | ||
|
|
9067b2848a | ||
|
|
9f5e9eb38d | ||
|
|
a6599404e4 | ||
|
|
0d8d51084f | ||
|
|
5948adfa10 | ||
|
|
fbb307cca0 | ||
|
|
4e8a9a1cd4 | ||
|
|
ca1093f848 | ||
|
|
a7181bd304 | ||
|
|
76e4e233ad | ||
|
|
f01d745d70 | ||
|
|
d44fe4ec62 | ||
|
|
72bf02bf15 | ||
|
|
357d17ae58 | ||
|
|
1d1ba40965 | ||
|
|
3b30765378 | ||
|
|
377c8a13de | ||
|
|
201b09f99a | ||
|
|
44b83c6ea6 | ||
|
|
12ca70537f | ||
|
|
ba0c41436c | ||
|
|
fabaf4f1f0 | ||
|
|
90ceb5218c | ||
|
|
9329e175d8 | ||
|
|
0af08eca1f | ||
|
|
45afbe5d9c | ||
|
|
c47866d251 | ||
|
|
7315962880 | ||
|
|
a6fe92194f | ||
|
|
1576551741 | ||
|
|
178798ef87 | ||
|
|
871dfd399b | ||
|
|
671e38fb65 | ||
|
|
e1bae3771e | ||
|
|
215c763d53 | ||
|
|
429828cd92 | ||
|
|
22659a7fea | ||
|
|
9b0f00baf3 | ||
|
|
93141f4b6d | ||
|
|
c3deafabda | ||
|
|
c92e48ce3f | ||
|
|
5f25c117eb | ||
|
|
cf880f78d5 | ||
|
|
6e7e5d5fd5 | ||
|
|
7964f30dcb | ||
|
|
21649100b1 | ||
|
|
7d39fd6678 | ||
|
|
2c505efd1e | ||
|
|
d344054e5a | ||
|
|
d084aed5e9 | ||
|
|
736e632215 | ||
|
|
51e01cceca | ||
|
|
936dd0f3bc | ||
|
|
15f491e500 | ||
|
|
5817dab89e | ||
|
|
a56243075a | ||
|
|
84a4f761f3 | ||
|
|
d4d505c868 | ||
|
|
08fd0715f9 | ||
|
|
26de12d9bf | ||
|
|
2b3c55f20d | ||
|
|
e9f1e868e2 | ||
|
|
827ea43478 | ||
|
|
bb152612e0 | ||
|
|
cfe3af099c | ||
|
|
f0b2ea64fc | ||
|
|
2707891966 | ||
|
|
d8a68dc0f1 | ||
|
|
253eb778d1 | ||
|
|
988391fc37 | ||
|
|
b1603f166e | ||
|
|
8e995b97cc | ||
|
|
2c616bd279 | ||
|
|
8c2940a98b | ||
|
|
40ff3cac39 | ||
|
|
53b5a45856 | ||
|
|
313fe3861b | ||
|
|
22b132e28f | ||
|
|
b0aaa77f02 | ||
|
|
ee0a1bec6c | ||
|
|
c74c07eed1 | ||
|
|
6518da7c01 | ||
|
|
a6e04ab051 | ||
|
|
651b2158ba | ||
|
|
42a210b571 | ||
|
|
9f359dfffa | ||
|
|
d9d40888ce | ||
|
|
2a50931684 | ||
|
|
0867e4fae9 | ||
|
|
fa831206c6 | ||
|
|
e72173dc43 | ||
|
|
4659b51b50 | ||
|
|
ffa6b99ab6 | ||
|
|
524bf9e858 | ||
|
|
b7ec9fbb0e | ||
|
|
e73d7725df | ||
|
|
b909a5ec18 | ||
|
|
1650b59cd9 | ||
|
|
bf5365b317 | ||
|
|
ba0a758d8c | ||
|
|
49da6a8d80 | ||
|
|
34ee5ab9a8 | ||
|
|
fa910966ed | ||
|
|
d0354b8440 | ||
|
|
2f647c443a | ||
|
|
c1ef19bef9 | ||
|
|
6c2856df23 | ||
|
|
fc47f0f27b | ||
|
|
76af536d0d | ||
|
|
34be795bc1 | ||
|
|
7e224b6834 | ||
|
|
de9f79133f | ||
|
|
080823bdee | ||
|
|
21c373b55d | ||
|
|
47278a6e4e | ||
|
|
e7b33e9ae7 | ||
|
|
af6971f823 | ||
|
|
2dc1b7282a | ||
|
|
1d8a427753 | ||
|
|
deb2e50296 | ||
|
|
c1bae04203 | ||
|
|
24003c76d1 | ||
|
|
a60a18b080 | ||
|
|
9c6d9dfc5c | ||
|
|
41c9dc973d | ||
|
|
fe7ab662f0 | ||
|
|
200f66537c | ||
|
|
0823254c3b | ||
|
|
fb2488235a | ||
|
|
4f3f881c9b | ||
|
|
540c79e6ad | ||
|
|
b13735b400 | ||
|
|
b383ff0b96 | ||
|
|
ce7204fa17 | ||
|
|
d9ea240122 | ||
|
|
67f3f4c1d8 | ||
|
|
a75af474f7 | ||
|
|
e31ec57f88 | ||
|
|
0976c3024f | ||
|
|
cb868a604c | ||
|
|
4cb0bfe939 | ||
|
|
bc1d97b2a7 | ||
|
|
6e50a1e9f5 | ||
|
|
ac88ae86a3 | ||
|
|
cfe0370280 | ||
|
|
60a2704b04 | ||
|
|
65cad14f9b | ||
|
|
fdf939a6f9 | ||
|
|
2dbdcf3636 | ||
|
|
5375dd6756 | ||
|
|
cdb77f0ecd | ||
|
|
43b5777709 | ||
|
|
35f53abc78 | ||
|
|
73c52d1677 | ||
|
|
ae45a39dc1 | ||
|
|
7ab13e0f17 | ||
|
|
6c0b194382 | ||
|
|
7adf065b10 | ||
|
|
6ea7aae29c | ||
|
|
11fbc41e4b | ||
|
|
ba1f4bbe91 | ||
|
|
ea0517b539 | ||
|
|
f6e821fd33 | ||
|
|
3820a65299 | ||
|
|
0efd6a881a | ||
|
|
8653db6df0 | ||
|
|
cb8d0fa874 | ||
|
|
fc3c7760a5 | ||
|
|
b6155375ae | ||
|
|
ad3a21f260 | ||
|
|
5a827417d9 | ||
|
|
a39c73672e | ||
|
|
d90b71bc55 | ||
|
|
cc5c8a444d | ||
|
|
3a7c8d7ae4 | ||
|
|
0fd6a22a86 | ||
|
|
3ab05ddd25 | ||
|
|
76f6d75ef8 | ||
|
|
fa7deb10f6 | ||
|
|
e235b57234 | ||
|
|
c18ea4de14 | ||
|
|
37e6870f64 | ||
|
|
a622eccecb | ||
|
|
a3b3d19d80 | ||
|
|
d09cbfcf84 | ||
|
|
88913ec89b | ||
|
|
8058f2fdf0 | ||
|
|
48276be277 | ||
|
|
1e07358ac2 | ||
|
|
a1c830cd3c | ||
|
|
49ded3aa77 | ||
|
|
5ab0eaa06d | ||
|
|
9884eed0cf | ||
|
|
5b202a158a | ||
|
|
a0cfe0d123 | ||
|
|
57cea0c623 | ||
|
|
739b7cc2ac | ||
|
|
d5aed82b11 | ||
|
|
8eeab7ea3f | ||
|
|
46ce66a829 | ||
|
|
b155b9d80b | ||
|
|
260ab73969 | ||
|
|
23f2658091 | ||
|
|
d1311c53ee | ||
|
|
a431c4a665 | ||
|
|
b296b36d2b | ||
|
|
667cafc13e | ||
|
|
9f3cee021e | ||
|
|
6016b942d6 | ||
|
|
afb72dc795 | ||
|
|
16ecda951b | ||
|
|
cdc86965cb | ||
|
|
422490d75c | ||
|
|
d46c7bcaf9 | ||
|
|
cfb120d179 | ||
|
|
fe73023940 | ||
|
|
86b14058fd | ||
|
|
ce2b2422d6 | ||
|
|
9e0ab22dd0 | ||
|
|
978a29ab72 | ||
|
|
36e862c989 | ||
|
|
33c8c2bd7e | ||
|
|
52ccaa605e | ||
|
|
ed90efb05b | ||
|
|
2e3a6e2559 | ||
|
|
c8e9abff53 | ||
|
|
43acad81b3 | ||
|
|
21becb0feb | ||
|
|
923950ccaa | ||
|
|
5a43173e55 | ||
|
|
1e919a5e97 | ||
|
|
91a8c08f03 | ||
|
|
0b757ad12f | ||
|
|
0adff214c3 | ||
|
|
2a7ca69a82 | ||
|
|
3fcdafebc2 | ||
|
|
85f765a533 | ||
|
|
e8c84bdf56 | ||
|
|
e48576ada3 | ||
|
|
4142708d9d | ||
|
|
6e2d856d85 | ||
|
|
9315ad3d2c | ||
|
|
13b4ab10ae | ||
|
|
c72e2588f3 | ||
|
|
7c510109cd | ||
|
|
359677b673 | ||
|
|
747647e02a | ||
|
|
0b57bad2de | ||
|
|
114c3b4efe | ||
|
|
e4f44139a1 | ||
|
|
f23aeb44e2 | ||
|
|
b2a225a52e | ||
|
|
dea6584018 | ||
|
|
bb3338df63 | ||
|
|
6fd894aae0 | ||
|
|
cb52754e6c | ||
|
|
40adb7feb6 | ||
|
|
48606e05c1 | ||
|
|
8b79ae6695 | ||
|
|
94f1ca2e09 | ||
|
|
dd086791ac | ||
|
|
20aa6dde06 | ||
|
|
eec4345a7c | ||
|
|
59a86d3171 | ||
|
|
98202e626c | ||
|
|
1be7e5048c | ||
|
|
8cc6647ebf | ||
|
|
321dce1f47 | ||
|
|
bba85a2074 | ||
|
|
483d96a89d | ||
|
|
168ab2b065 | ||
|
|
b131b37451 | ||
|
|
8620dc05de | ||
|
|
d8f7cb2f55 | ||
|
|
fd3793b8cf | ||
|
|
bba7ccb07f | ||
|
|
5912f0a849 | ||
|
|
cb7cd03919 | ||
|
|
bc541b918c | ||
|
|
3c14902649 | ||
|
|
92337baa5a | ||
|
|
f9663b8f4f | ||
|
|
113cf4208b | ||
|
|
18216a6e33 | ||
|
|
703dc8299c | ||
|
|
bd7ebbcd5b | ||
|
|
d586a633ff | ||
|
|
9feb657763 | ||
|
|
cc43ab9a81 | ||
|
|
66d5559866 | ||
|
|
e968928613 | ||
|
|
e282ad25a8 | ||
|
|
82cae27737 | ||
|
|
75625801f5 | ||
|
|
b392afac3c | ||
|
|
672f6c44b8 | ||
|
|
ea9a549bbd | ||
|
|
5c975dd4ed | ||
|
|
d8ac267f41 | ||
|
|
63031f571a | ||
|
|
982f73fa6d | ||
|
|
3b12a9293c | ||
|
|
654f7f707c | ||
|
|
66abe2e3d4 | ||
|
|
b3b6210886 | ||
|
|
01ce066d43 | ||
|
|
4ab7a290cd | ||
|
|
81dea2d8e7 | ||
|
|
0006585391 | ||
|
|
639ac5c3da | ||
|
|
765740b829 | ||
|
|
07c34751da | ||
|
|
fa4cbad315 | ||
|
|
a59cd94625 | ||
|
|
605dd3a982 | ||
|
|
3719db352a | ||
|
|
fa15854a54 | ||
|
|
dd871e791c | ||
|
|
3dbd32093c | ||
|
|
1ec6190e86 | ||
|
|
73f94f3755 | ||
|
|
c14071df9d | ||
|
|
dba4f3122e | ||
|
|
4322632c59 | ||
|
|
0057bb4ef6 | ||
|
|
03b8c6841b | ||
|
|
fdecc11128 | ||
|
|
5aff8bfb59 | ||
|
|
487c5cc294 | ||
|
|
ee9df32dba | ||
|
|
655e942597 | ||
|
|
be90ad89a8 | ||
|
|
05b1ec008b | ||
|
|
07bdba687f | ||
|
|
f499f343ba | ||
|
|
acd93c2971 | ||
|
|
9446489cf3 | ||
|
|
2ba65f4fba | ||
|
|
60318c96d0 | ||
|
|
c1d0693cb1 | ||
|
|
5ec8c5f71b | ||
|
|
c1474e1877 | ||
|
|
26d58e0446 | ||
|
|
7fc9b5b3f9 | ||
|
|
0e2f6691bf | ||
|
|
11e12680eb | ||
|
|
13c00afc68 | ||
|
|
5022b618aa | ||
|
|
5238b9439e | ||
|
|
9a2be227a6 | ||
|
|
fe94622ea3 | ||
|
|
567428fb34 | ||
|
|
815ead7107 | ||
|
|
7ea131d4ff | ||
|
|
547788b1b0 | ||
|
|
417f018498 | ||
|
|
2c454863f2 | ||
|
|
f965f41b6e | ||
|
|
119bea22aa | ||
|
|
bb346a3ae1 | ||
|
|
abb9b7f46f | ||
|
|
c934222a80 | ||
|
|
8135752a32 | ||
|
|
34d0e1b2c3 | ||
|
|
fbd5e4d5af | ||
|
|
0de1d1dd58 | ||
|
|
a22711a7b5 | ||
|
|
c4b8c11529 | ||
|
|
666ef48239 | ||
|
|
7ec1b7e90a | ||
|
|
a8c4de17da | ||
|
|
643eda5c2d | ||
|
|
4b81a98e4a | ||
|
|
beff83ecd2 | ||
|
|
5797752572 | ||
|
|
cb34502728 | ||
|
|
9796feccb7 | ||
|
|
c0ce323092 | ||
|
|
b9894c1d09 | ||
|
|
5718f96934 | ||
|
|
ea509a6d72 | ||
|
|
3068e2688d | ||
|
|
68f6ddc5aa | ||
|
|
1878630b59 | ||
|
|
702218008e | ||
|
|
202362d925 | ||
|
|
393267489c | ||
|
|
a92bcbb795 | ||
|
|
164de5e22b | ||
|
|
8f69b5c7a2 | ||
|
|
dda2eb84f7 | ||
|
|
957f334012 | ||
|
|
94af56789a | ||
|
|
d68e607aa5 | ||
|
|
d2a4bc4d73 | ||
|
|
f63c4a9bcb | ||
|
|
05f2808849 | ||
|
|
2c3a014f03 | ||
|
|
c924a841c7 | ||
|
|
7299eb72e0 | ||
|
|
238f39a42e | ||
|
|
09e53367a2 | ||
|
|
b143dad596 | ||
|
|
16ae675107 | ||
|
|
12fc590b34 | ||
|
|
c29b01ce75 | ||
|
|
befb4bc1c1 | ||
|
|
32c7ebc51d | ||
|
|
65159d65c8 | ||
|
|
3ff6c9bb79 | ||
|
|
84f7c966f7 | ||
|
|
8464e43eaf | ||
|
|
4bef3ce284 | ||
|
|
396f1a0a33 | ||
|
|
7c0f4a9b18 | ||
|
|
49a739c8d6 | ||
|
|
12b2d57629 | ||
|
|
95cfaa1b37 | ||
|
|
acc7c0f706 | ||
|
|
1c1a3033be | ||
|
|
384305f4aa | ||
|
|
7aef0fed29 | ||
|
|
4d49d7b5a6 | ||
|
|
f35d62b759 | ||
|
|
6a7b0ef904 | ||
|
|
ce239333d5 | ||
|
|
0f3c25b265 | ||
|
|
790de35e7f | ||
|
|
218f437b0c | ||
|
|
7336dfad02 | ||
|
|
00fca40939 | ||
|
|
8a0f23915e | ||
|
|
8305d409d2 | ||
|
|
5c251b6928 | ||
|
|
bde3ff16ad | ||
|
|
39434e383b | ||
|
|
76fa75b394 | ||
|
|
32a9c0ca80 | ||
|
|
fd3e1061e0 | ||
|
|
cf754b9483 | ||
|
|
5cc1256fd6 | ||
|
|
7101f44998 | ||
|
|
22ee366ed6 | ||
|
|
75d164037f | ||
|
|
a5ea21cd85 | ||
|
|
5110f80bba | ||
|
|
4ee0f90b46 | ||
|
|
ddc830be5c | ||
|
|
170eb3ac68 | ||
|
|
82f0bd9009 | ||
|
|
d0a2e655c9 | ||
|
|
1543833ca0 | ||
|
|
4e3377333f | ||
|
|
a681d1ec02 | ||
|
|
38faf2c51a | ||
|
|
31fdc645ed | ||
|
|
1000b02b18 | ||
|
|
5136fc9ab7 | ||
|
|
04c1a81509 | ||
|
|
b64ad7a2a6 | ||
|
|
3f6baa45a7 | ||
|
|
52a46e61f9 | ||
|
|
558c67d392 | ||
|
|
d73dff4d5b | ||
|
|
b94f85de22 | ||
|
|
1fc3524e40 | ||
|
|
ebc506dae8 | ||
|
|
6221b282d4 | ||
|
|
db24fb792c | ||
|
|
d311b1b9b7 | ||
|
|
3c40eb9e5a | ||
|
|
df49c609a0 | ||
|
|
3d6fd601c5 | ||
|
|
ef6c7bd726 | ||
|
|
d613bf69bf | ||
|
|
cfddb7f3cd | ||
|
|
c6af5f0a27 | ||
|
|
e433525f51 | ||
|
|
ab66a3d0d3 | ||
|
|
d0a2eca19b | ||
|
|
ec8404c375 | ||
|
|
766ee65328 | ||
|
|
bf2abc3b68 | ||
|
|
5a89c6f803 | ||
|
|
74e1320a0b | ||
|
|
eaec21f199 | ||
|
|
8c056aebe1 | ||
|
|
d1a31850ce | ||
|
|
d53e5646ec | ||
|
|
5fe2916ee1 | ||
|
|
acc667fbef | ||
|
|
80890cd9dd | ||
|
|
6b5f4ed244 | ||
|
|
4242b05462 | ||
|
|
a21b30c901 | ||
|
|
ddccea75e8 | ||
|
|
da2fae0e43 | ||
|
|
a3cd218719 | ||
|
|
0c7df37351 | ||
|
|
cf002a4611 | ||
|
|
be4f40741f | ||
|
|
70e2df3904 | ||
|
|
f1ebad2508 | ||
|
|
348d3af0fc | ||
|
|
9915d3c3be | ||
|
|
907f229757 | ||
|
|
58ba290a9f | ||
|
|
b22f0f2ef5 | ||
|
|
bcc5c51630 | ||
|
|
16a04e64f2 | ||
|
|
c8147fb7b9 | ||
|
|
0fa6927171 | ||
|
|
99ebb869bf | ||
|
|
44eafb15e0 | ||
|
|
cb877734f0 | ||
|
|
792cd0aa10 | ||
|
|
028775a086 | ||
|
|
2cf4fed11b | ||
|
|
e34d134102 | ||
|
|
8564eb9f7e | ||
|
|
9f52408e70 | ||
|
|
a3780032bf | ||
|
|
e4bb419707 | ||
|
|
5e0b2b260c | ||
|
|
b58b6b9bac | ||
|
|
f3ac378ca4 | ||
|
|
56f777b2fc | ||
|
|
e40c1c62ce | ||
|
|
8e8ec8f5f8 | ||
|
|
5bdc115943 | ||
|
|
739066ec56 | ||
|
|
12224c7f59 | ||
|
|
8c3095faf0 | ||
|
|
410b35e913 | ||
|
|
2e48d39fc7 | ||
|
|
488a042736 | ||
|
|
71765957e4 | ||
|
|
68205dec9f | ||
|
|
4499743522 | ||
|
|
54252ede31 | ||
|
|
faa069a126 | ||
|
|
20aade56c3 | ||
|
|
1f2adb05b5 | ||
|
|
4afde4e738 | ||
|
|
364b783281 | ||
|
|
58fc2c679b | ||
|
|
923504ce3d | ||
|
|
2e868566d7 | ||
|
|
e252c634cb | ||
|
|
1803c65e40 | ||
|
|
489d956283 | ||
|
|
076c382a74 | ||
|
|
3b6385b146 | ||
|
|
714b955d6e | ||
|
|
b855f671a5 | ||
|
|
4e52adb84a | ||
|
|
d227f6184e | ||
|
|
88167f39a6 | ||
|
|
c8a8aa0d43 | ||
|
|
6b5f25802e | ||
|
|
f8c1eb157d | ||
|
|
59665ade85 | ||
|
|
c1f6e259a9 | ||
|
|
03b89ab712 | ||
|
|
ae3e9d4881 | ||
|
|
cad53fa191 | ||
|
|
0e682d936d | ||
|
|
cec30e23b2 | ||
|
|
47129428fe | ||
|
|
2f30a27b2b | ||
|
|
8be1d134aa | ||
|
|
7e0799ff21 | ||
|
|
9d84609b3f | ||
|
|
c64852dbcc | ||
|
|
bcacaaa4f4 | ||
|
|
d00e2731e5 | ||
|
|
99a1551b20 | ||
|
|
ac69538707 | ||
|
|
16ab949110 | ||
|
|
82cc5f63ae | ||
|
|
9d2166a964 | ||
|
|
0c29650bfa | ||
|
|
af21a32cef | ||
|
|
5235124460 | ||
|
|
2e2e36cc72 | ||
|
|
db7c34a9df | ||
|
|
a1b4547a53 | ||
|
|
57f95c1dc7 | ||
|
|
1d519854e2 | ||
|
|
292f7ada8e | ||
|
|
65158d39b0 | ||
|
|
7c278d6ac2 | ||
|
|
429077a5a0 | ||
|
|
2656a2d038 | ||
|
|
3f03197dae | ||
|
|
83258456d3 | ||
|
|
936a8c0e3b | ||
|
|
b1870631a4 | ||
|
|
859a1999cb | ||
|
|
f3e1797153 | ||
|
|
7bfa609f38 | ||
|
|
822b05106d | ||
|
|
55ed0ff07c | ||
|
|
07590196a5 | ||
|
|
c37ea26dc7 | ||
|
|
697c2b5dc1 | ||
|
|
a0cfa3ca21 | ||
|
|
e58e2f5ee4 | ||
|
|
45134de740 | ||
|
|
f3ce1f07c4 | ||
|
|
ddc17196da | ||
|
|
fdcc1af4e2 | ||
|
|
901ddf7737 | ||
|
|
4a54b8c451 | ||
|
|
4dc283c0fb | ||
|
|
f1a5cf9128 | ||
|
|
a5909d82eb | ||
|
|
59b7386abb | ||
|
|
7bd2fbe2b1 | ||
|
|
623469cb6c | ||
|
|
663d725026 | ||
|
|
1860b3dff9 | ||
|
|
03faec9d41 | ||
|
|
2b3ea9770b | ||
|
|
30fa30bd4a | ||
|
|
faa54e59c1 | ||
|
|
93ae7bb0d2 | ||
|
|
3c7181d28f | ||
|
|
6fecb150d6 | ||
|
|
56559162d3 | ||
|
|
1f4ed49b4c | ||
|
|
57c6caf146 | ||
|
|
4bb5ba78b0 | ||
|
|
9d9c23e315 | ||
|
|
1a6b7de0af | ||
|
|
b2b42f759c | ||
|
|
7139c1aff7 | ||
|
|
1e60919d47 | ||
|
|
011fdd91df | ||
|
|
0994efa66f | ||
|
|
8ccde784f9 | ||
|
|
d52878c744 | ||
|
|
ca19e52266 | ||
|
|
e76af886bf | ||
|
|
b4b280c4ff | ||
|
|
764ed01688 | ||
|
|
d1c8fa6bbd | ||
|
|
8ce498ee53 | ||
|
|
d5166918e9 | ||
|
|
0d97c3ce13 | ||
|
|
19cff8ecca | ||
|
|
bb2e847363 | ||
|
|
a008c21cf0 | ||
|
|
9016ce8dd8 | ||
|
|
79cd58bdf3 | ||
|
|
d1e5d92191 | ||
|
|
cb382fa76b | ||
|
|
e6c0ec7278 | ||
|
|
3cdf108057 | ||
|
|
688030ecb6 | ||
|
|
589c4fb30f | ||
|
|
b20e972bec | ||
|
|
a8a2e3231c | ||
|
|
4bdf52fc1e | ||
|
|
0b82a05a75 | ||
|
|
80c97ca21b | ||
|
|
2491c99b37 | ||
|
|
cf534d4726 | ||
|
|
5689086202 | ||
|
|
bd64ed1e93 | ||
|
|
995861de4d | ||
|
|
56a0131778 | ||
|
|
e125e70fa0 | ||
|
|
5f10d982ac | ||
|
|
0bb3943698 | ||
|
|
2d9b3aa537 | ||
|
|
8e14545282 | ||
|
|
2eedc330bf | ||
|
|
0ed3edc99e | ||
|
|
0c0708076e | ||
|
|
3847e248df | ||
|
|
af927ffdaf | ||
|
|
c03d403437 | ||
|
|
c48644490f | ||
|
|
54927dc0e0 | ||
|
|
705cf6113d | ||
|
|
9022f5034f | ||
|
|
e8e8d12168 | ||
|
|
fad4ddbcaf | ||
|
|
bd992e7baf | ||
|
|
0031f388ac | ||
|
|
447bad9dbd | ||
|
|
89a48e365c | ||
|
|
1cfea1113a | ||
|
|
6488a392a3 | ||
|
|
600c9dd27d | ||
|
|
e380462532 | ||
|
|
94e0e5ab7d | ||
|
|
8613382869 | ||
|
|
df17c33898 | ||
|
|
ddf17d93ac | ||
|
|
c8ee08c24b | ||
|
|
84adf77bf3 | ||
|
|
f75dcc7f4c | ||
|
|
842b8cf323 | ||
|
|
b5918a1faa | ||
|
|
d0c6559204 | ||
|
|
6d012f628b | ||
|
|
726852e3d3 | ||
|
|
83b385a290 | ||
|
|
ec85458612 | ||
|
|
73dcbf7ba2 | ||
|
|
f80fe97763 | ||
|
|
cbf1d07073 | ||
|
|
8284bef072 | ||
|
|
fd5d061d49 | ||
|
|
32fbc0d334 | ||
|
|
1337a8dfb1 | ||
|
|
3440a8a0bf | ||
|
|
5e891ea981 | ||
|
|
adda54ac55 | ||
|
|
cebb149f5c | ||
|
|
e1c0862658 | ||
|
|
21fd31dad8 | ||
|
|
957f80c623 | ||
|
|
1c51e12c18 | ||
|
|
872b249711 | ||
|
|
1146f25015 | ||
|
|
45e15f62f5 | ||
|
|
7f638f0b2d | ||
|
|
5a52e86546 | ||
|
|
a88f609b8a | ||
|
|
61e8ae2f7b | ||
|
|
b46e1ca97e | ||
|
|
fb7c03ff4d | ||
|
|
2544d2c952 | ||
|
|
ea7c2fc673 | ||
|
|
9a11a94894 | ||
|
|
cbf162ca64 | ||
|
|
85d20cd61b | ||
|
|
94976d63ca | ||
|
|
cb47a9e97f | ||
|
|
ad5894e486 | ||
|
|
63d9c070ef | ||
|
|
f15d23b496 | ||
|
|
4c5968097d | ||
|
|
159c4d56cd | ||
|
|
f3e78c8f3c | ||
|
|
a20a5b437d | ||
|
|
8d9752a557 | ||
|
|
1345a8c67c | ||
|
|
83fad0fb59 | ||
|
|
e9d017ba08 | ||
|
|
d8c6168d11 | ||
|
|
dd3f38fe5b | ||
|
|
a38bca3438 | ||
|
|
5f50fe7a4a | ||
|
|
b8e7b8e2e1 | ||
|
|
2f0166b945 | ||
|
|
d790229a33 | ||
|
|
8c99a87aa8 | ||
|
|
fe14b0b82e | ||
|
|
aa5b29e2f2 | ||
|
|
382726fde4 | ||
|
|
c2cb2bef96 | ||
|
|
09f633596d | ||
|
|
42a25f2f26 | ||
|
|
6d59047c5f | ||
|
|
ad7c05778f | ||
|
|
f02368141f | ||
|
|
649b9cc195 | ||
|
|
1f5a6f1341 | ||
|
|
da4c2d530d | ||
|
|
2da367a2be | ||
|
|
079c59b929 | ||
|
|
5b701962dc | ||
|
|
c595632b92 | ||
|
|
c5610398d5 | ||
|
|
a7f4448f34 | ||
|
|
7807a4f738 | ||
|
|
e5d294df32 | ||
|
|
d0b6f3663b | ||
|
|
c71aff99db | ||
|
|
5d33d5a7d9 | ||
|
|
512ffa2bf4 | ||
|
|
d0440eef25 | ||
|
|
5deca66a7d | ||
|
|
58ec49a34d | ||
|
|
d223ac0379 | ||
|
|
113a3809ab | ||
|
|
fb34c6c7b9 | ||
|
|
7869294a26 | ||
|
|
61a0158877 | ||
|
|
fa93480d9a | ||
|
|
063f69d51d | ||
|
|
c54a85ee64 | ||
|
|
48083608b5 | ||
|
|
393a6c5edf | ||
|
|
0d96528d2f | ||
|
|
2ba54a69be | ||
|
|
382694f593 | ||
|
|
94106cc41f | ||
|
|
3aa0410f6e | ||
|
|
52e174b1f7 | ||
|
|
7a894e3738 | ||
|
|
fd450b7f9a | ||
|
|
04b611df1c | ||
|
|
64fc464e03 | ||
|
|
d792e95c21 | ||
|
|
a125b0fbc3 | ||
|
|
a216225827 | ||
|
|
0dfe511370 | ||
|
|
d4cc2d3503 | ||
|
|
d5f38f5690 | ||
|
|
c01f0ae825 | ||
|
|
81bbe8c93b | ||
|
|
26e84de180 | ||
|
|
b4e7a5b1c6 | ||
|
|
7f1d2b28c1 | ||
|
|
29fa57e9b3 | ||
|
|
13f39afbdd | ||
|
|
3073511e30 | ||
|
|
6c4432d417 | ||
|
|
e45db42e94 | ||
|
|
375ca542ab | ||
|
|
0202b05a5d | ||
|
|
ab0473ef93 | ||
|
|
d6a92b18d4 | ||
|
|
5e623f14f3 | ||
|
|
22c77c607e | ||
|
|
b777d6aa3f | ||
|
|
4b3e56ec23 | ||
|
|
4df2e1ef5c | ||
|
|
67f9783e6a | ||
|
|
6eaa404187 | ||
|
|
0045ce4cde | ||
|
|
465b0a79d8 | ||
|
|
ad8e92e9c6 | ||
|
|
edfb874527 | ||
|
|
c2d9c1a6f1 | ||
|
|
81a5813270 | ||
|
|
08e2696627 | ||
|
|
c9693b4746 | ||
|
|
ceb4357a8d | ||
|
|
fc986a3fbe | ||
|
|
0d2cccc2ce | ||
|
|
8af42d42da | ||
|
|
81ff253e68 | ||
|
|
e68f8e79ea | ||
|
|
e1fcffcc81 | ||
|
|
f3e78e50ff | ||
|
|
c14900dbb0 | ||
|
|
0aa76d3e5b | ||
|
|
622bfd4f08 | ||
|
|
1077109e11 | ||
|
|
ed7d7b405e | ||
|
|
41d80ba17b | ||
|
|
bdf99e0981 | ||
|
|
acdc19d1b7 | ||
|
|
7f9c335487 | ||
|
|
1f8290ca44 | ||
|
|
215780ab56 | ||
|
|
a6d4ce2630 | ||
|
|
0c77a96249 | ||
|
|
d92fde6980 | ||
|
|
87f50659db | ||
|
|
689630d261 | ||
|
|
848c54dc47 | ||
|
|
9845029a75 | ||
|
|
375cc67ba6 | ||
|
|
380c1522ac | ||
|
|
4dd7be7ed0 | ||
|
|
12fad65991 | ||
|
|
be58138100 | ||
|
|
5c79ee4446 | ||
|
|
d48140cab3 | ||
|
|
3cf038f300 | ||
|
|
dabbb6df65 | ||
|
|
8871fb4e0e | ||
|
|
eecee75336 | ||
|
|
83505e61f3 | ||
|
|
6a58db66f7 | ||
|
|
af54832d24 | ||
|
|
86b417e83f | ||
|
|
f34838688e | ||
|
|
bcb1166e52 | ||
|
|
8d1637f567 | ||
|
|
b03614527b | ||
|
|
9b509f6478 | ||
|
|
89c69a1d25 | ||
|
|
06bfe19f05 | ||
|
|
6e8085b839 | ||
|
|
f5ec2470db | ||
|
|
7394ee7c72 | ||
|
|
b2d23b91e7 | ||
|
|
2ce109eb53 | ||
|
|
823fb2995b | ||
|
|
1e2c1ae98a | ||
|
|
b457e88cd0 | ||
|
|
e97478cc1e | ||
|
|
2d8383d3c8 | ||
|
|
1c4d8f36e4 | ||
|
|
e94da808cb | ||
|
|
a1c0bb68dd | ||
|
|
774e9d24a1 | ||
|
|
9a264a4284 | ||
|
|
0172939490 | ||
|
|
24613a60dc | ||
|
|
acc8f7fadc | ||
|
|
df335682e4 | ||
|
|
de4ea8e6f4 | ||
|
|
2c36d5ff45 | ||
|
|
f1295b506d | ||
|
|
fbcc6d0d25 | ||
|
|
fc92abec2c | ||
|
|
52bb149541 | ||
|
|
9caf32befe | ||
|
|
47d3b3dd58 | ||
|
|
a1c2749380 | ||
|
|
945798f913 | ||
|
|
6d02c0d392 | ||
|
|
ec74fc05d4 | ||
|
|
46b932ccc0 | ||
|
|
f85f77f6cc | ||
|
|
6a4b4f3449 | ||
|
|
d0473d6d83 | ||
|
|
70bf1a5711 | ||
|
|
bacc5aa6d3 | ||
|
|
44a12cd070 | ||
|
|
29c46cdf34 | ||
|
|
552f5b2693 | ||
|
|
d5d9746ca3 | ||
|
|
1287fc3266 | ||
|
|
508f116738 | ||
|
|
a5946a969f | ||
|
|
472ad43211 | ||
|
|
603c790213 | ||
|
|
62e0e18030 | ||
|
|
6bb10ccc3b | ||
|
|
d30ca5aa8c | ||
|
|
489994054a | ||
|
|
fffd981058 | ||
|
|
9326d0a6dd | ||
|
|
74faa30af6 | ||
|
|
b0a9bbf33a | ||
|
|
6b2ec23132 | ||
|
|
ed1cb9edca | ||
|
|
17f2f12ce6 | ||
|
|
12bdb5f550 | ||
|
|
8d1f96cc0a | ||
|
|
a4049fb85c | ||
|
|
762a93fec8 | ||
|
|
f9e891909d | ||
|
|
a6e9bab298 | ||
|
|
3f5a075280 | ||
|
|
bb55307a9d | ||
|
|
422dc05bb0 | ||
|
|
ebf4686858 | ||
|
|
9a8f45ee30 | ||
|
|
aca3181b7e | ||
|
|
fd0230e5be | ||
|
|
0d25bb85d9 | ||
|
|
dac93ed616 | ||
|
|
8b7d4b0c9e | ||
|
|
499bc404e8 | ||
|
|
a81d835e4d | ||
|
|
54eaf239ac | ||
|
|
961e4da7d8 | ||
|
|
b178414a47 | ||
|
|
f54c90a0ba | ||
|
|
ee167e53d1 | ||
|
|
8f733461b3 | ||
|
|
82beaabf6a | ||
|
|
8d7ddf5299 | ||
|
|
6fd011a3b6 | ||
|
|
4056c046a7 | ||
|
|
e3cad04dec | ||
|
|
a9930bfd87 | ||
|
|
1428dcee21 | ||
|
|
f3b71a73e3 | ||
|
|
380d9862c3 | ||
|
|
b6c0e53d69 | ||
|
|
e95bb34ea0 | ||
|
|
9e0de57a82 | ||
|
|
f6ff1f18b8 | ||
|
|
7595a5dfcb | ||
|
|
1e5353824a | ||
|
|
4704a0a288 | ||
|
|
6a2e82a23d | ||
|
|
1818dffaec | ||
|
|
b2112729fa | ||
|
|
32bed50ba1 | ||
|
|
5b561f434d | ||
|
|
750d70c202 | ||
|
|
34689cb3f3 | ||
|
|
ba225017c4 | ||
|
|
507241f73c | ||
|
|
55c689722a | ||
|
|
8a1b51c716 | ||
|
|
dfe77eac84 | ||
|
|
75cd9cd2de | ||
|
|
1aebe33a34 | ||
|
|
d70a30c056 | ||
|
|
00348756bc | ||
|
|
2577b803f6 | ||
|
|
928dde590c | ||
|
|
5fbb24353a | ||
|
|
35fe4313d5 | ||
|
|
9f0c292144 | ||
|
|
d812c685c9 | ||
|
|
9a9987aeed | ||
|
|
5582901ca5 | ||
|
|
ded221fba2 | ||
|
|
ab745d3b0e | ||
|
|
b915c7a870 | ||
|
|
6c26255979 | ||
|
|
e2c4525da7 | ||
|
|
e778e127d6 | ||
|
|
a4e6f0b3c6 | ||
|
|
048e7771fb | ||
|
|
15c229300c | ||
|
|
24814a4f0f | ||
|
|
6188e64473 | ||
|
|
c34b0c67a1 | ||
|
|
a0008c3508 | ||
|
|
7e6b72cb5c | ||
|
|
e3da85faed | ||
|
|
491c23a728 | ||
|
|
351516c57c | ||
|
|
e8a131e05c | ||
|
|
8c7b764d47 | ||
|
|
bf798c8dec | ||
|
|
53dbdf3dd2 | ||
|
|
905b8cc82f | ||
|
|
c674306973 | ||
|
|
47687cf085 | ||
|
|
314220a00d | ||
|
|
29c60c000a | ||
|
|
35f4bb96f3 | ||
|
|
92f171ec99 | ||
|
|
0933a79ab8 | ||
|
|
b136b387a7 | ||
|
|
dd866afc2e | ||
|
|
6eb455032c | ||
|
|
5c8c0ae04e | ||
|
|
a35be3a12a | ||
|
|
f9b0d1a8e7 | ||
|
|
543a87c63f | ||
|
|
c9f566269b | ||
|
|
bfa12d75f8 | ||
|
|
b3eda29f41 | ||
|
|
18d8bf4b9c | ||
|
|
aee82d3196 | ||
|
|
a5907a8239 | ||
|
|
2a6c84984a | ||
|
|
0538c11576 | ||
|
|
012a1c2533 | ||
|
|
c9015e2e04 | ||
|
|
07fba274b1 | ||
|
|
585f259b63 | ||
|
|
b227000f19 | ||
|
|
b3161f5803 | ||
|
|
5a9952c7b4 | ||
|
|
8ecc9509b3 | ||
|
|
f72cb28b0f | ||
|
|
43ed0ed1ae | ||
|
|
69dfca2feb | ||
|
|
3bdf28c1fe | ||
|
|
c8a4c04b36 | ||
|
|
ac2ce00e28 | ||
|
|
26f066f0c7 | ||
|
|
f73731d5a4 | ||
|
|
4a0ade4788 | ||
|
|
c397e350f4 | ||
|
|
b6058a837f | ||
|
|
5518022a5d | ||
|
|
5f958a582d | ||
|
|
e27237a03a | ||
|
|
9b9f7cffde | ||
|
|
ee84b20247 | ||
|
|
b25126a277 | ||
|
|
807ec60e63 | ||
|
|
f9cc090473 | ||
|
|
eb3451142e | ||
|
|
73ba8a48ab | ||
|
|
2f3384947b | ||
|
|
a8dde17146 | ||
|
|
1ad28d0494 | ||
|
|
db4aaedcbd | ||
|
|
08a72727cd | ||
|
|
0aa66f02ef | ||
|
|
b94c610e49 | ||
|
|
5208bb32f1 | ||
|
|
982c812e81 | ||
|
|
c1908c7d91 | ||
|
|
59c5a2f519 | ||
|
|
1d05027ba2 | ||
|
|
fed3e6a808 | ||
|
|
ec7cb9981c | ||
|
|
99e6e00c34 | ||
|
|
df4d7846e5 | ||
|
|
6c160adab3 | ||
|
|
55f6fe4f7b | ||
|
|
032ab66529 | ||
|
|
60d9611c23 | ||
|
|
210682b734 | ||
|
|
f0ec751237 | ||
|
|
6ce9799370 | ||
|
|
1d139f7a0b | ||
|
|
93bf0d6f4e | ||
|
|
dc087ffa97 | ||
|
|
25e6c4eff8 | ||
|
|
a76b7dadae | ||
|
|
b6232cfdd1 | ||
|
|
a2a77172a6 | ||
|
|
1b903767e0 | ||
|
|
4e7f53adf0 | ||
|
|
8c1b26889a | ||
|
|
af9242f4cc | ||
|
|
564f02aa2b | ||
|
|
3b8725e0f5 | ||
|
|
3caa4ad1ba | ||
|
|
b0ff946b55 | ||
|
|
eb0e7b1b81 | ||
|
|
36e1e5f151 | ||
|
|
4c8c115a76 | ||
|
|
545e14691b | ||
|
|
be97785856 | ||
|
|
fde0ddb324 | ||
|
|
117f66e823 | ||
|
|
63d61cb380 | ||
|
|
a26aecdfdb | ||
|
|
47e6b2cef8 | ||
|
|
cc7f8f58e8 | ||
|
|
c9985bf563 | ||
|
|
22c0c5465a | ||
|
|
2cfbf76db8 | ||
|
|
ec4dee0fcd | ||
|
|
952287db29 | ||
|
|
b99b2c446c | ||
|
|
04c0f7e15c | ||
|
|
128d417f47 | ||
|
|
d001479a47 | ||
|
|
f16810c48e | ||
|
|
66b05433b6 | ||
|
|
6abf8ef78f | ||
|
|
b907a5d765 | ||
|
|
0ace267c4f | ||
|
|
b0854fbff5 | ||
|
|
c1dee15144 | ||
|
|
987119cd4a | ||
|
|
08b03afa4b | ||
|
|
09841b1c9b | ||
|
|
bd0c267cbe | ||
|
|
ca1b2a1a91 | ||
|
|
1b90567546 | ||
|
|
16f417f5af | ||
|
|
5c82fdc243 | ||
|
|
55e55826ee | ||
|
|
530953050a | ||
|
|
24f89f8bd9 | ||
|
|
2e75a216c7 | ||
|
|
7aab71f656 | ||
|
|
4dc7ee9087 | ||
|
|
3340f4dbfc | ||
|
|
456b5791bb | ||
|
|
e2d1d832ef | ||
|
|
d336e24dce | ||
|
|
ae2c90cc28 | ||
|
|
6cf61039cf | ||
|
|
48d2a8b8ee | ||
|
|
477a6d426c | ||
|
|
0972bdeda2 | ||
|
|
1cc86c07a0 | ||
|
|
1c7e8e9093 | ||
|
|
b619b244c7 | ||
|
|
0fb1bcd321 | ||
|
|
a4dc12f12c | ||
|
|
4547a05a68 | ||
|
|
4b4e082102 | ||
|
|
1954b87819 | ||
|
|
77924757a8 | ||
|
|
16460b0048 | ||
|
|
a9068aa8ff | ||
|
|
89244981a8 | ||
|
|
138ab26b8c | ||
|
|
51a97c031f | ||
|
|
cc5e621fc4 | ||
|
|
2ebf33ac1c | ||
|
|
788d812a72 | ||
|
|
29c887ef2c | ||
|
|
1085960ed8 | ||
|
|
8df689bd44 | ||
|
|
2f8a45cd8b | ||
|
|
ce68ac6959 | ||
|
|
1f5552feb4 | ||
|
|
4d37c1cea2 | ||
|
|
2fdc7bfbd1 | ||
|
|
dc7c584a4d | ||
|
|
58d477f7a6 | ||
|
|
804af9658a | ||
|
|
9d429180f9 | ||
|
|
771bfe9e78 | ||
|
|
c9f963a77e | ||
|
|
7ba9fe4d5d | ||
|
|
fb1edd05f4 | ||
|
|
780abaec98 | ||
|
|
98fe404e6a | ||
|
|
aafb5f768b | ||
|
|
8c34e93b51 | ||
|
|
f468a9a0e2 | ||
|
|
1054c155db | ||
|
|
7d2353f24d | ||
|
|
34f72ddb3d | ||
|
|
1382e8d84b | ||
|
|
e2e3fa3d11 | ||
|
|
9e5257b83b | ||
|
|
4cd79d8ddd | ||
|
|
4b52cd512d | ||
|
|
e32f7baa0d | ||
|
|
60b1f9629c | ||
|
|
4051c0333f | ||
|
|
e42517754a | ||
|
|
a153b47c2b | ||
|
|
e531c6fc6c | ||
|
|
ed7e05fb2a | ||
|
|
8130df63ca | ||
|
|
123098ce79 | ||
|
|
4fd4facf35 | ||
|
|
43bf3b4a78 | ||
|
|
05da381c15 | ||
|
|
26bf95731b | ||
|
|
03dc6ec0d4 | ||
|
|
f7ec759ef0 | ||
|
|
7ddebd7a75 | ||
|
|
bab78bbeb6 | ||
|
|
7a79428278 | ||
|
|
1360f027d9 | ||
|
|
b3629c6f62 | ||
|
|
176c98eb66 | ||
|
|
25d16f358a | ||
|
|
795b14330a | ||
|
|
0e5aed63dd | ||
|
|
8a285d258a | ||
|
|
a4ccc6e72e | ||
|
|
125bdc3253 | ||
|
|
6cff6dd8b8 | ||
|
|
3983dd2428 | ||
|
|
0a9dc1536c | ||
|
|
1508a23a6f | ||
|
|
f5b8f3d41b | ||
|
|
0e93b98533 | ||
|
|
5da5db5a0a | ||
|
|
6567f9d0b2 | ||
|
|
88af879f7a | ||
|
|
75f0412f9d | ||
|
|
207b6c50fb | ||
|
|
07cfec33f8 | ||
|
|
12671c82ea | ||
|
|
6e24b1587d | ||
|
|
59ef6e3693 | ||
|
|
22d29a6d52 | ||
|
|
a7f4ade711 | ||
|
|
1e985f9865 | ||
|
|
4789084998 | ||
|
|
3325683794 | ||
|
|
f7287c626e | ||
|
|
198cc69357 | ||
|
|
86c3b8cfad | ||
|
|
b227b10f5d | ||
|
|
71b5d6e0a3 | ||
|
|
5ad473d758 | ||
|
|
db494170dc | ||
|
|
9e286e1c33 | ||
|
|
0dc566124a | ||
|
|
721e8ae93f | ||
|
|
2d09e67713 | ||
|
|
49e0267fe7 | ||
|
|
590aace88d | ||
|
|
4b2f1f7628 | ||
|
|
df3366d910 | ||
|
|
aefcb9716e | ||
|
|
e6fdf0c9f7 | ||
|
|
4dbdcaecb1 | ||
|
|
8da07e91e4 | ||
|
|
b1c58b76a9 | ||
|
|
52b54631a4 | ||
|
|
e9db2d1b18 | ||
|
|
93edae280d | ||
|
|
bb17591959 | ||
|
|
aa3b91b802 | ||
|
|
b55fabc7be | ||
|
|
54605d8c8e | ||
|
|
52ca80bdd2 | ||
|
|
0291eff99a | ||
|
|
c96e504adb | ||
|
|
01a6db9324 | ||
|
|
993280ec03 | ||
|
|
6ff9d5770b | ||
|
|
455241debb | ||
|
|
db89c3e1a3 | ||
|
|
ef4135eabe | ||
|
|
56dac74f71 | ||
|
|
c7bc684909 | ||
|
|
96272e19a6 | ||
|
|
bd9088792b | ||
|
|
cdb2ebbdfa | ||
|
|
4b5ad31b3a | ||
|
|
6c168c8f22 | ||
|
|
afc8b887ab | ||
|
|
f111fc0608 | ||
|
|
1d959cb0ca | ||
|
|
c3ba4ace64 | ||
|
|
15e46b97b4 | ||
|
|
da900f9435 | ||
|
|
f0f6727778 | ||
|
|
65e39bf20e | ||
|
|
72290f67fe | ||
|
|
4c89d5331f | ||
|
|
61940b2275 | ||
|
|
e77b720ead | ||
|
|
7b39cc83cc | ||
|
|
01dc1c1394 | ||
|
|
4dfce4624d | ||
|
|
5e4d77b2b8 | ||
|
|
2dd8f41147 | ||
|
|
0add0c400f | ||
|
|
e847aaca3e | ||
|
|
7d02c4fdb7 | ||
|
|
d9b16c1197 | ||
|
|
ae7c1e3e55 | ||
|
|
50e1dcc43a | ||
|
|
d84810d89d | ||
|
|
39d86a28e7 | ||
|
|
5022a31889 | ||
|
|
c2af10d256 | ||
|
|
b89ed8eb7b | ||
|
|
118862f1ba | ||
|
|
148de1c875 | ||
|
|
76070b4674 | ||
|
|
3308d82b23 | ||
|
|
c44e025898 | ||
|
|
02017ed0e0 | ||
|
|
4366fdfc13 | ||
|
|
d957dd2c9f | ||
|
|
eb5cb04aa9 | ||
|
|
e5aa38cb0f | ||
|
|
ccbf120c36 | ||
|
|
f8061fcba8 | ||
|
|
4c84db85c5 | ||
|
|
0122989808 | ||
|
|
ccb4fc8d03 | ||
|
|
aec0c0efcb | ||
|
|
bf566a657c | ||
|
|
8577e4171a | ||
|
|
06e76422b5 | ||
|
|
1c7fd62e57 | ||
|
|
a17a1f9208 | ||
|
|
ed1538248f | ||
|
|
cbf5afdef8 | ||
|
|
9e1689df9c | ||
|
|
ca7f385294 | ||
|
|
a92ccfc5c6 | ||
|
|
a70c4b51a4 | ||
|
|
f146467607 | ||
|
|
25cf0c440c | ||
|
|
c2bd8d1d7a | ||
|
|
ce6344b770 | ||
|
|
05fd1dafe2 | ||
|
|
e28c60caf9 | ||
|
|
9423401d73 | ||
|
|
0d57ca486a | ||
|
|
d899334bba | ||
|
|
779f25d36c | ||
|
|
68175386c0 | ||
|
|
ce796dcdbf | ||
|
|
2b5fcb4642 | ||
|
|
5553e5aaed | ||
|
|
af6afbaa56 | ||
|
|
1b98cbbfa4 | ||
|
|
3e38f8af23 | ||
|
|
e74f9f27db | ||
|
|
31a9fdced8 | ||
|
|
47793b606c | ||
|
|
4082c8b61d | ||
|
|
dda778eda7 | ||
|
|
0f5c6c5e2d | ||
|
|
186948da22 | ||
|
|
4f1ef89cb2 | ||
|
|
1fb84d3c5f | ||
|
|
3308491c92 | ||
|
|
9ff7be68fb | ||
|
|
ce0c4e5d86 | ||
|
|
984c7e6689 | ||
|
|
87adff7e18 | ||
|
|
c24018e273 | ||
|
|
6cf6981ed0 | ||
|
|
6cf4e0329c | ||
|
|
df5157c0b0 | ||
|
|
acf4b5753f | ||
|
|
829730dec4 | ||
|
|
c084a7daa5 | ||
|
|
93e858f88e | ||
|
|
4f12f0697e | ||
|
|
76842b0df8 | ||
|
|
e3a8412df3 | ||
|
|
ebe2d9d872 | ||
|
|
ad322fbb58 | ||
|
|
f06543fd06 | ||
|
|
195b2d2ebd | ||
|
|
384b8c75f0 | ||
|
|
9925916851 | ||
|
|
f989f42618 | ||
|
|
095cb97675 | ||
|
|
d80f8bda94 | ||
|
|
3cf0477c21 | ||
|
|
8dbca75d85 | ||
|
|
710360bab6 | ||
|
|
4bc65d1129 | ||
|
|
3db9c80070 | ||
|
|
085f604b27 | ||
|
|
a5b27bbc10 | ||
|
|
8c7e4b290f | ||
|
|
12cfae18e3 | ||
|
|
5653898150 | ||
|
|
73123bf257 | ||
|
|
73c4ca3a6f | ||
|
|
296112848c | ||
|
|
008e91db6a | ||
|
|
3043b233ea | ||
|
|
bff5999efa | ||
|
|
f298ffdbb8 | ||
|
|
3664cd58e3 | ||
|
|
491edc16e7 | ||
|
|
83663ed4b0 | ||
|
|
9008b155d3 | ||
|
|
b6cb5272de | ||
|
|
6d99c03d91 | ||
|
|
99853ac3ce | ||
|
|
8240550187 | ||
|
|
709eff4ea7 | ||
|
|
6212175be3 | ||
|
|
6095edac58 | ||
|
|
3d9a4e7084 | ||
|
|
086caf3701 | ||
|
|
f778922086 | ||
|
|
edc52bdcbf | ||
|
|
0a22dc2ce5 | ||
|
|
cb4d168ecc | ||
|
|
5ebae82eeb | ||
|
|
64f35ba8d1 | ||
|
|
99481a245a | ||
|
|
9f7a8ea5e6 | ||
|
|
b4eeffa8f1 | ||
|
|
2df8ad6307 | ||
|
|
a052357872 | ||
|
|
e6c92673b9 | ||
|
|
a22056db59 | ||
|
|
beb7d35c40 | ||
|
|
d33987cb44 | ||
|
|
6dc46d3341 | ||
|
|
4089b809fb | ||
|
|
cfdca62277 | ||
|
|
f59f89d876 | ||
|
|
68da13fe3e | ||
|
|
616066a598 | ||
|
|
2e5175e818 | ||
|
|
b5b9408e64 | ||
|
|
7c24cd790d | ||
|
|
1bce02eff7 | ||
|
|
a3559c5e1b | ||
|
|
c8d0f8adc5 | ||
|
|
6ba8328077 | ||
|
|
61556ef01d | ||
|
|
ef7961b7d2 | ||
|
|
c17a3cb0ce | ||
|
|
cfd7e74c25 | ||
|
|
3a09459c4c | ||
|
|
9b85002b70 | ||
|
|
f816fdcb69 | ||
|
|
6049fcd52a | ||
|
|
c1fca72552 | ||
|
|
205af02a1f | ||
|
|
5a5560f105 | ||
|
|
8e69fbfa98 | ||
|
|
59b63caf5e | ||
|
|
e4a601c644 | ||
|
|
7149191dd9 | ||
|
|
f38052c499 | ||
|
|
4cd9d57bad | ||
|
|
8cf9ed0ea5 | ||
|
|
28b7dcc204 | ||
|
|
eba3fca7bc | ||
|
|
6c098ee779 | ||
|
|
90f4f942e6 | ||
|
|
c0bbb7e69a | ||
|
|
d5ac24907e | ||
|
|
0f47129113 | ||
|
|
9b8a12b4b5 | ||
|
|
12f1aea38d | ||
|
|
c5e5228e0d | ||
|
|
9c0232a2b9 | ||
|
|
b05e63c34d | ||
|
|
cab7e6000e | ||
|
|
3ba0007e86 | ||
|
|
0f460ad26e | ||
|
|
e70529a977 | ||
|
|
14e2e488fd | ||
|
|
d84be4fe07 | ||
|
|
c8497ab257 | ||
|
|
437d79f094 | ||
|
|
93e693be72 | ||
|
|
675ba4d7eb | ||
|
|
f8d0cd9906 | ||
|
|
a1b6a9ac29 | ||
|
|
b402484e41 | ||
|
|
62cd9946ee | ||
|
|
e08aba5dd9 | ||
|
|
34f29d57b6 | ||
|
|
3220a32ff0 | ||
|
|
f7417d3552 | ||
|
|
04845d42c0 | ||
|
|
0d526d66b7 | ||
|
|
8fe16df6c9 | ||
|
|
1a9624af51 | ||
|
|
8b7e59729f | ||
|
|
76d25420e1 | ||
|
|
0be275e757 | ||
|
|
1d42d1d7c6 | ||
|
|
d90868c307 | ||
|
|
6dbcf6b0d6 | ||
|
|
5c958ec5f6 | ||
|
|
2a5af8fac7 | ||
|
|
559a81da6f | ||
|
|
27a8799e48 | ||
|
|
a19d2c2278 | ||
|
|
cad770c734 | ||
|
|
ca74bcc4cd | ||
|
|
b4e47a094c | ||
|
|
bd0a50fdc3 | ||
|
|
74266d5bbd | ||
|
|
9095b37343 | ||
|
|
ffab36c7d8 | ||
|
|
f82fb889b7 | ||
|
|
6fc07a7f81 | ||
|
|
ddca18638f | ||
|
|
3588c4a9fe | ||
|
|
71b338e8ac | ||
|
|
58812fad42 | ||
|
|
790ded0f47 | ||
|
|
6dbd7a9a80 | ||
|
|
e1e50f4afd | ||
|
|
3a656c07f1 | ||
|
|
ec75119341 | ||
|
|
0b64906a72 | ||
|
|
1beb9a2b8b | ||
|
|
242667ebe5 | ||
|
|
5211fb0c79 | ||
|
|
81e7f8679e | ||
|
|
6f7f570670 | ||
|
|
8f9a354682 | ||
|
|
bc5d924b83 | ||
|
|
9481f86c37 | ||
|
|
dd9e99a418 | ||
|
|
1f38c8c0a2 | ||
|
|
cd85ca17ed | ||
|
|
33afb10b0d | ||
|
|
279b284c0d | ||
|
|
6cae937e5e | ||
|
|
1ecb3b4cf3 | ||
|
|
dcd8cc8341 | ||
|
|
e6e468ef59 | ||
|
|
2a9fc7baa9 | ||
|
|
f6ee8e52dd | ||
|
|
08f2dde45a | ||
|
|
42713c6e99 | ||
|
|
7ffba22f2d | ||
|
|
60198a05b9 | ||
|
|
6b8b1259e2 | ||
|
|
c966a5c17e | ||
|
|
56aa24002d | ||
|
|
711be7009e | ||
|
|
f6e55962a8 | ||
|
|
ea8db7a4ae | ||
|
|
89675a7153 | ||
|
|
f1de1cc97a | ||
|
|
32f0c47c68 | ||
|
|
8aaec1d98f | ||
|
|
b1428555d1 | ||
|
|
20d518ee95 | ||
|
|
0e67fcd361 | ||
|
|
ab50e76652 | ||
|
|
313cfba7d4 | ||
|
|
3da90d01f6 | ||
|
|
d99fea2db6 | ||
|
|
78f1e4a945 | ||
|
|
461324a801 | ||
|
|
fa59db7595 | ||
|
|
bd9bd4abed | ||
|
|
6eacc8eab9 | ||
|
|
00878e5b6e | ||
|
|
7ce63d32b2 | ||
|
|
3451f26086 | ||
|
|
05290d5547 | ||
|
|
d06b792cd0 | ||
|
|
d434ecdcc3 | ||
|
|
60cdb1148c | ||
|
|
9bb1ac7564 | ||
|
|
6c9e503eb8 | ||
|
|
1d866b5e57 | ||
|
|
5c5df21e3d | ||
|
|
12e8404f8f | ||
|
|
0d1cdd26d6 | ||
|
|
cff0d93105 | ||
|
|
c24d143c9e | ||
|
|
bfd1fe977e | ||
|
|
d9ccbf04db | ||
|
|
2c06f34cc0 | ||
|
|
4b0c3b29ae | ||
|
|
dc100f85b3 | ||
|
|
0316490c54 | ||
|
|
d85cef557b | ||
|
|
838ca2fd93 | ||
|
|
cd94b5ffb3 | ||
|
|
3c619baec5 | ||
|
|
8f3a03c0cc | ||
|
|
75ee3b3f08 | ||
|
|
84b36a7193 | ||
|
|
dea68f073e | ||
|
|
7af9cc70d0 | ||
|
|
4b876168f4 | ||
|
|
d92a7527db | ||
|
|
63bcca7604 | ||
|
|
6e0310c1ea | ||
|
|
30c266caff | ||
|
|
2927763d68 | ||
|
|
a0fa91b2b8 | ||
|
|
60924843f0 | ||
|
|
720365859c | ||
|
|
d95e2b7999 | ||
|
|
9509322ecd | ||
|
|
6fc5d8e81e | ||
|
|
bed659f9b3 | ||
|
|
ad0acb5762 | ||
|
|
67e3eff806 | ||
|
|
f5024b4926 | ||
|
|
c1b2595deb | ||
|
|
512d4ca6a4 | ||
|
|
c91e4afe6c | ||
|
|
ebb7db263f | ||
|
|
d30571a7a8 | ||
|
|
cbeebcd47d | ||
|
|
f538ea25e4 | ||
|
|
a2d8b89289 | ||
|
|
8ca991ecd2 | ||
|
|
e3ad9be4c8 | ||
|
|
0d6479e1d6 | ||
|
|
429dd2a100 | ||
|
|
fcba866721 | ||
|
|
3270b432bc | ||
|
|
a441074ba4 | ||
|
|
0afa72c82b | ||
|
|
6be83dd5a1 | ||
|
|
0a3a148ed4 | ||
|
|
c18b8ab2d3 | ||
|
|
66c2e1f642 | ||
|
|
9a9325822e | ||
|
|
bd14b4d23e | ||
|
|
4402a7d817 | ||
|
|
5871d1e359 | ||
|
|
2f33a8c657 | ||
|
|
6dc7be6cd1 | ||
|
|
7d6164b351 | ||
|
|
48a3f0986c | ||
|
|
a1d62abca4 | ||
|
|
44ab30f628 | ||
|
|
be96da179a | ||
|
|
8f94f731a5 | ||
|
|
ab6b9c44aa | ||
|
|
4e15adac6d | ||
|
|
dcae30c1e4 | ||
|
|
f281a362f0 | ||
|
|
c402dad6fa | ||
|
|
e229374f46 | ||
|
|
189527e563 | ||
|
|
9b4e768995 | ||
|
|
45d0d72138 | ||
|
|
15088d7ebe | ||
|
|
4be4db5e6c | ||
|
|
b100546c9d | ||
|
|
834f8a1dc8 | ||
|
|
ada684e054 | ||
|
|
92b30cc452 | ||
|
|
cb32f52b9c | ||
|
|
4f00929084 | ||
|
|
4669b5694b | ||
|
|
a567fedaa7 | ||
|
|
94b0ce84da | ||
|
|
e76c58d175 | ||
|
|
92299b7c24 | ||
|
|
48488017e4 | ||
|
|
b4da085a9f | ||
|
|
7db44b56b0 | ||
|
|
aaba185ceb | ||
|
|
fa782aed93 | ||
|
|
3e174a0879 | ||
|
|
99d5769c2b | ||
|
|
1b1fa049fa | ||
|
|
8cfbf1836d | ||
|
|
78fb2af6f1 | ||
|
|
b96a59eb28 | ||
|
|
64b6172089 | ||
|
|
e7d9bcd36b | ||
|
|
123282e045 | ||
|
|
e22e8b7fef | ||
|
|
79d7cbfc4a | ||
|
|
9120274a46 | ||
|
|
1c1ba8d161 | ||
|
|
a9db1ee8d4 | ||
|
|
699dcaf65c | ||
|
|
f4b717cb9d | ||
|
|
f59a3b67f6 | ||
|
|
1025d097fd | ||
|
|
d56d0c64aa | ||
|
|
0c4adeceae | ||
|
|
f76f953f0c | ||
|
|
9c2b878678 | ||
|
|
a82b89e2d5 | ||
|
|
c8302882c8 | ||
|
|
d87aa24885 | ||
|
|
0cdef3376d | ||
|
|
92c7aca817 | ||
|
|
3aebe532e5 | ||
|
|
8a0be21839 | ||
|
|
83643addbc | ||
|
|
3930ca3a9a | ||
|
|
b0e11826e5 | ||
|
|
e3998e30ba | ||
|
|
51d79f3e3b | ||
|
|
b773e57490 | ||
|
|
76c9c8d653 | ||
|
|
bd4f51ff3c | ||
|
|
5dcf59bdf4 | ||
|
|
9f8bcf3abc | ||
|
|
1bb398f4e2 | ||
|
|
3f90f7c898 | ||
|
|
c8438979a9 | ||
|
|
141d3caabb | ||
|
|
394e0f60c2 | ||
|
|
b95d9e005d | ||
|
|
f3473312ba | ||
|
|
5af4ff985d | ||
|
|
4914a78c8c | ||
|
|
af34749a6b | ||
|
|
af8f5f0b69 | ||
|
|
0ed1a8b50a | ||
|
|
8826e9694c | ||
|
|
c8307a9e44 | ||
|
|
b1c247231b | ||
|
|
fd9da72536 | ||
|
|
3ee0461cb5 | ||
|
|
8e0a39f33f | ||
|
|
e84fa8d4e6 | ||
|
|
f11b5f3e40 | ||
|
|
5538ff7252 | ||
|
|
aca9a41fcf | ||
|
|
df5603de0a | ||
|
|
014d370b5d | ||
|
|
fa890c8c01 | ||
|
|
ce2ec1980b | ||
|
|
155d449be2 | ||
|
|
f05d422a97 | ||
|
|
2ef044edfc | ||
|
|
cc67a84e94 | ||
|
|
81ec564ef6 | ||
|
|
4cf69d7cd3 | ||
|
|
38034c3066 | ||
|
|
56014844a9 | ||
|
|
d9bccdde23 | ||
|
|
051af604e2 | ||
|
|
cb607b4911 | ||
|
|
31c6159019 | ||
|
|
9e2f071d26 | ||
|
|
9adb625846 | ||
|
|
fb4113dab4 | ||
|
|
665a44646e | ||
|
|
6b3f5fb82b | ||
|
|
e252dbf989 | ||
|
|
8170f96ded | ||
|
|
0b10cbd713 | ||
|
|
3119be908c | ||
|
|
48125a25eb | ||
|
|
7849b7e978 | ||
|
|
c9eae764b8 | ||
|
|
28d4250866 | ||
|
|
5920aa7be6 | ||
|
|
1e55fe3aa2 | ||
|
|
9d386033ef | ||
|
|
2b02d81253 | ||
|
|
11b3f97520 | ||
|
|
10782c5aae | ||
|
|
cbc6709937 | ||
|
|
ca18b3f1e9 | ||
|
|
69e745c537 | ||
|
|
003280888d | ||
|
|
797b93c98c | ||
|
|
b095bd3237 | ||
|
|
1d3f43f060 | ||
|
|
d586dd902d | ||
|
|
272d58662c | ||
|
|
6623500c6b | ||
|
|
08c26ab8b0 | ||
|
|
f62b6742f2 | ||
|
|
e73aad959e | ||
|
|
771fbcc02e | ||
|
|
119c5b40a7 | ||
|
|
ad2a75ac58 | ||
|
|
184055b3e2 | ||
|
|
bd2862aec6 | ||
|
|
69baa465ea | ||
|
|
66e439b6f4 | ||
|
|
feef194829 | ||
|
|
91c876831a | ||
|
|
834c52af64 | ||
|
|
06aa74e7df | ||
|
|
50fd469249 | ||
|
|
7daa8c2f6e | ||
|
|
bb03276c19 | ||
|
|
411b9800ae | ||
|
|
29b8a0bc5f | ||
|
|
2e45e4d015 | ||
|
|
5662176f8c | ||
|
|
1880c6b3dc | ||
|
|
6247a99f41 | ||
|
|
53d5c490be | ||
|
|
51ecab6967 | ||
|
|
f9ca054314 | ||
|
|
f7c9c8928e | ||
|
|
ea3048421f | ||
|
|
037039cace | ||
|
|
b5beb1aac1 | ||
|
|
c73a8a89d2 | ||
|
|
5cd93a0618 | ||
|
|
ce05634f38 | ||
|
|
b9a8c92422 | ||
|
|
b48ae74af4 | ||
|
|
bee0a4100c | ||
|
|
27cb0750c1 | ||
|
|
6b92d541da | ||
|
|
6f08e30109 | ||
|
|
520fdfe346 | ||
|
|
10b252dd05 | ||
|
|
eef4cd1b64 | ||
|
|
ac7994d8c7 | ||
|
|
8a7d1a69b3 | ||
|
|
76b20be2ea | ||
|
|
74cab14b8d | ||
|
|
c8aa5feb14 | ||
|
|
590c393680 | ||
|
|
5050d20b4d | ||
|
|
6ea44c466a | ||
|
|
097ba56df5 | ||
|
|
ba35362876 | ||
|
|
33ca8d7b8f | ||
|
|
3ad1daa70d | ||
|
|
3bc64b6b6e | ||
|
|
73c1c2c4af | ||
|
|
350b0b1f66 | ||
|
|
3ea0e904ad | ||
|
|
20c742e474 | ||
|
|
82a2e4fe28 | ||
|
|
6956b5104f | ||
|
|
a02dc4ccc3 | ||
|
|
77badc8c46 | ||
|
|
d2bb83833f | ||
|
|
e57989c0a6 | ||
|
|
b94dfc8d3a | ||
|
|
70a00d602e | ||
|
|
df238dc7ec | ||
|
|
abdf5e76f3 | ||
|
|
03fd832ee8 | ||
|
|
fc308b842e | ||
|
|
35f339e942 | ||
|
|
fd9b03a431 | ||
|
|
c090a77f1c | ||
|
|
50f5ba5b0c | ||
|
|
cbd785cfe8 | ||
|
|
0165c18330 | ||
|
|
e0f93c74c5 | ||
|
|
a6265cb49a | ||
|
|
793baf060a | ||
|
|
ec132749aa | ||
|
|
45d1052229 | ||
|
|
d5a7ba1626 | ||
|
|
3b1296077b | ||
|
|
dac128a029 | ||
|
|
4e95cecfb9 | ||
|
|
3976b52ed7 | ||
|
|
e183880d8b | ||
|
|
d7736a7bbb | ||
|
|
df2b70853f | ||
|
|
9e6411db31 | ||
|
|
751668571e | ||
|
|
3b70985284 | ||
|
|
fa84e50ddb | ||
|
|
ade980912d | ||
|
|
28570ef109 | ||
|
|
20cdb73862 | ||
|
|
36cdab2068 | ||
|
|
6906904896 | ||
|
|
10bbf265b2 | ||
|
|
dac4a8f113 | ||
|
|
93fcabd251 | ||
|
|
f5b8775bed | ||
|
|
0e687cee47 | ||
|
|
bb5038699e | ||
|
|
65cdb3436e | ||
|
|
86f789333a | ||
|
|
febec5ca4a | ||
|
|
70f7a0be11 | ||
|
|
0a99719a39 | ||
|
|
311c6f8a3f | ||
|
|
78a78e2e6c | ||
|
|
7227552f42 | ||
|
|
266d212094 | ||
|
|
3d177be73e | ||
|
|
0aea5fc4a3 | ||
|
|
7ca7938d8e | ||
|
|
f55e39cf1a | ||
|
|
393a92811b | ||
|
|
294b437414 | ||
|
|
c5bd32b0ad | ||
|
|
b315da618b | ||
|
|
03e082d4ac | ||
|
|
db6f4ab1cc | ||
|
|
0a76a3a312 | ||
|
|
1644b1e53e | ||
|
|
cfd1f0907f | ||
|
|
1f67385f13 | ||
|
|
7a7e198395 | ||
|
|
46eb6283ae | ||
|
|
2e894b668a | ||
|
|
8128190fb2 | ||
|
|
cb845b9bc8 | ||
|
|
56843ca0fc | ||
|
|
8d38d62d10 | ||
|
|
e02c0fa808 | ||
|
|
9b494c6869 | ||
|
|
3db6a8e92d | ||
|
|
6fec5bd32e | ||
|
|
6877660fe2 | ||
|
|
c1f8a640d3 | ||
|
|
ed6eba7c8e | ||
|
|
e83a999039 | ||
|
|
44674cb96c | ||
|
|
d451269977 | ||
|
|
7c9508ed71 | ||
|
|
a38dafcc57 | ||
|
|
2d72050db1 | ||
|
|
bd7aca76e1 | ||
|
|
4de3ad1712 | ||
|
|
83a4b8b49b | ||
|
|
b93d6ca5d2 | ||
|
|
9d86a49a73 | ||
|
|
f3196c915a | ||
|
|
9b60cf267a | ||
|
|
11ace54307 | ||
|
|
6de726f16c | ||
|
|
b417766b36 | ||
|
|
dfe66cab3f | ||
|
|
1a67a96cff | ||
|
|
ffd6bc97ad | ||
|
|
9779d67b8c | ||
|
|
a4f5f45228 | ||
|
|
b6d7cba499 | ||
|
|
865cb4083d | ||
|
|
b4fa28a3e6 | ||
|
|
d1a6084bf7 | ||
|
|
a9b857769d | ||
|
|
0015ce1e35 | ||
|
|
4ed94d3d51 | ||
|
|
49a9f47aec | ||
|
|
94a493b0d9 | ||
|
|
72853c4382 | ||
|
|
3b0ec436e4 | ||
|
|
222068b9ba | ||
|
|
c1696531a6 | ||
|
|
c95dfec5e4 | ||
|
|
aec3252b8e | ||
|
|
e17a909f70 | ||
|
|
33fcab5727 | ||
|
|
25f9fd542a | ||
|
|
2d561a5373 | ||
|
|
b0c48fa8d6 | ||
|
|
e100aa3c6c | ||
|
|
677836cbee | ||
|
|
a75c92000f | ||
|
|
b55e017e62 | ||
|
|
82be305496 | ||
|
|
3bc238b1ce | ||
|
|
5053ec2190 | ||
|
|
a34a971b50 | ||
|
|
5fa0173c41 | ||
|
|
6cae166f6f | ||
|
|
4ff906fbc2 | ||
|
|
3af211dd65 | ||
|
|
6db40ecb22 | ||
|
|
a3c66b2740 | ||
|
|
0cae9c3c1b | ||
|
|
68ccbefc94 | ||
|
|
5b3fee6806 | ||
|
|
ab6ede51d7 | ||
|
|
ea0357bf02 | ||
|
|
9cdd218083 | ||
|
|
44d50bc8d2 | ||
|
|
e20b113053 | ||
|
|
0acdeca3d6 | ||
|
|
a45e293267 | ||
|
|
41ae6f298e | ||
|
|
bd95fd770b | ||
|
|
b8354124be | ||
|
|
2b8eae9810 | ||
|
|
b2dc19155f | ||
|
|
7a5b279459 | ||
|
|
cf999c4622 | ||
|
|
68119d0929 | ||
|
|
9ed8dc7384 | ||
|
|
dc944f7518 | ||
|
|
d5d1e50365 | ||
|
|
2458697dad | ||
|
|
206672db5e | ||
|
|
5c2aa1d4f5 | ||
|
|
5cb4120ef5 | ||
|
|
496df5c29a | ||
|
|
3aeba50c38 | ||
|
|
29f5dd38e3 | ||
|
|
b8b1453392 | ||
|
|
ecdda01841 | ||
|
|
bb4495722f | ||
|
|
1118aaf840 | ||
|
|
1cb12296f6 | ||
|
|
96fd1ce270 | ||
|
|
544b7fba7f | ||
|
|
6ecbbe4006 | ||
|
|
cba2f6c2c4 | ||
|
|
1fe2d0d0e0 | ||
|
|
54558dd8ae | ||
|
|
60a8c9527c | ||
|
|
84690bfbbe | ||
|
|
d3a0bb4f35 | ||
|
|
ad13b402d7 | ||
|
|
b66fcf85df | ||
|
|
ba43364f36 | ||
|
|
57dc435f9b | ||
|
|
c582890590 | ||
|
|
615d20598a | ||
|
|
46a496428f | ||
|
|
acfb5b85fb | ||
|
|
70db149494 | ||
|
|
a4007f3b68 | ||
|
|
bc1a173d2f | ||
|
|
5c5db7d931 | ||
|
|
6800c3665a | ||
|
|
28ed968b46 | ||
|
|
ffbd5a35b5 | ||
|
|
b73c07dd80 | ||
|
|
ea67d853a8 | ||
|
|
ac5e86b7ae | ||
|
|
353b558536 | ||
|
|
8516e748ca | ||
|
|
8780deece9 | ||
|
|
1b66e1c93a | ||
|
|
0705bb3fe5 | ||
|
|
48fd23dc10 | ||
|
|
df30588eb6 | ||
|
|
ce149d2733 | ||
|
|
9ac4e23b66 | ||
|
|
7d08e4f7d1 | ||
|
|
2ae3bda029 | ||
|
|
1bc815e0b1 | ||
|
|
16871ae2b4 | ||
|
|
9ed5b4d90e | ||
|
|
b65f29f8fa | ||
|
|
65a802c678 | ||
|
|
151f9c7f82 | ||
|
|
54c14f1ff3 | ||
|
|
d0af113aab | ||
|
|
80261c803a | ||
|
|
cb8261a78b | ||
|
|
863785a520 | ||
|
|
f3a93b046e | ||
|
|
b3834d8272 | ||
|
|
a26c479182 | ||
|
|
9559b53228 | ||
|
|
eb32fe20c8 | ||
|
|
fd041d91ee | ||
|
|
1549a29c9d | ||
|
|
66e309c5c4 | ||
|
|
fb528c47c0 | ||
|
|
74de0f1f2a | ||
|
|
d02024929a | ||
|
|
399256b384 | ||
|
|
33a0dec8a1 | ||
|
|
2f614900e8 | ||
|
|
4db4ec1621 | ||
|
|
74ef22d824 | ||
|
|
86d1a26b13 | ||
|
|
742a9b00bc | ||
|
|
9e89dacc64 | ||
|
|
f63cb27803 | ||
|
|
954ba211bf | ||
|
|
4b4830692a | ||
|
|
2fb57b2ea7 | ||
|
|
96cf6fc147 | ||
|
|
8ef17c2fb1 | ||
|
|
10564723b9 | ||
|
|
369e8c4150 | ||
|
|
c0187930dc | ||
|
|
2f362509b8 | ||
|
|
8ac1b85a0b | ||
|
|
7dacd7eb78 | ||
|
|
2949990016 | ||
|
|
d91357d00c | ||
|
|
0fea62ec6d | ||
|
|
a63b74e345 | ||
|
|
0b6b6b52fe | ||
|
|
250d40bca0 | ||
|
|
adabd71a4a | ||
|
|
ff27df78fc | ||
|
|
627b7c9fd7 | ||
|
|
6afc16399f | ||
|
|
3f904bf3ac | ||
|
|
cdbc3ecc2a | ||
|
|
67af300383 | ||
|
|
ccea5fa948 | ||
|
|
fcc6f183a4 | ||
|
|
962255b373 | ||
|
|
d9d4f63cd4 | ||
|
|
56103f0751 | ||
|
|
be9bfb5536 | ||
|
|
836ed9d6b7 | ||
|
|
a9f9a59416 | ||
|
|
42d43147ca | ||
|
|
93008e279d | ||
|
|
740081e2f7 | ||
|
|
088bbc6bb7 | ||
|
|
2d00027fd9 | ||
|
|
d03ab3c976 | ||
|
|
fb90ecc8bc | ||
|
|
5196f9a340 | ||
|
|
732573ba51 | ||
|
|
854d6d4e5c | ||
|
|
a289a77d5d | ||
|
|
3def9258be | ||
|
|
0eb08693e9 | ||
|
|
cc6ad034f1 | ||
|
|
0af0f0d890 | ||
|
|
c173e9f4ab | ||
|
|
15ef3388c1 | ||
|
|
d90ae4d45b | ||
|
|
b368549fd5 | ||
|
|
c44f4f32fe | ||
|
|
eaa2e8900d | ||
|
|
79c64f6bca | ||
|
|
89c442cadb | ||
|
|
55a2f35a64 | ||
|
|
b97ea0e447 | ||
|
|
b0ae61c652 | ||
|
|
793e666f36 | ||
|
|
4008ff32c9 | ||
|
|
d79387c27e | ||
|
|
4bd6003b7f | ||
|
|
7d95e8624a | ||
|
|
2b9f71c6ca | ||
|
|
d701b23230 | ||
|
|
79bc628858 | ||
|
|
ace551030f | ||
|
|
c7ee9844bd | ||
|
|
0fcc606569 | ||
|
|
07cfb7b64a | ||
|
|
0d733aa071 | ||
|
|
0283498140 | ||
|
|
fa881220ae | ||
|
|
e85f3972b9 | ||
|
|
a760ce05b9 | ||
|
|
2e5d28c73f | ||
|
|
42d2bc28af | ||
|
|
024be32f06 | ||
|
|
27290e1277 | ||
|
|
c51db4c940 | ||
|
|
3fc24013ef | ||
|
|
d6b0ab3028 | ||
|
|
7272577fe6 | ||
|
|
da50c75148 | ||
|
|
4edf7cfb05 | ||
|
|
3c78e418fb | ||
|
|
e71b198e3d | ||
|
|
4f0bda403e | ||
|
|
c215bbadf1 | ||
|
|
0f84b9c30d | ||
|
|
342cc122b4 | ||
|
|
03ce15df4c | ||
|
|
3debeb7236 | ||
|
|
2e7cf83522 | ||
|
|
8bed47a2d4 | ||
|
|
5ede1224e4 | ||
|
|
9831619881 | ||
|
|
5a2d62e4d9 | ||
|
|
42d47ecfb0 | ||
|
|
1f9894c084 | ||
|
|
27f8922653 | ||
|
|
74d7012025 | ||
|
|
5ca2938117 | ||
|
|
6fd2401cdf | ||
|
|
6e94c024e4 | ||
|
|
d1d2b660dc | ||
|
|
8e7c4f91e3 | ||
|
|
41bd38147c | ||
|
|
92ffc1cc4c | ||
|
|
d761af84c8 | ||
|
|
54f9ea14e1 | ||
|
|
7ee49c32b7 | ||
|
|
702cf5a3e1 | ||
|
|
dcf4fad971 | ||
|
|
6d69ca36a7 | ||
|
|
a45c08f9fe | ||
|
|
3c3292d505 | ||
|
|
306b5bcff3 | ||
|
|
cbd71ef8f5 | ||
|
|
32d125131f | ||
|
|
958b482ada | ||
|
|
92b16618ed | ||
|
|
a3771e7d7b | ||
|
|
06ec80f394 | ||
|
|
5d57b78471 | ||
|
|
490ca410c0 | ||
|
|
4513623da1 | ||
|
|
9c86e99968 | ||
|
|
1e8b54abfb | ||
|
|
e8cb5c221d | ||
|
|
20ee1ae65e | ||
|
|
eab0b2a90a | ||
|
|
194c58858c | ||
|
|
67528cf970 | ||
|
|
6774ddaba2 | ||
|
|
13cc220c0d | ||
|
|
1e4af85a38 | ||
|
|
8f91d47bf3 | ||
|
|
5d2669dbd3 | ||
|
|
93261b98c2 | ||
|
|
9f00aeae29 | ||
|
|
2762ec22d0 | ||
|
|
cd9b344506 | ||
|
|
61cc2ba7d9 | ||
|
|
dad29bcaa1 | ||
|
|
65650a5c66 | ||
|
|
db8170def3 | ||
|
|
449b9a9d68 | ||
|
|
28a146d438 | ||
|
|
6a19b62db6 | ||
|
|
a626b7ebe1 | ||
|
|
3331bb29ea | ||
|
|
16f6100500 | ||
|
|
90f63657cb | ||
|
|
0415e4a637 | ||
|
|
ed3424ff75 | ||
|
|
14c4f06100 | ||
|
|
8820d4e5ac | ||
|
|
7c0a27a0f4 | ||
|
|
7a410643ac | ||
|
|
34da3b4fa8 | ||
|
|
4a2dd306c7 | ||
|
|
09bade6466 | ||
|
|
9a93169898 | ||
|
|
017d36e6b2 | ||
|
|
1735ec0362 | ||
|
|
0ecc5c815e | ||
|
|
5ec62a5153 | ||
|
|
2784e256f1 | ||
|
|
50bc838047 | ||
|
|
69acda2c25 | ||
|
|
98f21d8973 | ||
|
|
767d24ea5d | ||
|
|
d1c89727dc | ||
|
|
3d5db7288f | ||
|
|
dc11b5c55e | ||
|
|
5c03adbded | ||
|
|
8845fb7eae | ||
|
|
98823c04b3 | ||
|
|
5a0c4ce295 | ||
|
|
04f8c455e2 | ||
|
|
2c46bfde8b | ||
|
|
5b2e5d180f | ||
|
|
357eb21e4d | ||
|
|
6426f3635e | ||
|
|
ee3ba0b1d6 | ||
|
|
00cd0cce8f | ||
|
|
54715586ab | ||
|
|
9010857677 | ||
|
|
ff151f9fbc | ||
|
|
5c7e96d895 | ||
|
|
04561c4ddc | ||
|
|
9688ebef52 | ||
|
|
d6753b2883 | ||
|
|
b7ff773ecf | ||
|
|
e504088b79 | ||
|
|
d52e5f7130 | ||
|
|
bea468f1e5 | ||
|
|
639f1fd339 | ||
|
|
67e5689f87 | ||
|
|
ddfa3af45d | ||
|
|
d659f469a9 | ||
|
|
dcbd97d29c | ||
|
|
794e65b60e | ||
|
|
6cb35836a2 | ||
|
|
e4e704f480 | ||
|
|
14d13167a7 | ||
|
|
78aad9a192 | ||
|
|
b01cb2406f | ||
|
|
42bb3d8aae | ||
|
|
96ac061e68 | ||
|
|
890745e846 | ||
|
|
4d77b7face | ||
|
|
68fba4b781 | ||
|
|
239a5d3230 | ||
|
|
6fe9b4ab5e | ||
|
|
9dab7dcc3c | ||
|
|
d40cba3042 | ||
|
|
1199941475 | ||
|
|
ec040908e9 | ||
|
|
b958179263 | ||
|
|
5e83ea8228 | ||
|
|
a09aae0efe | ||
|
|
5a2afc5754 | ||
|
|
d4300c406c | ||
|
|
4fb2905b1e | ||
|
|
b232acd04e | ||
|
|
329887df99 | ||
|
|
44d0d6abd2 | ||
|
|
0c6f1c9c3a | ||
|
|
584d1c61ec | ||
|
|
af27264140 | ||
|
|
ec9a044a17 | ||
|
|
90eb4f1939 | ||
|
|
23b5b5fa36 | ||
|
|
d5bcc01eae | ||
|
|
5e0123fbe1 | ||
|
|
633027d980 | ||
|
|
d3d043dba0 | ||
|
|
db60ebbbd7 | ||
|
|
cb7ebdf821 | ||
|
|
70e1a1a4df | ||
|
|
7c41e413e4 | ||
|
|
2b6da2f5f2 | ||
|
|
f02602d02d | ||
|
|
90c2064640 | ||
|
|
c833c3fec8 | ||
|
|
c64629964f | ||
|
|
de2da4fd19 | ||
|
|
198e5eeab9 | ||
|
|
8baa0f84e7 | ||
|
|
5d67139206 | ||
|
|
5b8dde9602 | ||
|
|
81bc721c5c | ||
|
|
4bb646117d | ||
|
|
bba38980bd | ||
|
|
35ae9e3aa8 | ||
|
|
2f9bc2ab75 | ||
|
|
8de099ae75 | ||
|
|
40e3d2ab55 | ||
|
|
a33b309d99 | ||
|
|
50318217ca | ||
|
|
57fa655522 | ||
|
|
6748158ab4 | ||
|
|
e4d2d00d41 | ||
|
|
315d65280b | ||
|
|
d15952c867 | ||
|
|
1954ef47e6 | ||
|
|
fd1d0bbde7 | ||
|
|
d7e396a98c | ||
|
|
00d3935aac | ||
|
|
bb2433ca1a | ||
|
|
7238a77327 | ||
|
|
dd869064a6 | ||
|
|
7a2a63f32b | ||
|
|
28ef7d228c | ||
|
|
6151ae7db5 | ||
|
|
3889785017 | ||
|
|
7a9ff4f8d4 | ||
|
|
29f613ef84 | ||
|
|
ff5703fd9b | ||
|
|
89630d2826 | ||
|
|
550407b0ec | ||
|
|
d0959063d5 | ||
|
|
d294dedfad | ||
|
|
e798294a4b | ||
|
|
ea0eb0a8c8 | ||
|
|
114e715e3c | ||
|
|
253c23240b | ||
|
|
0ce9003ba7 | ||
|
|
2bbc204328 | ||
|
|
92693e4459 | ||
|
|
39263b674c | ||
|
|
5f5910c603 | ||
|
|
ed276cd7c2 | ||
|
|
82272ee08a | ||
|
|
9ed0d389b2 | ||
|
|
25bb76b69c | ||
|
|
00bb68d7d2 | ||
|
|
c23074d5ad | ||
|
|
8ddd4c4c52 | ||
|
|
5a86892ecb | ||
|
|
74c6d8424e | ||
|
|
12972b4b65 | ||
|
|
2920795168 | ||
|
|
25314313f8 | ||
|
|
a8be0d9f48 | ||
|
|
dabaa4cce0 | ||
|
|
707d413761 | ||
|
|
4be3521727 | ||
|
|
e3b911652d | ||
|
|
5e50b50dc3 | ||
|
|
772e7e8c8d | ||
|
|
e1ea41ee9c | ||
|
|
d87857ffdb | ||
|
|
1db3e2241e | ||
|
|
d085133c6d | ||
|
|
5c1e0a6dc4 | ||
|
|
7489fb784e | ||
|
|
9ea3a60291 | ||
|
|
5fc3ac0e92 | ||
|
|
edd3a00c2a | ||
|
|
2eae52ebd1 | ||
|
|
5021e0dd83 | ||
|
|
c818d13202 | ||
|
|
79009ca074 | ||
|
|
8151858e70 | ||
|
|
6c7e58643c | ||
|
|
423beddf57 | ||
|
|
30f5642c62 | ||
|
|
e3ad2a3969 | ||
|
|
8119d77a21 | ||
|
|
d551a75c35 | ||
|
|
8935a93cf8 | ||
|
|
9d5a3f0131 | ||
|
|
a98e6a262a | ||
|
|
491925b71e | ||
|
|
853053a3b2 | ||
|
|
21e389bec5 | ||
|
|
da38faa8f7 | ||
|
|
098136b681 | ||
|
|
0ed19d9f20 | ||
|
|
39cb34850a | ||
|
|
782f780476 | ||
|
|
a243e3b858 | ||
|
|
98f1ee9442 | ||
|
|
a02edf7a93 | ||
|
|
6465e4c3fd | ||
|
|
e75f7ae330 | ||
|
|
b0dc50c2a0 | ||
|
|
6d32bef65a | ||
|
|
4141cc39d0 | ||
|
|
d8c675afbf | ||
|
|
8fe8175c78 | ||
|
|
589d27386a | ||
|
|
e58ba2fcfa | ||
|
|
9dae1a1732 | ||
|
|
0c55a11318 | ||
|
|
16e8fc7427 | ||
|
|
f58c7ac5a6 | ||
|
|
63157c798d | ||
|
|
b9e8a3e024 | ||
|
|
8e9cc36979 | ||
|
|
614624754d | ||
|
|
d890258af6 | ||
|
|
803e4807ed | ||
|
|
a4e26bf7c2 | ||
|
|
9350ecd36f | ||
|
|
8c96c5662f | ||
|
|
842d52db7b | ||
|
|
bb1641e4ec | ||
|
|
299b50a0d4 | ||
|
|
931ae0f116 | ||
|
|
7fb5e993e3 | ||
|
|
0251fae5cc | ||
|
|
0c6b41f4c9 | ||
|
|
f63f3853bb | ||
|
|
3f1f8438ed | ||
|
|
7ad073fb30 | ||
|
|
09f37bd023 | ||
|
|
8f29f6a4d4 | ||
|
|
6fcc6a2f7c | ||
|
|
0b8ba1d55b | ||
|
|
933aa63b7d | ||
|
|
80ffe1610c | ||
|
|
9104dcc29c | ||
|
|
7e6684d926 | ||
|
|
1b431f29e5 | ||
|
|
5ea7598408 | ||
|
|
731f55a05d | ||
|
|
509389be97 | ||
|
|
f911087eab | ||
|
|
c4af1340fa | ||
|
|
3bc57fe5b5 | ||
|
|
7f94bd09ae | ||
|
|
d179f31d4f | ||
|
|
fba6de834e | ||
|
|
1f79175898 | ||
|
|
2fbcfd8824 | ||
|
|
22e16f15a6 | ||
|
|
dc9c9369e0 | ||
|
|
2565a79575 | ||
|
|
8a885c2606 | ||
|
|
ca79360fd7 | ||
|
|
34c8045d5b | ||
|
|
a90ffe1af1 | ||
|
|
01e6f63e98 | ||
|
|
3621988e15 | ||
|
|
53e30f750d | ||
|
|
6656f99c54 | ||
|
|
5a0e751736 | ||
|
|
ff0f15f763 | ||
|
|
887debb055 | ||
|
|
0d77632839 | ||
|
|
8b15732c1e | ||
|
|
48bca30e61 | ||
|
|
9f62d441a7 | ||
|
|
b836267401 | ||
|
|
7b55bcf484 | ||
|
|
15d1f753f7 | ||
|
|
1d76e433f7 | ||
|
|
02d8ad030f | ||
|
|
58a0e8e3e2 | ||
|
|
dccef70728 | ||
|
|
1fbea2e438 | ||
|
|
8198fd7913 | ||
|
|
d80f999a21 | ||
|
|
5871dbaf5a | ||
|
|
b0e023e432 | ||
|
|
6d52da58d9 | ||
|
|
63883bf27d | ||
|
|
8124547348 | ||
|
|
c734dde982 | ||
|
|
cebf4e3697 | ||
|
|
5e2bf12a31 | ||
|
|
d078e9b8c9 | ||
|
|
b855e5f7df | ||
|
|
6593c69424 | ||
|
|
3a9d7d318a | ||
|
|
8a2e50ab2a | ||
|
|
9ee6295c75 | ||
|
|
1bf6f8b4a6 | ||
|
|
4d3209ad1d | ||
|
|
9ff97a98a7 | ||
|
|
1938bfcddf | ||
|
|
714770ffb3 | ||
|
|
71ab5d52b6 | ||
|
|
e090d131c3 | ||
|
|
97cc762143 | ||
|
|
bdc206885a | ||
|
|
69044fe577 | ||
|
|
753f749423 | ||
|
|
2e6cf42011 | ||
|
|
2995d6c281 | ||
|
|
1b40f69ce5 | ||
|
|
771f64397f | ||
|
|
d8339fa29a | ||
|
|
006ac772e6 | ||
|
|
a51dfe89c0 | ||
|
|
c7d1924c34 | ||
|
|
1153fd9a0c | ||
|
|
a56f78af67 | ||
|
|
d7b882977c | ||
|
|
2010fea088 | ||
|
|
fb6ff61730 | ||
|
|
ff8a834ccc | ||
|
|
9e8127accb | ||
|
|
9345bc13d4 | ||
|
|
a2257f3471 | ||
|
|
78576dd3d3 | ||
|
|
6b7dfa1fb5 | ||
|
|
17c825f53a | ||
|
|
b15e03acd7 | ||
|
|
e0b6a31613 | ||
|
|
f382221b28 | ||
|
|
6c91ffcfbe | ||
|
|
15e0093e13 | ||
|
|
99797858a6 | ||
|
|
8fcba0eb1e | ||
|
|
9bb7633254 | ||
|
|
e7097641e3 | ||
|
|
a2d01d6af8 | ||
|
|
2ef3a98929 | ||
|
|
4d98762486 | ||
|
|
73a42d34a5 | ||
|
|
95adac7522 | ||
|
|
76a59274bf | ||
|
|
a453b5514d | ||
|
|
8601604a09 | ||
|
|
b695c82520 | ||
|
|
a98e35d7a0 | ||
|
|
65722aeeca | ||
|
|
8278ba5e45 | ||
|
|
6e98e5709a | ||
|
|
2fec1af275 | ||
|
|
cfb979b5e3 | ||
|
|
9988b1a047 | ||
|
|
73761f7af6 | ||
|
|
1c01e9c095 | ||
|
|
98d4b51120 | ||
|
|
ab8c7252da | ||
|
|
818cbcbdd4 | ||
|
|
a428533160 | ||
|
|
006c757a03 | ||
|
|
4eb1771e67 | ||
|
|
aba3066658 | ||
|
|
c1b09d639c | ||
|
|
817def000b | ||
|
|
6e24d603a1 | ||
|
|
5cdfee5143 | ||
|
|
2232974cda | ||
|
|
aefcb83419 | ||
|
|
24a6d87c3f | ||
|
|
4c7bd75c1a | ||
|
|
b1463b2dc2 | ||
|
|
1f3f76cb09 | ||
|
|
3ebd7f1166 | ||
|
|
81ef40010f | ||
|
|
99fa9afaf1 | ||
|
|
281559d427 | ||
|
|
cc8464ce80 | ||
|
|
230aafbf66 | ||
|
|
14787ac148 | ||
|
|
125839e848 | ||
|
|
356a3296bc | ||
|
|
4e1c6a8a22 | ||
|
|
f8f84ef095 | ||
|
|
42e14ec54f | ||
|
|
4300197a74 | ||
|
|
a0d01b1a0b | ||
|
|
e1b7bd51ee | ||
|
|
6bc2fc7405 | ||
|
|
56c2f651fe | ||
|
|
c371f9a162 | ||
|
|
d6e398aba4 | ||
|
|
7fe73deb2d | ||
|
|
8f5eddd0ba | ||
|
|
f5852b47d1 | ||
|
|
1275e5bdc9 | ||
|
|
86cf69648e | ||
|
|
d658a7f4ab | ||
|
|
0e9c8568fd | ||
|
|
2667cb3ab6 | ||
|
|
0c27c5eb7f | ||
|
|
05e4e97276 | ||
|
|
07fe00c466 | ||
|
|
cbf221f6b7 | ||
|
|
734b2e4cf7 | ||
|
|
85793a4706 | ||
|
|
3c35ba7c31 | ||
|
|
c31a93c27a | ||
|
|
5ceb1620e9 | ||
|
|
e8b4585295 | ||
|
|
6ef2832083 | ||
|
|
6ba534af92 | ||
|
|
47fd4833ee | ||
|
|
64701e388c | ||
|
|
27aae60381 | ||
|
|
7dae955c1a | ||
|
|
3b38df085e | ||
|
|
de87e436ab | ||
|
|
e837c9ab3f | ||
|
|
ad51c85e5d | ||
|
|
66bc3665c1 | ||
|
|
ede5499da6 | ||
|
|
9562aba86a | ||
|
|
4b13f93a3e | ||
|
|
c37b3cef7d | ||
|
|
0c4040d191 | ||
|
|
2bd377a3de | ||
|
|
31e44c2ab9 | ||
|
|
f5d4414734 | ||
|
|
7d3e99a2ab | ||
|
|
b4e156e1d7 | ||
|
|
6a31d55b2e | ||
|
|
45b810450f | ||
|
|
f292e93e0e | ||
|
|
378815ee62 | ||
|
|
38b4dc2cdf | ||
|
|
530ab6b8fc | ||
|
|
fafdd21e4f | ||
|
|
faa57ecaef | ||
|
|
2450398862 | ||
|
|
36c9c93720 | ||
|
|
12f30e6220 | ||
|
|
fd19142c0d | ||
|
|
5131429abb | ||
|
|
a2fb265563 | ||
|
|
b8034f4d9e | ||
|
|
bd48690f63 | ||
|
|
f44a859331 | ||
|
|
8730dfdcc2 | ||
|
|
88686cbed2 | ||
|
|
f95993e326 | ||
|
|
7bf2ae0b11 | ||
|
|
2734fc4079 | ||
|
|
6efdd21633 | ||
|
|
ad4ffdc947 | ||
|
|
65f570271c | ||
|
|
a6b9ea05e8 | ||
|
|
166853aed9 | ||
|
|
98a631b556 | ||
|
|
ff2cf2dacd | ||
|
|
3ac74b1e78 | ||
|
|
f4fa0d48cb | ||
|
|
0512113bdd | ||
|
|
7c0df348f8 | ||
|
|
0c1f732c64 | ||
|
|
283f4d8eb3 | ||
|
|
a4883a029f | ||
|
|
b2181ac814 | ||
|
|
b0798e0a72 | ||
|
|
9831ba20b2 | ||
|
|
485e04d9df | ||
|
|
86d6aba012 | ||
|
|
c9ac5b0f74 | ||
|
|
28357d657b | ||
|
|
8ec1bb382a | ||
|
|
cac9562c05 | ||
|
|
d31303a592 | ||
|
|
a9d5656a46 | ||
|
|
3647cc5b07 | ||
|
|
cc341b8734 | ||
|
|
52b664b0ae | ||
|
|
8fe0864680 | ||
|
|
5fcbaefd0b | ||
|
|
e1ae4ad449 | ||
|
|
7f9fd08792 | ||
|
|
8b4ed8c505 | ||
|
|
4eb3ad192e | ||
|
|
2b6c136dda | ||
|
|
36572f03a7 | ||
|
|
a32dffb0e8 | ||
|
|
e22e83b19a | ||
|
|
d3d9ed62e2 | ||
|
|
be7da48dad | ||
|
|
3af35d922e | ||
|
|
dbf8645aaf | ||
|
|
c03bf14e02 | ||
|
|
afe83af219 | ||
|
|
cbccbf977c | ||
|
|
5a0bae1dae | ||
|
|
e8fb965ccb | ||
|
|
d709815106 | ||
|
|
f0440e85dc | ||
|
|
554f4f6f7d | ||
|
|
6c66cb3fa9 | ||
|
|
45ce820b11 | ||
|
|
edbb8d407e | ||
|
|
76d7bad722 | ||
|
|
a0af7de58e | ||
|
|
050684450b | ||
|
|
e18b96b486 | ||
|
|
af6875f4b2 | ||
|
|
66af749023 | ||
|
|
2096b3a9ed | ||
|
|
fedd4c906f | ||
|
|
78cb04cca3 | ||
|
|
14a6e6a9ce | ||
|
|
3e5a7b34b1 | ||
|
|
a4ca9927ab | ||
|
|
9b1f11695d | ||
|
|
87a5e94525 | ||
|
|
b98cc2fb4e | ||
|
|
fde3e01f80 | ||
|
|
c496aad20b | ||
|
|
8adad0654a | ||
|
|
5757f5df2a | ||
|
|
39b8c83ba6 | ||
|
|
7c91159449 | ||
|
|
4f20e8f649 | ||
|
|
1f6df0cd52 | ||
|
|
69d83b1da5 | ||
|
|
e798f221dd | ||
|
|
c54788338a | ||
|
|
ebdf339a61 | ||
|
|
70c8656640 | ||
|
|
17674fb888 | ||
|
|
91aa189ef3 | ||
|
|
e6a68f0c3a | ||
|
|
d2ab322267 | ||
|
|
c3293641e7 | ||
|
|
21724f7ef9 | ||
|
|
38d6b67b5c | ||
|
|
5516efdfa0 | ||
|
|
21f8806eed | ||
|
|
bf850974f3 | ||
|
|
338b698091 | ||
|
|
16e52327a4 | ||
|
|
45a0974f6f | ||
|
|
05d2d8f27d | ||
|
|
ca6e3f6def | ||
|
|
d3a159ad3d | ||
|
|
0f93da400a | ||
|
|
f3818478e2 | ||
|
|
ee7c16a8d9 | ||
|
|
1c85d8c66b | ||
|
|
0651af9dfd | ||
|
|
c81804444f | ||
|
|
ef7f3f36e2 | ||
|
|
f7d4e3cd6b | ||
|
|
6b08efabf8 | ||
|
|
3a9a252f6e | ||
|
|
61cd1594b5 | ||
|
|
11c26e3211 | ||
|
|
6930260962 | ||
|
|
5fd2a98fcb | ||
|
|
4ba150954e | ||
|
|
a96c8c8af9 | ||
|
|
c5729d7ecc | ||
|
|
d811920d8b | ||
|
|
9c6aca7893 | ||
|
|
ca13e3b105 | ||
|
|
086acd122b | ||
|
|
116516158d | ||
|
|
ca747f2688 | ||
|
|
7d6ba88d2b | ||
|
|
d927c154e7 | ||
|
|
25dd46061f | ||
|
|
afc92fb7d7 | ||
|
|
891f725909 | ||
|
|
969e748dce | ||
|
|
6a530ea371 | ||
|
|
0fccbeabcc | ||
|
|
720521ed4a | ||
|
|
e09f0a5f2c | ||
|
|
4f2e9c2640 | ||
|
|
5714a82778 | ||
|
|
272b135b74 | ||
|
|
335dc9e687 | ||
|
|
03e139d23b | ||
|
|
6d28bf534f | ||
|
|
c0cad0b534 | ||
|
|
a83db489df | ||
|
|
035f0ffb8a | ||
|
|
b66a99e32d | ||
|
|
527a3bbc2a | ||
|
|
c0a030ef0a | ||
|
|
35a82f8f4a | ||
|
|
12643c7c57 | ||
|
|
90bb512f42 | ||
|
|
782910eaa7 | ||
|
|
3558dd5ed4 | ||
|
|
0a88010826 | ||
|
|
7d0348e4ba | ||
|
|
5f49a659c3 | ||
|
|
7277c42047 | ||
|
|
7cc28c8b46 | ||
|
|
205e33bc83 | ||
|
|
6625b6ffbd | ||
|
|
b888652201 | ||
|
|
60fd2f3521 | ||
|
|
75e6406c1f | ||
|
|
3c3431d111 | ||
|
|
56a58ad70d | ||
|
|
00c5f9b9a6 | ||
|
|
7660e1ed90 | ||
|
|
43cad69016 | ||
|
|
308c59320c | ||
|
|
6253d10938 | ||
|
|
e0b6091d7e | ||
|
|
ec6ec62dd4 | ||
|
|
97786d03d5 | ||
|
|
274d5cc91c | ||
|
|
6a86c517c4 | ||
|
|
01c1bce9c5 | ||
|
|
9a9e252cab | ||
|
|
b52b1fca89 | ||
|
|
2ea4c632d1 | ||
|
|
fa1db8d2dc | ||
|
|
9cf8ce9ef8 | ||
|
|
f567f89b99 | ||
|
|
7705b23f24 | ||
|
|
f3d27bf5d8 | ||
|
|
c68ff9886b | ||
|
|
f21eb88ad1 | ||
|
|
c642094cac | ||
|
|
3520771d68 | ||
|
|
c17381b853 | ||
|
|
59d8dc3950 | ||
|
|
38ea6a6d5d | ||
|
|
82d0f65dab | ||
|
|
c135b389fe | ||
|
|
bdc0d1b7ad | ||
|
|
ae837c4719 | ||
|
|
344e827061 | ||
|
|
2be2fc7974 | ||
|
|
826c827e6b | ||
|
|
2b9b02812e | ||
|
|
07578fe25f | ||
|
|
095d5baaed | ||
|
|
8ea7e21f64 | ||
|
|
3274e0a249 | ||
|
|
b15a4985e8 | ||
|
|
d5efeab8f9 | ||
|
|
54bcee512d | ||
|
|
685ea3e9a9 | ||
|
|
694ef47041 | ||
|
|
9d887234ea | ||
|
|
e2e338929f | ||
|
|
8162aff8cf | ||
|
|
ea873304ca | ||
|
|
f80984491a | ||
|
|
e7770b2332 | ||
|
|
be543a6d17 | ||
|
|
6c6e8b0fd7 | ||
|
|
79320e2868 | ||
|
|
92f2abdf76 | ||
|
|
c1de7bcec5 | ||
|
|
8577e9116e | ||
|
|
5b1613d65b | ||
|
|
c1d0ea7366 | ||
|
|
9d492b0509 | ||
|
|
bfed1c7cac | ||
|
|
d2bc57cd34 | ||
|
|
d65b4cd0dd | ||
|
|
f1b354e6aa | ||
|
|
d7c5936ac4 | ||
|
|
ceada15290 | ||
|
|
b462ca4aad | ||
|
|
601340bd46 | ||
|
|
15dd8fd794 | ||
|
|
8ee8ec8a36 | ||
|
|
33f80fef21 | ||
|
|
e1f5e12abb | ||
|
|
7de2c7f176 | ||
|
|
839bd73fbb | ||
|
|
3f7ec1a83f | ||
|
|
8fa19664e6 | ||
|
|
9d06f9e6fb | ||
|
|
c0fcefa3a0 | ||
|
|
c9f3d1c00b | ||
|
|
f87ce15ad2 | ||
|
|
179255c3fe | ||
|
|
4fad5958d0 | ||
|
|
e98b53bbef | ||
|
|
4b8c50e2cd | ||
|
|
1e7b3cbb13 | ||
|
|
ce07d9bb4c | ||
|
|
507fc7b9d1 | ||
|
|
4f4175a3e2 | ||
|
|
c7e73ba12d | ||
|
|
b30b9ab8cb | ||
|
|
0afdedb01a | ||
|
|
6c7255cde2 | ||
|
|
f2234264ed | ||
|
|
95a8ebc249 | ||
|
|
88a9c62fcc | ||
|
|
b29c1eecd1 | ||
|
|
d69db6e617 | ||
|
|
d8b5bbd48c | ||
|
|
22e2c3429b | ||
|
|
4cc5b03137 | ||
|
|
a3fb7008b2 | ||
|
|
55c1c220d0 | ||
|
|
5971c82094 | ||
|
|
1a98bbf1c8 | ||
|
|
377c995103 | ||
|
|
c006ed4ffd | ||
|
|
8ecb24f114 | ||
|
|
3a45cdeaf9 | ||
|
|
a4a4ffbeff | ||
|
|
f5737b929a | ||
|
|
c66cf95b40 | ||
|
|
73b9ae9579 | ||
|
|
4bfd717ba2 | ||
|
|
510ff56363 | ||
|
|
a0ec843832 | ||
|
|
660cd26f31 | ||
|
|
6ad14c1a15 | ||
|
|
cca8585554 | ||
|
|
18cc35338a | ||
|
|
681eacaa7f | ||
|
|
b20c0b1d59 | ||
|
|
f2a1260294 | ||
|
|
06ea7fc830 | ||
|
|
ed05779adb | ||
|
|
8f69c2ac45 | ||
|
|
504d356232 | ||
|
|
059ad35215 | ||
|
|
9bc5c4a0c5 | ||
|
|
4afb624c45 | ||
|
|
39b6eaf51c | ||
|
|
d4cc125456 | ||
|
|
dc994b3518 | ||
|
|
8e7daec886 | ||
|
|
b3da104e56 | ||
|
|
0936e5ccf5 | ||
|
|
531b3a96eb | ||
|
|
3dae732f36 | ||
|
|
1e241e3a61 | ||
|
|
24f2b2afc3 | ||
|
|
357b4bc14c | ||
|
|
5adbd39946 | ||
|
|
6dac014978 | ||
|
|
4d405f6654 | ||
|
|
bbcf304b99 | ||
|
|
c866fcc5b3 | ||
|
|
d7eca7bcc1 | ||
|
|
68028f492f | ||
|
|
8629d9a418 | ||
|
|
c7623c3165 | ||
|
|
ba95849097 | ||
|
|
bb3e28310e | ||
|
|
a5b7279cb5 | ||
|
|
c5b009ba6f | ||
|
|
e72a782bf0 | ||
|
|
7413552a28 | ||
|
|
b7a636b894 | ||
|
|
e5b97fe03e | ||
|
|
2ea05292c0 | ||
|
|
e4a6ee3d7f | ||
|
|
7264044122 | ||
|
|
f1d6f1bd17 | ||
|
|
c95a27e394 | ||
|
|
066940f134 | ||
|
|
07c12f0b92 | ||
|
|
5883446b21 | ||
|
|
9bcb3d2216 | ||
|
|
424b0b8bac | ||
|
|
30ee32a725 | ||
|
|
f5fbbb147f | ||
|
|
147a74dff2 | ||
|
|
60afd02e59 | ||
|
|
fd1aa869e1 | ||
|
|
334c41d088 | ||
|
|
4a656eff7b | ||
|
|
73fd358d94 | ||
|
|
f247f0c518 | ||
|
|
f6d1bfe45b | ||
|
|
c2fb9f06ad | ||
|
|
67de76c217 | ||
|
|
02acef23d5 | ||
|
|
5a83114efd | ||
|
|
42123b4396 | ||
|
|
0ae6a38825 | ||
|
|
8ab6c53231 | ||
|
|
1d26ae2dea | ||
|
|
d2edc2bbf4 | ||
|
|
8db7d791f0 | ||
|
|
a50b4f6b11 | ||
|
|
156495732b | ||
|
|
3c4fb01da3 | ||
|
|
c00b1dd508 | ||
|
|
0de31a3898 | ||
|
|
24349bc431 | ||
|
|
1f7b13ff4e | ||
|
|
04c00f40f0 | ||
|
|
9e9b7a520e | ||
|
|
f995f5763b | ||
|
|
6292c5ad5a | ||
|
|
a9a564c226 | ||
|
|
04b6e413d9 | ||
|
|
aa9341570b | ||
|
|
f4a96ca588 | ||
|
|
48b41862ef | ||
|
|
3f503ffc7f | ||
|
|
ae0d4eb7aa | ||
|
|
cb8a7d979d | ||
|
|
b70fe3a9be | ||
|
|
dfa778fed6 | ||
|
|
8c4746a3df | ||
|
|
ce69334988 | ||
|
|
8c09602a8b | ||
|
|
da66eddfcc | ||
|
|
dfa38b3f91 | ||
|
|
36f221dbe7 | ||
|
|
7f100e9610 | ||
|
|
7ccf51fd30 | ||
|
|
3e400739a7 | ||
|
|
4a82230de5 | ||
|
|
884f792871 | ||
|
|
7931c6624c | ||
|
|
1b7cba1878 | ||
|
|
233f5200ef | ||
|
|
878e796c0a | ||
|
|
2b32f47d2c | ||
|
|
f91ad7b385 | ||
|
|
6da2954462 | ||
|
|
cc4224675f | ||
|
|
131c610da6 | ||
|
|
7613302b49 | ||
|
|
121632bedd | ||
|
|
ef6c5506c3 | ||
|
|
345e4bcfef | ||
|
|
2c81698f31 | ||
|
|
e4bbea400f |
27
.gitignore
vendored
27
.gitignore
vendored
@@ -6,9 +6,32 @@
|
||||
|
||||
/tmp
|
||||
*/**/*un~
|
||||
*/**/*.test
|
||||
*un~
|
||||
.DS_Store
|
||||
*/**/.DS_Store
|
||||
ethereum/ethereum
|
||||
ethereal/ethereal
|
||||
.ethtest
|
||||
*/**/*tx_database*
|
||||
*/**/*dapps*
|
||||
Godeps/_workspace/pkg
|
||||
Godeps/_workspace/bin
|
||||
|
||||
#*
|
||||
.#*
|
||||
*#
|
||||
*~
|
||||
.project
|
||||
.settings
|
||||
|
||||
deploy/osx/Mist.app
|
||||
deploy/osx/Mist\ Installer.dmg
|
||||
cmd/mist/assets/ext/ethereum.js/
|
||||
|
||||
# used by the Makefile
|
||||
/build/_workspace/
|
||||
/build/bin/
|
||||
|
||||
# travis
|
||||
profile.tmp
|
||||
profile.cov
|
||||
|
||||
|
||||
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -1,3 +1,3 @@
|
||||
[submodule "ethereal/assets/samplecoin"]
|
||||
path = ethereal/assets/samplecoin
|
||||
url = git@github.com:obscuren/SampleCoin.git
|
||||
[submodule "cmd/mist/assets/ext/ethereum.js"]
|
||||
path = cmd/mist/assets/ext/ethereum.js
|
||||
url = https://github.com/ethereum/web3.js
|
||||
|
||||
14
.mailmap
Normal file
14
.mailmap
Normal file
@@ -0,0 +1,14 @@
|
||||
Jeffrey Wilcke <jeffrey@ethereum.org>
|
||||
Jeffrey Wilcke <jeffrey@ethereum.org> <geffobscura@gmail.com>
|
||||
Jeffrey Wilcke <jeffrey@ethereum.org> <obscuren@obscura.com>
|
||||
Jeffrey Wilcke <jeffrey@ethereum.org> <obscuren@users.noreply.github.com>
|
||||
|
||||
Viktor Trón <viktor.tron@gmail.com>
|
||||
|
||||
Joseph Goulden <joegoulden@gmail.com>
|
||||
|
||||
Nick Savers <nicksavers@gmail.com>
|
||||
|
||||
Maran Hidskes <maran.hidskes@gmail.com>
|
||||
|
||||
Taylor Gerring <taylor.gerring@gmail.com> <taylor.gerring@ethereum.org>
|
||||
35
.travis.yml
35
.travis.yml
@@ -1,4 +1,35 @@
|
||||
before_install: sudo apt-get install libgmp3-dev
|
||||
language: go
|
||||
go:
|
||||
- 1.2
|
||||
- 1.4.2
|
||||
before_install:
|
||||
- sudo add-apt-repository ppa:beineri/opt-qt541 -y
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -yqq libgmp3-dev qt54quickcontrols qt54webengine
|
||||
install:
|
||||
# - go get code.google.com/p/go.tools/cmd/goimports
|
||||
# - go get github.com/golang/lint/golint
|
||||
# - go get golang.org/x/tools/cmd/vet
|
||||
- go get golang.org/x/tools/cmd/cover github.com/mattn/goveralls
|
||||
before_script:
|
||||
# - gofmt -l -w .
|
||||
# - goimports -l -w .
|
||||
# - golint .
|
||||
# - go vet ./...
|
||||
# - go test -race ./...
|
||||
script:
|
||||
- make travis-test-with-coverage
|
||||
after_success:
|
||||
- if [ "$COVERALLS_TOKEN" ]; then goveralls -coverprofile=profile.cov -service=travis-ci -repotoken $COVERALLS_TOKEN; fi
|
||||
env:
|
||||
global:
|
||||
- PKG_CONFIG_PATH=/opt/qt54/lib/pkgconfig
|
||||
- LD_LIBRARY_PATH=/opt/qt54/lib
|
||||
- secure: "U2U1AmkU4NJBgKR/uUAebQY87cNL0+1JHjnLOmmXwxYYyj5ralWb1aSuSH3qSXiT93qLBmtaUkuv9fberHVqrbAeVlztVdUsKAq7JMQH+M99iFkC9UiRMqHmtjWJ0ok4COD1sRYixxi21wb/JrMe3M1iL4QJVS61iltjHhVdM64="
|
||||
|
||||
notifications:
|
||||
webhooks:
|
||||
urls:
|
||||
- https://webhooks.gitter.im/e/e09ccdce1048c5e03445
|
||||
on_success: change # options: [always|never|change] default: always
|
||||
on_failure: always # options: [always|never|change] default: always
|
||||
on_start: false # default: false
|
||||
|
||||
126
Godeps/Godeps.json
generated
Normal file
126
Godeps/Godeps.json
generated
Normal file
@@ -0,0 +1,126 @@
|
||||
{
|
||||
"ImportPath": "github.com/ethereum/go-ethereum",
|
||||
"GoVersion": "go1.4.2",
|
||||
"Packages": [
|
||||
"./..."
|
||||
],
|
||||
"Deps": [
|
||||
{
|
||||
"ImportPath": "code.google.com/p/go-uuid/uuid",
|
||||
"Comment": "null-12",
|
||||
"Rev": "7dda39b2e7d5e265014674c5af696ba4186679e9"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/codegangsta/cli",
|
||||
"Comment": "1.2.0-95-g9b2bd2b",
|
||||
"Rev": "9b2bd2b3489748d4d0a204fa4eb2ee9e89e0ebc6"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/ethereum/ethash",
|
||||
"Comment": "v23.1-206-gf0e6321",
|
||||
"Rev": "f0e63218b721dc2f696920a92d5de1f6364e9bf7"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/howeyc/fsnotify",
|
||||
"Comment": "v0.9.0-11-g6b1ef89",
|
||||
"Rev": "6b1ef893dc11e0447abda6da20a5203481878dda"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/huin/goupnp",
|
||||
"Rev": "c57ae84388ab59076fd547f1abeab71c2edb0a21"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/jackpal/go-nat-pmp",
|
||||
"Rev": "a45aa3d54aef73b504e15eb71bea0e5565b5e6e1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/kardianos/osext",
|
||||
"Rev": "ccfcd0245381f0c94c68f50626665eed3c6b726a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/mattn/go-colorable",
|
||||
"Rev": "043ae16291351db8465272edf465c9f388161627"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/mattn/go-isatty",
|
||||
"Rev": "fdbe02a1b44e75977b2690062b83cf507d70c013"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/obscuren/qml",
|
||||
"Rev": "c288002b52e905973b131089a8a7c761d4a2c36a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/peterh/liner",
|
||||
"Rev": "29f6a646557d83e2b6e9ba05c45fbea9c006dbe8"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/rakyll/globalconf",
|
||||
"Rev": "415abc325023f1a00cd2d9fa512e0e71745791a2"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/rakyll/goini",
|
||||
"Rev": "907cca0f578a5316fb864ec6992dc3d9730ec58c"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/robertkrimen/otto",
|
||||
"Rev": "dea31a3d392779af358ec41f77a07fcc7e9d04ba"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/rs/cors",
|
||||
"Rev": "6e0c3cb65fc0fdb064c743d176a620e3ca446dfb"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/syndtr/goleveldb/leveldb",
|
||||
"Rev": "4875955338b0a434238a31165cb87255ab6e9e4a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/syndtr/gosnappy/snappy",
|
||||
"Rev": "156a073208e131d7d2e212cb749feae7c339e846"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/crypto/pbkdf2",
|
||||
"Rev": "4ed45ec682102c643324fae5dff8dab085b6c300"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/crypto/ripemd160",
|
||||
"Rev": "4ed45ec682102c643324fae5dff8dab085b6c300"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/crypto/scrypt",
|
||||
"Rev": "4ed45ec682102c643324fae5dff8dab085b6c300"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/net/html",
|
||||
"Rev": "e0403b4e005737430c05a57aac078479844f919c"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/encoding",
|
||||
"Rev": "c93e7c9fff19fb9139b5ab04ce041833add0134e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/transform",
|
||||
"Rev": "c93e7c9fff19fb9139b5ab04ce041833add0134e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gopkg.in/check.v1",
|
||||
"Rev": "64131543e7896d5bcc6bd5a76287eb75ea96c673"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gopkg.in/fatih/set.v0",
|
||||
"Comment": "v0.1.0-3-g27c4092",
|
||||
"Rev": "27c40922c40b43fe04554d8223a402af3ea333f3"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gopkg.in/karalabe/cookiejar.v2/collections/prque",
|
||||
"Rev": "0b2e270613f5d7ba262a5749b9e32270131497a2"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gopkg.in/qml.v1/cdata",
|
||||
"Rev": "1116cb9cd8dee23f8d444ded354eb53122739f99"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gopkg.in/qml.v1/gl/glbase",
|
||||
"Rev": "1116cb9cd8dee23f8d444ded354eb53122739f99"
|
||||
}
|
||||
]
|
||||
}
|
||||
5
Godeps/Readme
generated
Normal file
5
Godeps/Readme
generated
Normal file
@@ -0,0 +1,5 @@
|
||||
This directory tree is generated automatically by godep.
|
||||
|
||||
Please do not edit.
|
||||
|
||||
See https://github.com/tools/godep for more information.
|
||||
2
Godeps/_workspace/.gitignore
generated
vendored
Normal file
2
Godeps/_workspace/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/pkg
|
||||
/bin
|
||||
27
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/LICENSE
generated
vendored
Normal file
27
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
Copyright (c) 2009 Google Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
84
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/dce.go
generated
vendored
Normal file
84
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/dce.go
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
// Copyright 2011 Google Inc. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package uuid
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
// A Domain represents a Version 2 domain
|
||||
type Domain byte
|
||||
|
||||
// Domain constants for DCE Security (Version 2) UUIDs.
|
||||
const (
|
||||
Person = Domain(0)
|
||||
Group = Domain(1)
|
||||
Org = Domain(2)
|
||||
)
|
||||
|
||||
// NewDCESecurity returns a DCE Security (Version 2) UUID.
|
||||
//
|
||||
// The domain should be one of Person, Group or Org.
|
||||
// On a POSIX system the id should be the users UID for the Person
|
||||
// domain and the users GID for the Group. The meaning of id for
|
||||
// the domain Org or on non-POSIX systems is site defined.
|
||||
//
|
||||
// For a given domain/id pair the same token may be returned for up to
|
||||
// 7 minutes and 10 seconds.
|
||||
func NewDCESecurity(domain Domain, id uint32) UUID {
|
||||
uuid := NewUUID()
|
||||
if uuid != nil {
|
||||
uuid[6] = (uuid[6] & 0x0f) | 0x20 // Version 2
|
||||
uuid[9] = byte(domain)
|
||||
binary.BigEndian.PutUint32(uuid[0:], id)
|
||||
}
|
||||
return uuid
|
||||
}
|
||||
|
||||
// NewDCEPerson returns a DCE Security (Version 2) UUID in the person
|
||||
// domain with the id returned by os.Getuid.
|
||||
//
|
||||
// NewDCEPerson(Person, uint32(os.Getuid()))
|
||||
func NewDCEPerson() UUID {
|
||||
return NewDCESecurity(Person, uint32(os.Getuid()))
|
||||
}
|
||||
|
||||
// NewDCEGroup returns a DCE Security (Version 2) UUID in the group
|
||||
// domain with the id returned by os.Getgid.
|
||||
//
|
||||
// NewDCEGroup(Group, uint32(os.Getgid()))
|
||||
func NewDCEGroup() UUID {
|
||||
return NewDCESecurity(Group, uint32(os.Getgid()))
|
||||
}
|
||||
|
||||
// Domain returns the domain for a Version 2 UUID or false.
|
||||
func (uuid UUID) Domain() (Domain, bool) {
|
||||
if v, _ := uuid.Version(); v != 2 {
|
||||
return 0, false
|
||||
}
|
||||
return Domain(uuid[9]), true
|
||||
}
|
||||
|
||||
// Id returns the id for a Version 2 UUID or false.
|
||||
func (uuid UUID) Id() (uint32, bool) {
|
||||
if v, _ := uuid.Version(); v != 2 {
|
||||
return 0, false
|
||||
}
|
||||
return binary.BigEndian.Uint32(uuid[0:4]), true
|
||||
}
|
||||
|
||||
func (d Domain) String() string {
|
||||
switch d {
|
||||
case Person:
|
||||
return "Person"
|
||||
case Group:
|
||||
return "Group"
|
||||
case Org:
|
||||
return "Org"
|
||||
}
|
||||
return fmt.Sprintf("Domain%d", int(d))
|
||||
}
|
||||
8
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/doc.go
generated
vendored
Normal file
8
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/doc.go
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// Copyright 2011 Google Inc. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// The uuid package generates and inspects UUIDs.
|
||||
//
|
||||
// UUIDs are based on RFC 4122 and DCE 1.1: Authentication and Security Services.
|
||||
package uuid
|
||||
53
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/hash.go
generated
vendored
Normal file
53
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/hash.go
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
// Copyright 2011 Google Inc. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package uuid
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"crypto/sha1"
|
||||
"hash"
|
||||
)
|
||||
|
||||
// Well known Name Space IDs and UUIDs
|
||||
var (
|
||||
NameSpace_DNS = Parse("6ba7b810-9dad-11d1-80b4-00c04fd430c8")
|
||||
NameSpace_URL = Parse("6ba7b811-9dad-11d1-80b4-00c04fd430c8")
|
||||
NameSpace_OID = Parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8")
|
||||
NameSpace_X500 = Parse("6ba7b814-9dad-11d1-80b4-00c04fd430c8")
|
||||
NIL = Parse("00000000-0000-0000-0000-000000000000")
|
||||
)
|
||||
|
||||
// NewHash returns a new UUID dervied from the hash of space concatenated with
|
||||
// data generated by h. The hash should be at least 16 byte in length. The
|
||||
// first 16 bytes of the hash are used to form the UUID. The version of the
|
||||
// UUID will be the lower 4 bits of version. NewHash is used to implement
|
||||
// NewMD5 and NewSHA1.
|
||||
func NewHash(h hash.Hash, space UUID, data []byte, version int) UUID {
|
||||
h.Reset()
|
||||
h.Write(space)
|
||||
h.Write([]byte(data))
|
||||
s := h.Sum(nil)
|
||||
uuid := make([]byte, 16)
|
||||
copy(uuid, s)
|
||||
uuid[6] = (uuid[6] & 0x0f) | uint8((version&0xf)<<4)
|
||||
uuid[8] = (uuid[8] & 0x3f) | 0x80 // RFC 4122 variant
|
||||
return uuid
|
||||
}
|
||||
|
||||
// NewMD5 returns a new MD5 (Version 3) UUID based on the
|
||||
// supplied name space and data.
|
||||
//
|
||||
// NewHash(md5.New(), space, data, 3)
|
||||
func NewMD5(space UUID, data []byte) UUID {
|
||||
return NewHash(md5.New(), space, data, 3)
|
||||
}
|
||||
|
||||
// NewSHA1 returns a new SHA1 (Version 5) UUID based on the
|
||||
// supplied name space and data.
|
||||
//
|
||||
// NewHash(sha1.New(), space, data, 5)
|
||||
func NewSHA1(space UUID, data []byte) UUID {
|
||||
return NewHash(sha1.New(), space, data, 5)
|
||||
}
|
||||
101
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/node.go
generated
vendored
Normal file
101
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/node.go
generated
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
// Copyright 2011 Google Inc. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package uuid
|
||||
|
||||
import "net"
|
||||
|
||||
var (
|
||||
interfaces []net.Interface // cached list of interfaces
|
||||
ifname string // name of interface being used
|
||||
nodeID []byte // hardware for version 1 UUIDs
|
||||
)
|
||||
|
||||
// NodeInterface returns the name of the interface from which the NodeID was
|
||||
// derived. The interface "user" is returned if the NodeID was set by
|
||||
// SetNodeID.
|
||||
func NodeInterface() string {
|
||||
return ifname
|
||||
}
|
||||
|
||||
// SetNodeInterface selects the hardware address to be used for Version 1 UUIDs.
|
||||
// If name is "" then the first usable interface found will be used or a random
|
||||
// Node ID will be generated. If a named interface cannot be found then false
|
||||
// is returned.
|
||||
//
|
||||
// SetNodeInterface never fails when name is "".
|
||||
func SetNodeInterface(name string) bool {
|
||||
if interfaces == nil {
|
||||
var err error
|
||||
interfaces, err = net.Interfaces()
|
||||
if err != nil && name != "" {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
for _, ifs := range interfaces {
|
||||
if len(ifs.HardwareAddr) >= 6 && (name == "" || name == ifs.Name) {
|
||||
if setNodeID(ifs.HardwareAddr) {
|
||||
ifname = ifs.Name
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// We found no interfaces with a valid hardware address. If name
|
||||
// does not specify a specific interface generate a random Node ID
|
||||
// (section 4.1.6)
|
||||
if name == "" {
|
||||
if nodeID == nil {
|
||||
nodeID = make([]byte, 6)
|
||||
}
|
||||
randomBits(nodeID)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// NodeID returns a slice of a copy of the current Node ID, setting the Node ID
|
||||
// if not already set.
|
||||
func NodeID() []byte {
|
||||
if nodeID == nil {
|
||||
SetNodeInterface("")
|
||||
}
|
||||
nid := make([]byte, 6)
|
||||
copy(nid, nodeID)
|
||||
return nid
|
||||
}
|
||||
|
||||
// SetNodeID sets the Node ID to be used for Version 1 UUIDs. The first 6 bytes
|
||||
// of id are used. If id is less than 6 bytes then false is returned and the
|
||||
// Node ID is not set.
|
||||
func SetNodeID(id []byte) bool {
|
||||
if setNodeID(id) {
|
||||
ifname = "user"
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func setNodeID(id []byte) bool {
|
||||
if len(id) < 6 {
|
||||
return false
|
||||
}
|
||||
if nodeID == nil {
|
||||
nodeID = make([]byte, 6)
|
||||
}
|
||||
copy(nodeID, id)
|
||||
return true
|
||||
}
|
||||
|
||||
// NodeID returns the 6 byte node id encoded in uuid. It returns nil if uuid is
|
||||
// not valid. The NodeID is only well defined for version 1 and 2 UUIDs.
|
||||
func (uuid UUID) NodeID() []byte {
|
||||
if len(uuid) != 16 {
|
||||
return nil
|
||||
}
|
||||
node := make([]byte, 6)
|
||||
copy(node, uuid[10:])
|
||||
return node
|
||||
}
|
||||
132
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/time.go
generated
vendored
Normal file
132
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/time.go
generated
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
// Copyright 2014 Google Inc. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package uuid
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
// A Time represents a time as the number of 100's of nanoseconds since 15 Oct
|
||||
// 1582.
|
||||
type Time int64
|
||||
|
||||
const (
|
||||
lillian = 2299160 // Julian day of 15 Oct 1582
|
||||
unix = 2440587 // Julian day of 1 Jan 1970
|
||||
epoch = unix - lillian // Days between epochs
|
||||
g1582 = epoch * 86400 // seconds between epochs
|
||||
g1582ns100 = g1582 * 10000000 // 100s of a nanoseconds between epochs
|
||||
)
|
||||
|
||||
var (
|
||||
mu sync.Mutex
|
||||
lasttime uint64 // last time we returned
|
||||
clock_seq uint16 // clock sequence for this run
|
||||
|
||||
timeNow = time.Now // for testing
|
||||
)
|
||||
|
||||
// UnixTime converts t the number of seconds and nanoseconds using the Unix
|
||||
// epoch of 1 Jan 1970.
|
||||
func (t Time) UnixTime() (sec, nsec int64) {
|
||||
sec = int64(t - g1582ns100)
|
||||
nsec = (sec % 10000000) * 100
|
||||
sec /= 10000000
|
||||
return sec, nsec
|
||||
}
|
||||
|
||||
// GetTime returns the current Time (100s of nanoseconds since 15 Oct 1582) and
|
||||
// adjusts the clock sequence as needed. An error is returned if the current
|
||||
// time cannot be determined.
|
||||
func GetTime() (Time, error) {
|
||||
defer mu.Unlock()
|
||||
mu.Lock()
|
||||
return getTime()
|
||||
}
|
||||
|
||||
func getTime() (Time, error) {
|
||||
t := timeNow()
|
||||
|
||||
// If we don't have a clock sequence already, set one.
|
||||
if clock_seq == 0 {
|
||||
setClockSequence(-1)
|
||||
}
|
||||
now := uint64(t.UnixNano()/100) + g1582ns100
|
||||
|
||||
// If time has gone backwards with this clock sequence then we
|
||||
// increment the clock sequence
|
||||
if now <= lasttime {
|
||||
clock_seq = ((clock_seq + 1) & 0x3fff) | 0x8000
|
||||
}
|
||||
lasttime = now
|
||||
return Time(now), nil
|
||||
}
|
||||
|
||||
// ClockSequence returns the current clock sequence, generating one if not
|
||||
// already set. The clock sequence is only used for Version 1 UUIDs.
|
||||
//
|
||||
// The uuid package does not use global static storage for the clock sequence or
|
||||
// the last time a UUID was generated. Unless SetClockSequence a new random
|
||||
// clock sequence is generated the first time a clock sequence is requested by
|
||||
// ClockSequence, GetTime, or NewUUID. (section 4.2.1.1) sequence is generated
|
||||
// for
|
||||
func ClockSequence() int {
|
||||
defer mu.Unlock()
|
||||
mu.Lock()
|
||||
return clockSequence()
|
||||
}
|
||||
|
||||
func clockSequence() int {
|
||||
if clock_seq == 0 {
|
||||
setClockSequence(-1)
|
||||
}
|
||||
return int(clock_seq & 0x3fff)
|
||||
}
|
||||
|
||||
// SetClockSeq sets the clock sequence to the lower 14 bits of seq. Setting to
|
||||
// -1 causes a new sequence to be generated.
|
||||
func SetClockSequence(seq int) {
|
||||
defer mu.Unlock()
|
||||
mu.Lock()
|
||||
setClockSequence(seq)
|
||||
}
|
||||
|
||||
func setClockSequence(seq int) {
|
||||
if seq == -1 {
|
||||
var b [2]byte
|
||||
randomBits(b[:]) // clock sequence
|
||||
seq = int(b[0])<<8 | int(b[1])
|
||||
}
|
||||
old_seq := clock_seq
|
||||
clock_seq = uint16(seq&0x3fff) | 0x8000 // Set our variant
|
||||
if old_seq != clock_seq {
|
||||
lasttime = 0
|
||||
}
|
||||
}
|
||||
|
||||
// Time returns the time in 100s of nanoseconds since 15 Oct 1582 encoded in
|
||||
// uuid. It returns false if uuid is not valid. The time is only well defined
|
||||
// for version 1 and 2 UUIDs.
|
||||
func (uuid UUID) Time() (Time, bool) {
|
||||
if len(uuid) != 16 {
|
||||
return 0, false
|
||||
}
|
||||
time := int64(binary.BigEndian.Uint32(uuid[0:4]))
|
||||
time |= int64(binary.BigEndian.Uint16(uuid[4:6])) << 32
|
||||
time |= int64(binary.BigEndian.Uint16(uuid[6:8])&0xfff) << 48
|
||||
return Time(time), true
|
||||
}
|
||||
|
||||
// ClockSequence returns the clock sequence encoded in uuid. It returns false
|
||||
// if uuid is not valid. The clock sequence is only well defined for version 1
|
||||
// and 2 UUIDs.
|
||||
func (uuid UUID) ClockSequence() (int, bool) {
|
||||
if len(uuid) != 16 {
|
||||
return 0, false
|
||||
}
|
||||
return int(binary.BigEndian.Uint16(uuid[8:10])) & 0x3fff, true
|
||||
}
|
||||
43
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/util.go
generated
vendored
Normal file
43
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/util.go
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
// Copyright 2011 Google Inc. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package uuid
|
||||
|
||||
import (
|
||||
"io"
|
||||
)
|
||||
|
||||
// randomBits completely fills slice b with random data.
|
||||
func randomBits(b []byte) {
|
||||
if _, err := io.ReadFull(rander, b); err != nil {
|
||||
panic(err.Error()) // rand should never fail
|
||||
}
|
||||
}
|
||||
|
||||
// xvalues returns the value of a byte as a hexadecimal digit or 255.
|
||||
var xvalues = []byte{
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 255, 255, 255, 255, 255, 255,
|
||||
255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
}
|
||||
|
||||
// xtob converts the the first two hex bytes of x into a byte.
|
||||
func xtob(x string) (byte, bool) {
|
||||
b1 := xvalues[x[0]]
|
||||
b2 := xvalues[x[1]]
|
||||
return (b1 << 4) | b2, b1 != 255 && b2 != 255
|
||||
}
|
||||
163
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/uuid.go
generated
vendored
Normal file
163
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/uuid.go
generated
vendored
Normal file
@@ -0,0 +1,163 @@
|
||||
// Copyright 2011 Google Inc. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package uuid
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/rand"
|
||||
"fmt"
|
||||
"io"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// A UUID is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC
|
||||
// 4122.
|
||||
type UUID []byte
|
||||
|
||||
// A Version represents a UUIDs version.
|
||||
type Version byte
|
||||
|
||||
// A Variant represents a UUIDs variant.
|
||||
type Variant byte
|
||||
|
||||
// Constants returned by Variant.
|
||||
const (
|
||||
Invalid = Variant(iota) // Invalid UUID
|
||||
RFC4122 // The variant specified in RFC4122
|
||||
Reserved // Reserved, NCS backward compatibility.
|
||||
Microsoft // Reserved, Microsoft Corporation backward compatibility.
|
||||
Future // Reserved for future definition.
|
||||
)
|
||||
|
||||
var rander = rand.Reader // random function
|
||||
|
||||
// New returns a new random (version 4) UUID as a string. It is a convenience
|
||||
// function for NewRandom().String().
|
||||
func New() string {
|
||||
return NewRandom().String()
|
||||
}
|
||||
|
||||
// Parse decodes s into a UUID or returns nil. Both the UUID form of
|
||||
// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and
|
||||
// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx are decoded.
|
||||
func Parse(s string) UUID {
|
||||
if len(s) == 36+9 {
|
||||
if strings.ToLower(s[:9]) != "urn:uuid:" {
|
||||
return nil
|
||||
}
|
||||
s = s[9:]
|
||||
} else if len(s) != 36 {
|
||||
return nil
|
||||
}
|
||||
if s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' {
|
||||
return nil
|
||||
}
|
||||
uuid := make([]byte, 16)
|
||||
for i, x := range []int{
|
||||
0, 2, 4, 6,
|
||||
9, 11,
|
||||
14, 16,
|
||||
19, 21,
|
||||
24, 26, 28, 30, 32, 34} {
|
||||
if v, ok := xtob(s[x:]); !ok {
|
||||
return nil
|
||||
} else {
|
||||
uuid[i] = v
|
||||
}
|
||||
}
|
||||
return uuid
|
||||
}
|
||||
|
||||
// Equal returns true if uuid1 and uuid2 are equal.
|
||||
func Equal(uuid1, uuid2 UUID) bool {
|
||||
return bytes.Equal(uuid1, uuid2)
|
||||
}
|
||||
|
||||
// String returns the string form of uuid, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
||||
// , or "" if uuid is invalid.
|
||||
func (uuid UUID) String() string {
|
||||
if uuid == nil || len(uuid) != 16 {
|
||||
return ""
|
||||
}
|
||||
b := []byte(uuid)
|
||||
return fmt.Sprintf("%08x-%04x-%04x-%04x-%012x",
|
||||
b[:4], b[4:6], b[6:8], b[8:10], b[10:])
|
||||
}
|
||||
|
||||
// URN returns the RFC 2141 URN form of uuid,
|
||||
// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, or "" if uuid is invalid.
|
||||
func (uuid UUID) URN() string {
|
||||
if uuid == nil || len(uuid) != 16 {
|
||||
return ""
|
||||
}
|
||||
b := []byte(uuid)
|
||||
return fmt.Sprintf("urn:uuid:%08x-%04x-%04x-%04x-%012x",
|
||||
b[:4], b[4:6], b[6:8], b[8:10], b[10:])
|
||||
}
|
||||
|
||||
// Variant returns the variant encoded in uuid. It returns Invalid if
|
||||
// uuid is invalid.
|
||||
func (uuid UUID) Variant() Variant {
|
||||
if len(uuid) != 16 {
|
||||
return Invalid
|
||||
}
|
||||
switch {
|
||||
case (uuid[8] & 0xc0) == 0x80:
|
||||
return RFC4122
|
||||
case (uuid[8] & 0xe0) == 0xc0:
|
||||
return Microsoft
|
||||
case (uuid[8] & 0xe0) == 0xe0:
|
||||
return Future
|
||||
default:
|
||||
return Reserved
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
// Version returns the verison of uuid. It returns false if uuid is not
|
||||
// valid.
|
||||
func (uuid UUID) Version() (Version, bool) {
|
||||
if len(uuid) != 16 {
|
||||
return 0, false
|
||||
}
|
||||
return Version(uuid[6] >> 4), true
|
||||
}
|
||||
|
||||
func (v Version) String() string {
|
||||
if v > 15 {
|
||||
return fmt.Sprintf("BAD_VERSION_%d", v)
|
||||
}
|
||||
return fmt.Sprintf("VERSION_%d", v)
|
||||
}
|
||||
|
||||
func (v Variant) String() string {
|
||||
switch v {
|
||||
case RFC4122:
|
||||
return "RFC4122"
|
||||
case Reserved:
|
||||
return "Reserved"
|
||||
case Microsoft:
|
||||
return "Microsoft"
|
||||
case Future:
|
||||
return "Future"
|
||||
case Invalid:
|
||||
return "Invalid"
|
||||
}
|
||||
return fmt.Sprintf("BadVariant%d", int(v))
|
||||
}
|
||||
|
||||
// SetRand sets the random number generator to r, which implents io.Reader.
|
||||
// If r.Read returns an error when the package requests random data then
|
||||
// a panic will be issued.
|
||||
//
|
||||
// Calling SetRand with nil sets the random number generator to the default
|
||||
// generator.
|
||||
func SetRand(r io.Reader) {
|
||||
if r == nil {
|
||||
rander = rand.Reader
|
||||
return
|
||||
}
|
||||
rander = r
|
||||
}
|
||||
390
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/uuid_test.go
generated
vendored
Normal file
390
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/uuid_test.go
generated
vendored
Normal file
@@ -0,0 +1,390 @@
|
||||
// Copyright 2011 Google Inc. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package uuid
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
type test struct {
|
||||
in string
|
||||
version Version
|
||||
variant Variant
|
||||
isuuid bool
|
||||
}
|
||||
|
||||
var tests = []test{
|
||||
{"f47ac10b-58cc-0372-8567-0e02b2c3d479", 0, RFC4122, true},
|
||||
{"f47ac10b-58cc-1372-8567-0e02b2c3d479", 1, RFC4122, true},
|
||||
{"f47ac10b-58cc-2372-8567-0e02b2c3d479", 2, RFC4122, true},
|
||||
{"f47ac10b-58cc-3372-8567-0e02b2c3d479", 3, RFC4122, true},
|
||||
{"f47ac10b-58cc-4372-8567-0e02b2c3d479", 4, RFC4122, true},
|
||||
{"f47ac10b-58cc-5372-8567-0e02b2c3d479", 5, RFC4122, true},
|
||||
{"f47ac10b-58cc-6372-8567-0e02b2c3d479", 6, RFC4122, true},
|
||||
{"f47ac10b-58cc-7372-8567-0e02b2c3d479", 7, RFC4122, true},
|
||||
{"f47ac10b-58cc-8372-8567-0e02b2c3d479", 8, RFC4122, true},
|
||||
{"f47ac10b-58cc-9372-8567-0e02b2c3d479", 9, RFC4122, true},
|
||||
{"f47ac10b-58cc-a372-8567-0e02b2c3d479", 10, RFC4122, true},
|
||||
{"f47ac10b-58cc-b372-8567-0e02b2c3d479", 11, RFC4122, true},
|
||||
{"f47ac10b-58cc-c372-8567-0e02b2c3d479", 12, RFC4122, true},
|
||||
{"f47ac10b-58cc-d372-8567-0e02b2c3d479", 13, RFC4122, true},
|
||||
{"f47ac10b-58cc-e372-8567-0e02b2c3d479", 14, RFC4122, true},
|
||||
{"f47ac10b-58cc-f372-8567-0e02b2c3d479", 15, RFC4122, true},
|
||||
|
||||
{"urn:uuid:f47ac10b-58cc-4372-0567-0e02b2c3d479", 4, Reserved, true},
|
||||
{"URN:UUID:f47ac10b-58cc-4372-0567-0e02b2c3d479", 4, Reserved, true},
|
||||
{"f47ac10b-58cc-4372-0567-0e02b2c3d479", 4, Reserved, true},
|
||||
{"f47ac10b-58cc-4372-1567-0e02b2c3d479", 4, Reserved, true},
|
||||
{"f47ac10b-58cc-4372-2567-0e02b2c3d479", 4, Reserved, true},
|
||||
{"f47ac10b-58cc-4372-3567-0e02b2c3d479", 4, Reserved, true},
|
||||
{"f47ac10b-58cc-4372-4567-0e02b2c3d479", 4, Reserved, true},
|
||||
{"f47ac10b-58cc-4372-5567-0e02b2c3d479", 4, Reserved, true},
|
||||
{"f47ac10b-58cc-4372-6567-0e02b2c3d479", 4, Reserved, true},
|
||||
{"f47ac10b-58cc-4372-7567-0e02b2c3d479", 4, Reserved, true},
|
||||
{"f47ac10b-58cc-4372-8567-0e02b2c3d479", 4, RFC4122, true},
|
||||
{"f47ac10b-58cc-4372-9567-0e02b2c3d479", 4, RFC4122, true},
|
||||
{"f47ac10b-58cc-4372-a567-0e02b2c3d479", 4, RFC4122, true},
|
||||
{"f47ac10b-58cc-4372-b567-0e02b2c3d479", 4, RFC4122, true},
|
||||
{"f47ac10b-58cc-4372-c567-0e02b2c3d479", 4, Microsoft, true},
|
||||
{"f47ac10b-58cc-4372-d567-0e02b2c3d479", 4, Microsoft, true},
|
||||
{"f47ac10b-58cc-4372-e567-0e02b2c3d479", 4, Future, true},
|
||||
{"f47ac10b-58cc-4372-f567-0e02b2c3d479", 4, Future, true},
|
||||
|
||||
{"f47ac10b158cc-5372-a567-0e02b2c3d479", 0, Invalid, false},
|
||||
{"f47ac10b-58cc25372-a567-0e02b2c3d479", 0, Invalid, false},
|
||||
{"f47ac10b-58cc-53723a567-0e02b2c3d479", 0, Invalid, false},
|
||||
{"f47ac10b-58cc-5372-a56740e02b2c3d479", 0, Invalid, false},
|
||||
{"f47ac10b-58cc-5372-a567-0e02-2c3d479", 0, Invalid, false},
|
||||
{"g47ac10b-58cc-4372-a567-0e02b2c3d479", 0, Invalid, false},
|
||||
}
|
||||
|
||||
var constants = []struct {
|
||||
c interface{}
|
||||
name string
|
||||
}{
|
||||
{Person, "Person"},
|
||||
{Group, "Group"},
|
||||
{Org, "Org"},
|
||||
{Invalid, "Invalid"},
|
||||
{RFC4122, "RFC4122"},
|
||||
{Reserved, "Reserved"},
|
||||
{Microsoft, "Microsoft"},
|
||||
{Future, "Future"},
|
||||
{Domain(17), "Domain17"},
|
||||
{Variant(42), "BadVariant42"},
|
||||
}
|
||||
|
||||
func testTest(t *testing.T, in string, tt test) {
|
||||
uuid := Parse(in)
|
||||
if ok := (uuid != nil); ok != tt.isuuid {
|
||||
t.Errorf("Parse(%s) got %v expected %v\b", in, ok, tt.isuuid)
|
||||
}
|
||||
if uuid == nil {
|
||||
return
|
||||
}
|
||||
|
||||
if v := uuid.Variant(); v != tt.variant {
|
||||
t.Errorf("Variant(%s) got %d expected %d\b", in, v, tt.variant)
|
||||
}
|
||||
if v, _ := uuid.Version(); v != tt.version {
|
||||
t.Errorf("Version(%s) got %d expected %d\b", in, v, tt.version)
|
||||
}
|
||||
}
|
||||
|
||||
func TestUUID(t *testing.T) {
|
||||
for _, tt := range tests {
|
||||
testTest(t, tt.in, tt)
|
||||
testTest(t, strings.ToUpper(tt.in), tt)
|
||||
}
|
||||
}
|
||||
|
||||
func TestConstants(t *testing.T) {
|
||||
for x, tt := range constants {
|
||||
v, ok := tt.c.(fmt.Stringer)
|
||||
if !ok {
|
||||
t.Errorf("%x: %v: not a stringer", x, v)
|
||||
} else if s := v.String(); s != tt.name {
|
||||
v, _ := tt.c.(int)
|
||||
t.Errorf("%x: Constant %T:%d gives %q, expected %q\n", x, tt.c, v, s, tt.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestRandomUUID(t *testing.T) {
|
||||
m := make(map[string]bool)
|
||||
for x := 1; x < 32; x++ {
|
||||
uuid := NewRandom()
|
||||
s := uuid.String()
|
||||
if m[s] {
|
||||
t.Errorf("NewRandom returned duplicated UUID %s\n", s)
|
||||
}
|
||||
m[s] = true
|
||||
if v, _ := uuid.Version(); v != 4 {
|
||||
t.Errorf("Random UUID of version %s\n", v)
|
||||
}
|
||||
if uuid.Variant() != RFC4122 {
|
||||
t.Errorf("Random UUID is variant %d\n", uuid.Variant())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestNew(t *testing.T) {
|
||||
m := make(map[string]bool)
|
||||
for x := 1; x < 32; x++ {
|
||||
s := New()
|
||||
if m[s] {
|
||||
t.Errorf("New returned duplicated UUID %s\n", s)
|
||||
}
|
||||
m[s] = true
|
||||
uuid := Parse(s)
|
||||
if uuid == nil {
|
||||
t.Errorf("New returned %q which does not decode\n", s)
|
||||
continue
|
||||
}
|
||||
if v, _ := uuid.Version(); v != 4 {
|
||||
t.Errorf("Random UUID of version %s\n", v)
|
||||
}
|
||||
if uuid.Variant() != RFC4122 {
|
||||
t.Errorf("Random UUID is variant %d\n", uuid.Variant())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func clockSeq(t *testing.T, uuid UUID) int {
|
||||
seq, ok := uuid.ClockSequence()
|
||||
if !ok {
|
||||
t.Fatalf("%s: invalid clock sequence\n", uuid)
|
||||
}
|
||||
return seq
|
||||
}
|
||||
|
||||
func TestClockSeq(t *testing.T) {
|
||||
// Fake time.Now for this test to return a monotonically advancing time; restore it at end.
|
||||
defer func(orig func() time.Time) { timeNow = orig }(timeNow)
|
||||
monTime := time.Now()
|
||||
timeNow = func() time.Time {
|
||||
monTime = monTime.Add(1 * time.Second)
|
||||
return monTime
|
||||
}
|
||||
|
||||
SetClockSequence(-1)
|
||||
uuid1 := NewUUID()
|
||||
uuid2 := NewUUID()
|
||||
|
||||
if clockSeq(t, uuid1) != clockSeq(t, uuid2) {
|
||||
t.Errorf("clock sequence %d != %d\n", clockSeq(t, uuid1), clockSeq(t, uuid2))
|
||||
}
|
||||
|
||||
SetClockSequence(-1)
|
||||
uuid2 = NewUUID()
|
||||
|
||||
// Just on the very off chance we generated the same sequence
|
||||
// two times we try again.
|
||||
if clockSeq(t, uuid1) == clockSeq(t, uuid2) {
|
||||
SetClockSequence(-1)
|
||||
uuid2 = NewUUID()
|
||||
}
|
||||
if clockSeq(t, uuid1) == clockSeq(t, uuid2) {
|
||||
t.Errorf("Duplicate clock sequence %d\n", clockSeq(t, uuid1))
|
||||
}
|
||||
|
||||
SetClockSequence(0x1234)
|
||||
uuid1 = NewUUID()
|
||||
if seq := clockSeq(t, uuid1); seq != 0x1234 {
|
||||
t.Errorf("%s: expected seq 0x1234 got 0x%04x\n", uuid1, seq)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCoding(t *testing.T) {
|
||||
text := "7d444840-9dc0-11d1-b245-5ffdce74fad2"
|
||||
urn := "urn:uuid:7d444840-9dc0-11d1-b245-5ffdce74fad2"
|
||||
data := UUID{
|
||||
0x7d, 0x44, 0x48, 0x40,
|
||||
0x9d, 0xc0,
|
||||
0x11, 0xd1,
|
||||
0xb2, 0x45,
|
||||
0x5f, 0xfd, 0xce, 0x74, 0xfa, 0xd2,
|
||||
}
|
||||
if v := data.String(); v != text {
|
||||
t.Errorf("%x: encoded to %s, expected %s\n", data, v, text)
|
||||
}
|
||||
if v := data.URN(); v != urn {
|
||||
t.Errorf("%x: urn is %s, expected %s\n", data, v, urn)
|
||||
}
|
||||
|
||||
uuid := Parse(text)
|
||||
if !Equal(uuid, data) {
|
||||
t.Errorf("%s: decoded to %s, expected %s\n", text, uuid, data)
|
||||
}
|
||||
}
|
||||
|
||||
func TestVersion1(t *testing.T) {
|
||||
uuid1 := NewUUID()
|
||||
uuid2 := NewUUID()
|
||||
|
||||
if Equal(uuid1, uuid2) {
|
||||
t.Errorf("%s:duplicate uuid\n", uuid1)
|
||||
}
|
||||
if v, _ := uuid1.Version(); v != 1 {
|
||||
t.Errorf("%s: version %s expected 1\n", uuid1, v)
|
||||
}
|
||||
if v, _ := uuid2.Version(); v != 1 {
|
||||
t.Errorf("%s: version %s expected 1\n", uuid2, v)
|
||||
}
|
||||
n1 := uuid1.NodeID()
|
||||
n2 := uuid2.NodeID()
|
||||
if !bytes.Equal(n1, n2) {
|
||||
t.Errorf("Different nodes %x != %x\n", n1, n2)
|
||||
}
|
||||
t1, ok := uuid1.Time()
|
||||
if !ok {
|
||||
t.Errorf("%s: invalid time\n", uuid1)
|
||||
}
|
||||
t2, ok := uuid2.Time()
|
||||
if !ok {
|
||||
t.Errorf("%s: invalid time\n", uuid2)
|
||||
}
|
||||
q1, ok := uuid1.ClockSequence()
|
||||
if !ok {
|
||||
t.Errorf("%s: invalid clock sequence\n", uuid1)
|
||||
}
|
||||
q2, ok := uuid2.ClockSequence()
|
||||
if !ok {
|
||||
t.Errorf("%s: invalid clock sequence", uuid2)
|
||||
}
|
||||
|
||||
switch {
|
||||
case t1 == t2 && q1 == q2:
|
||||
t.Errorf("time stopped\n")
|
||||
case t1 > t2 && q1 == q2:
|
||||
t.Errorf("time reversed\n")
|
||||
case t1 < t2 && q1 != q2:
|
||||
t.Errorf("clock sequence chaned unexpectedly\n")
|
||||
}
|
||||
}
|
||||
|
||||
func TestNodeAndTime(t *testing.T) {
|
||||
// Time is February 5, 1998 12:30:23.136364800 AM GMT
|
||||
|
||||
uuid := Parse("7d444840-9dc0-11d1-b245-5ffdce74fad2")
|
||||
node := []byte{0x5f, 0xfd, 0xce, 0x74, 0xfa, 0xd2}
|
||||
|
||||
ts, ok := uuid.Time()
|
||||
if ok {
|
||||
c := time.Unix(ts.UnixTime())
|
||||
want := time.Date(1998, 2, 5, 0, 30, 23, 136364800, time.UTC)
|
||||
if !c.Equal(want) {
|
||||
t.Errorf("Got time %v, want %v", c, want)
|
||||
}
|
||||
} else {
|
||||
t.Errorf("%s: bad time\n", uuid)
|
||||
}
|
||||
if !bytes.Equal(node, uuid.NodeID()) {
|
||||
t.Errorf("Expected node %v got %v\n", node, uuid.NodeID())
|
||||
}
|
||||
}
|
||||
|
||||
func TestMD5(t *testing.T) {
|
||||
uuid := NewMD5(NameSpace_DNS, []byte("python.org")).String()
|
||||
want := "6fa459ea-ee8a-3ca4-894e-db77e160355e"
|
||||
if uuid != want {
|
||||
t.Errorf("MD5: got %q expected %q\n", uuid, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSHA1(t *testing.T) {
|
||||
uuid := NewSHA1(NameSpace_DNS, []byte("python.org")).String()
|
||||
want := "886313e1-3b8a-5372-9b90-0c9aee199e5d"
|
||||
if uuid != want {
|
||||
t.Errorf("SHA1: got %q expected %q\n", uuid, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestNodeID(t *testing.T) {
|
||||
nid := []byte{1, 2, 3, 4, 5, 6}
|
||||
SetNodeInterface("")
|
||||
s := NodeInterface()
|
||||
if s == "" || s == "user" {
|
||||
t.Errorf("NodeInterface %q after SetInteface\n", s)
|
||||
}
|
||||
node1 := NodeID()
|
||||
if node1 == nil {
|
||||
t.Errorf("NodeID nil after SetNodeInterface\n", s)
|
||||
}
|
||||
SetNodeID(nid)
|
||||
s = NodeInterface()
|
||||
if s != "user" {
|
||||
t.Errorf("Expected NodeInterface %q got %q\n", "user", s)
|
||||
}
|
||||
node2 := NodeID()
|
||||
if node2 == nil {
|
||||
t.Errorf("NodeID nil after SetNodeID\n", s)
|
||||
}
|
||||
if bytes.Equal(node1, node2) {
|
||||
t.Errorf("NodeID not changed after SetNodeID\n", s)
|
||||
} else if !bytes.Equal(nid, node2) {
|
||||
t.Errorf("NodeID is %x, expected %x\n", node2, nid)
|
||||
}
|
||||
}
|
||||
|
||||
func testDCE(t *testing.T, name string, uuid UUID, domain Domain, id uint32) {
|
||||
if uuid == nil {
|
||||
t.Errorf("%s failed\n", name)
|
||||
return
|
||||
}
|
||||
if v, _ := uuid.Version(); v != 2 {
|
||||
t.Errorf("%s: %s: expected version 2, got %s\n", name, uuid, v)
|
||||
return
|
||||
}
|
||||
if v, ok := uuid.Domain(); !ok || v != domain {
|
||||
if !ok {
|
||||
t.Errorf("%s: %d: Domain failed\n", name, uuid)
|
||||
} else {
|
||||
t.Errorf("%s: %s: expected domain %d, got %d\n", name, uuid, domain, v)
|
||||
}
|
||||
}
|
||||
if v, ok := uuid.Id(); !ok || v != id {
|
||||
if !ok {
|
||||
t.Errorf("%s: %d: Id failed\n", name, uuid)
|
||||
} else {
|
||||
t.Errorf("%s: %s: expected id %d, got %d\n", name, uuid, id, v)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestDCE(t *testing.T) {
|
||||
testDCE(t, "NewDCESecurity", NewDCESecurity(42, 12345678), 42, 12345678)
|
||||
testDCE(t, "NewDCEPerson", NewDCEPerson(), Person, uint32(os.Getuid()))
|
||||
testDCE(t, "NewDCEGroup", NewDCEGroup(), Group, uint32(os.Getgid()))
|
||||
}
|
||||
|
||||
type badRand struct{}
|
||||
|
||||
func (r badRand) Read(buf []byte) (int, error) {
|
||||
for i, _ := range buf {
|
||||
buf[i] = byte(i)
|
||||
}
|
||||
return len(buf), nil
|
||||
}
|
||||
|
||||
func TestBadRand(t *testing.T) {
|
||||
SetRand(badRand{})
|
||||
uuid1 := New()
|
||||
uuid2 := New()
|
||||
if uuid1 != uuid2 {
|
||||
t.Errorf("execpted duplicates, got %q and %q\n", uuid1, uuid2)
|
||||
}
|
||||
SetRand(nil)
|
||||
uuid1 = New()
|
||||
uuid2 = New()
|
||||
if uuid1 == uuid2 {
|
||||
t.Errorf("unexecpted duplicates, got %q\n", uuid1)
|
||||
}
|
||||
}
|
||||
41
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/version1.go
generated
vendored
Normal file
41
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/version1.go
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
// Copyright 2011 Google Inc. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package uuid
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
)
|
||||
|
||||
// NewUUID returns a Version 1 UUID based on the current NodeID and clock
|
||||
// sequence, and the current time. If the NodeID has not been set by SetNodeID
|
||||
// or SetNodeInterface then it will be set automatically. If the NodeID cannot
|
||||
// be set NewUUID returns nil. If clock sequence has not been set by
|
||||
// SetClockSequence then it will be set automatically. If GetTime fails to
|
||||
// return the current NewUUID returns nil.
|
||||
func NewUUID() UUID {
|
||||
if nodeID == nil {
|
||||
SetNodeInterface("")
|
||||
}
|
||||
|
||||
now, err := GetTime()
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
uuid := make([]byte, 16)
|
||||
|
||||
time_low := uint32(now & 0xffffffff)
|
||||
time_mid := uint16((now >> 32) & 0xffff)
|
||||
time_hi := uint16((now >> 48) & 0x0fff)
|
||||
time_hi |= 0x1000 // Version 1
|
||||
|
||||
binary.BigEndian.PutUint32(uuid[0:], time_low)
|
||||
binary.BigEndian.PutUint16(uuid[4:], time_mid)
|
||||
binary.BigEndian.PutUint16(uuid[6:], time_hi)
|
||||
binary.BigEndian.PutUint16(uuid[8:], clock_seq)
|
||||
copy(uuid[10:], nodeID)
|
||||
|
||||
return uuid
|
||||
}
|
||||
25
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/version4.go
generated
vendored
Normal file
25
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/version4.go
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
// Copyright 2011 Google Inc. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package uuid
|
||||
|
||||
// Random returns a Random (Version 4) UUID or panics.
|
||||
//
|
||||
// The strength of the UUIDs is based on the strength of the crypto/rand
|
||||
// package.
|
||||
//
|
||||
// A note about uniqueness derived from from the UUID Wikipedia entry:
|
||||
//
|
||||
// Randomly generated UUIDs have 122 random bits. One's annual risk of being
|
||||
// hit by a meteorite is estimated to be one chance in 17 billion, that
|
||||
// means the probability is about 0.00000000006 (6 × 10−11),
|
||||
// equivalent to the odds of creating a few tens of trillions of UUIDs in a
|
||||
// year and having one duplicate.
|
||||
func NewRandom() UUID {
|
||||
uuid := make([]byte, 16)
|
||||
randomBits([]byte(uuid))
|
||||
uuid[6] = (uuid[6] & 0x0f) | 0x40 // Version 4
|
||||
uuid[8] = (uuid[8] & 0x3f) | 0x80 // Variant is 10
|
||||
return uuid
|
||||
}
|
||||
6
Godeps/_workspace/src/github.com/codegangsta/cli/.travis.yml
generated
vendored
Normal file
6
Godeps/_workspace/src/github.com/codegangsta/cli/.travis.yml
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
language: go
|
||||
go: 1.1
|
||||
|
||||
script:
|
||||
- go vet ./...
|
||||
- go test -v ./...
|
||||
21
Godeps/_workspace/src/github.com/codegangsta/cli/LICENSE
generated
vendored
Normal file
21
Godeps/_workspace/src/github.com/codegangsta/cli/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
Copyright (C) 2013 Jeremy Saenz
|
||||
All Rights Reserved.
|
||||
|
||||
MIT LICENSE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
298
Godeps/_workspace/src/github.com/codegangsta/cli/README.md
generated
vendored
Normal file
298
Godeps/_workspace/src/github.com/codegangsta/cli/README.md
generated
vendored
Normal file
@@ -0,0 +1,298 @@
|
||||
[](https://travis-ci.org/codegangsta/cli)
|
||||
|
||||
# cli.go
|
||||
cli.go is simple, fast, and fun package for building command line apps in Go. The goal is to enable developers to write fast and distributable command line applications in an expressive way.
|
||||
|
||||
You can view the API docs here:
|
||||
http://godoc.org/github.com/codegangsta/cli
|
||||
|
||||
## Overview
|
||||
Command line apps are usually so tiny that there is absolutely no reason why your code should *not* be self-documenting. Things like generating help text and parsing command flags/options should not hinder productivity when writing a command line app.
|
||||
|
||||
**This is where cli.go comes into play.** cli.go makes command line programming fun, organized, and expressive!
|
||||
|
||||
## Installation
|
||||
Make sure you have a working Go environment (go 1.1 is *required*). [See the install instructions](http://golang.org/doc/install.html).
|
||||
|
||||
To install `cli.go`, simply run:
|
||||
```
|
||||
$ go get github.com/codegangsta/cli
|
||||
```
|
||||
|
||||
Make sure your `PATH` includes to the `$GOPATH/bin` directory so your commands can be easily used:
|
||||
```
|
||||
export PATH=$PATH:$GOPATH/bin
|
||||
```
|
||||
|
||||
## Getting Started
|
||||
One of the philosophies behind cli.go is that an API should be playful and full of discovery. So a cli.go app can be as little as one line of code in `main()`.
|
||||
|
||||
``` go
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
func main() {
|
||||
cli.NewApp().Run(os.Args)
|
||||
}
|
||||
```
|
||||
|
||||
This app will run and show help text, but is not very useful. Let's give an action to execute and some help documentation:
|
||||
|
||||
``` go
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
func main() {
|
||||
app := cli.NewApp()
|
||||
app.Name = "boom"
|
||||
app.Usage = "make an explosive entrance"
|
||||
app.Action = func(c *cli.Context) {
|
||||
println("boom! I say!")
|
||||
}
|
||||
|
||||
app.Run(os.Args)
|
||||
}
|
||||
```
|
||||
|
||||
Running this already gives you a ton of functionality, plus support for things like subcommands and flags, which are covered below.
|
||||
|
||||
## Example
|
||||
|
||||
Being a programmer can be a lonely job. Thankfully by the power of automation that is not the case! Let's create a greeter app to fend off our demons of loneliness!
|
||||
|
||||
Start by creating a directory named `greet`, and within it, add a file, `greet.go` with the following code in it:
|
||||
|
||||
``` go
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
func main() {
|
||||
app := cli.NewApp()
|
||||
app.Name = "greet"
|
||||
app.Usage = "fight the loneliness!"
|
||||
app.Action = func(c *cli.Context) {
|
||||
println("Hello friend!")
|
||||
}
|
||||
|
||||
app.Run(os.Args)
|
||||
}
|
||||
```
|
||||
|
||||
Install our command to the `$GOPATH/bin` directory:
|
||||
|
||||
```
|
||||
$ go install
|
||||
```
|
||||
|
||||
Finally run our new command:
|
||||
|
||||
```
|
||||
$ greet
|
||||
Hello friend!
|
||||
```
|
||||
|
||||
cli.go also generates some bitchass help text:
|
||||
```
|
||||
$ greet help
|
||||
NAME:
|
||||
greet - fight the loneliness!
|
||||
|
||||
USAGE:
|
||||
greet [global options] command [command options] [arguments...]
|
||||
|
||||
VERSION:
|
||||
0.0.0
|
||||
|
||||
COMMANDS:
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
||||
GLOBAL OPTIONS
|
||||
--version Shows version information
|
||||
```
|
||||
|
||||
### Arguments
|
||||
You can lookup arguments by calling the `Args` function on `cli.Context`.
|
||||
|
||||
``` go
|
||||
...
|
||||
app.Action = func(c *cli.Context) {
|
||||
println("Hello", c.Args()[0])
|
||||
}
|
||||
...
|
||||
```
|
||||
|
||||
### Flags
|
||||
Setting and querying flags is simple.
|
||||
``` go
|
||||
...
|
||||
app.Flags = []cli.Flag {
|
||||
cli.StringFlag{
|
||||
Name: "lang",
|
||||
Value: "english",
|
||||
Usage: "language for the greeting",
|
||||
},
|
||||
}
|
||||
app.Action = func(c *cli.Context) {
|
||||
name := "someone"
|
||||
if len(c.Args()) > 0 {
|
||||
name = c.Args()[0]
|
||||
}
|
||||
if c.String("lang") == "spanish" {
|
||||
println("Hola", name)
|
||||
} else {
|
||||
println("Hello", name)
|
||||
}
|
||||
}
|
||||
...
|
||||
```
|
||||
|
||||
#### Alternate Names
|
||||
|
||||
You can set alternate (or short) names for flags by providing a comma-delimited list for the `Name`. e.g.
|
||||
|
||||
``` go
|
||||
app.Flags = []cli.Flag {
|
||||
cli.StringFlag{
|
||||
Name: "lang, l",
|
||||
Value: "english",
|
||||
Usage: "language for the greeting",
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
That flag can then be set with `--lang spanish` or `-l spanish`. Note that giving two different forms of the same flag in the same command invocation is an error.
|
||||
|
||||
#### Values from the Environment
|
||||
|
||||
You can also have the default value set from the environment via `EnvVar`. e.g.
|
||||
|
||||
``` go
|
||||
app.Flags = []cli.Flag {
|
||||
cli.StringFlag{
|
||||
Name: "lang, l",
|
||||
Value: "english",
|
||||
Usage: "language for the greeting",
|
||||
EnvVar: "APP_LANG",
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
The `EnvVar` may also be given as a comma-delimited "cascade", where the first environment variable that resolves is used as the default.
|
||||
|
||||
``` go
|
||||
app.Flags = []cli.Flag {
|
||||
cli.StringFlag{
|
||||
Name: "lang, l",
|
||||
Value: "english",
|
||||
Usage: "language for the greeting",
|
||||
EnvVar: "LEGACY_COMPAT_LANG,APP_LANG,LANG",
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
### Subcommands
|
||||
|
||||
Subcommands can be defined for a more git-like command line app.
|
||||
```go
|
||||
...
|
||||
app.Commands = []cli.Command{
|
||||
{
|
||||
Name: "add",
|
||||
Aliases: []string{"a"},
|
||||
Usage: "add a task to the list",
|
||||
Action: func(c *cli.Context) {
|
||||
println("added task: ", c.Args().First())
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "complete",
|
||||
Aliases: []string{"c"},
|
||||
Usage: "complete a task on the list",
|
||||
Action: func(c *cli.Context) {
|
||||
println("completed task: ", c.Args().First())
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "template",
|
||||
Aliases: []string{"r"},
|
||||
Usage: "options for task templates",
|
||||
Subcommands: []cli.Command{
|
||||
{
|
||||
Name: "add",
|
||||
Usage: "add a new template",
|
||||
Action: func(c *cli.Context) {
|
||||
println("new task template: ", c.Args().First())
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "remove",
|
||||
Usage: "remove an existing template",
|
||||
Action: func(c *cli.Context) {
|
||||
println("removed task template: ", c.Args().First())
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
...
|
||||
```
|
||||
|
||||
### Bash Completion
|
||||
|
||||
You can enable completion commands by setting the `EnableBashCompletion`
|
||||
flag on the `App` object. By default, this setting will only auto-complete to
|
||||
show an app's subcommands, but you can write your own completion methods for
|
||||
the App or its subcommands.
|
||||
```go
|
||||
...
|
||||
var tasks = []string{"cook", "clean", "laundry", "eat", "sleep", "code"}
|
||||
app := cli.NewApp()
|
||||
app.EnableBashCompletion = true
|
||||
app.Commands = []cli.Command{
|
||||
{
|
||||
Name: "complete",
|
||||
Aliases: []string{"c"},
|
||||
Usage: "complete a task on the list",
|
||||
Action: func(c *cli.Context) {
|
||||
println("completed task: ", c.Args().First())
|
||||
},
|
||||
BashComplete: func(c *cli.Context) {
|
||||
// This will complete if no args are passed
|
||||
if len(c.Args()) > 0 {
|
||||
return
|
||||
}
|
||||
for _, t := range tasks {
|
||||
fmt.Println(t)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
...
|
||||
```
|
||||
|
||||
#### To Enable
|
||||
|
||||
Source the `autocomplete/bash_autocomplete` file in your `.bashrc` file while
|
||||
setting the `PROG` variable to the name of your program:
|
||||
|
||||
`PROG=myprogram source /.../cli/autocomplete/bash_autocomplete`
|
||||
|
||||
|
||||
## Contribution Guidelines
|
||||
Feel free to put up a pull request to fix a bug or maybe add a feature. I will give it a code review and make sure that it does not break backwards compatibility. If I or any other collaborators agree that it is in line with the vision of the project, we will work with you to get the code into a mergeable state and merge it into the master branch.
|
||||
|
||||
If you have contributed something significant to the project, I will most likely add you as a collaborator. As a collaborator you are given the ability to merge others pull requests. It is very important that new code does not break existing code, so be careful about what code you do choose to merge. If you have any questions feel free to link @codegangsta to the issue in question and we can review it together.
|
||||
|
||||
If you feel like you have contributed to the project but have not yet been added as a collaborator, I probably forgot to add you. Hit @codegangsta up over email and we will get it figured out.
|
||||
321
Godeps/_workspace/src/github.com/codegangsta/cli/app.go
generated
vendored
Normal file
321
Godeps/_workspace/src/github.com/codegangsta/cli/app.go
generated
vendored
Normal file
@@ -0,0 +1,321 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strings"
|
||||
"text/tabwriter"
|
||||
"text/template"
|
||||
"time"
|
||||
)
|
||||
|
||||
// App is the main structure of a cli application. It is recomended that
|
||||
// and app be created with the cli.NewApp() function
|
||||
type App struct {
|
||||
// The name of the program. Defaults to os.Args[0]
|
||||
Name string
|
||||
// Description of the program.
|
||||
Usage string
|
||||
// Version of the program
|
||||
Version string
|
||||
// List of commands to execute
|
||||
Commands []Command
|
||||
// List of flags to parse
|
||||
Flags []Flag
|
||||
// Boolean to enable bash completion commands
|
||||
EnableBashCompletion bool
|
||||
// Boolean to hide built-in help command
|
||||
HideHelp bool
|
||||
// Boolean to hide built-in version flag
|
||||
HideVersion bool
|
||||
// An action to execute when the bash-completion flag is set
|
||||
BashComplete func(context *Context)
|
||||
// An action to execute before any subcommands are run, but after the context is ready
|
||||
// If a non-nil error is returned, no subcommands are run
|
||||
Before func(context *Context) error
|
||||
// An action to execute after any subcommands are run, but after the subcommand has finished
|
||||
// It is run even if Action() panics
|
||||
After func(context *Context) error
|
||||
// The action to execute when no subcommands are specified
|
||||
Action func(context *Context)
|
||||
// Execute this function if the proper command cannot be found
|
||||
CommandNotFound func(context *Context, command string)
|
||||
// Compilation date
|
||||
Compiled time.Time
|
||||
// List of all authors who contributed
|
||||
Authors []Author
|
||||
// Name of Author (Note: Use App.Authors, this is deprecated)
|
||||
Author string
|
||||
// Email of Author (Note: Use App.Authors, this is deprecated)
|
||||
Email string
|
||||
// Writer writer to write output to
|
||||
Writer io.Writer
|
||||
}
|
||||
|
||||
// Tries to find out when this binary was compiled.
|
||||
// Returns the current time if it fails to find it.
|
||||
func compileTime() time.Time {
|
||||
info, err := os.Stat(os.Args[0])
|
||||
if err != nil {
|
||||
return time.Now()
|
||||
}
|
||||
return info.ModTime()
|
||||
}
|
||||
|
||||
// Creates a new cli Application with some reasonable defaults for Name, Usage, Version and Action.
|
||||
func NewApp() *App {
|
||||
return &App{
|
||||
Name: os.Args[0],
|
||||
Usage: "A new cli application",
|
||||
Version: "0.0.0",
|
||||
BashComplete: DefaultAppComplete,
|
||||
Action: helpCommand.Action,
|
||||
Compiled: compileTime(),
|
||||
Writer: os.Stdout,
|
||||
}
|
||||
}
|
||||
|
||||
// Entry point to the cli app. Parses the arguments slice and routes to the proper flag/args combination
|
||||
func (a *App) Run(arguments []string) (err error) {
|
||||
if a.Author != "" || a.Email != "" {
|
||||
a.Authors = append(a.Authors, Author{Name: a.Author, Email: a.Email})
|
||||
}
|
||||
|
||||
if HelpPrinter == nil {
|
||||
defer func() {
|
||||
HelpPrinter = nil
|
||||
}()
|
||||
|
||||
HelpPrinter = func(templ string, data interface{}) {
|
||||
funcMap := template.FuncMap{
|
||||
"join": strings.Join,
|
||||
}
|
||||
|
||||
w := tabwriter.NewWriter(a.Writer, 0, 8, 1, '\t', 0)
|
||||
t := template.Must(template.New("help").Funcs(funcMap).Parse(templ))
|
||||
err := t.Execute(w, data)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
w.Flush()
|
||||
}
|
||||
}
|
||||
|
||||
// append help to commands
|
||||
if a.Command(helpCommand.Name) == nil && !a.HideHelp {
|
||||
a.Commands = append(a.Commands, helpCommand)
|
||||
if (HelpFlag != BoolFlag{}) {
|
||||
a.appendFlag(HelpFlag)
|
||||
}
|
||||
}
|
||||
|
||||
//append version/help flags
|
||||
if a.EnableBashCompletion {
|
||||
a.appendFlag(BashCompletionFlag)
|
||||
}
|
||||
|
||||
if !a.HideVersion {
|
||||
a.appendFlag(VersionFlag)
|
||||
}
|
||||
|
||||
// parse flags
|
||||
set := flagSet(a.Name, a.Flags)
|
||||
set.SetOutput(ioutil.Discard)
|
||||
err = set.Parse(arguments[1:])
|
||||
nerr := normalizeFlags(a.Flags, set)
|
||||
if nerr != nil {
|
||||
fmt.Fprintln(a.Writer, nerr)
|
||||
context := NewContext(a, set, set)
|
||||
ShowAppHelp(context)
|
||||
fmt.Fprintln(a.Writer)
|
||||
return nerr
|
||||
}
|
||||
context := NewContext(a, set, set)
|
||||
|
||||
if err != nil {
|
||||
fmt.Fprintf(a.Writer, "Incorrect Usage.\n\n")
|
||||
ShowAppHelp(context)
|
||||
fmt.Fprintln(a.Writer)
|
||||
return err
|
||||
}
|
||||
|
||||
if checkCompletions(context) {
|
||||
return nil
|
||||
}
|
||||
|
||||
if checkHelp(context) {
|
||||
return nil
|
||||
}
|
||||
|
||||
if checkVersion(context) {
|
||||
return nil
|
||||
}
|
||||
|
||||
if a.After != nil {
|
||||
defer func() {
|
||||
// err is always nil here.
|
||||
// There is a check to see if it is non-nil
|
||||
// just few lines before.
|
||||
err = a.After(context)
|
||||
}()
|
||||
}
|
||||
|
||||
if a.Before != nil {
|
||||
err := a.Before(context)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
args := context.Args()
|
||||
if args.Present() {
|
||||
name := args.First()
|
||||
c := a.Command(name)
|
||||
if c != nil {
|
||||
return c.Run(context)
|
||||
}
|
||||
}
|
||||
|
||||
// Run default Action
|
||||
a.Action(context)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Another entry point to the cli app, takes care of passing arguments and error handling
|
||||
func (a *App) RunAndExitOnError() {
|
||||
if err := a.Run(os.Args); err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
// Invokes the subcommand given the context, parses ctx.Args() to generate command-specific flags
|
||||
func (a *App) RunAsSubcommand(ctx *Context) (err error) {
|
||||
// append help to commands
|
||||
if len(a.Commands) > 0 {
|
||||
if a.Command(helpCommand.Name) == nil && !a.HideHelp {
|
||||
a.Commands = append(a.Commands, helpCommand)
|
||||
if (HelpFlag != BoolFlag{}) {
|
||||
a.appendFlag(HelpFlag)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// append flags
|
||||
if a.EnableBashCompletion {
|
||||
a.appendFlag(BashCompletionFlag)
|
||||
}
|
||||
|
||||
// parse flags
|
||||
set := flagSet(a.Name, a.Flags)
|
||||
set.SetOutput(ioutil.Discard)
|
||||
err = set.Parse(ctx.Args().Tail())
|
||||
nerr := normalizeFlags(a.Flags, set)
|
||||
context := NewContext(a, set, ctx.globalSet)
|
||||
|
||||
if nerr != nil {
|
||||
fmt.Fprintln(a.Writer, nerr)
|
||||
if len(a.Commands) > 0 {
|
||||
ShowSubcommandHelp(context)
|
||||
} else {
|
||||
ShowCommandHelp(ctx, context.Args().First())
|
||||
}
|
||||
fmt.Fprintln(a.Writer)
|
||||
return nerr
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
fmt.Fprintf(a.Writer, "Incorrect Usage.\n\n")
|
||||
ShowSubcommandHelp(context)
|
||||
return err
|
||||
}
|
||||
|
||||
if checkCompletions(context) {
|
||||
return nil
|
||||
}
|
||||
|
||||
if len(a.Commands) > 0 {
|
||||
if checkSubcommandHelp(context) {
|
||||
return nil
|
||||
}
|
||||
} else {
|
||||
if checkCommandHelp(ctx, context.Args().First()) {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
if a.After != nil {
|
||||
defer func() {
|
||||
// err is always nil here.
|
||||
// There is a check to see if it is non-nil
|
||||
// just few lines before.
|
||||
err = a.After(context)
|
||||
}()
|
||||
}
|
||||
|
||||
if a.Before != nil {
|
||||
err := a.Before(context)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
args := context.Args()
|
||||
if args.Present() {
|
||||
name := args.First()
|
||||
c := a.Command(name)
|
||||
if c != nil {
|
||||
return c.Run(context)
|
||||
}
|
||||
}
|
||||
|
||||
// Run default Action
|
||||
a.Action(context)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Returns the named command on App. Returns nil if the command does not exist
|
||||
func (a *App) Command(name string) *Command {
|
||||
for _, c := range a.Commands {
|
||||
if c.HasName(name) {
|
||||
return &c
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *App) hasFlag(flag Flag) bool {
|
||||
for _, f := range a.Flags {
|
||||
if flag == f {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func (a *App) appendFlag(flag Flag) {
|
||||
if !a.hasFlag(flag) {
|
||||
a.Flags = append(a.Flags, flag)
|
||||
}
|
||||
}
|
||||
|
||||
// Author represents someone who has contributed to a cli project.
|
||||
type Author struct {
|
||||
Name string // The Authors name
|
||||
Email string // The Authors email
|
||||
}
|
||||
|
||||
// String makes Author comply to the Stringer interface, to allow an easy print in the templating process
|
||||
func (a Author) String() string {
|
||||
e := ""
|
||||
if a.Email != "" {
|
||||
e = "<" + a.Email + "> "
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%v %v", a.Name, e)
|
||||
}
|
||||
622
Godeps/_workspace/src/github.com/codegangsta/cli/app_test.go
generated
vendored
Normal file
622
Godeps/_workspace/src/github.com/codegangsta/cli/app_test.go
generated
vendored
Normal file
@@ -0,0 +1,622 @@
|
||||
package cli_test
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
func ExampleApp() {
|
||||
// set args for examples sake
|
||||
os.Args = []string{"greet", "--name", "Jeremy"}
|
||||
|
||||
app := cli.NewApp()
|
||||
app.Name = "greet"
|
||||
app.Flags = []cli.Flag{
|
||||
cli.StringFlag{Name: "name", Value: "bob", Usage: "a name to say"},
|
||||
}
|
||||
app.Action = func(c *cli.Context) {
|
||||
fmt.Printf("Hello %v\n", c.String("name"))
|
||||
}
|
||||
app.Author = "Harrison"
|
||||
app.Email = "harrison@lolwut.com"
|
||||
app.Authors = []cli.Author{cli.Author{Name: "Oliver Allen", Email: "oliver@toyshop.com"}}
|
||||
app.Run(os.Args)
|
||||
// Output:
|
||||
// Hello Jeremy
|
||||
}
|
||||
|
||||
func ExampleAppSubcommand() {
|
||||
// set args for examples sake
|
||||
os.Args = []string{"say", "hi", "english", "--name", "Jeremy"}
|
||||
app := cli.NewApp()
|
||||
app.Name = "say"
|
||||
app.Commands = []cli.Command{
|
||||
{
|
||||
Name: "hello",
|
||||
Aliases: []string{"hi"},
|
||||
Usage: "use it to see a description",
|
||||
Description: "This is how we describe hello the function",
|
||||
Subcommands: []cli.Command{
|
||||
{
|
||||
Name: "english",
|
||||
Aliases: []string{"en"},
|
||||
Usage: "sends a greeting in english",
|
||||
Description: "greets someone in english",
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "name",
|
||||
Value: "Bob",
|
||||
Usage: "Name of the person to greet",
|
||||
},
|
||||
},
|
||||
Action: func(c *cli.Context) {
|
||||
fmt.Println("Hello,", c.String("name"))
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
app.Run(os.Args)
|
||||
// Output:
|
||||
// Hello, Jeremy
|
||||
}
|
||||
|
||||
func ExampleAppHelp() {
|
||||
// set args for examples sake
|
||||
os.Args = []string{"greet", "h", "describeit"}
|
||||
|
||||
app := cli.NewApp()
|
||||
app.Name = "greet"
|
||||
app.Flags = []cli.Flag{
|
||||
cli.StringFlag{Name: "name", Value: "bob", Usage: "a name to say"},
|
||||
}
|
||||
app.Commands = []cli.Command{
|
||||
{
|
||||
Name: "describeit",
|
||||
Aliases: []string{"d"},
|
||||
Usage: "use it to see a description",
|
||||
Description: "This is how we describe describeit the function",
|
||||
Action: func(c *cli.Context) {
|
||||
fmt.Printf("i like to describe things")
|
||||
},
|
||||
},
|
||||
}
|
||||
app.Run(os.Args)
|
||||
// Output:
|
||||
// NAME:
|
||||
// describeit - use it to see a description
|
||||
//
|
||||
// USAGE:
|
||||
// command describeit [arguments...]
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// This is how we describe describeit the function
|
||||
}
|
||||
|
||||
func ExampleAppBashComplete() {
|
||||
// set args for examples sake
|
||||
os.Args = []string{"greet", "--generate-bash-completion"}
|
||||
|
||||
app := cli.NewApp()
|
||||
app.Name = "greet"
|
||||
app.EnableBashCompletion = true
|
||||
app.Commands = []cli.Command{
|
||||
{
|
||||
Name: "describeit",
|
||||
Aliases: []string{"d"},
|
||||
Usage: "use it to see a description",
|
||||
Description: "This is how we describe describeit the function",
|
||||
Action: func(c *cli.Context) {
|
||||
fmt.Printf("i like to describe things")
|
||||
},
|
||||
}, {
|
||||
Name: "next",
|
||||
Usage: "next example",
|
||||
Description: "more stuff to see when generating bash completion",
|
||||
Action: func(c *cli.Context) {
|
||||
fmt.Printf("the next example")
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
app.Run(os.Args)
|
||||
// Output:
|
||||
// describeit
|
||||
// d
|
||||
// next
|
||||
// help
|
||||
// h
|
||||
}
|
||||
|
||||
func TestApp_Run(t *testing.T) {
|
||||
s := ""
|
||||
|
||||
app := cli.NewApp()
|
||||
app.Action = func(c *cli.Context) {
|
||||
s = s + c.Args().First()
|
||||
}
|
||||
|
||||
err := app.Run([]string{"command", "foo"})
|
||||
expect(t, err, nil)
|
||||
err = app.Run([]string{"command", "bar"})
|
||||
expect(t, err, nil)
|
||||
expect(t, s, "foobar")
|
||||
}
|
||||
|
||||
var commandAppTests = []struct {
|
||||
name string
|
||||
expected bool
|
||||
}{
|
||||
{"foobar", true},
|
||||
{"batbaz", true},
|
||||
{"b", true},
|
||||
{"f", true},
|
||||
{"bat", false},
|
||||
{"nothing", false},
|
||||
}
|
||||
|
||||
func TestApp_Command(t *testing.T) {
|
||||
app := cli.NewApp()
|
||||
fooCommand := cli.Command{Name: "foobar", Aliases: []string{"f"}}
|
||||
batCommand := cli.Command{Name: "batbaz", Aliases: []string{"b"}}
|
||||
app.Commands = []cli.Command{
|
||||
fooCommand,
|
||||
batCommand,
|
||||
}
|
||||
|
||||
for _, test := range commandAppTests {
|
||||
expect(t, app.Command(test.name) != nil, test.expected)
|
||||
}
|
||||
}
|
||||
|
||||
func TestApp_CommandWithArgBeforeFlags(t *testing.T) {
|
||||
var parsedOption, firstArg string
|
||||
|
||||
app := cli.NewApp()
|
||||
command := cli.Command{
|
||||
Name: "cmd",
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{Name: "option", Value: "", Usage: "some option"},
|
||||
},
|
||||
Action: func(c *cli.Context) {
|
||||
parsedOption = c.String("option")
|
||||
firstArg = c.Args().First()
|
||||
},
|
||||
}
|
||||
app.Commands = []cli.Command{command}
|
||||
|
||||
app.Run([]string{"", "cmd", "my-arg", "--option", "my-option"})
|
||||
|
||||
expect(t, parsedOption, "my-option")
|
||||
expect(t, firstArg, "my-arg")
|
||||
}
|
||||
|
||||
func TestApp_RunAsSubcommandParseFlags(t *testing.T) {
|
||||
var context *cli.Context
|
||||
|
||||
a := cli.NewApp()
|
||||
a.Commands = []cli.Command{
|
||||
{
|
||||
Name: "foo",
|
||||
Action: func(c *cli.Context) {
|
||||
context = c
|
||||
},
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "lang",
|
||||
Value: "english",
|
||||
Usage: "language for the greeting",
|
||||
},
|
||||
},
|
||||
Before: func(_ *cli.Context) error { return nil },
|
||||
},
|
||||
}
|
||||
a.Run([]string{"", "foo", "--lang", "spanish", "abcd"})
|
||||
|
||||
expect(t, context.Args().Get(0), "abcd")
|
||||
expect(t, context.String("lang"), "spanish")
|
||||
}
|
||||
|
||||
func TestApp_CommandWithFlagBeforeTerminator(t *testing.T) {
|
||||
var parsedOption string
|
||||
var args []string
|
||||
|
||||
app := cli.NewApp()
|
||||
command := cli.Command{
|
||||
Name: "cmd",
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{Name: "option", Value: "", Usage: "some option"},
|
||||
},
|
||||
Action: func(c *cli.Context) {
|
||||
parsedOption = c.String("option")
|
||||
args = c.Args()
|
||||
},
|
||||
}
|
||||
app.Commands = []cli.Command{command}
|
||||
|
||||
app.Run([]string{"", "cmd", "my-arg", "--option", "my-option", "--", "--notARealFlag"})
|
||||
|
||||
expect(t, parsedOption, "my-option")
|
||||
expect(t, args[0], "my-arg")
|
||||
expect(t, args[1], "--")
|
||||
expect(t, args[2], "--notARealFlag")
|
||||
}
|
||||
|
||||
func TestApp_CommandWithNoFlagBeforeTerminator(t *testing.T) {
|
||||
var args []string
|
||||
|
||||
app := cli.NewApp()
|
||||
command := cli.Command{
|
||||
Name: "cmd",
|
||||
Action: func(c *cli.Context) {
|
||||
args = c.Args()
|
||||
},
|
||||
}
|
||||
app.Commands = []cli.Command{command}
|
||||
|
||||
app.Run([]string{"", "cmd", "my-arg", "--", "notAFlagAtAll"})
|
||||
|
||||
expect(t, args[0], "my-arg")
|
||||
expect(t, args[1], "--")
|
||||
expect(t, args[2], "notAFlagAtAll")
|
||||
}
|
||||
|
||||
func TestApp_Float64Flag(t *testing.T) {
|
||||
var meters float64
|
||||
|
||||
app := cli.NewApp()
|
||||
app.Flags = []cli.Flag{
|
||||
cli.Float64Flag{Name: "height", Value: 1.5, Usage: "Set the height, in meters"},
|
||||
}
|
||||
app.Action = func(c *cli.Context) {
|
||||
meters = c.Float64("height")
|
||||
}
|
||||
|
||||
app.Run([]string{"", "--height", "1.93"})
|
||||
expect(t, meters, 1.93)
|
||||
}
|
||||
|
||||
func TestApp_ParseSliceFlags(t *testing.T) {
|
||||
var parsedOption, firstArg string
|
||||
var parsedIntSlice []int
|
||||
var parsedStringSlice []string
|
||||
|
||||
app := cli.NewApp()
|
||||
command := cli.Command{
|
||||
Name: "cmd",
|
||||
Flags: []cli.Flag{
|
||||
cli.IntSliceFlag{Name: "p", Value: &cli.IntSlice{}, Usage: "set one or more ip addr"},
|
||||
cli.StringSliceFlag{Name: "ip", Value: &cli.StringSlice{}, Usage: "set one or more ports to open"},
|
||||
},
|
||||
Action: func(c *cli.Context) {
|
||||
parsedIntSlice = c.IntSlice("p")
|
||||
parsedStringSlice = c.StringSlice("ip")
|
||||
parsedOption = c.String("option")
|
||||
firstArg = c.Args().First()
|
||||
},
|
||||
}
|
||||
app.Commands = []cli.Command{command}
|
||||
|
||||
app.Run([]string{"", "cmd", "my-arg", "-p", "22", "-p", "80", "-ip", "8.8.8.8", "-ip", "8.8.4.4"})
|
||||
|
||||
IntsEquals := func(a, b []int) bool {
|
||||
if len(a) != len(b) {
|
||||
return false
|
||||
}
|
||||
for i, v := range a {
|
||||
if v != b[i] {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
StrsEquals := func(a, b []string) bool {
|
||||
if len(a) != len(b) {
|
||||
return false
|
||||
}
|
||||
for i, v := range a {
|
||||
if v != b[i] {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
var expectedIntSlice = []int{22, 80}
|
||||
var expectedStringSlice = []string{"8.8.8.8", "8.8.4.4"}
|
||||
|
||||
if !IntsEquals(parsedIntSlice, expectedIntSlice) {
|
||||
t.Errorf("%v does not match %v", parsedIntSlice, expectedIntSlice)
|
||||
}
|
||||
|
||||
if !StrsEquals(parsedStringSlice, expectedStringSlice) {
|
||||
t.Errorf("%v does not match %v", parsedStringSlice, expectedStringSlice)
|
||||
}
|
||||
}
|
||||
|
||||
func TestApp_DefaultStdout(t *testing.T) {
|
||||
app := cli.NewApp()
|
||||
|
||||
if app.Writer != os.Stdout {
|
||||
t.Error("Default output writer not set.")
|
||||
}
|
||||
}
|
||||
|
||||
type mockWriter struct {
|
||||
written []byte
|
||||
}
|
||||
|
||||
func (fw *mockWriter) Write(p []byte) (n int, err error) {
|
||||
if fw.written == nil {
|
||||
fw.written = p
|
||||
} else {
|
||||
fw.written = append(fw.written, p...)
|
||||
}
|
||||
|
||||
return len(p), nil
|
||||
}
|
||||
|
||||
func (fw *mockWriter) GetWritten() (b []byte) {
|
||||
return fw.written
|
||||
}
|
||||
|
||||
func TestApp_SetStdout(t *testing.T) {
|
||||
w := &mockWriter{}
|
||||
|
||||
app := cli.NewApp()
|
||||
app.Name = "test"
|
||||
app.Writer = w
|
||||
|
||||
err := app.Run([]string{"help"})
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("Run error: %s", err)
|
||||
}
|
||||
|
||||
if len(w.written) == 0 {
|
||||
t.Error("App did not write output to desired writer.")
|
||||
}
|
||||
}
|
||||
|
||||
func TestApp_BeforeFunc(t *testing.T) {
|
||||
beforeRun, subcommandRun := false, false
|
||||
beforeError := fmt.Errorf("fail")
|
||||
var err error
|
||||
|
||||
app := cli.NewApp()
|
||||
|
||||
app.Before = func(c *cli.Context) error {
|
||||
beforeRun = true
|
||||
s := c.String("opt")
|
||||
if s == "fail" {
|
||||
return beforeError
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
app.Commands = []cli.Command{
|
||||
cli.Command{
|
||||
Name: "sub",
|
||||
Action: func(c *cli.Context) {
|
||||
subcommandRun = true
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
app.Flags = []cli.Flag{
|
||||
cli.StringFlag{Name: "opt"},
|
||||
}
|
||||
|
||||
// run with the Before() func succeeding
|
||||
err = app.Run([]string{"command", "--opt", "succeed", "sub"})
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("Run error: %s", err)
|
||||
}
|
||||
|
||||
if beforeRun == false {
|
||||
t.Errorf("Before() not executed when expected")
|
||||
}
|
||||
|
||||
if subcommandRun == false {
|
||||
t.Errorf("Subcommand not executed when expected")
|
||||
}
|
||||
|
||||
// reset
|
||||
beforeRun, subcommandRun = false, false
|
||||
|
||||
// run with the Before() func failing
|
||||
err = app.Run([]string{"command", "--opt", "fail", "sub"})
|
||||
|
||||
// should be the same error produced by the Before func
|
||||
if err != beforeError {
|
||||
t.Errorf("Run error expected, but not received")
|
||||
}
|
||||
|
||||
if beforeRun == false {
|
||||
t.Errorf("Before() not executed when expected")
|
||||
}
|
||||
|
||||
if subcommandRun == true {
|
||||
t.Errorf("Subcommand executed when NOT expected")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestApp_AfterFunc(t *testing.T) {
|
||||
afterRun, subcommandRun := false, false
|
||||
afterError := fmt.Errorf("fail")
|
||||
var err error
|
||||
|
||||
app := cli.NewApp()
|
||||
|
||||
app.After = func(c *cli.Context) error {
|
||||
afterRun = true
|
||||
s := c.String("opt")
|
||||
if s == "fail" {
|
||||
return afterError
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
app.Commands = []cli.Command{
|
||||
cli.Command{
|
||||
Name: "sub",
|
||||
Action: func(c *cli.Context) {
|
||||
subcommandRun = true
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
app.Flags = []cli.Flag{
|
||||
cli.StringFlag{Name: "opt"},
|
||||
}
|
||||
|
||||
// run with the After() func succeeding
|
||||
err = app.Run([]string{"command", "--opt", "succeed", "sub"})
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("Run error: %s", err)
|
||||
}
|
||||
|
||||
if afterRun == false {
|
||||
t.Errorf("After() not executed when expected")
|
||||
}
|
||||
|
||||
if subcommandRun == false {
|
||||
t.Errorf("Subcommand not executed when expected")
|
||||
}
|
||||
|
||||
// reset
|
||||
afterRun, subcommandRun = false, false
|
||||
|
||||
// run with the Before() func failing
|
||||
err = app.Run([]string{"command", "--opt", "fail", "sub"})
|
||||
|
||||
// should be the same error produced by the Before func
|
||||
if err != afterError {
|
||||
t.Errorf("Run error expected, but not received")
|
||||
}
|
||||
|
||||
if afterRun == false {
|
||||
t.Errorf("After() not executed when expected")
|
||||
}
|
||||
|
||||
if subcommandRun == false {
|
||||
t.Errorf("Subcommand not executed when expected")
|
||||
}
|
||||
}
|
||||
|
||||
func TestAppNoHelpFlag(t *testing.T) {
|
||||
oldFlag := cli.HelpFlag
|
||||
defer func() {
|
||||
cli.HelpFlag = oldFlag
|
||||
}()
|
||||
|
||||
cli.HelpFlag = cli.BoolFlag{}
|
||||
|
||||
app := cli.NewApp()
|
||||
err := app.Run([]string{"test", "-h"})
|
||||
|
||||
if err != flag.ErrHelp {
|
||||
t.Errorf("expected error about missing help flag, but got: %s (%T)", err, err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestAppHelpPrinter(t *testing.T) {
|
||||
oldPrinter := cli.HelpPrinter
|
||||
defer func() {
|
||||
cli.HelpPrinter = oldPrinter
|
||||
}()
|
||||
|
||||
var wasCalled = false
|
||||
cli.HelpPrinter = func(template string, data interface{}) {
|
||||
wasCalled = true
|
||||
}
|
||||
|
||||
app := cli.NewApp()
|
||||
app.Run([]string{"-h"})
|
||||
|
||||
if wasCalled == false {
|
||||
t.Errorf("Help printer expected to be called, but was not")
|
||||
}
|
||||
}
|
||||
|
||||
func TestAppVersionPrinter(t *testing.T) {
|
||||
oldPrinter := cli.VersionPrinter
|
||||
defer func() {
|
||||
cli.VersionPrinter = oldPrinter
|
||||
}()
|
||||
|
||||
var wasCalled = false
|
||||
cli.VersionPrinter = func(c *cli.Context) {
|
||||
wasCalled = true
|
||||
}
|
||||
|
||||
app := cli.NewApp()
|
||||
ctx := cli.NewContext(app, nil, nil)
|
||||
cli.ShowVersion(ctx)
|
||||
|
||||
if wasCalled == false {
|
||||
t.Errorf("Version printer expected to be called, but was not")
|
||||
}
|
||||
}
|
||||
|
||||
func TestAppCommandNotFound(t *testing.T) {
|
||||
beforeRun, subcommandRun := false, false
|
||||
app := cli.NewApp()
|
||||
|
||||
app.CommandNotFound = func(c *cli.Context, command string) {
|
||||
beforeRun = true
|
||||
}
|
||||
|
||||
app.Commands = []cli.Command{
|
||||
cli.Command{
|
||||
Name: "bar",
|
||||
Action: func(c *cli.Context) {
|
||||
subcommandRun = true
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
app.Run([]string{"command", "foo"})
|
||||
|
||||
expect(t, beforeRun, true)
|
||||
expect(t, subcommandRun, false)
|
||||
}
|
||||
|
||||
func TestGlobalFlagsInSubcommands(t *testing.T) {
|
||||
subcommandRun := false
|
||||
app := cli.NewApp()
|
||||
|
||||
app.Flags = []cli.Flag{
|
||||
cli.BoolFlag{Name: "debug, d", Usage: "Enable debugging"},
|
||||
}
|
||||
|
||||
app.Commands = []cli.Command{
|
||||
cli.Command{
|
||||
Name: "foo",
|
||||
Subcommands: []cli.Command{
|
||||
{
|
||||
Name: "bar",
|
||||
Action: func(c *cli.Context) {
|
||||
if c.GlobalBool("debug") {
|
||||
subcommandRun = true
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
app.Run([]string{"command", "-d", "foo", "bar"})
|
||||
|
||||
expect(t, subcommandRun, true)
|
||||
}
|
||||
13
Godeps/_workspace/src/github.com/codegangsta/cli/autocomplete/bash_autocomplete
generated
vendored
Normal file
13
Godeps/_workspace/src/github.com/codegangsta/cli/autocomplete/bash_autocomplete
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
#! /bin/bash
|
||||
|
||||
_cli_bash_autocomplete() {
|
||||
local cur prev opts base
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion )
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
return 0
|
||||
}
|
||||
|
||||
complete -F _cli_bash_autocomplete $PROG
|
||||
5
Godeps/_workspace/src/github.com/codegangsta/cli/autocomplete/zsh_autocomplete
generated
vendored
Normal file
5
Godeps/_workspace/src/github.com/codegangsta/cli/autocomplete/zsh_autocomplete
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
autoload -U compinit && compinit
|
||||
autoload -U bashcompinit && bashcompinit
|
||||
|
||||
script_dir=$(dirname $0)
|
||||
source ${script_dir}/bash_autocomplete
|
||||
19
Godeps/_workspace/src/github.com/codegangsta/cli/cli.go
generated
vendored
Normal file
19
Godeps/_workspace/src/github.com/codegangsta/cli/cli.go
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// Package cli provides a minimal framework for creating and organizing command line
|
||||
// Go applications. cli is designed to be easy to understand and write, the most simple
|
||||
// cli application can be written as follows:
|
||||
// func main() {
|
||||
// cli.NewApp().Run(os.Args)
|
||||
// }
|
||||
//
|
||||
// Of course this application does not do much, so let's make this an actual application:
|
||||
// func main() {
|
||||
// app := cli.NewApp()
|
||||
// app.Name = "greet"
|
||||
// app.Usage = "say a greeting"
|
||||
// app.Action = func(c *cli.Context) {
|
||||
// println("Greetings")
|
||||
// }
|
||||
//
|
||||
// app.Run(os.Args)
|
||||
// }
|
||||
package cli
|
||||
100
Godeps/_workspace/src/github.com/codegangsta/cli/cli_test.go
generated
vendored
Normal file
100
Godeps/_workspace/src/github.com/codegangsta/cli/cli_test.go
generated
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
package cli_test
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
func Example() {
|
||||
app := cli.NewApp()
|
||||
app.Name = "todo"
|
||||
app.Usage = "task list on the command line"
|
||||
app.Commands = []cli.Command{
|
||||
{
|
||||
Name: "add",
|
||||
Aliases: []string{"a"},
|
||||
Usage: "add a task to the list",
|
||||
Action: func(c *cli.Context) {
|
||||
println("added task: ", c.Args().First())
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "complete",
|
||||
Aliases: []string{"c"},
|
||||
Usage: "complete a task on the list",
|
||||
Action: func(c *cli.Context) {
|
||||
println("completed task: ", c.Args().First())
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
app.Run(os.Args)
|
||||
}
|
||||
|
||||
func ExampleSubcommand() {
|
||||
app := cli.NewApp()
|
||||
app.Name = "say"
|
||||
app.Commands = []cli.Command{
|
||||
{
|
||||
Name: "hello",
|
||||
Aliases: []string{"hi"},
|
||||
Usage: "use it to see a description",
|
||||
Description: "This is how we describe hello the function",
|
||||
Subcommands: []cli.Command{
|
||||
{
|
||||
Name: "english",
|
||||
Aliases: []string{"en"},
|
||||
Usage: "sends a greeting in english",
|
||||
Description: "greets someone in english",
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "name",
|
||||
Value: "Bob",
|
||||
Usage: "Name of the person to greet",
|
||||
},
|
||||
},
|
||||
Action: func(c *cli.Context) {
|
||||
println("Hello, ", c.String("name"))
|
||||
},
|
||||
}, {
|
||||
Name: "spanish",
|
||||
Aliases: []string{"sp"},
|
||||
Usage: "sends a greeting in spanish",
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "surname",
|
||||
Value: "Jones",
|
||||
Usage: "Surname of the person to greet",
|
||||
},
|
||||
},
|
||||
Action: func(c *cli.Context) {
|
||||
println("Hola, ", c.String("surname"))
|
||||
},
|
||||
}, {
|
||||
Name: "french",
|
||||
Aliases: []string{"fr"},
|
||||
Usage: "sends a greeting in french",
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "nickname",
|
||||
Value: "Stevie",
|
||||
Usage: "Nickname of the person to greet",
|
||||
},
|
||||
},
|
||||
Action: func(c *cli.Context) {
|
||||
println("Bonjour, ", c.String("nickname"))
|
||||
},
|
||||
},
|
||||
},
|
||||
}, {
|
||||
Name: "bye",
|
||||
Usage: "says goodbye",
|
||||
Action: func(c *cli.Context) {
|
||||
println("bye")
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
app.Run(os.Args)
|
||||
}
|
||||
177
Godeps/_workspace/src/github.com/codegangsta/cli/command.go
generated
vendored
Normal file
177
Godeps/_workspace/src/github.com/codegangsta/cli/command.go
generated
vendored
Normal file
@@ -0,0 +1,177 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Command is a subcommand for a cli.App.
|
||||
type Command struct {
|
||||
// The name of the command
|
||||
Name string
|
||||
// short name of the command. Typically one character (deprecated, use `Aliases`)
|
||||
ShortName string
|
||||
// A list of aliases for the command
|
||||
Aliases []string
|
||||
// A short description of the usage of this command
|
||||
Usage string
|
||||
// A longer explanation of how the command works
|
||||
Description string
|
||||
// The function to call when checking for bash command completions
|
||||
BashComplete func(context *Context)
|
||||
// An action to execute before any sub-subcommands are run, but after the context is ready
|
||||
// If a non-nil error is returned, no sub-subcommands are run
|
||||
Before func(context *Context) error
|
||||
// An action to execute after any subcommands are run, but after the subcommand has finished
|
||||
// It is run even if Action() panics
|
||||
After func(context *Context) error
|
||||
// The function to call when this command is invoked
|
||||
Action func(context *Context)
|
||||
// List of child commands
|
||||
Subcommands []Command
|
||||
// List of flags to parse
|
||||
Flags []Flag
|
||||
// Treat all flags as normal arguments if true
|
||||
SkipFlagParsing bool
|
||||
// Boolean to hide built-in help command
|
||||
HideHelp bool
|
||||
}
|
||||
|
||||
// Invokes the command given the context, parses ctx.Args() to generate command-specific flags
|
||||
func (c Command) Run(ctx *Context) error {
|
||||
|
||||
if len(c.Subcommands) > 0 || c.Before != nil || c.After != nil {
|
||||
return c.startApp(ctx)
|
||||
}
|
||||
|
||||
if !c.HideHelp && (HelpFlag != BoolFlag{}) {
|
||||
// append help to flags
|
||||
c.Flags = append(
|
||||
c.Flags,
|
||||
HelpFlag,
|
||||
)
|
||||
}
|
||||
|
||||
if ctx.App.EnableBashCompletion {
|
||||
c.Flags = append(c.Flags, BashCompletionFlag)
|
||||
}
|
||||
|
||||
set := flagSet(c.Name, c.Flags)
|
||||
set.SetOutput(ioutil.Discard)
|
||||
|
||||
firstFlagIndex := -1
|
||||
terminatorIndex := -1
|
||||
for index, arg := range ctx.Args() {
|
||||
if arg == "--" {
|
||||
terminatorIndex = index
|
||||
break
|
||||
} else if strings.HasPrefix(arg, "-") && firstFlagIndex == -1 {
|
||||
firstFlagIndex = index
|
||||
}
|
||||
}
|
||||
|
||||
var err error
|
||||
if firstFlagIndex > -1 && !c.SkipFlagParsing {
|
||||
args := ctx.Args()
|
||||
regularArgs := make([]string, len(args[1:firstFlagIndex]))
|
||||
copy(regularArgs, args[1:firstFlagIndex])
|
||||
|
||||
var flagArgs []string
|
||||
if terminatorIndex > -1 {
|
||||
flagArgs = args[firstFlagIndex:terminatorIndex]
|
||||
regularArgs = append(regularArgs, args[terminatorIndex:]...)
|
||||
} else {
|
||||
flagArgs = args[firstFlagIndex:]
|
||||
}
|
||||
|
||||
err = set.Parse(append(flagArgs, regularArgs...))
|
||||
} else {
|
||||
err = set.Parse(ctx.Args().Tail())
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
fmt.Fprint(ctx.App.Writer, "Incorrect Usage.\n\n")
|
||||
ShowCommandHelp(ctx, c.Name)
|
||||
fmt.Fprintln(ctx.App.Writer)
|
||||
return err
|
||||
}
|
||||
|
||||
nerr := normalizeFlags(c.Flags, set)
|
||||
if nerr != nil {
|
||||
fmt.Fprintln(ctx.App.Writer, nerr)
|
||||
fmt.Fprintln(ctx.App.Writer)
|
||||
ShowCommandHelp(ctx, c.Name)
|
||||
fmt.Fprintln(ctx.App.Writer)
|
||||
return nerr
|
||||
}
|
||||
context := NewContext(ctx.App, set, ctx.globalSet)
|
||||
|
||||
if checkCommandCompletions(context, c.Name) {
|
||||
return nil
|
||||
}
|
||||
|
||||
if checkCommandHelp(context, c.Name) {
|
||||
return nil
|
||||
}
|
||||
context.Command = c
|
||||
c.Action(context)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c Command) Names() []string {
|
||||
names := []string{c.Name}
|
||||
|
||||
if c.ShortName != "" {
|
||||
names = append(names, c.ShortName)
|
||||
}
|
||||
|
||||
return append(names, c.Aliases...)
|
||||
}
|
||||
|
||||
// Returns true if Command.Name or Command.ShortName matches given name
|
||||
func (c Command) HasName(name string) bool {
|
||||
for _, n := range c.Names() {
|
||||
if n == name {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (c Command) startApp(ctx *Context) error {
|
||||
app := NewApp()
|
||||
|
||||
// set the name and usage
|
||||
app.Name = fmt.Sprintf("%s %s", ctx.App.Name, c.Name)
|
||||
if c.Description != "" {
|
||||
app.Usage = c.Description
|
||||
} else {
|
||||
app.Usage = c.Usage
|
||||
}
|
||||
|
||||
// set CommandNotFound
|
||||
app.CommandNotFound = ctx.App.CommandNotFound
|
||||
|
||||
// set the flags and commands
|
||||
app.Commands = c.Subcommands
|
||||
app.Flags = c.Flags
|
||||
app.HideHelp = c.HideHelp
|
||||
|
||||
// bash completion
|
||||
app.EnableBashCompletion = ctx.App.EnableBashCompletion
|
||||
if c.BashComplete != nil {
|
||||
app.BashComplete = c.BashComplete
|
||||
}
|
||||
|
||||
// set the actions
|
||||
app.Before = c.Before
|
||||
app.After = c.After
|
||||
if c.Action != nil {
|
||||
app.Action = c.Action
|
||||
} else {
|
||||
app.Action = helpSubcommand.Action
|
||||
}
|
||||
|
||||
return app.RunAsSubcommand(ctx)
|
||||
}
|
||||
49
Godeps/_workspace/src/github.com/codegangsta/cli/command_test.go
generated
vendored
Normal file
49
Godeps/_workspace/src/github.com/codegangsta/cli/command_test.go
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
package cli_test
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"testing"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
func TestCommandDoNotIgnoreFlags(t *testing.T) {
|
||||
app := cli.NewApp()
|
||||
set := flag.NewFlagSet("test", 0)
|
||||
test := []string{"blah", "blah", "-break"}
|
||||
set.Parse(test)
|
||||
|
||||
c := cli.NewContext(app, set, set)
|
||||
|
||||
command := cli.Command{
|
||||
Name: "test-cmd",
|
||||
Aliases: []string{"tc"},
|
||||
Usage: "this is for testing",
|
||||
Description: "testing",
|
||||
Action: func(_ *cli.Context) {},
|
||||
}
|
||||
err := command.Run(c)
|
||||
|
||||
expect(t, err.Error(), "flag provided but not defined: -break")
|
||||
}
|
||||
|
||||
func TestCommandIgnoreFlags(t *testing.T) {
|
||||
app := cli.NewApp()
|
||||
set := flag.NewFlagSet("test", 0)
|
||||
test := []string{"blah", "blah"}
|
||||
set.Parse(test)
|
||||
|
||||
c := cli.NewContext(app, set, set)
|
||||
|
||||
command := cli.Command{
|
||||
Name: "test-cmd",
|
||||
Aliases: []string{"tc"},
|
||||
Usage: "this is for testing",
|
||||
Description: "testing",
|
||||
Action: func(_ *cli.Context) {},
|
||||
SkipFlagParsing: true,
|
||||
}
|
||||
err := command.Run(c)
|
||||
|
||||
expect(t, err, nil)
|
||||
}
|
||||
344
Godeps/_workspace/src/github.com/codegangsta/cli/context.go
generated
vendored
Normal file
344
Godeps/_workspace/src/github.com/codegangsta/cli/context.go
generated
vendored
Normal file
@@ -0,0 +1,344 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"flag"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Context is a type that is passed through to
|
||||
// each Handler action in a cli application. Context
|
||||
// can be used to retrieve context-specific Args and
|
||||
// parsed command-line options.
|
||||
type Context struct {
|
||||
App *App
|
||||
Command Command
|
||||
flagSet *flag.FlagSet
|
||||
globalSet *flag.FlagSet
|
||||
setFlags map[string]bool
|
||||
globalSetFlags map[string]bool
|
||||
}
|
||||
|
||||
// Creates a new context. For use in when invoking an App or Command action.
|
||||
func NewContext(app *App, set *flag.FlagSet, globalSet *flag.FlagSet) *Context {
|
||||
return &Context{App: app, flagSet: set, globalSet: globalSet}
|
||||
}
|
||||
|
||||
// Looks up the value of a local int flag, returns 0 if no int flag exists
|
||||
func (c *Context) Int(name string) int {
|
||||
return lookupInt(name, c.flagSet)
|
||||
}
|
||||
|
||||
// Looks up the value of a local time.Duration flag, returns 0 if no time.Duration flag exists
|
||||
func (c *Context) Duration(name string) time.Duration {
|
||||
return lookupDuration(name, c.flagSet)
|
||||
}
|
||||
|
||||
// Looks up the value of a local float64 flag, returns 0 if no float64 flag exists
|
||||
func (c *Context) Float64(name string) float64 {
|
||||
return lookupFloat64(name, c.flagSet)
|
||||
}
|
||||
|
||||
// Looks up the value of a local bool flag, returns false if no bool flag exists
|
||||
func (c *Context) Bool(name string) bool {
|
||||
return lookupBool(name, c.flagSet)
|
||||
}
|
||||
|
||||
// Looks up the value of a local boolT flag, returns false if no bool flag exists
|
||||
func (c *Context) BoolT(name string) bool {
|
||||
return lookupBoolT(name, c.flagSet)
|
||||
}
|
||||
|
||||
// Looks up the value of a local string flag, returns "" if no string flag exists
|
||||
func (c *Context) String(name string) string {
|
||||
return lookupString(name, c.flagSet)
|
||||
}
|
||||
|
||||
// Looks up the value of a local string slice flag, returns nil if no string slice flag exists
|
||||
func (c *Context) StringSlice(name string) []string {
|
||||
return lookupStringSlice(name, c.flagSet)
|
||||
}
|
||||
|
||||
// Looks up the value of a local int slice flag, returns nil if no int slice flag exists
|
||||
func (c *Context) IntSlice(name string) []int {
|
||||
return lookupIntSlice(name, c.flagSet)
|
||||
}
|
||||
|
||||
// Looks up the value of a local generic flag, returns nil if no generic flag exists
|
||||
func (c *Context) Generic(name string) interface{} {
|
||||
return lookupGeneric(name, c.flagSet)
|
||||
}
|
||||
|
||||
// Looks up the value of a global int flag, returns 0 if no int flag exists
|
||||
func (c *Context) GlobalInt(name string) int {
|
||||
return lookupInt(name, c.globalSet)
|
||||
}
|
||||
|
||||
// Looks up the value of a global time.Duration flag, returns 0 if no time.Duration flag exists
|
||||
func (c *Context) GlobalDuration(name string) time.Duration {
|
||||
return lookupDuration(name, c.globalSet)
|
||||
}
|
||||
|
||||
// Looks up the value of a global bool flag, returns false if no bool flag exists
|
||||
func (c *Context) GlobalBool(name string) bool {
|
||||
return lookupBool(name, c.globalSet)
|
||||
}
|
||||
|
||||
// Looks up the value of a global string flag, returns "" if no string flag exists
|
||||
func (c *Context) GlobalString(name string) string {
|
||||
return lookupString(name, c.globalSet)
|
||||
}
|
||||
|
||||
// Looks up the value of a global string slice flag, returns nil if no string slice flag exists
|
||||
func (c *Context) GlobalStringSlice(name string) []string {
|
||||
return lookupStringSlice(name, c.globalSet)
|
||||
}
|
||||
|
||||
// Looks up the value of a global int slice flag, returns nil if no int slice flag exists
|
||||
func (c *Context) GlobalIntSlice(name string) []int {
|
||||
return lookupIntSlice(name, c.globalSet)
|
||||
}
|
||||
|
||||
// Looks up the value of a global generic flag, returns nil if no generic flag exists
|
||||
func (c *Context) GlobalGeneric(name string) interface{} {
|
||||
return lookupGeneric(name, c.globalSet)
|
||||
}
|
||||
|
||||
// Returns the number of flags set
|
||||
func (c *Context) NumFlags() int {
|
||||
return c.flagSet.NFlag()
|
||||
}
|
||||
|
||||
// Determines if the flag was actually set
|
||||
func (c *Context) IsSet(name string) bool {
|
||||
if c.setFlags == nil {
|
||||
c.setFlags = make(map[string]bool)
|
||||
c.flagSet.Visit(func(f *flag.Flag) {
|
||||
c.setFlags[f.Name] = true
|
||||
})
|
||||
}
|
||||
return c.setFlags[name] == true
|
||||
}
|
||||
|
||||
// Determines if the global flag was actually set
|
||||
func (c *Context) GlobalIsSet(name string) bool {
|
||||
if c.globalSetFlags == nil {
|
||||
c.globalSetFlags = make(map[string]bool)
|
||||
c.globalSet.Visit(func(f *flag.Flag) {
|
||||
c.globalSetFlags[f.Name] = true
|
||||
})
|
||||
}
|
||||
return c.globalSetFlags[name] == true
|
||||
}
|
||||
|
||||
// Returns a slice of flag names used in this context.
|
||||
func (c *Context) FlagNames() (names []string) {
|
||||
for _, flag := range c.Command.Flags {
|
||||
name := strings.Split(flag.getName(), ",")[0]
|
||||
if name == "help" {
|
||||
continue
|
||||
}
|
||||
names = append(names, name)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Returns a slice of global flag names used by the app.
|
||||
func (c *Context) GlobalFlagNames() (names []string) {
|
||||
for _, flag := range c.App.Flags {
|
||||
name := strings.Split(flag.getName(), ",")[0]
|
||||
if name == "help" || name == "version" {
|
||||
continue
|
||||
}
|
||||
names = append(names, name)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
type Args []string
|
||||
|
||||
// Returns the command line arguments associated with the context.
|
||||
func (c *Context) Args() Args {
|
||||
args := Args(c.flagSet.Args())
|
||||
return args
|
||||
}
|
||||
|
||||
// Returns the nth argument, or else a blank string
|
||||
func (a Args) Get(n int) string {
|
||||
if len(a) > n {
|
||||
return a[n]
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Returns the first argument, or else a blank string
|
||||
func (a Args) First() string {
|
||||
return a.Get(0)
|
||||
}
|
||||
|
||||
// Return the rest of the arguments (not the first one)
|
||||
// or else an empty string slice
|
||||
func (a Args) Tail() []string {
|
||||
if len(a) >= 2 {
|
||||
return []string(a)[1:]
|
||||
}
|
||||
return []string{}
|
||||
}
|
||||
|
||||
// Checks if there are any arguments present
|
||||
func (a Args) Present() bool {
|
||||
return len(a) != 0
|
||||
}
|
||||
|
||||
// Swaps arguments at the given indexes
|
||||
func (a Args) Swap(from, to int) error {
|
||||
if from >= len(a) || to >= len(a) {
|
||||
return errors.New("index out of range")
|
||||
}
|
||||
a[from], a[to] = a[to], a[from]
|
||||
return nil
|
||||
}
|
||||
|
||||
func lookupInt(name string, set *flag.FlagSet) int {
|
||||
f := set.Lookup(name)
|
||||
if f != nil {
|
||||
val, err := strconv.Atoi(f.Value.String())
|
||||
if err != nil {
|
||||
return 0
|
||||
}
|
||||
return val
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
func lookupDuration(name string, set *flag.FlagSet) time.Duration {
|
||||
f := set.Lookup(name)
|
||||
if f != nil {
|
||||
val, err := time.ParseDuration(f.Value.String())
|
||||
if err == nil {
|
||||
return val
|
||||
}
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
func lookupFloat64(name string, set *flag.FlagSet) float64 {
|
||||
f := set.Lookup(name)
|
||||
if f != nil {
|
||||
val, err := strconv.ParseFloat(f.Value.String(), 64)
|
||||
if err != nil {
|
||||
return 0
|
||||
}
|
||||
return val
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
func lookupString(name string, set *flag.FlagSet) string {
|
||||
f := set.Lookup(name)
|
||||
if f != nil {
|
||||
return f.Value.String()
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
|
||||
func lookupStringSlice(name string, set *flag.FlagSet) []string {
|
||||
f := set.Lookup(name)
|
||||
if f != nil {
|
||||
return (f.Value.(*StringSlice)).Value()
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func lookupIntSlice(name string, set *flag.FlagSet) []int {
|
||||
f := set.Lookup(name)
|
||||
if f != nil {
|
||||
return (f.Value.(*IntSlice)).Value()
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func lookupGeneric(name string, set *flag.FlagSet) interface{} {
|
||||
f := set.Lookup(name)
|
||||
if f != nil {
|
||||
return f.Value
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func lookupBool(name string, set *flag.FlagSet) bool {
|
||||
f := set.Lookup(name)
|
||||
if f != nil {
|
||||
val, err := strconv.ParseBool(f.Value.String())
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
return val
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func lookupBoolT(name string, set *flag.FlagSet) bool {
|
||||
f := set.Lookup(name)
|
||||
if f != nil {
|
||||
val, err := strconv.ParseBool(f.Value.String())
|
||||
if err != nil {
|
||||
return true
|
||||
}
|
||||
return val
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func copyFlag(name string, ff *flag.Flag, set *flag.FlagSet) {
|
||||
switch ff.Value.(type) {
|
||||
case *StringSlice:
|
||||
default:
|
||||
set.Set(name, ff.Value.String())
|
||||
}
|
||||
}
|
||||
|
||||
func normalizeFlags(flags []Flag, set *flag.FlagSet) error {
|
||||
visited := make(map[string]bool)
|
||||
set.Visit(func(f *flag.Flag) {
|
||||
visited[f.Name] = true
|
||||
})
|
||||
for _, f := range flags {
|
||||
parts := strings.Split(f.getName(), ",")
|
||||
if len(parts) == 1 {
|
||||
continue
|
||||
}
|
||||
var ff *flag.Flag
|
||||
for _, name := range parts {
|
||||
name = strings.Trim(name, " ")
|
||||
if visited[name] {
|
||||
if ff != nil {
|
||||
return errors.New("Cannot use two forms of the same flag: " + name + " " + ff.Name)
|
||||
}
|
||||
ff = set.Lookup(name)
|
||||
}
|
||||
}
|
||||
if ff == nil {
|
||||
continue
|
||||
}
|
||||
for _, name := range parts {
|
||||
name = strings.Trim(name, " ")
|
||||
if !visited[name] {
|
||||
copyFlag(name, ff, set)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
111
Godeps/_workspace/src/github.com/codegangsta/cli/context_test.go
generated
vendored
Normal file
111
Godeps/_workspace/src/github.com/codegangsta/cli/context_test.go
generated
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
package cli_test
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
func TestNewContext(t *testing.T) {
|
||||
set := flag.NewFlagSet("test", 0)
|
||||
set.Int("myflag", 12, "doc")
|
||||
globalSet := flag.NewFlagSet("test", 0)
|
||||
globalSet.Int("myflag", 42, "doc")
|
||||
command := cli.Command{Name: "mycommand"}
|
||||
c := cli.NewContext(nil, set, globalSet)
|
||||
c.Command = command
|
||||
expect(t, c.Int("myflag"), 12)
|
||||
expect(t, c.GlobalInt("myflag"), 42)
|
||||
expect(t, c.Command.Name, "mycommand")
|
||||
}
|
||||
|
||||
func TestContext_Int(t *testing.T) {
|
||||
set := flag.NewFlagSet("test", 0)
|
||||
set.Int("myflag", 12, "doc")
|
||||
c := cli.NewContext(nil, set, set)
|
||||
expect(t, c.Int("myflag"), 12)
|
||||
}
|
||||
|
||||
func TestContext_Duration(t *testing.T) {
|
||||
set := flag.NewFlagSet("test", 0)
|
||||
set.Duration("myflag", time.Duration(12*time.Second), "doc")
|
||||
c := cli.NewContext(nil, set, set)
|
||||
expect(t, c.Duration("myflag"), time.Duration(12*time.Second))
|
||||
}
|
||||
|
||||
func TestContext_String(t *testing.T) {
|
||||
set := flag.NewFlagSet("test", 0)
|
||||
set.String("myflag", "hello world", "doc")
|
||||
c := cli.NewContext(nil, set, set)
|
||||
expect(t, c.String("myflag"), "hello world")
|
||||
}
|
||||
|
||||
func TestContext_Bool(t *testing.T) {
|
||||
set := flag.NewFlagSet("test", 0)
|
||||
set.Bool("myflag", false, "doc")
|
||||
c := cli.NewContext(nil, set, set)
|
||||
expect(t, c.Bool("myflag"), false)
|
||||
}
|
||||
|
||||
func TestContext_BoolT(t *testing.T) {
|
||||
set := flag.NewFlagSet("test", 0)
|
||||
set.Bool("myflag", true, "doc")
|
||||
c := cli.NewContext(nil, set, set)
|
||||
expect(t, c.BoolT("myflag"), true)
|
||||
}
|
||||
|
||||
func TestContext_Args(t *testing.T) {
|
||||
set := flag.NewFlagSet("test", 0)
|
||||
set.Bool("myflag", false, "doc")
|
||||
c := cli.NewContext(nil, set, set)
|
||||
set.Parse([]string{"--myflag", "bat", "baz"})
|
||||
expect(t, len(c.Args()), 2)
|
||||
expect(t, c.Bool("myflag"), true)
|
||||
}
|
||||
|
||||
func TestContext_IsSet(t *testing.T) {
|
||||
set := flag.NewFlagSet("test", 0)
|
||||
set.Bool("myflag", false, "doc")
|
||||
set.String("otherflag", "hello world", "doc")
|
||||
globalSet := flag.NewFlagSet("test", 0)
|
||||
globalSet.Bool("myflagGlobal", true, "doc")
|
||||
c := cli.NewContext(nil, set, globalSet)
|
||||
set.Parse([]string{"--myflag", "bat", "baz"})
|
||||
globalSet.Parse([]string{"--myflagGlobal", "bat", "baz"})
|
||||
expect(t, c.IsSet("myflag"), true)
|
||||
expect(t, c.IsSet("otherflag"), false)
|
||||
expect(t, c.IsSet("bogusflag"), false)
|
||||
expect(t, c.IsSet("myflagGlobal"), false)
|
||||
}
|
||||
|
||||
func TestContext_GlobalIsSet(t *testing.T) {
|
||||
set := flag.NewFlagSet("test", 0)
|
||||
set.Bool("myflag", false, "doc")
|
||||
set.String("otherflag", "hello world", "doc")
|
||||
globalSet := flag.NewFlagSet("test", 0)
|
||||
globalSet.Bool("myflagGlobal", true, "doc")
|
||||
globalSet.Bool("myflagGlobalUnset", true, "doc")
|
||||
c := cli.NewContext(nil, set, globalSet)
|
||||
set.Parse([]string{"--myflag", "bat", "baz"})
|
||||
globalSet.Parse([]string{"--myflagGlobal", "bat", "baz"})
|
||||
expect(t, c.GlobalIsSet("myflag"), false)
|
||||
expect(t, c.GlobalIsSet("otherflag"), false)
|
||||
expect(t, c.GlobalIsSet("bogusflag"), false)
|
||||
expect(t, c.GlobalIsSet("myflagGlobal"), true)
|
||||
expect(t, c.GlobalIsSet("myflagGlobalUnset"), false)
|
||||
expect(t, c.GlobalIsSet("bogusGlobal"), false)
|
||||
}
|
||||
|
||||
func TestContext_NumFlags(t *testing.T) {
|
||||
set := flag.NewFlagSet("test", 0)
|
||||
set.Bool("myflag", false, "doc")
|
||||
set.String("otherflag", "hello world", "doc")
|
||||
globalSet := flag.NewFlagSet("test", 0)
|
||||
globalSet.Bool("myflagGlobal", true, "doc")
|
||||
c := cli.NewContext(nil, set, globalSet)
|
||||
set.Parse([]string{"--myflag", "--otherflag=foo"})
|
||||
globalSet.Parse([]string{"--myflagGlobal"})
|
||||
expect(t, c.NumFlags(), 2)
|
||||
}
|
||||
454
Godeps/_workspace/src/github.com/codegangsta/cli/flag.go
generated
vendored
Normal file
454
Godeps/_workspace/src/github.com/codegangsta/cli/flag.go
generated
vendored
Normal file
@@ -0,0 +1,454 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
// This flag enables bash-completion for all commands and subcommands
|
||||
var BashCompletionFlag = BoolFlag{
|
||||
Name: "generate-bash-completion",
|
||||
}
|
||||
|
||||
// This flag prints the version for the application
|
||||
var VersionFlag = BoolFlag{
|
||||
Name: "version, v",
|
||||
Usage: "print the version",
|
||||
}
|
||||
|
||||
// This flag prints the help for all commands and subcommands
|
||||
// Set to the zero value (BoolFlag{}) to disable flag -- keeps subcommand
|
||||
// unless HideHelp is set to true)
|
||||
var HelpFlag = BoolFlag{
|
||||
Name: "help, h",
|
||||
Usage: "show help",
|
||||
}
|
||||
|
||||
// Flag is a common interface related to parsing flags in cli.
|
||||
// For more advanced flag parsing techniques, it is recomended that
|
||||
// this interface be implemented.
|
||||
type Flag interface {
|
||||
fmt.Stringer
|
||||
// Apply Flag settings to the given flag set
|
||||
Apply(*flag.FlagSet)
|
||||
getName() string
|
||||
}
|
||||
|
||||
func flagSet(name string, flags []Flag) *flag.FlagSet {
|
||||
set := flag.NewFlagSet(name, flag.ContinueOnError)
|
||||
|
||||
for _, f := range flags {
|
||||
f.Apply(set)
|
||||
}
|
||||
return set
|
||||
}
|
||||
|
||||
func eachName(longName string, fn func(string)) {
|
||||
parts := strings.Split(longName, ",")
|
||||
for _, name := range parts {
|
||||
name = strings.Trim(name, " ")
|
||||
fn(name)
|
||||
}
|
||||
}
|
||||
|
||||
// Generic is a generic parseable type identified by a specific flag
|
||||
type Generic interface {
|
||||
Set(value string) error
|
||||
String() string
|
||||
}
|
||||
|
||||
// GenericFlag is the flag type for types implementing Generic
|
||||
type GenericFlag struct {
|
||||
Name string
|
||||
Value Generic
|
||||
Usage string
|
||||
EnvVar string
|
||||
}
|
||||
|
||||
// String returns the string representation of the generic flag to display the
|
||||
// help text to the user (uses the String() method of the generic flag to show
|
||||
// the value)
|
||||
func (f GenericFlag) String() string {
|
||||
return withEnvHint(f.EnvVar, fmt.Sprintf("%s%s \"%v\"\t%v", prefixFor(f.Name), f.Name, f.Value, f.Usage))
|
||||
}
|
||||
|
||||
// Apply takes the flagset and calls Set on the generic flag with the value
|
||||
// provided by the user for parsing by the flag
|
||||
func (f GenericFlag) Apply(set *flag.FlagSet) {
|
||||
val := f.Value
|
||||
if f.EnvVar != "" {
|
||||
for _, envVar := range strings.Split(f.EnvVar, ",") {
|
||||
envVar = strings.TrimSpace(envVar)
|
||||
if envVal := os.Getenv(envVar); envVal != "" {
|
||||
val.Set(envVal)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
eachName(f.Name, func(name string) {
|
||||
set.Var(f.Value, name, f.Usage)
|
||||
})
|
||||
}
|
||||
|
||||
func (f GenericFlag) getName() string {
|
||||
return f.Name
|
||||
}
|
||||
|
||||
type StringSlice []string
|
||||
|
||||
func (f *StringSlice) Set(value string) error {
|
||||
*f = append(*f, value)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (f *StringSlice) String() string {
|
||||
return fmt.Sprintf("%s", *f)
|
||||
}
|
||||
|
||||
func (f *StringSlice) Value() []string {
|
||||
return *f
|
||||
}
|
||||
|
||||
type StringSliceFlag struct {
|
||||
Name string
|
||||
Value *StringSlice
|
||||
Usage string
|
||||
EnvVar string
|
||||
}
|
||||
|
||||
func (f StringSliceFlag) String() string {
|
||||
firstName := strings.Trim(strings.Split(f.Name, ",")[0], " ")
|
||||
pref := prefixFor(firstName)
|
||||
return withEnvHint(f.EnvVar, fmt.Sprintf("%s [%v]\t%v", prefixedNames(f.Name), pref+firstName+" option "+pref+firstName+" option", f.Usage))
|
||||
}
|
||||
|
||||
func (f StringSliceFlag) Apply(set *flag.FlagSet) {
|
||||
if f.EnvVar != "" {
|
||||
for _, envVar := range strings.Split(f.EnvVar, ",") {
|
||||
envVar = strings.TrimSpace(envVar)
|
||||
if envVal := os.Getenv(envVar); envVal != "" {
|
||||
newVal := &StringSlice{}
|
||||
for _, s := range strings.Split(envVal, ",") {
|
||||
s = strings.TrimSpace(s)
|
||||
newVal.Set(s)
|
||||
}
|
||||
f.Value = newVal
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
eachName(f.Name, func(name string) {
|
||||
set.Var(f.Value, name, f.Usage)
|
||||
})
|
||||
}
|
||||
|
||||
func (f StringSliceFlag) getName() string {
|
||||
return f.Name
|
||||
}
|
||||
|
||||
type IntSlice []int
|
||||
|
||||
func (f *IntSlice) Set(value string) error {
|
||||
|
||||
tmp, err := strconv.Atoi(value)
|
||||
if err != nil {
|
||||
return err
|
||||
} else {
|
||||
*f = append(*f, tmp)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (f *IntSlice) String() string {
|
||||
return fmt.Sprintf("%d", *f)
|
||||
}
|
||||
|
||||
func (f *IntSlice) Value() []int {
|
||||
return *f
|
||||
}
|
||||
|
||||
type IntSliceFlag struct {
|
||||
Name string
|
||||
Value *IntSlice
|
||||
Usage string
|
||||
EnvVar string
|
||||
}
|
||||
|
||||
func (f IntSliceFlag) String() string {
|
||||
firstName := strings.Trim(strings.Split(f.Name, ",")[0], " ")
|
||||
pref := prefixFor(firstName)
|
||||
return withEnvHint(f.EnvVar, fmt.Sprintf("%s [%v]\t%v", prefixedNames(f.Name), pref+firstName+" option "+pref+firstName+" option", f.Usage))
|
||||
}
|
||||
|
||||
func (f IntSliceFlag) Apply(set *flag.FlagSet) {
|
||||
if f.EnvVar != "" {
|
||||
for _, envVar := range strings.Split(f.EnvVar, ",") {
|
||||
envVar = strings.TrimSpace(envVar)
|
||||
if envVal := os.Getenv(envVar); envVal != "" {
|
||||
newVal := &IntSlice{}
|
||||
for _, s := range strings.Split(envVal, ",") {
|
||||
s = strings.TrimSpace(s)
|
||||
err := newVal.Set(s)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, err.Error())
|
||||
}
|
||||
}
|
||||
f.Value = newVal
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
eachName(f.Name, func(name string) {
|
||||
set.Var(f.Value, name, f.Usage)
|
||||
})
|
||||
}
|
||||
|
||||
func (f IntSliceFlag) getName() string {
|
||||
return f.Name
|
||||
}
|
||||
|
||||
type BoolFlag struct {
|
||||
Name string
|
||||
Usage string
|
||||
EnvVar string
|
||||
}
|
||||
|
||||
func (f BoolFlag) String() string {
|
||||
return withEnvHint(f.EnvVar, fmt.Sprintf("%s\t%v", prefixedNames(f.Name), f.Usage))
|
||||
}
|
||||
|
||||
func (f BoolFlag) Apply(set *flag.FlagSet) {
|
||||
val := false
|
||||
if f.EnvVar != "" {
|
||||
for _, envVar := range strings.Split(f.EnvVar, ",") {
|
||||
envVar = strings.TrimSpace(envVar)
|
||||
if envVal := os.Getenv(envVar); envVal != "" {
|
||||
envValBool, err := strconv.ParseBool(envVal)
|
||||
if err == nil {
|
||||
val = envValBool
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
eachName(f.Name, func(name string) {
|
||||
set.Bool(name, val, f.Usage)
|
||||
})
|
||||
}
|
||||
|
||||
func (f BoolFlag) getName() string {
|
||||
return f.Name
|
||||
}
|
||||
|
||||
type BoolTFlag struct {
|
||||
Name string
|
||||
Usage string
|
||||
EnvVar string
|
||||
}
|
||||
|
||||
func (f BoolTFlag) String() string {
|
||||
return withEnvHint(f.EnvVar, fmt.Sprintf("%s\t%v", prefixedNames(f.Name), f.Usage))
|
||||
}
|
||||
|
||||
func (f BoolTFlag) Apply(set *flag.FlagSet) {
|
||||
val := true
|
||||
if f.EnvVar != "" {
|
||||
for _, envVar := range strings.Split(f.EnvVar, ",") {
|
||||
envVar = strings.TrimSpace(envVar)
|
||||
if envVal := os.Getenv(envVar); envVal != "" {
|
||||
envValBool, err := strconv.ParseBool(envVal)
|
||||
if err == nil {
|
||||
val = envValBool
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
eachName(f.Name, func(name string) {
|
||||
set.Bool(name, val, f.Usage)
|
||||
})
|
||||
}
|
||||
|
||||
func (f BoolTFlag) getName() string {
|
||||
return f.Name
|
||||
}
|
||||
|
||||
type StringFlag struct {
|
||||
Name string
|
||||
Value string
|
||||
Usage string
|
||||
EnvVar string
|
||||
}
|
||||
|
||||
func (f StringFlag) String() string {
|
||||
var fmtString string
|
||||
fmtString = "%s %v\t%v"
|
||||
|
||||
if len(f.Value) > 0 {
|
||||
fmtString = "%s \"%v\"\t%v"
|
||||
} else {
|
||||
fmtString = "%s %v\t%v"
|
||||
}
|
||||
|
||||
return withEnvHint(f.EnvVar, fmt.Sprintf(fmtString, prefixedNames(f.Name), f.Value, f.Usage))
|
||||
}
|
||||
|
||||
func (f StringFlag) Apply(set *flag.FlagSet) {
|
||||
if f.EnvVar != "" {
|
||||
for _, envVar := range strings.Split(f.EnvVar, ",") {
|
||||
envVar = strings.TrimSpace(envVar)
|
||||
if envVal := os.Getenv(envVar); envVal != "" {
|
||||
f.Value = envVal
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
eachName(f.Name, func(name string) {
|
||||
set.String(name, f.Value, f.Usage)
|
||||
})
|
||||
}
|
||||
|
||||
func (f StringFlag) getName() string {
|
||||
return f.Name
|
||||
}
|
||||
|
||||
type IntFlag struct {
|
||||
Name string
|
||||
Value int
|
||||
Usage string
|
||||
EnvVar string
|
||||
}
|
||||
|
||||
func (f IntFlag) String() string {
|
||||
return withEnvHint(f.EnvVar, fmt.Sprintf("%s \"%v\"\t%v", prefixedNames(f.Name), f.Value, f.Usage))
|
||||
}
|
||||
|
||||
func (f IntFlag) Apply(set *flag.FlagSet) {
|
||||
if f.EnvVar != "" {
|
||||
for _, envVar := range strings.Split(f.EnvVar, ",") {
|
||||
envVar = strings.TrimSpace(envVar)
|
||||
if envVal := os.Getenv(envVar); envVal != "" {
|
||||
envValInt, err := strconv.ParseInt(envVal, 0, 64)
|
||||
if err == nil {
|
||||
f.Value = int(envValInt)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
eachName(f.Name, func(name string) {
|
||||
set.Int(name, f.Value, f.Usage)
|
||||
})
|
||||
}
|
||||
|
||||
func (f IntFlag) getName() string {
|
||||
return f.Name
|
||||
}
|
||||
|
||||
type DurationFlag struct {
|
||||
Name string
|
||||
Value time.Duration
|
||||
Usage string
|
||||
EnvVar string
|
||||
}
|
||||
|
||||
func (f DurationFlag) String() string {
|
||||
return withEnvHint(f.EnvVar, fmt.Sprintf("%s \"%v\"\t%v", prefixedNames(f.Name), f.Value, f.Usage))
|
||||
}
|
||||
|
||||
func (f DurationFlag) Apply(set *flag.FlagSet) {
|
||||
if f.EnvVar != "" {
|
||||
for _, envVar := range strings.Split(f.EnvVar, ",") {
|
||||
envVar = strings.TrimSpace(envVar)
|
||||
if envVal := os.Getenv(envVar); envVal != "" {
|
||||
envValDuration, err := time.ParseDuration(envVal)
|
||||
if err == nil {
|
||||
f.Value = envValDuration
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
eachName(f.Name, func(name string) {
|
||||
set.Duration(name, f.Value, f.Usage)
|
||||
})
|
||||
}
|
||||
|
||||
func (f DurationFlag) getName() string {
|
||||
return f.Name
|
||||
}
|
||||
|
||||
type Float64Flag struct {
|
||||
Name string
|
||||
Value float64
|
||||
Usage string
|
||||
EnvVar string
|
||||
}
|
||||
|
||||
func (f Float64Flag) String() string {
|
||||
return withEnvHint(f.EnvVar, fmt.Sprintf("%s \"%v\"\t%v", prefixedNames(f.Name), f.Value, f.Usage))
|
||||
}
|
||||
|
||||
func (f Float64Flag) Apply(set *flag.FlagSet) {
|
||||
if f.EnvVar != "" {
|
||||
for _, envVar := range strings.Split(f.EnvVar, ",") {
|
||||
envVar = strings.TrimSpace(envVar)
|
||||
if envVal := os.Getenv(envVar); envVal != "" {
|
||||
envValFloat, err := strconv.ParseFloat(envVal, 10)
|
||||
if err == nil {
|
||||
f.Value = float64(envValFloat)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
eachName(f.Name, func(name string) {
|
||||
set.Float64(name, f.Value, f.Usage)
|
||||
})
|
||||
}
|
||||
|
||||
func (f Float64Flag) getName() string {
|
||||
return f.Name
|
||||
}
|
||||
|
||||
func prefixFor(name string) (prefix string) {
|
||||
if len(name) == 1 {
|
||||
prefix = "-"
|
||||
} else {
|
||||
prefix = "--"
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func prefixedNames(fullName string) (prefixed string) {
|
||||
parts := strings.Split(fullName, ",")
|
||||
for i, name := range parts {
|
||||
name = strings.Trim(name, " ")
|
||||
prefixed += prefixFor(name) + name
|
||||
if i < len(parts)-1 {
|
||||
prefixed += ", "
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func withEnvHint(envVar, str string) string {
|
||||
envText := ""
|
||||
if envVar != "" {
|
||||
envText = fmt.Sprintf(" [$%s]", strings.Join(strings.Split(envVar, ","), ", $"))
|
||||
}
|
||||
return str + envText
|
||||
}
|
||||
742
Godeps/_workspace/src/github.com/codegangsta/cli/flag_test.go
generated
vendored
Normal file
742
Godeps/_workspace/src/github.com/codegangsta/cli/flag_test.go
generated
vendored
Normal file
@@ -0,0 +1,742 @@
|
||||
package cli_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"reflect"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
var boolFlagTests = []struct {
|
||||
name string
|
||||
expected string
|
||||
}{
|
||||
{"help", "--help\t"},
|
||||
{"h", "-h\t"},
|
||||
}
|
||||
|
||||
func TestBoolFlagHelpOutput(t *testing.T) {
|
||||
|
||||
for _, test := range boolFlagTests {
|
||||
flag := cli.BoolFlag{Name: test.name}
|
||||
output := flag.String()
|
||||
|
||||
if output != test.expected {
|
||||
t.Errorf("%s does not match %s", output, test.expected)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var stringFlagTests = []struct {
|
||||
name string
|
||||
value string
|
||||
expected string
|
||||
}{
|
||||
{"help", "", "--help \t"},
|
||||
{"h", "", "-h \t"},
|
||||
{"h", "", "-h \t"},
|
||||
{"test", "Something", "--test \"Something\"\t"},
|
||||
}
|
||||
|
||||
func TestStringFlagHelpOutput(t *testing.T) {
|
||||
|
||||
for _, test := range stringFlagTests {
|
||||
flag := cli.StringFlag{Name: test.name, Value: test.value}
|
||||
output := flag.String()
|
||||
|
||||
if output != test.expected {
|
||||
t.Errorf("%s does not match %s", output, test.expected)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestStringFlagWithEnvVarHelpOutput(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_FOO", "derp")
|
||||
for _, test := range stringFlagTests {
|
||||
flag := cli.StringFlag{Name: test.name, Value: test.value, EnvVar: "APP_FOO"}
|
||||
output := flag.String()
|
||||
|
||||
if !strings.HasSuffix(output, " [$APP_FOO]") {
|
||||
t.Errorf("%s does not end with [$APP_FOO]", output)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var stringSliceFlagTests = []struct {
|
||||
name string
|
||||
value *cli.StringSlice
|
||||
expected string
|
||||
}{
|
||||
{"help", func() *cli.StringSlice {
|
||||
s := &cli.StringSlice{}
|
||||
s.Set("")
|
||||
return s
|
||||
}(), "--help [--help option --help option]\t"},
|
||||
{"h", func() *cli.StringSlice {
|
||||
s := &cli.StringSlice{}
|
||||
s.Set("")
|
||||
return s
|
||||
}(), "-h [-h option -h option]\t"},
|
||||
{"h", func() *cli.StringSlice {
|
||||
s := &cli.StringSlice{}
|
||||
s.Set("")
|
||||
return s
|
||||
}(), "-h [-h option -h option]\t"},
|
||||
{"test", func() *cli.StringSlice {
|
||||
s := &cli.StringSlice{}
|
||||
s.Set("Something")
|
||||
return s
|
||||
}(), "--test [--test option --test option]\t"},
|
||||
}
|
||||
|
||||
func TestStringSliceFlagHelpOutput(t *testing.T) {
|
||||
|
||||
for _, test := range stringSliceFlagTests {
|
||||
flag := cli.StringSliceFlag{Name: test.name, Value: test.value}
|
||||
output := flag.String()
|
||||
|
||||
if output != test.expected {
|
||||
t.Errorf("%q does not match %q", output, test.expected)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestStringSliceFlagWithEnvVarHelpOutput(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_QWWX", "11,4")
|
||||
for _, test := range stringSliceFlagTests {
|
||||
flag := cli.StringSliceFlag{Name: test.name, Value: test.value, EnvVar: "APP_QWWX"}
|
||||
output := flag.String()
|
||||
|
||||
if !strings.HasSuffix(output, " [$APP_QWWX]") {
|
||||
t.Errorf("%q does not end with [$APP_QWWX]", output)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var intFlagTests = []struct {
|
||||
name string
|
||||
expected string
|
||||
}{
|
||||
{"help", "--help \"0\"\t"},
|
||||
{"h", "-h \"0\"\t"},
|
||||
}
|
||||
|
||||
func TestIntFlagHelpOutput(t *testing.T) {
|
||||
|
||||
for _, test := range intFlagTests {
|
||||
flag := cli.IntFlag{Name: test.name}
|
||||
output := flag.String()
|
||||
|
||||
if output != test.expected {
|
||||
t.Errorf("%s does not match %s", output, test.expected)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestIntFlagWithEnvVarHelpOutput(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_BAR", "2")
|
||||
for _, test := range intFlagTests {
|
||||
flag := cli.IntFlag{Name: test.name, EnvVar: "APP_BAR"}
|
||||
output := flag.String()
|
||||
|
||||
if !strings.HasSuffix(output, " [$APP_BAR]") {
|
||||
t.Errorf("%s does not end with [$APP_BAR]", output)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var durationFlagTests = []struct {
|
||||
name string
|
||||
expected string
|
||||
}{
|
||||
{"help", "--help \"0\"\t"},
|
||||
{"h", "-h \"0\"\t"},
|
||||
}
|
||||
|
||||
func TestDurationFlagHelpOutput(t *testing.T) {
|
||||
|
||||
for _, test := range durationFlagTests {
|
||||
flag := cli.DurationFlag{Name: test.name}
|
||||
output := flag.String()
|
||||
|
||||
if output != test.expected {
|
||||
t.Errorf("%s does not match %s", output, test.expected)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestDurationFlagWithEnvVarHelpOutput(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_BAR", "2h3m6s")
|
||||
for _, test := range durationFlagTests {
|
||||
flag := cli.DurationFlag{Name: test.name, EnvVar: "APP_BAR"}
|
||||
output := flag.String()
|
||||
|
||||
if !strings.HasSuffix(output, " [$APP_BAR]") {
|
||||
t.Errorf("%s does not end with [$APP_BAR]", output)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var intSliceFlagTests = []struct {
|
||||
name string
|
||||
value *cli.IntSlice
|
||||
expected string
|
||||
}{
|
||||
{"help", &cli.IntSlice{}, "--help [--help option --help option]\t"},
|
||||
{"h", &cli.IntSlice{}, "-h [-h option -h option]\t"},
|
||||
{"h", &cli.IntSlice{}, "-h [-h option -h option]\t"},
|
||||
{"test", func() *cli.IntSlice {
|
||||
i := &cli.IntSlice{}
|
||||
i.Set("9")
|
||||
return i
|
||||
}(), "--test [--test option --test option]\t"},
|
||||
}
|
||||
|
||||
func TestIntSliceFlagHelpOutput(t *testing.T) {
|
||||
|
||||
for _, test := range intSliceFlagTests {
|
||||
flag := cli.IntSliceFlag{Name: test.name, Value: test.value}
|
||||
output := flag.String()
|
||||
|
||||
if output != test.expected {
|
||||
t.Errorf("%q does not match %q", output, test.expected)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestIntSliceFlagWithEnvVarHelpOutput(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_SMURF", "42,3")
|
||||
for _, test := range intSliceFlagTests {
|
||||
flag := cli.IntSliceFlag{Name: test.name, Value: test.value, EnvVar: "APP_SMURF"}
|
||||
output := flag.String()
|
||||
|
||||
if !strings.HasSuffix(output, " [$APP_SMURF]") {
|
||||
t.Errorf("%q does not end with [$APP_SMURF]", output)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var float64FlagTests = []struct {
|
||||
name string
|
||||
expected string
|
||||
}{
|
||||
{"help", "--help \"0\"\t"},
|
||||
{"h", "-h \"0\"\t"},
|
||||
}
|
||||
|
||||
func TestFloat64FlagHelpOutput(t *testing.T) {
|
||||
|
||||
for _, test := range float64FlagTests {
|
||||
flag := cli.Float64Flag{Name: test.name}
|
||||
output := flag.String()
|
||||
|
||||
if output != test.expected {
|
||||
t.Errorf("%s does not match %s", output, test.expected)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestFloat64FlagWithEnvVarHelpOutput(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_BAZ", "99.4")
|
||||
for _, test := range float64FlagTests {
|
||||
flag := cli.Float64Flag{Name: test.name, EnvVar: "APP_BAZ"}
|
||||
output := flag.String()
|
||||
|
||||
if !strings.HasSuffix(output, " [$APP_BAZ]") {
|
||||
t.Errorf("%s does not end with [$APP_BAZ]", output)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var genericFlagTests = []struct {
|
||||
name string
|
||||
value cli.Generic
|
||||
expected string
|
||||
}{
|
||||
{"test", &Parser{"abc", "def"}, "--test \"abc,def\"\ttest flag"},
|
||||
{"t", &Parser{"abc", "def"}, "-t \"abc,def\"\ttest flag"},
|
||||
}
|
||||
|
||||
func TestGenericFlagHelpOutput(t *testing.T) {
|
||||
|
||||
for _, test := range genericFlagTests {
|
||||
flag := cli.GenericFlag{Name: test.name, Value: test.value, Usage: "test flag"}
|
||||
output := flag.String()
|
||||
|
||||
if output != test.expected {
|
||||
t.Errorf("%q does not match %q", output, test.expected)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestGenericFlagWithEnvVarHelpOutput(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_ZAP", "3")
|
||||
for _, test := range genericFlagTests {
|
||||
flag := cli.GenericFlag{Name: test.name, EnvVar: "APP_ZAP"}
|
||||
output := flag.String()
|
||||
|
||||
if !strings.HasSuffix(output, " [$APP_ZAP]") {
|
||||
t.Errorf("%s does not end with [$APP_ZAP]", output)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseMultiString(t *testing.T) {
|
||||
(&cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{Name: "serve, s"},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if ctx.String("serve") != "10" {
|
||||
t.Errorf("main name not set")
|
||||
}
|
||||
if ctx.String("s") != "10" {
|
||||
t.Errorf("short name not set")
|
||||
}
|
||||
},
|
||||
}).Run([]string{"run", "-s", "10"})
|
||||
}
|
||||
|
||||
func TestParseMultiStringFromEnv(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_COUNT", "20")
|
||||
(&cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{Name: "count, c", EnvVar: "APP_COUNT"},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if ctx.String("count") != "20" {
|
||||
t.Errorf("main name not set")
|
||||
}
|
||||
if ctx.String("c") != "20" {
|
||||
t.Errorf("short name not set")
|
||||
}
|
||||
},
|
||||
}).Run([]string{"run"})
|
||||
}
|
||||
|
||||
func TestParseMultiStringFromEnvCascade(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_COUNT", "20")
|
||||
(&cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{Name: "count, c", EnvVar: "COMPAT_COUNT,APP_COUNT"},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if ctx.String("count") != "20" {
|
||||
t.Errorf("main name not set")
|
||||
}
|
||||
if ctx.String("c") != "20" {
|
||||
t.Errorf("short name not set")
|
||||
}
|
||||
},
|
||||
}).Run([]string{"run"})
|
||||
}
|
||||
|
||||
func TestParseMultiStringSlice(t *testing.T) {
|
||||
(&cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.StringSliceFlag{Name: "serve, s", Value: &cli.StringSlice{}},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if !reflect.DeepEqual(ctx.StringSlice("serve"), []string{"10", "20"}) {
|
||||
t.Errorf("main name not set")
|
||||
}
|
||||
if !reflect.DeepEqual(ctx.StringSlice("s"), []string{"10", "20"}) {
|
||||
t.Errorf("short name not set")
|
||||
}
|
||||
},
|
||||
}).Run([]string{"run", "-s", "10", "-s", "20"})
|
||||
}
|
||||
|
||||
func TestParseMultiStringSliceFromEnv(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_INTERVALS", "20,30,40")
|
||||
|
||||
(&cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.StringSliceFlag{Name: "intervals, i", Value: &cli.StringSlice{}, EnvVar: "APP_INTERVALS"},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if !reflect.DeepEqual(ctx.StringSlice("intervals"), []string{"20", "30", "40"}) {
|
||||
t.Errorf("main name not set from env")
|
||||
}
|
||||
if !reflect.DeepEqual(ctx.StringSlice("i"), []string{"20", "30", "40"}) {
|
||||
t.Errorf("short name not set from env")
|
||||
}
|
||||
},
|
||||
}).Run([]string{"run"})
|
||||
}
|
||||
|
||||
func TestParseMultiStringSliceFromEnvCascade(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_INTERVALS", "20,30,40")
|
||||
|
||||
(&cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.StringSliceFlag{Name: "intervals, i", Value: &cli.StringSlice{}, EnvVar: "COMPAT_INTERVALS,APP_INTERVALS"},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if !reflect.DeepEqual(ctx.StringSlice("intervals"), []string{"20", "30", "40"}) {
|
||||
t.Errorf("main name not set from env")
|
||||
}
|
||||
if !reflect.DeepEqual(ctx.StringSlice("i"), []string{"20", "30", "40"}) {
|
||||
t.Errorf("short name not set from env")
|
||||
}
|
||||
},
|
||||
}).Run([]string{"run"})
|
||||
}
|
||||
|
||||
func TestParseMultiInt(t *testing.T) {
|
||||
a := cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.IntFlag{Name: "serve, s"},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if ctx.Int("serve") != 10 {
|
||||
t.Errorf("main name not set")
|
||||
}
|
||||
if ctx.Int("s") != 10 {
|
||||
t.Errorf("short name not set")
|
||||
}
|
||||
},
|
||||
}
|
||||
a.Run([]string{"run", "-s", "10"})
|
||||
}
|
||||
|
||||
func TestParseMultiIntFromEnv(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_TIMEOUT_SECONDS", "10")
|
||||
a := cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.IntFlag{Name: "timeout, t", EnvVar: "APP_TIMEOUT_SECONDS"},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if ctx.Int("timeout") != 10 {
|
||||
t.Errorf("main name not set")
|
||||
}
|
||||
if ctx.Int("t") != 10 {
|
||||
t.Errorf("short name not set")
|
||||
}
|
||||
},
|
||||
}
|
||||
a.Run([]string{"run"})
|
||||
}
|
||||
|
||||
func TestParseMultiIntFromEnvCascade(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_TIMEOUT_SECONDS", "10")
|
||||
a := cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.IntFlag{Name: "timeout, t", EnvVar: "COMPAT_TIMEOUT_SECONDS,APP_TIMEOUT_SECONDS"},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if ctx.Int("timeout") != 10 {
|
||||
t.Errorf("main name not set")
|
||||
}
|
||||
if ctx.Int("t") != 10 {
|
||||
t.Errorf("short name not set")
|
||||
}
|
||||
},
|
||||
}
|
||||
a.Run([]string{"run"})
|
||||
}
|
||||
|
||||
func TestParseMultiIntSlice(t *testing.T) {
|
||||
(&cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.IntSliceFlag{Name: "serve, s", Value: &cli.IntSlice{}},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if !reflect.DeepEqual(ctx.IntSlice("serve"), []int{10, 20}) {
|
||||
t.Errorf("main name not set")
|
||||
}
|
||||
if !reflect.DeepEqual(ctx.IntSlice("s"), []int{10, 20}) {
|
||||
t.Errorf("short name not set")
|
||||
}
|
||||
},
|
||||
}).Run([]string{"run", "-s", "10", "-s", "20"})
|
||||
}
|
||||
|
||||
func TestParseMultiIntSliceFromEnv(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_INTERVALS", "20,30,40")
|
||||
|
||||
(&cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.IntSliceFlag{Name: "intervals, i", Value: &cli.IntSlice{}, EnvVar: "APP_INTERVALS"},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if !reflect.DeepEqual(ctx.IntSlice("intervals"), []int{20, 30, 40}) {
|
||||
t.Errorf("main name not set from env")
|
||||
}
|
||||
if !reflect.DeepEqual(ctx.IntSlice("i"), []int{20, 30, 40}) {
|
||||
t.Errorf("short name not set from env")
|
||||
}
|
||||
},
|
||||
}).Run([]string{"run"})
|
||||
}
|
||||
|
||||
func TestParseMultiIntSliceFromEnvCascade(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_INTERVALS", "20,30,40")
|
||||
|
||||
(&cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.IntSliceFlag{Name: "intervals, i", Value: &cli.IntSlice{}, EnvVar: "COMPAT_INTERVALS,APP_INTERVALS"},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if !reflect.DeepEqual(ctx.IntSlice("intervals"), []int{20, 30, 40}) {
|
||||
t.Errorf("main name not set from env")
|
||||
}
|
||||
if !reflect.DeepEqual(ctx.IntSlice("i"), []int{20, 30, 40}) {
|
||||
t.Errorf("short name not set from env")
|
||||
}
|
||||
},
|
||||
}).Run([]string{"run"})
|
||||
}
|
||||
|
||||
func TestParseMultiFloat64(t *testing.T) {
|
||||
a := cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.Float64Flag{Name: "serve, s"},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if ctx.Float64("serve") != 10.2 {
|
||||
t.Errorf("main name not set")
|
||||
}
|
||||
if ctx.Float64("s") != 10.2 {
|
||||
t.Errorf("short name not set")
|
||||
}
|
||||
},
|
||||
}
|
||||
a.Run([]string{"run", "-s", "10.2"})
|
||||
}
|
||||
|
||||
func TestParseMultiFloat64FromEnv(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_TIMEOUT_SECONDS", "15.5")
|
||||
a := cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.Float64Flag{Name: "timeout, t", EnvVar: "APP_TIMEOUT_SECONDS"},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if ctx.Float64("timeout") != 15.5 {
|
||||
t.Errorf("main name not set")
|
||||
}
|
||||
if ctx.Float64("t") != 15.5 {
|
||||
t.Errorf("short name not set")
|
||||
}
|
||||
},
|
||||
}
|
||||
a.Run([]string{"run"})
|
||||
}
|
||||
|
||||
func TestParseMultiFloat64FromEnvCascade(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_TIMEOUT_SECONDS", "15.5")
|
||||
a := cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.Float64Flag{Name: "timeout, t", EnvVar: "COMPAT_TIMEOUT_SECONDS,APP_TIMEOUT_SECONDS"},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if ctx.Float64("timeout") != 15.5 {
|
||||
t.Errorf("main name not set")
|
||||
}
|
||||
if ctx.Float64("t") != 15.5 {
|
||||
t.Errorf("short name not set")
|
||||
}
|
||||
},
|
||||
}
|
||||
a.Run([]string{"run"})
|
||||
}
|
||||
|
||||
func TestParseMultiBool(t *testing.T) {
|
||||
a := cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.BoolFlag{Name: "serve, s"},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if ctx.Bool("serve") != true {
|
||||
t.Errorf("main name not set")
|
||||
}
|
||||
if ctx.Bool("s") != true {
|
||||
t.Errorf("short name not set")
|
||||
}
|
||||
},
|
||||
}
|
||||
a.Run([]string{"run", "--serve"})
|
||||
}
|
||||
|
||||
func TestParseMultiBoolFromEnv(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_DEBUG", "1")
|
||||
a := cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.BoolFlag{Name: "debug, d", EnvVar: "APP_DEBUG"},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if ctx.Bool("debug") != true {
|
||||
t.Errorf("main name not set from env")
|
||||
}
|
||||
if ctx.Bool("d") != true {
|
||||
t.Errorf("short name not set from env")
|
||||
}
|
||||
},
|
||||
}
|
||||
a.Run([]string{"run"})
|
||||
}
|
||||
|
||||
func TestParseMultiBoolFromEnvCascade(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_DEBUG", "1")
|
||||
a := cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.BoolFlag{Name: "debug, d", EnvVar: "COMPAT_DEBUG,APP_DEBUG"},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if ctx.Bool("debug") != true {
|
||||
t.Errorf("main name not set from env")
|
||||
}
|
||||
if ctx.Bool("d") != true {
|
||||
t.Errorf("short name not set from env")
|
||||
}
|
||||
},
|
||||
}
|
||||
a.Run([]string{"run"})
|
||||
}
|
||||
|
||||
func TestParseMultiBoolT(t *testing.T) {
|
||||
a := cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.BoolTFlag{Name: "serve, s"},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if ctx.BoolT("serve") != true {
|
||||
t.Errorf("main name not set")
|
||||
}
|
||||
if ctx.BoolT("s") != true {
|
||||
t.Errorf("short name not set")
|
||||
}
|
||||
},
|
||||
}
|
||||
a.Run([]string{"run", "--serve"})
|
||||
}
|
||||
|
||||
func TestParseMultiBoolTFromEnv(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_DEBUG", "0")
|
||||
a := cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.BoolTFlag{Name: "debug, d", EnvVar: "APP_DEBUG"},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if ctx.BoolT("debug") != false {
|
||||
t.Errorf("main name not set from env")
|
||||
}
|
||||
if ctx.BoolT("d") != false {
|
||||
t.Errorf("short name not set from env")
|
||||
}
|
||||
},
|
||||
}
|
||||
a.Run([]string{"run"})
|
||||
}
|
||||
|
||||
func TestParseMultiBoolTFromEnvCascade(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_DEBUG", "0")
|
||||
a := cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.BoolTFlag{Name: "debug, d", EnvVar: "COMPAT_DEBUG,APP_DEBUG"},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if ctx.BoolT("debug") != false {
|
||||
t.Errorf("main name not set from env")
|
||||
}
|
||||
if ctx.BoolT("d") != false {
|
||||
t.Errorf("short name not set from env")
|
||||
}
|
||||
},
|
||||
}
|
||||
a.Run([]string{"run"})
|
||||
}
|
||||
|
||||
type Parser [2]string
|
||||
|
||||
func (p *Parser) Set(value string) error {
|
||||
parts := strings.Split(value, ",")
|
||||
if len(parts) != 2 {
|
||||
return fmt.Errorf("invalid format")
|
||||
}
|
||||
|
||||
(*p)[0] = parts[0]
|
||||
(*p)[1] = parts[1]
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *Parser) String() string {
|
||||
return fmt.Sprintf("%s,%s", p[0], p[1])
|
||||
}
|
||||
|
||||
func TestParseGeneric(t *testing.T) {
|
||||
a := cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.GenericFlag{Name: "serve, s", Value: &Parser{}},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if !reflect.DeepEqual(ctx.Generic("serve"), &Parser{"10", "20"}) {
|
||||
t.Errorf("main name not set")
|
||||
}
|
||||
if !reflect.DeepEqual(ctx.Generic("s"), &Parser{"10", "20"}) {
|
||||
t.Errorf("short name not set")
|
||||
}
|
||||
},
|
||||
}
|
||||
a.Run([]string{"run", "-s", "10,20"})
|
||||
}
|
||||
|
||||
func TestParseGenericFromEnv(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_SERVE", "20,30")
|
||||
a := cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.GenericFlag{Name: "serve, s", Value: &Parser{}, EnvVar: "APP_SERVE"},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if !reflect.DeepEqual(ctx.Generic("serve"), &Parser{"20", "30"}) {
|
||||
t.Errorf("main name not set from env")
|
||||
}
|
||||
if !reflect.DeepEqual(ctx.Generic("s"), &Parser{"20", "30"}) {
|
||||
t.Errorf("short name not set from env")
|
||||
}
|
||||
},
|
||||
}
|
||||
a.Run([]string{"run"})
|
||||
}
|
||||
|
||||
func TestParseGenericFromEnvCascade(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_FOO", "99,2000")
|
||||
a := cli.App{
|
||||
Flags: []cli.Flag{
|
||||
cli.GenericFlag{Name: "foos", Value: &Parser{}, EnvVar: "COMPAT_FOO,APP_FOO"},
|
||||
},
|
||||
Action: func(ctx *cli.Context) {
|
||||
if !reflect.DeepEqual(ctx.Generic("foos"), &Parser{"99", "2000"}) {
|
||||
t.Errorf("value not set from env")
|
||||
}
|
||||
},
|
||||
}
|
||||
a.Run([]string{"run"})
|
||||
}
|
||||
215
Godeps/_workspace/src/github.com/codegangsta/cli/help.go
generated
vendored
Normal file
215
Godeps/_workspace/src/github.com/codegangsta/cli/help.go
generated
vendored
Normal file
@@ -0,0 +1,215 @@
|
||||
package cli
|
||||
|
||||
import "fmt"
|
||||
|
||||
// The text template for the Default help topic.
|
||||
// cli.go uses text/template to render templates. You can
|
||||
// render custom help text by setting this variable.
|
||||
var AppHelpTemplate = `NAME:
|
||||
{{.Name}} - {{.Usage}}
|
||||
|
||||
USAGE:
|
||||
{{.Name}} {{if .Flags}}[global options] {{end}}command{{if .Flags}} [command options]{{end}} [arguments...]
|
||||
|
||||
VERSION:
|
||||
{{.Version}}
|
||||
|
||||
AUTHOR(S):
|
||||
{{range .Authors}}{{ . }}
|
||||
{{end}}
|
||||
COMMANDS:
|
||||
{{range .Commands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}}
|
||||
{{end}}{{if .Flags}}
|
||||
GLOBAL OPTIONS:
|
||||
{{range .Flags}}{{.}}
|
||||
{{end}}{{end}}
|
||||
`
|
||||
|
||||
// The text template for the command help topic.
|
||||
// cli.go uses text/template to render templates. You can
|
||||
// render custom help text by setting this variable.
|
||||
var CommandHelpTemplate = `NAME:
|
||||
{{.Name}} - {{.Usage}}
|
||||
|
||||
USAGE:
|
||||
command {{.Name}}{{if .Flags}} [command options]{{end}} [arguments...]{{if .Description}}
|
||||
|
||||
DESCRIPTION:
|
||||
{{.Description}}{{end}}{{if .Flags}}
|
||||
|
||||
OPTIONS:
|
||||
{{range .Flags}}{{.}}
|
||||
{{end}}{{ end }}
|
||||
`
|
||||
|
||||
// The text template for the subcommand help topic.
|
||||
// cli.go uses text/template to render templates. You can
|
||||
// render custom help text by setting this variable.
|
||||
var SubcommandHelpTemplate = `NAME:
|
||||
{{.Name}} - {{.Usage}}
|
||||
|
||||
USAGE:
|
||||
{{.Name}} command{{if .Flags}} [command options]{{end}} [arguments...]
|
||||
|
||||
COMMANDS:
|
||||
{{range .Commands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}}
|
||||
{{end}}{{if .Flags}}
|
||||
OPTIONS:
|
||||
{{range .Flags}}{{.}}
|
||||
{{end}}{{end}}
|
||||
`
|
||||
|
||||
var helpCommand = Command{
|
||||
Name: "help",
|
||||
Aliases: []string{"h"},
|
||||
Usage: "Shows a list of commands or help for one command",
|
||||
Action: func(c *Context) {
|
||||
args := c.Args()
|
||||
if args.Present() {
|
||||
ShowCommandHelp(c, args.First())
|
||||
} else {
|
||||
ShowAppHelp(c)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
var helpSubcommand = Command{
|
||||
Name: "help",
|
||||
Aliases: []string{"h"},
|
||||
Usage: "Shows a list of commands or help for one command",
|
||||
Action: func(c *Context) {
|
||||
args := c.Args()
|
||||
if args.Present() {
|
||||
ShowCommandHelp(c, args.First())
|
||||
} else {
|
||||
ShowSubcommandHelp(c)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
// Prints help for the App
|
||||
type helpPrinter func(templ string, data interface{})
|
||||
|
||||
var HelpPrinter helpPrinter = nil
|
||||
|
||||
// Prints version for the App
|
||||
var VersionPrinter = printVersion
|
||||
|
||||
func ShowAppHelp(c *Context) {
|
||||
HelpPrinter(AppHelpTemplate, c.App)
|
||||
}
|
||||
|
||||
// Prints the list of subcommands as the default app completion method
|
||||
func DefaultAppComplete(c *Context) {
|
||||
for _, command := range c.App.Commands {
|
||||
for _, name := range command.Names() {
|
||||
fmt.Fprintln(c.App.Writer, name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Prints help for the given command
|
||||
func ShowCommandHelp(c *Context, command string) {
|
||||
// show the subcommand help for a command with subcommands
|
||||
if command == "" {
|
||||
HelpPrinter(SubcommandHelpTemplate, c.App)
|
||||
return
|
||||
}
|
||||
|
||||
for _, c := range c.App.Commands {
|
||||
if c.HasName(command) {
|
||||
HelpPrinter(CommandHelpTemplate, c)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if c.App.CommandNotFound != nil {
|
||||
c.App.CommandNotFound(c, command)
|
||||
} else {
|
||||
fmt.Fprintf(c.App.Writer, "No help topic for '%v'\n", command)
|
||||
}
|
||||
}
|
||||
|
||||
// Prints help for the given subcommand
|
||||
func ShowSubcommandHelp(c *Context) {
|
||||
ShowCommandHelp(c, c.Command.Name)
|
||||
}
|
||||
|
||||
// Prints the version number of the App
|
||||
func ShowVersion(c *Context) {
|
||||
VersionPrinter(c)
|
||||
}
|
||||
|
||||
func printVersion(c *Context) {
|
||||
fmt.Fprintf(c.App.Writer, "%v version %v\n", c.App.Name, c.App.Version)
|
||||
}
|
||||
|
||||
// Prints the lists of commands within a given context
|
||||
func ShowCompletions(c *Context) {
|
||||
a := c.App
|
||||
if a != nil && a.BashComplete != nil {
|
||||
a.BashComplete(c)
|
||||
}
|
||||
}
|
||||
|
||||
// Prints the custom completions for a given command
|
||||
func ShowCommandCompletions(ctx *Context, command string) {
|
||||
c := ctx.App.Command(command)
|
||||
if c != nil && c.BashComplete != nil {
|
||||
c.BashComplete(ctx)
|
||||
}
|
||||
}
|
||||
|
||||
func checkVersion(c *Context) bool {
|
||||
if c.GlobalBool("version") {
|
||||
ShowVersion(c)
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func checkHelp(c *Context) bool {
|
||||
if c.GlobalBool("h") || c.GlobalBool("help") {
|
||||
ShowAppHelp(c)
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func checkCommandHelp(c *Context, name string) bool {
|
||||
if c.Bool("h") || c.Bool("help") {
|
||||
ShowCommandHelp(c, name)
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func checkSubcommandHelp(c *Context) bool {
|
||||
if c.GlobalBool("h") || c.GlobalBool("help") {
|
||||
ShowSubcommandHelp(c)
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func checkCompletions(c *Context) bool {
|
||||
if (c.GlobalBool(BashCompletionFlag.Name) || c.Bool(BashCompletionFlag.Name)) && c.App.EnableBashCompletion {
|
||||
ShowCompletions(c)
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func checkCommandCompletions(c *Context, name string) bool {
|
||||
if c.Bool(BashCompletionFlag.Name) && c.App.EnableBashCompletion {
|
||||
ShowCommandCompletions(c, name)
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
19
Godeps/_workspace/src/github.com/codegangsta/cli/helpers_test.go
generated
vendored
Normal file
19
Godeps/_workspace/src/github.com/codegangsta/cli/helpers_test.go
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
package cli_test
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"testing"
|
||||
)
|
||||
|
||||
/* Test Helpers */
|
||||
func expect(t *testing.T, a interface{}, b interface{}) {
|
||||
if a != b {
|
||||
t.Errorf("Expected %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a))
|
||||
}
|
||||
}
|
||||
|
||||
func refute(t *testing.T, a interface{}, b interface{}) {
|
||||
if a == b {
|
||||
t.Errorf("Did not expect %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a))
|
||||
}
|
||||
}
|
||||
12
Godeps/_workspace/src/github.com/ethereum/ethash/.gitignore
generated
vendored
Normal file
12
Godeps/_workspace/src/github.com/ethereum/ethash/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
.idea/
|
||||
.DS_Store
|
||||
*/**/*un~
|
||||
.vagrant/
|
||||
*.pyc
|
||||
build/
|
||||
pyethash.egg-info/
|
||||
*.so
|
||||
*~
|
||||
*.swp
|
||||
MANIFEST
|
||||
dist/
|
||||
23
Godeps/_workspace/src/github.com/ethereum/ethash/.travis.yml
generated
vendored
Normal file
23
Godeps/_workspace/src/github.com/ethereum/ethash/.travis.yml
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
language: go
|
||||
go:
|
||||
- 1.4.2
|
||||
|
||||
before_install:
|
||||
# for g++4.8 and C++11
|
||||
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||
|
||||
# Set up go-ethereum
|
||||
- sudo apt-get update -y -qq
|
||||
- sudo apt-get install -yqq libgmp3-dev
|
||||
- git clone --depth=10 https://github.com/ethereum/go-ethereum ${GOPATH}/src/github.com/ethereum/go-ethereum
|
||||
# use canned dependencies from the go-ethereum repository
|
||||
- export GOPATH=$GOPATH:$GOPATH/src/github.com/ethereum/go-ethereum/Godeps/_workspace/
|
||||
- echo $GOPATH
|
||||
|
||||
install:
|
||||
# need to explicitly request version 1.48 since by default we get 1.46 which does not work with C++11
|
||||
- sudo apt-get install -qq --yes --force-yes g++-4.8
|
||||
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
|
||||
- sudo apt-get install -qq wget cmake bash libboost-test1.48-dev libboost-system1.48-dev libboost-filesystem1.48-dev nodejs python-pip python-dev valgrind
|
||||
- sudo pip install virtualenv -q
|
||||
script: "./test/test.sh"
|
||||
21
Godeps/_workspace/src/github.com/ethereum/ethash/CMakeLists.txt
generated
vendored
Normal file
21
Godeps/_workspace/src/github.com/ethereum/ethash/CMakeLists.txt
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
cmake_minimum_required(VERSION 2.8.7)
|
||||
project(ethash)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
|
||||
set(ETHHASH_LIBS ethash)
|
||||
|
||||
if (WIN32 AND WANT_CRYPTOPP)
|
||||
add_subdirectory(cryptopp)
|
||||
endif()
|
||||
|
||||
add_subdirectory(src/libethash)
|
||||
# bin2h.cmake doesn't work
|
||||
if (NOT OpenCL_FOUND)
|
||||
find_package(OpenCL)
|
||||
endif()
|
||||
|
||||
if (OpenCL_FOUND)
|
||||
add_subdirectory(src/libethash-cl)
|
||||
endif()
|
||||
add_subdirectory(src/benchmark EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(test/c)
|
||||
17
Godeps/_workspace/src/github.com/ethereum/ethash/MANIFEST.in
generated
vendored
Normal file
17
Godeps/_workspace/src/github.com/ethereum/ethash/MANIFEST.in
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
include setup.py
|
||||
|
||||
# C sources
|
||||
include src/libethash/internal.c
|
||||
include src/libethash/sha3.c
|
||||
include src/libethash/util.c
|
||||
include src/python/core.c
|
||||
|
||||
# Headers
|
||||
include src/libethash/compiler.h
|
||||
include src/libethash/data_sizes.h
|
||||
include src/libethash/endian.h
|
||||
include src/libethash/ethash.h
|
||||
include src/libethash/fnv.h
|
||||
include src/libethash/internal.h
|
||||
include src/libethash/sha3.h
|
||||
include src/libethash/util.h
|
||||
6
Godeps/_workspace/src/github.com/ethereum/ethash/Makefile
generated
vendored
Normal file
6
Godeps/_workspace/src/github.com/ethereum/ethash/Makefile
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
.PHONY: clean test
|
||||
test:
|
||||
./test/test.sh
|
||||
|
||||
clean:
|
||||
rm -rf *.so pyethash.egg-info/ build/ test/python/python-virtual-env/ test/c/build/ pyethash.so test/python/*.pyc dist/ MANIFEST
|
||||
22
Godeps/_workspace/src/github.com/ethereum/ethash/README.md
generated
vendored
Normal file
22
Godeps/_workspace/src/github.com/ethereum/ethash/README.md
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
[](https://travis-ci.org/ethereum/ethash)
|
||||
[](https://ci.appveyor.com/project/debris/ethash-nr37r/branch/master)
|
||||
|
||||
# Ethash
|
||||
|
||||
For details on this project, please see the Ethereum wiki:
|
||||
https://github.com/ethereum/wiki/wiki/Ethash
|
||||
|
||||
### Coding Style for C++ code:
|
||||
|
||||
Follow the same exact style as in [cpp-ethereum](https://github.com/ethereum/cpp-ethereum/blob/develop/CodingStandards.txt)
|
||||
|
||||
### Coding Style for C code:
|
||||
|
||||
The main thing above all is code consistency.
|
||||
|
||||
- Tabs for indentation. A tab is 4 spaces
|
||||
- Try to stick to the [K&R](http://en.wikipedia.org/wiki/Indent_style#K.26R_style),
|
||||
especially for the C code.
|
||||
- Keep the line lengths reasonable. No hard limit on 80 characters but don't go further
|
||||
than 110. Some people work with multiple buffers next to each other.
|
||||
Make them like you :)
|
||||
7
Godeps/_workspace/src/github.com/ethereum/ethash/Vagrantfile
generated
vendored
Normal file
7
Godeps/_workspace/src/github.com/ethereum/ethash/Vagrantfile
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
Vagrant.configure(2) do |config|
|
||||
config.vm.box = "Ubuntu 12.04"
|
||||
config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box"
|
||||
end
|
||||
43
Godeps/_workspace/src/github.com/ethereum/ethash/appveyor.yml
generated
vendored
Normal file
43
Godeps/_workspace/src/github.com/ethereum/ethash/appveyor.yml
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
version: 1.0.0.{build}
|
||||
|
||||
environment:
|
||||
BOOST_ROOT: "c:/projects/ethash/deps/boost"
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
|
||||
os: Windows Server 2012 R2
|
||||
|
||||
clone_folder: c:\projects\ethash
|
||||
|
||||
#platform: Any CPU
|
||||
#configuration: Debug
|
||||
|
||||
install:
|
||||
# by default, all script lines are interpreted as batch
|
||||
|
||||
# scripts to run before build
|
||||
before_build:
|
||||
- echo "Downloading boost..."
|
||||
- mkdir c:\projects\ethash\deps
|
||||
- cd c:\projects\ethash\deps
|
||||
- curl -O https://build.ethdev.com/builds/windows-precompiled/boost.tar.gz
|
||||
- echo "Unzipping boost..."
|
||||
- 7z x boost.tar.gz > nul
|
||||
- 7z x boost.tar > nul
|
||||
- ls
|
||||
- echo "Running cmake..."
|
||||
- cd c:\projects\ethash
|
||||
- cmake .
|
||||
|
||||
build:
|
||||
project: ALL_BUILD.vcxproj # path to Visual Studio solution or project
|
||||
|
||||
after_build:
|
||||
- echo "Running tests..."
|
||||
- cd c:\projects\ethash\test\c\Debug
|
||||
- Test.exe
|
||||
- echo "Finished!"
|
||||
|
||||
161
Godeps/_workspace/src/github.com/ethereum/ethash/cmake/modules/CMakeParseArguments.cmake
generated
vendored
Normal file
161
Godeps/_workspace/src/github.com/ethereum/ethash/cmake/modules/CMakeParseArguments.cmake
generated
vendored
Normal file
@@ -0,0 +1,161 @@
|
||||
#.rst:
|
||||
# CMakeParseArguments
|
||||
# -------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
# CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords>
|
||||
# <multi_value_keywords> args...)
|
||||
#
|
||||
# CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions
|
||||
# for parsing the arguments given to that macro or function. It
|
||||
# processes the arguments and defines a set of variables which hold the
|
||||
# values of the respective options.
|
||||
#
|
||||
# The <options> argument contains all options for the respective macro,
|
||||
# i.e. keywords which can be used when calling the macro without any
|
||||
# value following, like e.g. the OPTIONAL keyword of the install()
|
||||
# command.
|
||||
#
|
||||
# The <one_value_keywords> argument contains all keywords for this macro
|
||||
# which are followed by one value, like e.g. DESTINATION keyword of the
|
||||
# install() command.
|
||||
#
|
||||
# The <multi_value_keywords> argument contains all keywords for this
|
||||
# macro which can be followed by more than one value, like e.g. the
|
||||
# TARGETS or FILES keywords of the install() command.
|
||||
#
|
||||
# When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the
|
||||
# keywords listed in <options>, <one_value_keywords> and
|
||||
# <multi_value_keywords> a variable composed of the given <prefix>
|
||||
# followed by "_" and the name of the respective keyword. These
|
||||
# variables will then hold the respective value from the argument list.
|
||||
# For the <options> keywords this will be TRUE or FALSE.
|
||||
#
|
||||
# All remaining arguments are collected in a variable
|
||||
# <prefix>_UNPARSED_ARGUMENTS, this can be checked afterwards to see
|
||||
# whether your macro was called with unrecognized parameters.
|
||||
#
|
||||
# As an example here a my_install() macro, which takes similar arguments
|
||||
# as the real install() command:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# function(MY_INSTALL)
|
||||
# set(options OPTIONAL FAST)
|
||||
# set(oneValueArgs DESTINATION RENAME)
|
||||
# set(multiValueArgs TARGETS CONFIGURATIONS)
|
||||
# cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}"
|
||||
# "${multiValueArgs}" ${ARGN} )
|
||||
# ...
|
||||
#
|
||||
#
|
||||
#
|
||||
# Assume my_install() has been called like this:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub)
|
||||
#
|
||||
#
|
||||
#
|
||||
# After the cmake_parse_arguments() call the macro will have set the
|
||||
# following variables:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# MY_INSTALL_OPTIONAL = TRUE
|
||||
# MY_INSTALL_FAST = FALSE (this option was not used when calling my_install()
|
||||
# MY_INSTALL_DESTINATION = "bin"
|
||||
# MY_INSTALL_RENAME = "" (was not used)
|
||||
# MY_INSTALL_TARGETS = "foo;bar"
|
||||
# MY_INSTALL_CONFIGURATIONS = "" (was not used)
|
||||
# MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL"
|
||||
#
|
||||
#
|
||||
#
|
||||
# You can then continue and process these variables.
|
||||
#
|
||||
# Keywords terminate lists of values, e.g. if directly after a
|
||||
# one_value_keyword another recognized keyword follows, this is
|
||||
# interpreted as the beginning of the new option. E.g.
|
||||
# my_install(TARGETS foo DESTINATION OPTIONAL) would result in
|
||||
# MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION
|
||||
# would be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2010 Alexander Neundorf <neundorf@kde.org>
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
|
||||
if(__CMAKE_PARSE_ARGUMENTS_INCLUDED)
|
||||
return()
|
||||
endif()
|
||||
set(__CMAKE_PARSE_ARGUMENTS_INCLUDED TRUE)
|
||||
|
||||
|
||||
function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgNames)
|
||||
# first set all result variables to empty/FALSE
|
||||
foreach(arg_name ${_singleArgNames} ${_multiArgNames})
|
||||
set(${prefix}_${arg_name})
|
||||
endforeach()
|
||||
|
||||
foreach(option ${_optionNames})
|
||||
set(${prefix}_${option} FALSE)
|
||||
endforeach()
|
||||
|
||||
set(${prefix}_UNPARSED_ARGUMENTS)
|
||||
|
||||
set(insideValues FALSE)
|
||||
set(currentArgName)
|
||||
|
||||
# now iterate over all arguments and fill the result variables
|
||||
foreach(currentArg ${ARGN})
|
||||
list(FIND _optionNames "${currentArg}" optionIndex) # ... then this marks the end of the arguments belonging to this keyword
|
||||
list(FIND _singleArgNames "${currentArg}" singleArgIndex) # ... then this marks the end of the arguments belonging to this keyword
|
||||
list(FIND _multiArgNames "${currentArg}" multiArgIndex) # ... then this marks the end of the arguments belonging to this keyword
|
||||
|
||||
if(${optionIndex} EQUAL -1 AND ${singleArgIndex} EQUAL -1 AND ${multiArgIndex} EQUAL -1)
|
||||
if(insideValues)
|
||||
if("${insideValues}" STREQUAL "SINGLE")
|
||||
set(${prefix}_${currentArgName} ${currentArg})
|
||||
set(insideValues FALSE)
|
||||
elseif("${insideValues}" STREQUAL "MULTI")
|
||||
list(APPEND ${prefix}_${currentArgName} ${currentArg})
|
||||
endif()
|
||||
else()
|
||||
list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg})
|
||||
endif()
|
||||
else()
|
||||
if(NOT ${optionIndex} EQUAL -1)
|
||||
set(${prefix}_${currentArg} TRUE)
|
||||
set(insideValues FALSE)
|
||||
elseif(NOT ${singleArgIndex} EQUAL -1)
|
||||
set(currentArgName ${currentArg})
|
||||
set(${prefix}_${currentArgName})
|
||||
set(insideValues "SINGLE")
|
||||
elseif(NOT ${multiArgIndex} EQUAL -1)
|
||||
set(currentArgName ${currentArg})
|
||||
set(${prefix}_${currentArgName})
|
||||
set(insideValues "MULTI")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endforeach()
|
||||
|
||||
# propagate the result variables to the caller:
|
||||
foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames})
|
||||
set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE)
|
||||
endforeach()
|
||||
set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE)
|
||||
|
||||
endfunction()
|
||||
108
Godeps/_workspace/src/github.com/ethereum/ethash/cmake/modules/FindCryptoPP.cmake
generated
vendored
Normal file
108
Godeps/_workspace/src/github.com/ethereum/ethash/cmake/modules/FindCryptoPP.cmake
generated
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
# Module for locating the Crypto++ encryption library.
|
||||
#
|
||||
# Customizable variables:
|
||||
# CRYPTOPP_ROOT_DIR
|
||||
# This variable points to the CryptoPP root directory. On Windows the
|
||||
# library location typically will have to be provided explicitly using the
|
||||
# -D command-line option. The directory should include the include/cryptopp,
|
||||
# lib and/or bin sub-directories.
|
||||
#
|
||||
# Read-only variables:
|
||||
# CRYPTOPP_FOUND
|
||||
# Indicates whether the library has been found.
|
||||
#
|
||||
# CRYPTOPP_INCLUDE_DIRS
|
||||
# Points to the CryptoPP include directory.
|
||||
#
|
||||
# CRYPTOPP_LIBRARIES
|
||||
# Points to the CryptoPP libraries that should be passed to
|
||||
# target_link_libararies.
|
||||
#
|
||||
#
|
||||
# Copyright (c) 2012 Sergiu Dotenco
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
INCLUDE (FindPackageHandleStandardArgs)
|
||||
|
||||
FIND_PATH (CRYPTOPP_ROOT_DIR
|
||||
NAMES cryptopp/cryptlib.h include/cryptopp/cryptlib.h
|
||||
PATHS ENV CRYPTOPPROOT
|
||||
DOC "CryptoPP root directory")
|
||||
|
||||
# Re-use the previous path:
|
||||
FIND_PATH (CRYPTOPP_INCLUDE_DIR
|
||||
NAMES cryptopp/cryptlib.h
|
||||
HINTS ${CRYPTOPP_ROOT_DIR}
|
||||
PATH_SUFFIXES include
|
||||
DOC "CryptoPP include directory")
|
||||
|
||||
FIND_LIBRARY (CRYPTOPP_LIBRARY_DEBUG
|
||||
NAMES cryptlibd cryptoppd
|
||||
HINTS ${CRYPTOPP_ROOT_DIR}
|
||||
PATH_SUFFIXES lib
|
||||
DOC "CryptoPP debug library")
|
||||
|
||||
FIND_LIBRARY (CRYPTOPP_LIBRARY_RELEASE
|
||||
NAMES cryptlib cryptopp
|
||||
HINTS ${CRYPTOPP_ROOT_DIR}
|
||||
PATH_SUFFIXES lib
|
||||
DOC "CryptoPP release library")
|
||||
|
||||
IF (CRYPTOPP_LIBRARY_DEBUG AND CRYPTOPP_LIBRARY_RELEASE)
|
||||
SET (CRYPTOPP_LIBRARY
|
||||
optimized ${CRYPTOPP_LIBRARY_RELEASE}
|
||||
debug ${CRYPTOPP_LIBRARY_DEBUG} CACHE DOC "CryptoPP library")
|
||||
ELSEIF (CRYPTOPP_LIBRARY_RELEASE)
|
||||
SET (CRYPTOPP_LIBRARY ${CRYPTOPP_LIBRARY_RELEASE} CACHE DOC
|
||||
"CryptoPP library")
|
||||
ENDIF (CRYPTOPP_LIBRARY_DEBUG AND CRYPTOPP_LIBRARY_RELEASE)
|
||||
|
||||
IF (CRYPTOPP_INCLUDE_DIR)
|
||||
SET (_CRYPTOPP_VERSION_HEADER ${CRYPTOPP_INCLUDE_DIR}/cryptopp/config.h)
|
||||
|
||||
IF (EXISTS ${_CRYPTOPP_VERSION_HEADER})
|
||||
FILE (STRINGS ${_CRYPTOPP_VERSION_HEADER} _CRYPTOPP_VERSION_TMP REGEX
|
||||
"^#define CRYPTOPP_VERSION[ \t]+[0-9]+$")
|
||||
|
||||
STRING (REGEX REPLACE
|
||||
"^#define CRYPTOPP_VERSION[ \t]+([0-9]+)" "\\1" _CRYPTOPP_VERSION_TMP
|
||||
${_CRYPTOPP_VERSION_TMP})
|
||||
|
||||
STRING (REGEX REPLACE "([0-9]+)[0-9][0-9]" "\\1" CRYPTOPP_VERSION_MAJOR
|
||||
${_CRYPTOPP_VERSION_TMP})
|
||||
STRING (REGEX REPLACE "[0-9]([0-9])[0-9]" "\\1" CRYPTOPP_VERSION_MINOR
|
||||
${_CRYPTOPP_VERSION_TMP})
|
||||
STRING (REGEX REPLACE "[0-9][0-9]([0-9])" "\\1" CRYPTOPP_VERSION_PATCH
|
||||
${_CRYPTOPP_VERSION_TMP})
|
||||
|
||||
SET (CRYPTOPP_VERSION_COUNT 3)
|
||||
SET (CRYPTOPP_VERSION
|
||||
${CRYPTOPP_VERSION_MAJOR}.${CRYPTOPP_VERSION_MINOR}.${CRYPTOPP_VERSION_PATCH})
|
||||
ENDIF (EXISTS ${_CRYPTOPP_VERSION_HEADER})
|
||||
ENDIF (CRYPTOPP_INCLUDE_DIR)
|
||||
|
||||
SET (CRYPTOPP_INCLUDE_DIRS ${CRYPTOPP_INCLUDE_DIR})
|
||||
SET (CRYPTOPP_LIBRARIES ${CRYPTOPP_LIBRARY})
|
||||
|
||||
MARK_AS_ADVANCED (CRYPTOPP_INCLUDE_DIR CRYPTOPP_LIBRARY CRYPTOPP_LIBRARY_DEBUG
|
||||
CRYPTOPP_LIBRARY_RELEASE)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS (CryptoPP REQUIRED_VARS CRYPTOPP_ROOT_DIR
|
||||
CRYPTOPP_INCLUDE_DIR CRYPTOPP_LIBRARY VERSION_VAR CRYPTOPP_VERSION)
|
||||
148
Godeps/_workspace/src/github.com/ethereum/ethash/cmake/modules/FindOpenCL.cmake
generated
vendored
Normal file
148
Godeps/_workspace/src/github.com/ethereum/ethash/cmake/modules/FindOpenCL.cmake
generated
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
#.rst:
|
||||
# FindOpenCL
|
||||
# ----------
|
||||
#
|
||||
# Try to find OpenCL
|
||||
#
|
||||
# Once done this will define::
|
||||
#
|
||||
# OpenCL_FOUND - True if OpenCL was found
|
||||
# OpenCL_INCLUDE_DIRS - include directories for OpenCL
|
||||
# OpenCL_LIBRARIES - link against this library to use OpenCL
|
||||
# OpenCL_VERSION_STRING - Highest supported OpenCL version (eg. 1.2)
|
||||
# OpenCL_VERSION_MAJOR - The major version of the OpenCL implementation
|
||||
# OpenCL_VERSION_MINOR - The minor version of the OpenCL implementation
|
||||
#
|
||||
# The module will also define two cache variables::
|
||||
#
|
||||
# OpenCL_INCLUDE_DIR - the OpenCL include directory
|
||||
# OpenCL_LIBRARY - the path to the OpenCL library
|
||||
#
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2014 Matthaeus G. Chajdas
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
function(_FIND_OPENCL_VERSION)
|
||||
include(CheckSymbolExists)
|
||||
include(CMakePushCheckState)
|
||||
set(CMAKE_REQUIRED_QUIET ${OpenCL_FIND_QUIETLY})
|
||||
|
||||
CMAKE_PUSH_CHECK_STATE()
|
||||
foreach(VERSION "2_0" "1_2" "1_1" "1_0")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${OpenCL_INCLUDE_DIR}")
|
||||
|
||||
if(APPLE)
|
||||
CHECK_SYMBOL_EXISTS(
|
||||
CL_VERSION_${VERSION}
|
||||
"${OpenCL_INCLUDE_DIR}/OpenCL/cl.h"
|
||||
OPENCL_VERSION_${VERSION})
|
||||
else()
|
||||
CHECK_SYMBOL_EXISTS(
|
||||
CL_VERSION_${VERSION}
|
||||
"${OpenCL_INCLUDE_DIR}/CL/cl.h"
|
||||
OPENCL_VERSION_${VERSION})
|
||||
endif()
|
||||
|
||||
if(OPENCL_VERSION_${VERSION})
|
||||
string(REPLACE "_" "." VERSION "${VERSION}")
|
||||
set(OpenCL_VERSION_STRING ${VERSION} PARENT_SCOPE)
|
||||
string(REGEX MATCHALL "[0-9]+" version_components "${VERSION}")
|
||||
list(GET version_components 0 major_version)
|
||||
list(GET version_components 1 minor_version)
|
||||
set(OpenCL_VERSION_MAJOR ${major_version} PARENT_SCOPE)
|
||||
set(OpenCL_VERSION_MINOR ${minor_version} PARENT_SCOPE)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
CMAKE_POP_CHECK_STATE()
|
||||
endfunction()
|
||||
|
||||
find_path(OpenCL_INCLUDE_DIR
|
||||
NAMES
|
||||
CL/cl.h OpenCL/cl.h
|
||||
PATHS
|
||||
ENV "PROGRAMFILES(X86)"
|
||||
ENV AMDAPPSDKROOT
|
||||
ENV INTELOCLSDKROOT
|
||||
ENV NVSDKCOMPUTE_ROOT
|
||||
ENV CUDA_PATH
|
||||
ENV ATISTREAMSDKROOT
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
OpenCL/common/inc
|
||||
"AMD APP/include")
|
||||
|
||||
_FIND_OPENCL_VERSION()
|
||||
|
||||
if(WIN32)
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
find_library(OpenCL_LIBRARY
|
||||
NAMES OpenCL
|
||||
PATHS
|
||||
ENV "PROGRAMFILES(X86)"
|
||||
ENV AMDAPPSDKROOT
|
||||
ENV INTELOCLSDKROOT
|
||||
ENV CUDA_PATH
|
||||
ENV NVSDKCOMPUTE_ROOT
|
||||
ENV ATISTREAMSDKROOT
|
||||
PATH_SUFFIXES
|
||||
"AMD APP/lib/x86"
|
||||
lib/x86
|
||||
lib/Win32
|
||||
OpenCL/common/lib/Win32)
|
||||
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
find_library(OpenCL_LIBRARY
|
||||
NAMES OpenCL
|
||||
PATHS
|
||||
ENV "PROGRAMFILES(X86)"
|
||||
ENV AMDAPPSDKROOT
|
||||
ENV INTELOCLSDKROOT
|
||||
ENV CUDA_PATH
|
||||
ENV NVSDKCOMPUTE_ROOT
|
||||
ENV ATISTREAMSDKROOT
|
||||
PATH_SUFFIXES
|
||||
"AMD APP/lib/x86_64"
|
||||
lib/x86_64
|
||||
lib/x64
|
||||
OpenCL/common/lib/x64)
|
||||
endif()
|
||||
else()
|
||||
find_library(OpenCL_LIBRARY
|
||||
NAMES OpenCL
|
||||
PATHS
|
||||
ENV "PROGRAMFILES(X86)"
|
||||
ENV AMDAPPSDKROOT
|
||||
ENV INTELOCLSDKROOT
|
||||
ENV CUDA_PATH
|
||||
ENV NVSDKCOMPUTE_ROOT
|
||||
ENV ATISTREAMSDKROOT
|
||||
PATH_SUFFIXES
|
||||
"AMD APP/lib/x86_64"
|
||||
lib/x86_64
|
||||
lib/x64
|
||||
OpenCL/common/lib/x64)
|
||||
endif()
|
||||
|
||||
set(OpenCL_LIBRARIES ${OpenCL_LIBRARY})
|
||||
set(OpenCL_INCLUDE_DIRS ${OpenCL_INCLUDE_DIR})
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
||||
find_package_handle_standard_args(
|
||||
OpenCL
|
||||
FOUND_VAR OpenCL_FOUND
|
||||
REQUIRED_VARS OpenCL_LIBRARY OpenCL_INCLUDE_DIR
|
||||
VERSION_VAR OpenCL_VERSION_STRING)
|
||||
|
||||
mark_as_advanced(
|
||||
OpenCL_INCLUDE_DIR
|
||||
OpenCL_LIBRARY)
|
||||
382
Godeps/_workspace/src/github.com/ethereum/ethash/cmake/modules/FindPackageHandleStandardArgs.cmake
generated
vendored
Normal file
382
Godeps/_workspace/src/github.com/ethereum/ethash/cmake/modules/FindPackageHandleStandardArgs.cmake
generated
vendored
Normal file
@@ -0,0 +1,382 @@
|
||||
#.rst:
|
||||
# FindPackageHandleStandardArgs
|
||||
# -----------------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> ... )
|
||||
#
|
||||
# This function is intended to be used in FindXXX.cmake modules files.
|
||||
# It handles the REQUIRED, QUIET and version-related arguments to
|
||||
# find_package(). It also sets the <packagename>_FOUND variable. The
|
||||
# package is considered found if all variables <var1>... listed contain
|
||||
# valid results, e.g. valid filepaths.
|
||||
#
|
||||
# There are two modes of this function. The first argument in both
|
||||
# modes is the name of the Find-module where it is called (in original
|
||||
# casing).
|
||||
#
|
||||
# The first simple mode looks like this:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name>
|
||||
# (DEFAULT_MSG|"Custom failure message") <var1>...<varN> )
|
||||
#
|
||||
# If the variables <var1> to <varN> are all valid, then
|
||||
# <UPPERCASED_NAME>_FOUND will be set to TRUE. If DEFAULT_MSG is given
|
||||
# as second argument, then the function will generate itself useful
|
||||
# success and error messages. You can also supply a custom error
|
||||
# message for the failure case. This is not recommended.
|
||||
#
|
||||
# The second mode is more powerful and also supports version checking:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME
|
||||
# [FOUND_VAR <resultVar>]
|
||||
# [REQUIRED_VARS <var1>...<varN>]
|
||||
# [VERSION_VAR <versionvar>]
|
||||
# [HANDLE_COMPONENTS]
|
||||
# [CONFIG_MODE]
|
||||
# [FAIL_MESSAGE "Custom failure message"] )
|
||||
#
|
||||
# In this mode, the name of the result-variable can be set either to
|
||||
# either <UPPERCASED_NAME>_FOUND or <OriginalCase_Name>_FOUND using the
|
||||
# FOUND_VAR option. Other names for the result-variable are not
|
||||
# allowed. So for a Find-module named FindFooBar.cmake, the two
|
||||
# possible names are FooBar_FOUND and FOOBAR_FOUND. It is recommended
|
||||
# to use the original case version. If the FOUND_VAR option is not
|
||||
# used, the default is <UPPERCASED_NAME>_FOUND.
|
||||
#
|
||||
# As in the simple mode, if <var1> through <varN> are all valid,
|
||||
# <packagename>_FOUND will be set to TRUE. After REQUIRED_VARS the
|
||||
# variables which are required for this package are listed. Following
|
||||
# VERSION_VAR the name of the variable can be specified which holds the
|
||||
# version of the package which has been found. If this is done, this
|
||||
# version will be checked against the (potentially) specified required
|
||||
# version used in the find_package() call. The EXACT keyword is also
|
||||
# handled. The default messages include information about the required
|
||||
# version and the version which has been actually found, both if the
|
||||
# version is ok or not. If the package supports components, use the
|
||||
# HANDLE_COMPONENTS option to enable handling them. In this case,
|
||||
# find_package_handle_standard_args() will report which components have
|
||||
# been found and which are missing, and the <packagename>_FOUND variable
|
||||
# will be set to FALSE if any of the required components (i.e. not the
|
||||
# ones listed after OPTIONAL_COMPONENTS) are missing. Use the option
|
||||
# CONFIG_MODE if your FindXXX.cmake module is a wrapper for a
|
||||
# find_package(... NO_MODULE) call. In this case VERSION_VAR will be
|
||||
# set to <NAME>_VERSION and the macro will automatically check whether
|
||||
# the Config module was found. Via FAIL_MESSAGE a custom failure
|
||||
# message can be specified, if this is not used, the default message
|
||||
# will be displayed.
|
||||
#
|
||||
# Example for mode 1:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# find_package_handle_standard_args(LibXml2 DEFAULT_MSG
|
||||
# LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
|
||||
#
|
||||
#
|
||||
#
|
||||
# LibXml2 is considered to be found, if both LIBXML2_LIBRARY and
|
||||
# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to
|
||||
# TRUE. If it is not found and REQUIRED was used, it fails with
|
||||
# FATAL_ERROR, independent whether QUIET was used or not. If it is
|
||||
# found, success will be reported, including the content of <var1>. On
|
||||
# repeated Cmake runs, the same message won't be printed again.
|
||||
#
|
||||
# Example for mode 2:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# find_package_handle_standard_args(LibXslt
|
||||
# FOUND_VAR LibXslt_FOUND
|
||||
# REQUIRED_VARS LibXslt_LIBRARIES LibXslt_INCLUDE_DIRS
|
||||
# VERSION_VAR LibXslt_VERSION_STRING)
|
||||
#
|
||||
# In this case, LibXslt is considered to be found if the variable(s)
|
||||
# listed after REQUIRED_VAR are all valid, i.e. LibXslt_LIBRARIES and
|
||||
# LibXslt_INCLUDE_DIRS in this case. The result will then be stored in
|
||||
# LibXslt_FOUND . Also the version of LibXslt will be checked by using
|
||||
# the version contained in LibXslt_VERSION_STRING. Since no
|
||||
# FAIL_MESSAGE is given, the default messages will be printed.
|
||||
#
|
||||
# Another example for mode 2:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# find_package(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
|
||||
# find_package_handle_standard_args(Automoc4 CONFIG_MODE)
|
||||
#
|
||||
# In this case, FindAutmoc4.cmake wraps a call to find_package(Automoc4
|
||||
# NO_MODULE) and adds an additional search directory for automoc4. Here
|
||||
# the result will be stored in AUTOMOC4_FOUND. The following
|
||||
# FIND_PACKAGE_HANDLE_STANDARD_ARGS() call produces a proper
|
||||
# success/error message.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2007-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageMessage.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake)
|
||||
|
||||
# internal helper macro
|
||||
macro(_FPHSA_FAILURE_MESSAGE _msg)
|
||||
if (${_NAME}_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "${_msg}")
|
||||
else ()
|
||||
if (NOT ${_NAME}_FIND_QUIETLY)
|
||||
message(STATUS "${_msg}")
|
||||
endif ()
|
||||
endif ()
|
||||
endmacro()
|
||||
|
||||
|
||||
# internal helper macro to generate the failure message when used in CONFIG_MODE:
|
||||
macro(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
|
||||
# <name>_CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found:
|
||||
if(${_NAME}_CONFIG)
|
||||
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing: ${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})")
|
||||
else()
|
||||
# If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version.
|
||||
# List them all in the error message:
|
||||
if(${_NAME}_CONSIDERED_CONFIGS)
|
||||
set(configsText "")
|
||||
list(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount)
|
||||
math(EXPR configsCount "${configsCount} - 1")
|
||||
foreach(currentConfigIndex RANGE ${configsCount})
|
||||
list(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename)
|
||||
list(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version)
|
||||
set(configsText "${configsText} ${filename} (version ${version})\n")
|
||||
endforeach()
|
||||
if (${_NAME}_NOT_FOUND_MESSAGE)
|
||||
set(configsText "${configsText} Reason given by package: ${${_NAME}_NOT_FOUND_MESSAGE}\n")
|
||||
endif()
|
||||
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:\n${configsText}")
|
||||
|
||||
else()
|
||||
# Simple case: No Config-file was found at all:
|
||||
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
|
||||
|
||||
# set up the arguments for CMAKE_PARSE_ARGUMENTS and check whether we are in
|
||||
# new extended or in the "old" mode:
|
||||
set(options CONFIG_MODE HANDLE_COMPONENTS)
|
||||
set(oneValueArgs FAIL_MESSAGE VERSION_VAR FOUND_VAR)
|
||||
set(multiValueArgs REQUIRED_VARS)
|
||||
set(_KEYWORDS_FOR_EXTENDED_MODE ${options} ${oneValueArgs} ${multiValueArgs} )
|
||||
list(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX)
|
||||
|
||||
if(${INDEX} EQUAL -1)
|
||||
set(FPHSA_FAIL_MESSAGE ${_FIRST_ARG})
|
||||
set(FPHSA_REQUIRED_VARS ${ARGN})
|
||||
set(FPHSA_VERSION_VAR)
|
||||
else()
|
||||
|
||||
CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}" ${_FIRST_ARG} ${ARGN})
|
||||
|
||||
if(FPHSA_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"")
|
||||
endif()
|
||||
|
||||
if(NOT FPHSA_FAIL_MESSAGE)
|
||||
set(FPHSA_FAIL_MESSAGE "DEFAULT_MSG")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# now that we collected all arguments, process them
|
||||
|
||||
if("x${FPHSA_FAIL_MESSAGE}" STREQUAL "xDEFAULT_MSG")
|
||||
set(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}")
|
||||
endif()
|
||||
|
||||
# In config-mode, we rely on the variable <package>_CONFIG, which is set by find_package()
|
||||
# when it successfully found the config-file, including version checking:
|
||||
if(FPHSA_CONFIG_MODE)
|
||||
list(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG)
|
||||
list(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS)
|
||||
set(FPHSA_VERSION_VAR ${_NAME}_VERSION)
|
||||
endif()
|
||||
|
||||
if(NOT FPHSA_REQUIRED_VARS)
|
||||
message(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()")
|
||||
endif()
|
||||
|
||||
list(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR)
|
||||
|
||||
string(TOUPPER ${_NAME} _NAME_UPPER)
|
||||
string(TOLOWER ${_NAME} _NAME_LOWER)
|
||||
|
||||
if(FPHSA_FOUND_VAR)
|
||||
if(FPHSA_FOUND_VAR MATCHES "^${_NAME}_FOUND$" OR FPHSA_FOUND_VAR MATCHES "^${_NAME_UPPER}_FOUND$")
|
||||
set(_FOUND_VAR ${FPHSA_FOUND_VAR})
|
||||
else()
|
||||
message(FATAL_ERROR "The argument for FOUND_VAR is \"${FPHSA_FOUND_VAR}\", but only \"${_NAME}_FOUND\" and \"${_NAME_UPPER}_FOUND\" are valid names.")
|
||||
endif()
|
||||
else()
|
||||
set(_FOUND_VAR ${_NAME_UPPER}_FOUND)
|
||||
endif()
|
||||
|
||||
# collect all variables which were not found, so they can be printed, so the
|
||||
# user knows better what went wrong (#6375)
|
||||
set(MISSING_VARS "")
|
||||
set(DETAILS "")
|
||||
# check if all passed variables are valid
|
||||
unset(${_FOUND_VAR})
|
||||
foreach(_CURRENT_VAR ${FPHSA_REQUIRED_VARS})
|
||||
if(NOT ${_CURRENT_VAR})
|
||||
set(${_FOUND_VAR} FALSE)
|
||||
set(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}")
|
||||
else()
|
||||
set(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]")
|
||||
endif()
|
||||
endforeach()
|
||||
if(NOT "${${_FOUND_VAR}}" STREQUAL "FALSE")
|
||||
set(${_FOUND_VAR} TRUE)
|
||||
endif()
|
||||
|
||||
# component handling
|
||||
unset(FOUND_COMPONENTS_MSG)
|
||||
unset(MISSING_COMPONENTS_MSG)
|
||||
|
||||
if(FPHSA_HANDLE_COMPONENTS)
|
||||
foreach(comp ${${_NAME}_FIND_COMPONENTS})
|
||||
if(${_NAME}_${comp}_FOUND)
|
||||
|
||||
if(NOT DEFINED FOUND_COMPONENTS_MSG)
|
||||
set(FOUND_COMPONENTS_MSG "found components: ")
|
||||
endif()
|
||||
set(FOUND_COMPONENTS_MSG "${FOUND_COMPONENTS_MSG} ${comp}")
|
||||
|
||||
else()
|
||||
|
||||
if(NOT DEFINED MISSING_COMPONENTS_MSG)
|
||||
set(MISSING_COMPONENTS_MSG "missing components: ")
|
||||
endif()
|
||||
set(MISSING_COMPONENTS_MSG "${MISSING_COMPONENTS_MSG} ${comp}")
|
||||
|
||||
if(${_NAME}_FIND_REQUIRED_${comp})
|
||||
set(${_FOUND_VAR} FALSE)
|
||||
set(MISSING_VARS "${MISSING_VARS} ${comp}")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
endforeach()
|
||||
set(COMPONENT_MSG "${FOUND_COMPONENTS_MSG} ${MISSING_COMPONENTS_MSG}")
|
||||
set(DETAILS "${DETAILS}[c${COMPONENT_MSG}]")
|
||||
endif()
|
||||
|
||||
# version handling:
|
||||
set(VERSION_MSG "")
|
||||
set(VERSION_OK TRUE)
|
||||
set(VERSION ${${FPHSA_VERSION_VAR}})
|
||||
|
||||
# check with DEFINED here as the requested or found version may be "0"
|
||||
if (DEFINED ${_NAME}_FIND_VERSION)
|
||||
if(DEFINED ${FPHSA_VERSION_VAR})
|
||||
|
||||
if(${_NAME}_FIND_VERSION_EXACT) # exact version required
|
||||
# count the dots in the version string
|
||||
string(REGEX REPLACE "[^.]" "" _VERSION_DOTS "${VERSION}")
|
||||
# add one dot because there is one dot more than there are components
|
||||
string(LENGTH "${_VERSION_DOTS}." _VERSION_DOTS)
|
||||
if (_VERSION_DOTS GREATER ${_NAME}_FIND_VERSION_COUNT)
|
||||
# Because of the C++ implementation of find_package() ${_NAME}_FIND_VERSION_COUNT
|
||||
# is at most 4 here. Therefore a simple lookup table is used.
|
||||
if (${_NAME}_FIND_VERSION_COUNT EQUAL 1)
|
||||
set(_VERSION_REGEX "[^.]*")
|
||||
elseif (${_NAME}_FIND_VERSION_COUNT EQUAL 2)
|
||||
set(_VERSION_REGEX "[^.]*\\.[^.]*")
|
||||
elseif (${_NAME}_FIND_VERSION_COUNT EQUAL 3)
|
||||
set(_VERSION_REGEX "[^.]*\\.[^.]*\\.[^.]*")
|
||||
else ()
|
||||
set(_VERSION_REGEX "[^.]*\\.[^.]*\\.[^.]*\\.[^.]*")
|
||||
endif ()
|
||||
string(REGEX REPLACE "^(${_VERSION_REGEX})\\..*" "\\1" _VERSION_HEAD "${VERSION}")
|
||||
unset(_VERSION_REGEX)
|
||||
if (NOT ${_NAME}_FIND_VERSION VERSION_EQUAL _VERSION_HEAD)
|
||||
set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
|
||||
set(VERSION_OK FALSE)
|
||||
else ()
|
||||
set(VERSION_MSG "(found suitable exact version \"${VERSION}\")")
|
||||
endif ()
|
||||
unset(_VERSION_HEAD)
|
||||
else ()
|
||||
if (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
|
||||
set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
|
||||
set(VERSION_OK FALSE)
|
||||
else ()
|
||||
set(VERSION_MSG "(found suitable exact version \"${VERSION}\")")
|
||||
endif ()
|
||||
endif ()
|
||||
unset(_VERSION_DOTS)
|
||||
|
||||
else() # minimum version specified:
|
||||
if ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
|
||||
set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"")
|
||||
set(VERSION_OK FALSE)
|
||||
else ()
|
||||
set(VERSION_MSG "(found suitable version \"${VERSION}\", minimum required is \"${${_NAME}_FIND_VERSION}\")")
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
||||
# if the package was not found, but a version was given, add that to the output:
|
||||
if(${_NAME}_FIND_VERSION_EXACT)
|
||||
set(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")")
|
||||
else()
|
||||
set(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
else ()
|
||||
if(VERSION)
|
||||
set(VERSION_MSG "(found version \"${VERSION}\")")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if(VERSION_OK)
|
||||
set(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]")
|
||||
else()
|
||||
set(${_FOUND_VAR} FALSE)
|
||||
endif()
|
||||
|
||||
|
||||
# print the result:
|
||||
if (${_FOUND_VAR})
|
||||
FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG} ${COMPONENT_MSG}" "${DETAILS}")
|
||||
else ()
|
||||
|
||||
if(FPHSA_CONFIG_MODE)
|
||||
_FPHSA_HANDLE_FAILURE_CONFIG_MODE()
|
||||
else()
|
||||
if(NOT VERSION_OK)
|
||||
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})")
|
||||
else()
|
||||
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endif ()
|
||||
|
||||
set(${_FOUND_VAR} ${${_FOUND_VAR}} PARENT_SCOPE)
|
||||
|
||||
endfunction()
|
||||
57
Godeps/_workspace/src/github.com/ethereum/ethash/cmake/modules/FindPackageMessage.cmake
generated
vendored
Normal file
57
Godeps/_workspace/src/github.com/ethereum/ethash/cmake/modules/FindPackageMessage.cmake
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
#.rst:
|
||||
# FindPackageMessage
|
||||
# ------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
# FIND_PACKAGE_MESSAGE(<name> "message for user" "find result details")
|
||||
#
|
||||
# This macro is intended to be used in FindXXX.cmake modules files. It
|
||||
# will print a message once for each unique find result. This is useful
|
||||
# for telling the user where a package was found. The first argument
|
||||
# specifies the name (XXX) of the package. The second argument
|
||||
# specifies the message to display. The third argument lists details
|
||||
# about the find result so that if they change the message will be
|
||||
# displayed again. The macro also obeys the QUIET argument to the
|
||||
# find_package command.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# if(X11_FOUND)
|
||||
# FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}"
|
||||
# "[${X11_X11_LIB}][${X11_INCLUDE_DIR}]")
|
||||
# else()
|
||||
# ...
|
||||
# endif()
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2008-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
function(FIND_PACKAGE_MESSAGE pkg msg details)
|
||||
# Avoid printing a message repeatedly for the same find result.
|
||||
if(NOT ${pkg}_FIND_QUIETLY)
|
||||
string(REPLACE "\n" "" details "${details}")
|
||||
set(DETAILS_VAR FIND_PACKAGE_MESSAGE_DETAILS_${pkg})
|
||||
if(NOT "${details}" STREQUAL "${${DETAILS_VAR}}")
|
||||
# The message has not yet been printed.
|
||||
message(STATUS "${msg}")
|
||||
|
||||
# Save the find details in the cache to avoid printing the same
|
||||
# message again.
|
||||
set("${DETAILS_VAR}" "${details}"
|
||||
CACHE INTERNAL "Details about finding ${pkg}")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
13
Godeps/_workspace/src/github.com/ethereum/ethash/cryptopp/CMakeLists.txt
generated
vendored
Normal file
13
Godeps/_workspace/src/github.com/ethereum/ethash/cryptopp/CMakeLists.txt
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
set(LIBRARY cryptopp)
|
||||
|
||||
include_directories(../../cryptopp)
|
||||
|
||||
# todo, subset
|
||||
file(GLOB HEADERS "../../cryptopp/*.h")
|
||||
file(GLOB SOURCE "../../cryptopp/*.cpp")
|
||||
|
||||
add_library(${LIBRARY} ${HEADERS} ${SOURCE})
|
||||
|
||||
set(CRYPTOPP_INCLUDE_DIRS "../.." "../../../" PARENT_SCOPE)
|
||||
set(CRYPTOPP_LIBRARIES ${LIBRARY} PARENT_SCOPE)
|
||||
set(CRYPTOPP_FOUND TRUE PARENT_SCOPE)
|
||||
360
Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go
generated
vendored
Normal file
360
Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go
generated
vendored
Normal file
@@ -0,0 +1,360 @@
|
||||
package ethash
|
||||
|
||||
/*
|
||||
#include "src/libethash/internal.h"
|
||||
|
||||
int ethashGoCallback_cgo(unsigned);
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"math/big"
|
||||
"math/rand"
|
||||
"os"
|
||||
"os/user"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/logger"
|
||||
"github.com/ethereum/go-ethereum/logger/glog"
|
||||
"github.com/ethereum/go-ethereum/pow"
|
||||
)
|
||||
|
||||
var (
|
||||
minDifficulty = new(big.Int).Exp(big.NewInt(2), big.NewInt(256), big.NewInt(0))
|
||||
sharedLight = new(Light)
|
||||
)
|
||||
|
||||
const (
|
||||
epochLength uint64 = 30000
|
||||
cacheSizeForTesting C.uint64_t = 1024
|
||||
dagSizeForTesting C.uint64_t = 1024 * 32
|
||||
)
|
||||
|
||||
var DefaultDir = defaultDir()
|
||||
|
||||
func defaultDir() string {
|
||||
home := os.Getenv("HOME")
|
||||
if user, err := user.Current(); err == nil {
|
||||
home = user.HomeDir
|
||||
}
|
||||
if runtime.GOOS == "windows" {
|
||||
return filepath.Join(home, "AppData", "Ethash")
|
||||
}
|
||||
return filepath.Join(home, ".ethash")
|
||||
}
|
||||
|
||||
// cache wraps an ethash_light_t with some metadata
|
||||
// and automatic memory management.
|
||||
type cache struct {
|
||||
epoch uint64
|
||||
test bool
|
||||
|
||||
gen sync.Once // ensures cache is only generated once.
|
||||
ptr *C.struct_ethash_light
|
||||
}
|
||||
|
||||
// generate creates the actual cache. it can be called from multiple
|
||||
// goroutines. the first call will generate the cache, subsequent
|
||||
// calls wait until it is generated.
|
||||
func (cache *cache) generate() {
|
||||
cache.gen.Do(func() {
|
||||
started := time.Now()
|
||||
seedHash := makeSeedHash(cache.epoch)
|
||||
glog.V(logger.Debug).Infof("Generating cache for epoch %d (%x)", cache.epoch, seedHash)
|
||||
size := C.ethash_get_cachesize(C.uint64_t(cache.epoch * epochLength))
|
||||
if cache.test {
|
||||
size = cacheSizeForTesting
|
||||
}
|
||||
cache.ptr = C.ethash_light_new_internal(size, (*C.ethash_h256_t)(unsafe.Pointer(&seedHash[0])))
|
||||
runtime.SetFinalizer(cache, freeCache)
|
||||
glog.V(logger.Debug).Infof("Done generating cache for epoch %d, it took %v", cache.epoch, time.Since(started))
|
||||
})
|
||||
}
|
||||
|
||||
func freeCache(cache *cache) {
|
||||
C.ethash_light_delete(cache.ptr)
|
||||
cache.ptr = nil
|
||||
}
|
||||
|
||||
// Light implements the Verify half of the proof of work.
|
||||
// It uses a small in-memory cache to verify the nonces
|
||||
// found by Full.
|
||||
type Light struct {
|
||||
test bool // if set use a smaller cache size
|
||||
mu sync.Mutex // protects current
|
||||
current *cache // last cache which was generated.
|
||||
// TODO: keep multiple caches.
|
||||
}
|
||||
|
||||
// Verify checks whether the block's nonce is valid.
|
||||
func (l *Light) Verify(block pow.Block) bool {
|
||||
// TODO: do ethash_quick_verify before getCache in order
|
||||
// to prevent DOS attacks.
|
||||
var (
|
||||
blockNum = block.NumberU64()
|
||||
difficulty = block.Difficulty()
|
||||
cache = l.getCache(blockNum)
|
||||
dagSize = C.ethash_get_datasize(C.uint64_t(blockNum))
|
||||
)
|
||||
if l.test {
|
||||
dagSize = dagSizeForTesting
|
||||
}
|
||||
if blockNum >= epochLength*2048 {
|
||||
glog.V(logger.Debug).Infof("block number %d too high, limit is %d", epochLength*2048)
|
||||
return false
|
||||
}
|
||||
// Recompute the hash using the cache.
|
||||
hash := hashToH256(block.HashNoNonce())
|
||||
ret := C.ethash_light_compute_internal(cache.ptr, dagSize, hash, C.uint64_t(block.Nonce()))
|
||||
if !ret.success {
|
||||
return false
|
||||
}
|
||||
// Make sure cache is live until after the C call.
|
||||
// This is important because a GC might happen and execute
|
||||
// the finalizer before the call completes.
|
||||
_ = cache
|
||||
// The actual check.
|
||||
target := new(big.Int).Div(minDifficulty, difficulty)
|
||||
return h256ToHash(ret.result).Big().Cmp(target) <= 0
|
||||
}
|
||||
|
||||
func h256ToHash(in C.ethash_h256_t) common.Hash {
|
||||
return *(*common.Hash)(unsafe.Pointer(&in.b))
|
||||
}
|
||||
|
||||
func hashToH256(in common.Hash) C.ethash_h256_t {
|
||||
return C.ethash_h256_t{b: *(*[32]C.uint8_t)(unsafe.Pointer(&in[0]))}
|
||||
}
|
||||
|
||||
func (l *Light) getCache(blockNum uint64) *cache {
|
||||
var c *cache
|
||||
epoch := blockNum / epochLength
|
||||
// Update or reuse the last cache.
|
||||
l.mu.Lock()
|
||||
if l.current != nil && l.current.epoch == epoch {
|
||||
c = l.current
|
||||
} else {
|
||||
c = &cache{epoch: epoch, test: l.test}
|
||||
l.current = c
|
||||
}
|
||||
l.mu.Unlock()
|
||||
// Wait for the cache to finish generating.
|
||||
c.generate()
|
||||
return c
|
||||
}
|
||||
|
||||
// dag wraps an ethash_full_t with some metadata
|
||||
// and automatic memory management.
|
||||
type dag struct {
|
||||
epoch uint64
|
||||
test bool
|
||||
dir string
|
||||
|
||||
gen sync.Once // ensures DAG is only generated once.
|
||||
ptr *C.struct_ethash_full
|
||||
}
|
||||
|
||||
// generate creates the actual DAG. it can be called from multiple
|
||||
// goroutines. the first call will generate the DAG, subsequent
|
||||
// calls wait until it is generated.
|
||||
func (d *dag) generate() {
|
||||
d.gen.Do(func() {
|
||||
var (
|
||||
started = time.Now()
|
||||
seedHash = makeSeedHash(d.epoch)
|
||||
blockNum = C.uint64_t(d.epoch * epochLength)
|
||||
cacheSize = C.ethash_get_cachesize(blockNum)
|
||||
dagSize = C.ethash_get_datasize(blockNum)
|
||||
)
|
||||
if d.test {
|
||||
cacheSize = cacheSizeForTesting
|
||||
dagSize = dagSizeForTesting
|
||||
}
|
||||
if d.dir == "" {
|
||||
d.dir = DefaultDir
|
||||
}
|
||||
glog.V(logger.Info).Infof("Generating DAG for epoch %d (%x)", d.epoch, seedHash)
|
||||
// Generate a temporary cache.
|
||||
// TODO: this could share the cache with Light
|
||||
cache := C.ethash_light_new_internal(cacheSize, (*C.ethash_h256_t)(unsafe.Pointer(&seedHash[0])))
|
||||
defer C.ethash_light_delete(cache)
|
||||
// Generate the actual DAG.
|
||||
d.ptr = C.ethash_full_new_internal(
|
||||
C.CString(d.dir),
|
||||
hashToH256(seedHash),
|
||||
dagSize,
|
||||
cache,
|
||||
(C.ethash_callback_t)(unsafe.Pointer(C.ethashGoCallback_cgo)),
|
||||
)
|
||||
if d.ptr == nil {
|
||||
panic("ethash_full_new IO or memory error")
|
||||
}
|
||||
runtime.SetFinalizer(d, freeDAG)
|
||||
glog.V(logger.Info).Infof("Done generating DAG for epoch %d, it took %v", d.epoch, time.Since(started))
|
||||
})
|
||||
}
|
||||
|
||||
func freeDAG(h *dag) {
|
||||
C.ethash_full_delete(h.ptr)
|
||||
h.ptr = nil
|
||||
}
|
||||
|
||||
//export ethashGoCallback
|
||||
func ethashGoCallback(percent C.unsigned) C.int {
|
||||
glog.V(logger.Info).Infof("Still generating DAG: %d%%", percent)
|
||||
return 0
|
||||
}
|
||||
|
||||
// MakeDAG pre-generates a DAG file for the given block number in the
|
||||
// given directory. If dir is the empty string, the default directory
|
||||
// is used.
|
||||
func MakeDAG(blockNum uint64, dir string) error {
|
||||
d := &dag{epoch: blockNum / epochLength, dir: dir}
|
||||
if blockNum >= epochLength*2048 {
|
||||
return fmt.Errorf("block number too high, limit is %d", epochLength*2048)
|
||||
}
|
||||
d.generate()
|
||||
if d.ptr == nil {
|
||||
return errors.New("failed")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Full implements the Search half of the proof of work.
|
||||
type Full struct {
|
||||
Dir string // use this to specify a non-default DAG directory
|
||||
|
||||
test bool // if set use a smaller DAG size
|
||||
turbo bool
|
||||
hashRate int32
|
||||
|
||||
mu sync.Mutex // protects dag
|
||||
current *dag // current full DAG
|
||||
}
|
||||
|
||||
func (pow *Full) getDAG(blockNum uint64) (d *dag) {
|
||||
epoch := blockNum / epochLength
|
||||
pow.mu.Lock()
|
||||
if pow.current != nil && pow.current.epoch == epoch {
|
||||
d = pow.current
|
||||
} else {
|
||||
d = &dag{epoch: epoch, test: pow.test, dir: pow.Dir}
|
||||
pow.current = d
|
||||
}
|
||||
pow.mu.Unlock()
|
||||
// wait for it to finish generating.
|
||||
d.generate()
|
||||
return d
|
||||
}
|
||||
|
||||
func (pow *Full) Search(block pow.Block, stop <-chan struct{}) (nonce uint64, mixDigest []byte) {
|
||||
dag := pow.getDAG(block.NumberU64())
|
||||
|
||||
r := rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
diff := block.Difficulty()
|
||||
|
||||
i := int64(0)
|
||||
starti := i
|
||||
start := time.Now().UnixNano()
|
||||
previousHashrate := int32(0)
|
||||
|
||||
nonce = uint64(r.Int63())
|
||||
hash := hashToH256(block.HashNoNonce())
|
||||
target := new(big.Int).Div(minDifficulty, diff)
|
||||
for {
|
||||
select {
|
||||
case <-stop:
|
||||
atomic.AddInt32(&pow.hashRate, -previousHashrate)
|
||||
return 0, nil
|
||||
default:
|
||||
i++
|
||||
|
||||
// we don't have to update hash rate on every nonce, so update after
|
||||
// first nonce check and then after 2^X nonces
|
||||
if i == 2 || ((i % (1 << 16)) == 0) {
|
||||
elapsed := time.Now().UnixNano() - start
|
||||
hashes := (float64(1e9) / float64(elapsed)) * float64(i-starti)
|
||||
hashrateDiff := int32(hashes) - previousHashrate
|
||||
previousHashrate = int32(hashes)
|
||||
atomic.AddInt32(&pow.hashRate, hashrateDiff)
|
||||
}
|
||||
|
||||
ret := C.ethash_full_compute(dag.ptr, hash, C.uint64_t(nonce))
|
||||
result := h256ToHash(ret.result).Big()
|
||||
|
||||
// TODO: disagrees with the spec https://github.com/ethereum/wiki/wiki/Ethash#mining
|
||||
if ret.success && result.Cmp(target) <= 0 {
|
||||
mixDigest = C.GoBytes(unsafe.Pointer(&ret.mix_hash), C.int(32))
|
||||
atomic.AddInt32(&pow.hashRate, -previousHashrate)
|
||||
return nonce, mixDigest
|
||||
}
|
||||
nonce += 1
|
||||
}
|
||||
|
||||
if !pow.turbo {
|
||||
time.Sleep(20 * time.Microsecond)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (pow *Full) GetHashrate() int64 {
|
||||
return int64(atomic.LoadInt32(&pow.hashRate))
|
||||
}
|
||||
|
||||
func (pow *Full) Turbo(on bool) {
|
||||
// TODO: this needs to use an atomic operation.
|
||||
pow.turbo = on
|
||||
}
|
||||
|
||||
// Ethash combines block verification with Light and
|
||||
// nonce searching with Full into a single proof of work.
|
||||
type Ethash struct {
|
||||
*Light
|
||||
*Full
|
||||
}
|
||||
|
||||
// New creates an instance of the proof of work.
|
||||
// A single instance of Light is shared across all instances
|
||||
// created with New.
|
||||
func New() *Ethash {
|
||||
return &Ethash{sharedLight, &Full{turbo: true}}
|
||||
}
|
||||
|
||||
// NewForTesting creates a proof of work for use in unit tests.
|
||||
// It uses a smaller DAG and cache size to keep test times low.
|
||||
// DAG files are stored in a temporary directory.
|
||||
//
|
||||
// Nonces found by a testing instance are not verifiable with a
|
||||
// regular-size cache.
|
||||
func NewForTesting() (*Ethash, error) {
|
||||
dir, err := ioutil.TempDir("", "ethash-test")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &Ethash{&Light{test: true}, &Full{Dir: dir, test: true}}, nil
|
||||
}
|
||||
|
||||
func GetSeedHash(blockNum uint64) ([]byte, error) {
|
||||
if blockNum >= epochLength*2048 {
|
||||
return nil, fmt.Errorf("block number too high, limit is %d", epochLength*2048)
|
||||
}
|
||||
sh := makeSeedHash(blockNum / epochLength)
|
||||
return sh[:], nil
|
||||
}
|
||||
|
||||
func makeSeedHash(epoch uint64) (sh common.Hash) {
|
||||
for ; epoch > 0; epoch-- {
|
||||
sh = crypto.Sha3Hash(sh[:])
|
||||
}
|
||||
return sh
|
||||
}
|
||||
176
Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go
generated
vendored
Normal file
176
Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go
generated
vendored
Normal file
@@ -0,0 +1,176 @@
|
||||
package ethash
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/rand"
|
||||
"encoding/hex"
|
||||
"log"
|
||||
"math/big"
|
||||
"os"
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
)
|
||||
|
||||
func init() {
|
||||
// glog.SetV(6)
|
||||
// glog.SetToStderr(true)
|
||||
}
|
||||
|
||||
type testBlock struct {
|
||||
difficulty *big.Int
|
||||
hashNoNonce common.Hash
|
||||
nonce uint64
|
||||
mixDigest common.Hash
|
||||
number uint64
|
||||
}
|
||||
|
||||
func (b *testBlock) Difficulty() *big.Int { return b.difficulty }
|
||||
func (b *testBlock) HashNoNonce() common.Hash { return b.hashNoNonce }
|
||||
func (b *testBlock) Nonce() uint64 { return b.nonce }
|
||||
func (b *testBlock) MixDigest() common.Hash { return b.mixDigest }
|
||||
func (b *testBlock) NumberU64() uint64 { return b.number }
|
||||
|
||||
var validBlocks = []*testBlock{
|
||||
// from proof of concept nine testnet, epoch 0
|
||||
{
|
||||
number: 22,
|
||||
hashNoNonce: common.HexToHash("372eca2454ead349c3df0ab5d00b0b706b23e49d469387db91811cee0358fc6d"),
|
||||
difficulty: big.NewInt(132416),
|
||||
nonce: 0x495732e0ed7a801c,
|
||||
},
|
||||
// from proof of concept nine testnet, epoch 1
|
||||
{
|
||||
number: 30001,
|
||||
hashNoNonce: common.HexToHash("7e44356ee3441623bc72a683fd3708fdf75e971bbe294f33e539eedad4b92b34"),
|
||||
difficulty: big.NewInt(1532671),
|
||||
nonce: 0x318df1c8adef7e5e,
|
||||
},
|
||||
// from proof of concept nine testnet, epoch 2
|
||||
{
|
||||
number: 60000,
|
||||
hashNoNonce: common.HexToHash("5fc898f16035bf5ac9c6d9077ae1e3d5fc1ecc3c9fd5bee8bb00e810fdacbaa0"),
|
||||
difficulty: big.NewInt(2467358),
|
||||
nonce: 0x50377003e5d830ca,
|
||||
},
|
||||
}
|
||||
|
||||
func TestEthashVerifyValid(t *testing.T) {
|
||||
eth := New()
|
||||
for i, block := range validBlocks {
|
||||
if !eth.Verify(block) {
|
||||
t.Errorf("block %d (%x) did not validate.", i, block.hashNoNonce[:6])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestEthashConcurrentVerify(t *testing.T) {
|
||||
eth, err := NewForTesting()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(eth.Full.Dir)
|
||||
|
||||
block := &testBlock{difficulty: big.NewInt(10)}
|
||||
nonce, _ := eth.Search(block, nil)
|
||||
block.nonce = nonce
|
||||
|
||||
// Verify the block concurrently to check for data races.
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(100)
|
||||
for i := 0; i < 100; i++ {
|
||||
go func() {
|
||||
if !eth.Verify(block) {
|
||||
t.Error("Block could not be verified")
|
||||
}
|
||||
wg.Done()
|
||||
}()
|
||||
}
|
||||
wg.Wait()
|
||||
}
|
||||
|
||||
func TestEthashConcurrentSearch(t *testing.T) {
|
||||
eth, err := NewForTesting()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
eth.Turbo(true)
|
||||
defer os.RemoveAll(eth.Full.Dir)
|
||||
|
||||
// launch n searches concurrently.
|
||||
var (
|
||||
block = &testBlock{difficulty: big.NewInt(35000)}
|
||||
nsearch = 10
|
||||
wg = new(sync.WaitGroup)
|
||||
found = make(chan uint64)
|
||||
stop = make(chan struct{})
|
||||
)
|
||||
rand.Read(block.hashNoNonce[:])
|
||||
wg.Add(nsearch)
|
||||
for i := 0; i < nsearch; i++ {
|
||||
go func() {
|
||||
nonce, _ := eth.Search(block, stop)
|
||||
select {
|
||||
case found <- nonce:
|
||||
case <-stop:
|
||||
}
|
||||
wg.Done()
|
||||
}()
|
||||
}
|
||||
|
||||
// wait for one of them to find the nonce
|
||||
nonce := <-found
|
||||
// stop the others
|
||||
close(stop)
|
||||
wg.Wait()
|
||||
|
||||
if block.nonce = nonce; !eth.Verify(block) {
|
||||
t.Error("Block could not be verified")
|
||||
}
|
||||
}
|
||||
|
||||
func TestEthashSearchAcrossEpoch(t *testing.T) {
|
||||
eth, err := NewForTesting()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(eth.Full.Dir)
|
||||
|
||||
for i := epochLength - 40; i < epochLength+40; i++ {
|
||||
block := &testBlock{number: i, difficulty: big.NewInt(90)}
|
||||
rand.Read(block.hashNoNonce[:])
|
||||
nonce, _ := eth.Search(block, nil)
|
||||
block.nonce = nonce
|
||||
if !eth.Verify(block) {
|
||||
t.Fatalf("Block could not be verified")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetSeedHash(t *testing.T) {
|
||||
seed0, err := GetSeedHash(0)
|
||||
if err != nil {
|
||||
t.Errorf("Failed to get seedHash for block 0: %v", err)
|
||||
}
|
||||
if bytes.Compare(seed0, make([]byte, 32)) != 0 {
|
||||
log.Printf("seedHash for block 0 should be 0s, was: %v\n", seed0)
|
||||
}
|
||||
seed1, err := GetSeedHash(30000)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
// From python:
|
||||
// > from pyethash import get_seedhash
|
||||
// > get_seedhash(30000)
|
||||
expectedSeed1, err := hex.DecodeString("290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563")
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
if bytes.Compare(seed1, expectedSeed1) != 0 {
|
||||
log.Printf("seedHash for block 1 should be: %v,\nactual value: %v\n", expectedSeed1, seed1)
|
||||
}
|
||||
|
||||
}
|
||||
35
Godeps/_workspace/src/github.com/ethereum/ethash/ethashc.go
generated
vendored
Normal file
35
Godeps/_workspace/src/github.com/ethereum/ethash/ethashc.go
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
package ethash
|
||||
|
||||
/*
|
||||
-mno-stack-arg-probe disables stack probing which avoids the function
|
||||
__chkstk_ms being linked. this avoids a clash of this symbol as we also
|
||||
separately link the secp256k1 lib which ends up defining this symbol
|
||||
|
||||
1. https://gcc.gnu.org/onlinedocs/gccint/Stack-Checking.html
|
||||
2. https://groups.google.com/forum/#!msg/golang-dev/v1bziURSQ4k/88fXuJ24e-gJ
|
||||
3. https://groups.google.com/forum/#!topic/golang-nuts/VNP6Mwz_B6o
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
#cgo CFLAGS: -std=gnu99 -Wall
|
||||
#cgo windows CFLAGS: -mno-stack-arg-probe
|
||||
#cgo LDFLAGS: -lm
|
||||
|
||||
#include "src/libethash/internal.c"
|
||||
#include "src/libethash/sha3.c"
|
||||
#include "src/libethash/io.c"
|
||||
|
||||
#ifdef _WIN32
|
||||
# include "src/libethash/io_win32.c"
|
||||
# include "src/libethash/mmap_win32.c"
|
||||
#else
|
||||
# include "src/libethash/io_posix.c"
|
||||
#endif
|
||||
|
||||
// 'gateway function' for calling back into go.
|
||||
extern int ethashGoCallback(unsigned);
|
||||
int ethashGoCallback_cgo(unsigned percent) { return ethashGoCallback(percent); }
|
||||
|
||||
*/
|
||||
import "C"
|
||||
22
Godeps/_workspace/src/github.com/ethereum/ethash/js/LICENSE
generated
vendored
Normal file
22
Godeps/_workspace/src/github.com/ethereum/ethash/js/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Tim Hughes
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
190
Godeps/_workspace/src/github.com/ethereum/ethash/js/ethash.js
generated
vendored
Normal file
190
Godeps/_workspace/src/github.com/ethereum/ethash/js/ethash.js
generated
vendored
Normal file
@@ -0,0 +1,190 @@
|
||||
// ethash.js
|
||||
// Tim Hughes <tim@twistedfury.com>
|
||||
// Revision 19
|
||||
|
||||
/*jslint node: true, shadow:true */
|
||||
"use strict";
|
||||
|
||||
var Keccak = require('./keccak');
|
||||
var util = require('./util');
|
||||
|
||||
// 32-bit unsigned modulo
|
||||
function mod32(x, n)
|
||||
{
|
||||
return (x>>>0) % (n>>>0);
|
||||
}
|
||||
|
||||
function fnv(x, y)
|
||||
{
|
||||
// js integer multiply by 0x01000193 will lose precision
|
||||
return ((x*0x01000000 | 0) + (x*0x193 | 0)) ^ y;
|
||||
}
|
||||
|
||||
function computeCache(params, seedWords)
|
||||
{
|
||||
var cache = new Uint32Array(params.cacheSize >> 2);
|
||||
var cacheNodeCount = params.cacheSize >> 6;
|
||||
|
||||
// Initialize cache
|
||||
var keccak = new Keccak();
|
||||
keccak.digestWords(cache, 0, 16, seedWords, 0, seedWords.length);
|
||||
for (var n = 1; n < cacheNodeCount; ++n)
|
||||
{
|
||||
keccak.digestWords(cache, n<<4, 16, cache, (n-1)<<4, 16);
|
||||
}
|
||||
|
||||
var tmp = new Uint32Array(16);
|
||||
|
||||
// Do randmemohash passes
|
||||
for (var r = 0; r < params.cacheRounds; ++r)
|
||||
{
|
||||
for (var n = 0; n < cacheNodeCount; ++n)
|
||||
{
|
||||
var p0 = mod32(n + cacheNodeCount - 1, cacheNodeCount) << 4;
|
||||
var p1 = mod32(cache[n<<4|0], cacheNodeCount) << 4;
|
||||
|
||||
for (var w = 0; w < 16; w=(w+1)|0)
|
||||
{
|
||||
tmp[w] = cache[p0 | w] ^ cache[p1 | w];
|
||||
}
|
||||
|
||||
keccak.digestWords(cache, n<<4, 16, tmp, 0, tmp.length);
|
||||
}
|
||||
}
|
||||
return cache;
|
||||
}
|
||||
|
||||
function computeDagNode(o_node, params, cache, keccak, nodeIndex)
|
||||
{
|
||||
var cacheNodeCount = params.cacheSize >> 6;
|
||||
var dagParents = params.dagParents;
|
||||
|
||||
var c = (nodeIndex % cacheNodeCount) << 4;
|
||||
var mix = o_node;
|
||||
for (var w = 0; w < 16; ++w)
|
||||
{
|
||||
mix[w] = cache[c|w];
|
||||
}
|
||||
mix[0] ^= nodeIndex;
|
||||
keccak.digestWords(mix, 0, 16, mix, 0, 16);
|
||||
|
||||
for (var p = 0; p < dagParents; ++p)
|
||||
{
|
||||
// compute cache node (word) index
|
||||
c = mod32(fnv(nodeIndex ^ p, mix[p&15]), cacheNodeCount) << 4;
|
||||
|
||||
for (var w = 0; w < 16; ++w)
|
||||
{
|
||||
mix[w] = fnv(mix[w], cache[c|w]);
|
||||
}
|
||||
}
|
||||
|
||||
keccak.digestWords(mix, 0, 16, mix, 0, 16);
|
||||
}
|
||||
|
||||
function computeHashInner(mix, params, cache, keccak, tempNode)
|
||||
{
|
||||
var mixParents = params.mixParents|0;
|
||||
var mixWordCount = params.mixSize >> 2;
|
||||
var mixNodeCount = mixWordCount >> 4;
|
||||
var dagPageCount = (params.dagSize / params.mixSize) >> 0;
|
||||
|
||||
// grab initial first word
|
||||
var s0 = mix[0];
|
||||
|
||||
// initialise mix from initial 64 bytes
|
||||
for (var w = 16; w < mixWordCount; ++w)
|
||||
{
|
||||
mix[w] = mix[w & 15];
|
||||
}
|
||||
|
||||
for (var a = 0; a < mixParents; ++a)
|
||||
{
|
||||
var p = mod32(fnv(s0 ^ a, mix[a & (mixWordCount-1)]), dagPageCount);
|
||||
var d = (p * mixNodeCount)|0;
|
||||
|
||||
for (var n = 0, w = 0; n < mixNodeCount; ++n, w += 16)
|
||||
{
|
||||
computeDagNode(tempNode, params, cache, keccak, (d + n)|0);
|
||||
|
||||
for (var v = 0; v < 16; ++v)
|
||||
{
|
||||
mix[w|v] = fnv(mix[w|v], tempNode[v]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function convertSeed(seed)
|
||||
{
|
||||
// todo, reconcile with spec, byte ordering?
|
||||
// todo, big-endian conversion
|
||||
var newSeed = util.toWords(seed);
|
||||
if (newSeed === null)
|
||||
throw Error("Invalid seed '" + seed + "'");
|
||||
return newSeed;
|
||||
}
|
||||
|
||||
exports.defaultParams = function()
|
||||
{
|
||||
return {
|
||||
cacheSize: 1048384,
|
||||
cacheRounds: 3,
|
||||
dagSize: 1073739904,
|
||||
dagParents: 256,
|
||||
mixSize: 128,
|
||||
mixParents: 64,
|
||||
};
|
||||
};
|
||||
|
||||
exports.Ethash = function(params, seed)
|
||||
{
|
||||
// precompute cache and related values
|
||||
seed = convertSeed(seed);
|
||||
var cache = computeCache(params, seed);
|
||||
|
||||
// preallocate buffers/etc
|
||||
var initBuf = new ArrayBuffer(96);
|
||||
var initBytes = new Uint8Array(initBuf);
|
||||
var initWords = new Uint32Array(initBuf);
|
||||
var mixWords = new Uint32Array(params.mixSize / 4);
|
||||
var tempNode = new Uint32Array(16);
|
||||
var keccak = new Keccak();
|
||||
|
||||
var retWords = new Uint32Array(8);
|
||||
var retBytes = new Uint8Array(retWords.buffer); // supposedly read-only
|
||||
|
||||
this.hash = function(header, nonce)
|
||||
{
|
||||
// compute initial hash
|
||||
initBytes.set(header, 0);
|
||||
initBytes.set(nonce, 32);
|
||||
keccak.digestWords(initWords, 0, 16, initWords, 0, 8 + nonce.length/4);
|
||||
|
||||
// compute mix
|
||||
for (var i = 0; i != 16; ++i)
|
||||
{
|
||||
mixWords[i] = initWords[i];
|
||||
}
|
||||
computeHashInner(mixWords, params, cache, keccak, tempNode);
|
||||
|
||||
// compress mix and append to initWords
|
||||
for (var i = 0; i != mixWords.length; i += 4)
|
||||
{
|
||||
initWords[16 + i/4] = fnv(fnv(fnv(mixWords[i], mixWords[i+1]), mixWords[i+2]), mixWords[i+3]);
|
||||
}
|
||||
|
||||
// final Keccak hashes
|
||||
keccak.digestWords(retWords, 0, 8, initWords, 0, 24); // Keccak-256(s + cmix)
|
||||
return retBytes;
|
||||
};
|
||||
|
||||
this.cacheDigest = function()
|
||||
{
|
||||
return keccak.digest(32, new Uint8Array(cache.buffer));
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
404
Godeps/_workspace/src/github.com/ethereum/ethash/js/keccak.js
generated
vendored
Normal file
404
Godeps/_workspace/src/github.com/ethereum/ethash/js/keccak.js
generated
vendored
Normal file
@@ -0,0 +1,404 @@
|
||||
// keccak.js
|
||||
// Tim Hughes <tim@twistedfury.com>
|
||||
// derived from Markku-Juhani O. Saarinen's C code (http://keccak.noekeon.org/readable_code.html)
|
||||
|
||||
/*jslint node: true, shadow:true */
|
||||
"use strict";
|
||||
|
||||
var Keccak_f1600_RC = new Uint32Array([
|
||||
0x00000001, 0x00000000,
|
||||
0x00008082, 0x00000000,
|
||||
0x0000808a, 0x80000000,
|
||||
0x80008000, 0x80000000,
|
||||
0x0000808b, 0x00000000,
|
||||
0x80000001, 0x00000000,
|
||||
0x80008081, 0x80000000,
|
||||
0x00008009, 0x80000000,
|
||||
0x0000008a, 0x00000000,
|
||||
0x00000088, 0x00000000,
|
||||
0x80008009, 0x00000000,
|
||||
0x8000000a, 0x00000000,
|
||||
0x8000808b, 0x00000000,
|
||||
0x0000008b, 0x80000000,
|
||||
0x00008089, 0x80000000,
|
||||
0x00008003, 0x80000000,
|
||||
0x00008002, 0x80000000,
|
||||
0x00000080, 0x80000000,
|
||||
0x0000800a, 0x00000000,
|
||||
0x8000000a, 0x80000000,
|
||||
0x80008081, 0x80000000,
|
||||
0x00008080, 0x80000000,
|
||||
0x80000001, 0x00000000,
|
||||
0x80008008, 0x80000000
|
||||
]);
|
||||
|
||||
function keccak_f1600(outState, outOffset, outSize, inState)
|
||||
{
|
||||
// todo, handle big endian loads
|
||||
var a00l = inState[0]|0;
|
||||
var a00h = inState[1]|0;
|
||||
var a01l = inState[2]|0;
|
||||
var a01h = inState[3]|0;
|
||||
var a02l = inState[4]|0;
|
||||
var a02h = inState[5]|0;
|
||||
var a03l = inState[6]|0;
|
||||
var a03h = inState[7]|0;
|
||||
var a04l = inState[8]|0;
|
||||
var a04h = inState[9]|0;
|
||||
var a05l = inState[10]|0;
|
||||
var a05h = inState[11]|0;
|
||||
var a06l = inState[12]|0;
|
||||
var a06h = inState[13]|0;
|
||||
var a07l = inState[14]|0;
|
||||
var a07h = inState[15]|0;
|
||||
var a08l = inState[16]|0;
|
||||
var a08h = inState[17]|0;
|
||||
var a09l = inState[18]|0;
|
||||
var a09h = inState[19]|0;
|
||||
var a10l = inState[20]|0;
|
||||
var a10h = inState[21]|0;
|
||||
var a11l = inState[22]|0;
|
||||
var a11h = inState[23]|0;
|
||||
var a12l = inState[24]|0;
|
||||
var a12h = inState[25]|0;
|
||||
var a13l = inState[26]|0;
|
||||
var a13h = inState[27]|0;
|
||||
var a14l = inState[28]|0;
|
||||
var a14h = inState[29]|0;
|
||||
var a15l = inState[30]|0;
|
||||
var a15h = inState[31]|0;
|
||||
var a16l = inState[32]|0;
|
||||
var a16h = inState[33]|0;
|
||||
var a17l = inState[34]|0;
|
||||
var a17h = inState[35]|0;
|
||||
var a18l = inState[36]|0;
|
||||
var a18h = inState[37]|0;
|
||||
var a19l = inState[38]|0;
|
||||
var a19h = inState[39]|0;
|
||||
var a20l = inState[40]|0;
|
||||
var a20h = inState[41]|0;
|
||||
var a21l = inState[42]|0;
|
||||
var a21h = inState[43]|0;
|
||||
var a22l = inState[44]|0;
|
||||
var a22h = inState[45]|0;
|
||||
var a23l = inState[46]|0;
|
||||
var a23h = inState[47]|0;
|
||||
var a24l = inState[48]|0;
|
||||
var a24h = inState[49]|0;
|
||||
var b00l, b00h, b01l, b01h, b02l, b02h, b03l, b03h, b04l, b04h;
|
||||
var b05l, b05h, b06l, b06h, b07l, b07h, b08l, b08h, b09l, b09h;
|
||||
var b10l, b10h, b11l, b11h, b12l, b12h, b13l, b13h, b14l, b14h;
|
||||
var b15l, b15h, b16l, b16h, b17l, b17h, b18l, b18h, b19l, b19h;
|
||||
var b20l, b20h, b21l, b21h, b22l, b22h, b23l, b23h, b24l, b24h;
|
||||
var tl, nl;
|
||||
var th, nh;
|
||||
|
||||
for (var r = 0; r < 48; r = (r+2)|0)
|
||||
{
|
||||
// Theta
|
||||
b00l = a00l ^ a05l ^ a10l ^ a15l ^ a20l;
|
||||
b00h = a00h ^ a05h ^ a10h ^ a15h ^ a20h;
|
||||
b01l = a01l ^ a06l ^ a11l ^ a16l ^ a21l;
|
||||
b01h = a01h ^ a06h ^ a11h ^ a16h ^ a21h;
|
||||
b02l = a02l ^ a07l ^ a12l ^ a17l ^ a22l;
|
||||
b02h = a02h ^ a07h ^ a12h ^ a17h ^ a22h;
|
||||
b03l = a03l ^ a08l ^ a13l ^ a18l ^ a23l;
|
||||
b03h = a03h ^ a08h ^ a13h ^ a18h ^ a23h;
|
||||
b04l = a04l ^ a09l ^ a14l ^ a19l ^ a24l;
|
||||
b04h = a04h ^ a09h ^ a14h ^ a19h ^ a24h;
|
||||
tl = b04l ^ (b01l << 1 | b01h >>> 31);
|
||||
th = b04h ^ (b01h << 1 | b01l >>> 31);
|
||||
a00l ^= tl;
|
||||
a00h ^= th;
|
||||
a05l ^= tl;
|
||||
a05h ^= th;
|
||||
a10l ^= tl;
|
||||
a10h ^= th;
|
||||
a15l ^= tl;
|
||||
a15h ^= th;
|
||||
a20l ^= tl;
|
||||
a20h ^= th;
|
||||
tl = b00l ^ (b02l << 1 | b02h >>> 31);
|
||||
th = b00h ^ (b02h << 1 | b02l >>> 31);
|
||||
a01l ^= tl;
|
||||
a01h ^= th;
|
||||
a06l ^= tl;
|
||||
a06h ^= th;
|
||||
a11l ^= tl;
|
||||
a11h ^= th;
|
||||
a16l ^= tl;
|
||||
a16h ^= th;
|
||||
a21l ^= tl;
|
||||
a21h ^= th;
|
||||
tl = b01l ^ (b03l << 1 | b03h >>> 31);
|
||||
th = b01h ^ (b03h << 1 | b03l >>> 31);
|
||||
a02l ^= tl;
|
||||
a02h ^= th;
|
||||
a07l ^= tl;
|
||||
a07h ^= th;
|
||||
a12l ^= tl;
|
||||
a12h ^= th;
|
||||
a17l ^= tl;
|
||||
a17h ^= th;
|
||||
a22l ^= tl;
|
||||
a22h ^= th;
|
||||
tl = b02l ^ (b04l << 1 | b04h >>> 31);
|
||||
th = b02h ^ (b04h << 1 | b04l >>> 31);
|
||||
a03l ^= tl;
|
||||
a03h ^= th;
|
||||
a08l ^= tl;
|
||||
a08h ^= th;
|
||||
a13l ^= tl;
|
||||
a13h ^= th;
|
||||
a18l ^= tl;
|
||||
a18h ^= th;
|
||||
a23l ^= tl;
|
||||
a23h ^= th;
|
||||
tl = b03l ^ (b00l << 1 | b00h >>> 31);
|
||||
th = b03h ^ (b00h << 1 | b00l >>> 31);
|
||||
a04l ^= tl;
|
||||
a04h ^= th;
|
||||
a09l ^= tl;
|
||||
a09h ^= th;
|
||||
a14l ^= tl;
|
||||
a14h ^= th;
|
||||
a19l ^= tl;
|
||||
a19h ^= th;
|
||||
a24l ^= tl;
|
||||
a24h ^= th;
|
||||
|
||||
// Rho Pi
|
||||
b00l = a00l;
|
||||
b00h = a00h;
|
||||
b10l = a01l << 1 | a01h >>> 31;
|
||||
b10h = a01h << 1 | a01l >>> 31;
|
||||
b07l = a10l << 3 | a10h >>> 29;
|
||||
b07h = a10h << 3 | a10l >>> 29;
|
||||
b11l = a07l << 6 | a07h >>> 26;
|
||||
b11h = a07h << 6 | a07l >>> 26;
|
||||
b17l = a11l << 10 | a11h >>> 22;
|
||||
b17h = a11h << 10 | a11l >>> 22;
|
||||
b18l = a17l << 15 | a17h >>> 17;
|
||||
b18h = a17h << 15 | a17l >>> 17;
|
||||
b03l = a18l << 21 | a18h >>> 11;
|
||||
b03h = a18h << 21 | a18l >>> 11;
|
||||
b05l = a03l << 28 | a03h >>> 4;
|
||||
b05h = a03h << 28 | a03l >>> 4;
|
||||
b16l = a05h << 4 | a05l >>> 28;
|
||||
b16h = a05l << 4 | a05h >>> 28;
|
||||
b08l = a16h << 13 | a16l >>> 19;
|
||||
b08h = a16l << 13 | a16h >>> 19;
|
||||
b21l = a08h << 23 | a08l >>> 9;
|
||||
b21h = a08l << 23 | a08h >>> 9;
|
||||
b24l = a21l << 2 | a21h >>> 30;
|
||||
b24h = a21h << 2 | a21l >>> 30;
|
||||
b04l = a24l << 14 | a24h >>> 18;
|
||||
b04h = a24h << 14 | a24l >>> 18;
|
||||
b15l = a04l << 27 | a04h >>> 5;
|
||||
b15h = a04h << 27 | a04l >>> 5;
|
||||
b23l = a15h << 9 | a15l >>> 23;
|
||||
b23h = a15l << 9 | a15h >>> 23;
|
||||
b19l = a23h << 24 | a23l >>> 8;
|
||||
b19h = a23l << 24 | a23h >>> 8;
|
||||
b13l = a19l << 8 | a19h >>> 24;
|
||||
b13h = a19h << 8 | a19l >>> 24;
|
||||
b12l = a13l << 25 | a13h >>> 7;
|
||||
b12h = a13h << 25 | a13l >>> 7;
|
||||
b02l = a12h << 11 | a12l >>> 21;
|
||||
b02h = a12l << 11 | a12h >>> 21;
|
||||
b20l = a02h << 30 | a02l >>> 2;
|
||||
b20h = a02l << 30 | a02h >>> 2;
|
||||
b14l = a20l << 18 | a20h >>> 14;
|
||||
b14h = a20h << 18 | a20l >>> 14;
|
||||
b22l = a14h << 7 | a14l >>> 25;
|
||||
b22h = a14l << 7 | a14h >>> 25;
|
||||
b09l = a22h << 29 | a22l >>> 3;
|
||||
b09h = a22l << 29 | a22h >>> 3;
|
||||
b06l = a09l << 20 | a09h >>> 12;
|
||||
b06h = a09h << 20 | a09l >>> 12;
|
||||
b01l = a06h << 12 | a06l >>> 20;
|
||||
b01h = a06l << 12 | a06h >>> 20;
|
||||
|
||||
// Chi
|
||||
a00l = b00l ^ ~b01l & b02l;
|
||||
a00h = b00h ^ ~b01h & b02h;
|
||||
a01l = b01l ^ ~b02l & b03l;
|
||||
a01h = b01h ^ ~b02h & b03h;
|
||||
a02l = b02l ^ ~b03l & b04l;
|
||||
a02h = b02h ^ ~b03h & b04h;
|
||||
a03l = b03l ^ ~b04l & b00l;
|
||||
a03h = b03h ^ ~b04h & b00h;
|
||||
a04l = b04l ^ ~b00l & b01l;
|
||||
a04h = b04h ^ ~b00h & b01h;
|
||||
a05l = b05l ^ ~b06l & b07l;
|
||||
a05h = b05h ^ ~b06h & b07h;
|
||||
a06l = b06l ^ ~b07l & b08l;
|
||||
a06h = b06h ^ ~b07h & b08h;
|
||||
a07l = b07l ^ ~b08l & b09l;
|
||||
a07h = b07h ^ ~b08h & b09h;
|
||||
a08l = b08l ^ ~b09l & b05l;
|
||||
a08h = b08h ^ ~b09h & b05h;
|
||||
a09l = b09l ^ ~b05l & b06l;
|
||||
a09h = b09h ^ ~b05h & b06h;
|
||||
a10l = b10l ^ ~b11l & b12l;
|
||||
a10h = b10h ^ ~b11h & b12h;
|
||||
a11l = b11l ^ ~b12l & b13l;
|
||||
a11h = b11h ^ ~b12h & b13h;
|
||||
a12l = b12l ^ ~b13l & b14l;
|
||||
a12h = b12h ^ ~b13h & b14h;
|
||||
a13l = b13l ^ ~b14l & b10l;
|
||||
a13h = b13h ^ ~b14h & b10h;
|
||||
a14l = b14l ^ ~b10l & b11l;
|
||||
a14h = b14h ^ ~b10h & b11h;
|
||||
a15l = b15l ^ ~b16l & b17l;
|
||||
a15h = b15h ^ ~b16h & b17h;
|
||||
a16l = b16l ^ ~b17l & b18l;
|
||||
a16h = b16h ^ ~b17h & b18h;
|
||||
a17l = b17l ^ ~b18l & b19l;
|
||||
a17h = b17h ^ ~b18h & b19h;
|
||||
a18l = b18l ^ ~b19l & b15l;
|
||||
a18h = b18h ^ ~b19h & b15h;
|
||||
a19l = b19l ^ ~b15l & b16l;
|
||||
a19h = b19h ^ ~b15h & b16h;
|
||||
a20l = b20l ^ ~b21l & b22l;
|
||||
a20h = b20h ^ ~b21h & b22h;
|
||||
a21l = b21l ^ ~b22l & b23l;
|
||||
a21h = b21h ^ ~b22h & b23h;
|
||||
a22l = b22l ^ ~b23l & b24l;
|
||||
a22h = b22h ^ ~b23h & b24h;
|
||||
a23l = b23l ^ ~b24l & b20l;
|
||||
a23h = b23h ^ ~b24h & b20h;
|
||||
a24l = b24l ^ ~b20l & b21l;
|
||||
a24h = b24h ^ ~b20h & b21h;
|
||||
|
||||
// Iota
|
||||
a00l ^= Keccak_f1600_RC[r|0];
|
||||
a00h ^= Keccak_f1600_RC[r|1];
|
||||
}
|
||||
|
||||
// todo, handle big-endian stores
|
||||
outState[outOffset|0] = a00l;
|
||||
outState[outOffset|1] = a00h;
|
||||
outState[outOffset|2] = a01l;
|
||||
outState[outOffset|3] = a01h;
|
||||
outState[outOffset|4] = a02l;
|
||||
outState[outOffset|5] = a02h;
|
||||
outState[outOffset|6] = a03l;
|
||||
outState[outOffset|7] = a03h;
|
||||
if (outSize == 8)
|
||||
return;
|
||||
outState[outOffset|8] = a04l;
|
||||
outState[outOffset|9] = a04h;
|
||||
outState[outOffset|10] = a05l;
|
||||
outState[outOffset|11] = a05h;
|
||||
outState[outOffset|12] = a06l;
|
||||
outState[outOffset|13] = a06h;
|
||||
outState[outOffset|14] = a07l;
|
||||
outState[outOffset|15] = a07h;
|
||||
if (outSize == 16)
|
||||
return;
|
||||
outState[outOffset|16] = a08l;
|
||||
outState[outOffset|17] = a08h;
|
||||
outState[outOffset|18] = a09l;
|
||||
outState[outOffset|19] = a09h;
|
||||
outState[outOffset|20] = a10l;
|
||||
outState[outOffset|21] = a10h;
|
||||
outState[outOffset|22] = a11l;
|
||||
outState[outOffset|23] = a11h;
|
||||
outState[outOffset|24] = a12l;
|
||||
outState[outOffset|25] = a12h;
|
||||
outState[outOffset|26] = a13l;
|
||||
outState[outOffset|27] = a13h;
|
||||
outState[outOffset|28] = a14l;
|
||||
outState[outOffset|29] = a14h;
|
||||
outState[outOffset|30] = a15l;
|
||||
outState[outOffset|31] = a15h;
|
||||
outState[outOffset|32] = a16l;
|
||||
outState[outOffset|33] = a16h;
|
||||
outState[outOffset|34] = a17l;
|
||||
outState[outOffset|35] = a17h;
|
||||
outState[outOffset|36] = a18l;
|
||||
outState[outOffset|37] = a18h;
|
||||
outState[outOffset|38] = a19l;
|
||||
outState[outOffset|39] = a19h;
|
||||
outState[outOffset|40] = a20l;
|
||||
outState[outOffset|41] = a20h;
|
||||
outState[outOffset|42] = a21l;
|
||||
outState[outOffset|43] = a21h;
|
||||
outState[outOffset|44] = a22l;
|
||||
outState[outOffset|45] = a22h;
|
||||
outState[outOffset|46] = a23l;
|
||||
outState[outOffset|47] = a23h;
|
||||
outState[outOffset|48] = a24l;
|
||||
outState[outOffset|49] = a24h;
|
||||
}
|
||||
|
||||
var Keccak = function()
|
||||
{
|
||||
var stateBuf = new ArrayBuffer(200);
|
||||
var stateBytes = new Uint8Array(stateBuf);
|
||||
var stateWords = new Uint32Array(stateBuf);
|
||||
|
||||
this.digest = function(oSize, iBytes)
|
||||
{
|
||||
for (var i = 0; i < 50; ++i)
|
||||
{
|
||||
stateWords[i] = 0;
|
||||
}
|
||||
|
||||
var r = 200 - oSize*2;
|
||||
var iLength = iBytes.length;
|
||||
var iOffset = 0;
|
||||
for ( ; ;)
|
||||
{
|
||||
var len = iLength < r ? iLength : r;
|
||||
for (i = 0; i < len; ++i, ++iOffset)
|
||||
{
|
||||
stateBytes[i] ^= iBytes[iOffset];
|
||||
}
|
||||
|
||||
if (iLength < r)
|
||||
break;
|
||||
iLength -= len;
|
||||
|
||||
keccak_f1600(stateWords, 0, 50, stateWords);
|
||||
}
|
||||
|
||||
stateBytes[iLength] ^= 1;
|
||||
stateBytes[r-1] ^= 0x80;
|
||||
keccak_f1600(stateWords, 0, 50, stateWords);
|
||||
return stateBytes.subarray(0, oSize);
|
||||
};
|
||||
|
||||
this.digestWords = function(oWords, oOffset, oLength, iWords, iOffset, iLength)
|
||||
{
|
||||
for (var i = 0; i < 50; ++i)
|
||||
{
|
||||
stateWords[i] = 0;
|
||||
}
|
||||
|
||||
var r = 50 - oLength*2;
|
||||
for (; ; )
|
||||
{
|
||||
var len = iLength < r ? iLength : r;
|
||||
for (i = 0; i < len; ++i, ++iOffset)
|
||||
{
|
||||
stateWords[i] ^= iWords[iOffset];
|
||||
}
|
||||
|
||||
if (iLength < r)
|
||||
break;
|
||||
iLength -= len;
|
||||
|
||||
keccak_f1600(stateWords, 0, 50, stateWords);
|
||||
}
|
||||
|
||||
stateBytes[iLength<<2] ^= 1;
|
||||
stateBytes[(r<<2) - 1] ^= 0x80;
|
||||
keccak_f1600(oWords, oOffset, oLength, stateWords);
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = Keccak;
|
||||
|
||||
|
||||
201
Godeps/_workspace/src/github.com/ethereum/ethash/js/makekeccak.js
generated
vendored
Normal file
201
Godeps/_workspace/src/github.com/ethereum/ethash/js/makekeccak.js
generated
vendored
Normal file
@@ -0,0 +1,201 @@
|
||||
#!/usr/bin/env node
|
||||
// makekeccak.js
|
||||
// Tim Hughes <tim@twistedfury.com>
|
||||
|
||||
/*jslint node: true, shadow:true */
|
||||
"use strict";
|
||||
|
||||
var Keccak_f1600_Rho = [
|
||||
1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 2, 14,
|
||||
27, 41, 56, 8, 25, 43, 62, 18, 39, 61, 20, 44
|
||||
];
|
||||
|
||||
var Keccak_f1600_Pi= [
|
||||
10, 7, 11, 17, 18, 3, 5, 16, 8, 21, 24, 4,
|
||||
15, 23, 19, 13, 12, 2, 20, 14, 22, 9, 6, 1
|
||||
];
|
||||
|
||||
var Keccak_f1600_RC = [
|
||||
0x00000001, 0x00000000,
|
||||
0x00008082, 0x00000000,
|
||||
0x0000808a, 0x80000000,
|
||||
0x80008000, 0x80000000,
|
||||
0x0000808b, 0x00000000,
|
||||
0x80000001, 0x00000000,
|
||||
0x80008081, 0x80000000,
|
||||
0x00008009, 0x80000000,
|
||||
0x0000008a, 0x00000000,
|
||||
0x00000088, 0x00000000,
|
||||
0x80008009, 0x00000000,
|
||||
0x8000000a, 0x00000000,
|
||||
0x8000808b, 0x00000000,
|
||||
0x0000008b, 0x80000000,
|
||||
0x00008089, 0x80000000,
|
||||
0x00008003, 0x80000000,
|
||||
0x00008002, 0x80000000,
|
||||
0x00000080, 0x80000000,
|
||||
0x0000800a, 0x00000000,
|
||||
0x8000000a, 0x80000000,
|
||||
0x80008081, 0x80000000,
|
||||
0x00008080, 0x80000000,
|
||||
0x80000001, 0x00000000,
|
||||
0x80008008, 0x80000000,
|
||||
];
|
||||
|
||||
function makeRotLow(lo, hi, n)
|
||||
{
|
||||
if (n === 0 || n === 32) throw Error("unsupported");
|
||||
if ((n & 0x20) !== 0)
|
||||
{
|
||||
n &= ~0x20;
|
||||
var t = hi;
|
||||
hi = lo;
|
||||
lo = t;
|
||||
}
|
||||
var hir = hi + " >>> " + (32 - n);
|
||||
var los = lo + " << " + n;
|
||||
return los + " | " + hir;
|
||||
}
|
||||
|
||||
function makeRotHigh(lo, hi, n)
|
||||
{
|
||||
if (n === 0 || n === 32) throw Error("unsupported");
|
||||
if ((n & 0x20) !== 0)
|
||||
{
|
||||
n &= ~0x20;
|
||||
var t = hi;
|
||||
hi = lo;
|
||||
lo = t;
|
||||
}
|
||||
var his = hi + " << " + n;
|
||||
var lor = lo + " >>> " + (32 - n);
|
||||
return his + " | " + lor;
|
||||
}
|
||||
|
||||
function makeKeccak_f1600()
|
||||
{
|
||||
var format = function(n)
|
||||
{
|
||||
return n < 10 ? "0"+n : ""+n;
|
||||
};
|
||||
|
||||
var a = function(n, w)
|
||||
{
|
||||
return "a" + format(n) + (w !== 0?'h':'l');
|
||||
};
|
||||
|
||||
var b = function(n, w)
|
||||
{
|
||||
return "b" + format(n) + (w !== 0?'h':'l');
|
||||
};
|
||||
|
||||
var str = "";
|
||||
str += "function keccak_f1600(outState, outOffset, outSize, inState)\n";
|
||||
str += "{\n";
|
||||
|
||||
for (var i = 0; i < 25; ++i)
|
||||
{
|
||||
for (var w = 0; w <= 1; ++w)
|
||||
{
|
||||
str += "\tvar " + a(i,w) + " = inState["+(i<<1|w)+"]|0;\n";
|
||||
}
|
||||
}
|
||||
|
||||
for (var j = 0; j < 5; ++j)
|
||||
{
|
||||
str += "\tvar ";
|
||||
for (var i = 0; i < 5; ++i)
|
||||
{
|
||||
if (i !== 0)
|
||||
str += ", ";
|
||||
str += b(j*5+i,0) + ", " + b(j*5+i,1);
|
||||
}
|
||||
str += ";\n";
|
||||
}
|
||||
|
||||
str += "\tvar tl, th;\n";
|
||||
str += "\n";
|
||||
str += "\tfor (var r = 0; r < 48; r = (r+2)|0)\n";
|
||||
str += "\t{\n";
|
||||
|
||||
|
||||
// Theta
|
||||
str += "\t\t// Theta\n";
|
||||
for (var i = 0; i < 5; ++i)
|
||||
{
|
||||
for (var w = 0; w <= 1; ++w)
|
||||
{
|
||||
str += "\t\t" + b(i,w) + " = " + a(i,w) + " ^ " + a(i+5,w) + " ^ " + a(i+10,w) + " ^ " + a(i+15,w) + " ^ " + a(i+20,w) + ";\n";
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < 5; ++i)
|
||||
{
|
||||
var i4 = (i + 4) % 5;
|
||||
var i1 = (i + 1) % 5;
|
||||
str += "\t\ttl = " + b(i4,0) + " ^ (" + b(i1,0) + " << 1 | " + b(i1,1) + " >>> 31);\n";
|
||||
str += "\t\tth = " + b(i4,1) + " ^ (" + b(i1,1) + " << 1 | " + b(i1,0) + " >>> 31);\n";
|
||||
|
||||
for (var j = 0; j < 25; j = (j+5)|0)
|
||||
{
|
||||
str += "\t\t" + a((j+i),0) + " ^= tl;\n";
|
||||
str += "\t\t" + a((j+i),1) + " ^= th;\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Rho Pi
|
||||
str += "\n\t\t// Rho Pi\n";
|
||||
for (var w = 0; w <= 1; ++w)
|
||||
{
|
||||
str += "\t\t" + b(0,w) + " = " + a(0,w) + ";\n";
|
||||
}
|
||||
var opi = 1;
|
||||
for (var i = 0; i < 24; ++i)
|
||||
{
|
||||
var pi = Keccak_f1600_Pi[i];
|
||||
str += "\t\t" + b(pi,0) + " = " + makeRotLow(a(opi,0), a(opi,1), Keccak_f1600_Rho[i]) + ";\n";
|
||||
str += "\t\t" + b(pi,1) + " = " + makeRotHigh(a(opi,0), a(opi,1), Keccak_f1600_Rho[i]) + ";\n";
|
||||
opi = pi;
|
||||
}
|
||||
|
||||
// Chi
|
||||
str += "\n\t\t// Chi\n";
|
||||
for (var j = 0; j < 25; j += 5)
|
||||
{
|
||||
for (var i = 0; i < 5; ++i)
|
||||
{
|
||||
for (var w = 0; w <= 1; ++w)
|
||||
{
|
||||
str += "\t\t" + a(j+i,w) + " = " + b(j+i,w) + " ^ ~" + b(j+(i+1)%5,w) + " & " + b(j+(i+2)%5,w) + ";\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Iota
|
||||
str += "\n\t\t// Iota\n";
|
||||
for (var w = 0; w <= 1; ++w)
|
||||
{
|
||||
str += "\t\t" + a(0,w) + " ^= Keccak_f1600_RC[r|" + w + "];\n";
|
||||
}
|
||||
|
||||
|
||||
str += "\t}\n";
|
||||
|
||||
for (var i = 0; i < 25; ++i)
|
||||
{
|
||||
if (i == 4 || i == 8)
|
||||
{
|
||||
str += "\tif (outSize == " + i*2 + ")\n\t\treturn;\n";
|
||||
}
|
||||
for (var w = 0; w <= 1; ++w)
|
||||
{
|
||||
str += "\toutState[outOffset|"+(i<<1|w)+"] = " + a(i,w) + ";\n";
|
||||
}
|
||||
}
|
||||
str += "}\n";
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
console.log(makeKeccak_f1600());
|
||||
53
Godeps/_workspace/src/github.com/ethereum/ethash/js/test.js
generated
vendored
Normal file
53
Godeps/_workspace/src/github.com/ethereum/ethash/js/test.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
// test.js
|
||||
// Tim Hughes <tim@twistedfury.com>
|
||||
|
||||
/*jslint node: true, shadow:true */
|
||||
"use strict";
|
||||
|
||||
var ethash = require('./ethash');
|
||||
var util = require('./util');
|
||||
var Keccak = require('./keccak');
|
||||
|
||||
// sanity check hash functions
|
||||
var src = util.stringToBytes("");
|
||||
if (util.bytesToHexString(new Keccak().digest(32, src)) != "c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470") throw Error("Keccak-256 failed");
|
||||
if (util.bytesToHexString(new Keccak().digest(64, src)) != "0eab42de4c3ceb9235fc91acffe746b29c29a8c366b7c60e4e67c466f36a4304c00fa9caf9d87976ba469bcbe06713b435f091ef2769fb160cdab33d3670680e") throw Error("Keccak-512 failed");
|
||||
|
||||
src = new Uint32Array(src.buffer);
|
||||
var dst = new Uint32Array(8);
|
||||
new Keccak().digestWords(dst, 0, dst.length, src, 0, src.length);
|
||||
if (util.wordsToHexString(dst) != "c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470") throw Error("Keccak-256 Fast failed");
|
||||
|
||||
var dst = new Uint32Array(16);
|
||||
new Keccak().digestWords(dst, 0, dst.length, src, 0, src.length);
|
||||
if (util.wordsToHexString(dst) != "0eab42de4c3ceb9235fc91acffe746b29c29a8c366b7c60e4e67c466f36a4304c00fa9caf9d87976ba469bcbe06713b435f091ef2769fb160cdab33d3670680e") throw Error("Keccak-512 Fast failed");
|
||||
|
||||
|
||||
// init params
|
||||
var ethashParams = ethash.defaultParams();
|
||||
//ethashParams.cacheRounds = 0;
|
||||
|
||||
// create hasher
|
||||
var seed = util.hexStringToBytes("9410b944535a83d9adf6bbdcc80e051f30676173c16ca0d32d6f1263fc246466")
|
||||
var startTime = new Date().getTime();
|
||||
var hasher = new ethash.Ethash(ethashParams, seed);
|
||||
console.log('Ethash startup took: '+(new Date().getTime() - startTime) + "ms");
|
||||
console.log('Ethash cache hash: ' + util.bytesToHexString(hasher.cacheDigest()));
|
||||
|
||||
var testHexString = "c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470";
|
||||
if (testHexString != util.bytesToHexString(util.hexStringToBytes(testHexString)))
|
||||
throw Error("bytesToHexString or hexStringToBytes broken");
|
||||
|
||||
|
||||
var header = util.hexStringToBytes("c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470");
|
||||
var nonce = util.hexStringToBytes("0000000000000000");
|
||||
var hash;
|
||||
|
||||
startTime = new Date().getTime();
|
||||
var trials = 10;
|
||||
for (var i = 0; i < trials; ++i)
|
||||
{
|
||||
hash = hasher.hash(header, nonce);
|
||||
}
|
||||
console.log("Light client hashes averaged: " + (new Date().getTime() - startTime)/trials + "ms");
|
||||
console.log("Hash = " + util.bytesToHexString(hash));
|
||||
100
Godeps/_workspace/src/github.com/ethereum/ethash/js/util.js
generated
vendored
Normal file
100
Godeps/_workspace/src/github.com/ethereum/ethash/js/util.js
generated
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
// util.js
|
||||
// Tim Hughes <tim@twistedfury.com>
|
||||
|
||||
/*jslint node: true, shadow:true */
|
||||
"use strict";
|
||||
|
||||
function nibbleToChar(nibble)
|
||||
{
|
||||
return String.fromCharCode((nibble < 10 ? 48 : 87) + nibble);
|
||||
}
|
||||
|
||||
function charToNibble(chr)
|
||||
{
|
||||
if (chr >= 48 && chr <= 57)
|
||||
{
|
||||
return chr - 48;
|
||||
}
|
||||
if (chr >= 65 && chr <= 70)
|
||||
{
|
||||
return chr - 65 + 10;
|
||||
}
|
||||
if (chr >= 97 && chr <= 102)
|
||||
{
|
||||
return chr - 97 + 10;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
function stringToBytes(str)
|
||||
{
|
||||
var bytes = new Uint8Array(str.length);
|
||||
for (var i = 0; i != str.length; ++i)
|
||||
{
|
||||
bytes[i] = str.charCodeAt(i);
|
||||
}
|
||||
return bytes;
|
||||
}
|
||||
|
||||
function hexStringToBytes(str)
|
||||
{
|
||||
var bytes = new Uint8Array(str.length>>>1);
|
||||
for (var i = 0; i != bytes.length; ++i)
|
||||
{
|
||||
bytes[i] = charToNibble(str.charCodeAt(i<<1 | 0)) << 4;
|
||||
bytes[i] |= charToNibble(str.charCodeAt(i<<1 | 1));
|
||||
}
|
||||
return bytes;
|
||||
}
|
||||
|
||||
function bytesToHexString(bytes)
|
||||
{
|
||||
var str = "";
|
||||
for (var i = 0; i != bytes.length; ++i)
|
||||
{
|
||||
str += nibbleToChar(bytes[i] >>> 4);
|
||||
str += nibbleToChar(bytes[i] & 0xf);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
function wordsToHexString(words)
|
||||
{
|
||||
return bytesToHexString(new Uint8Array(words.buffer));
|
||||
}
|
||||
|
||||
function uint32ToHexString(num)
|
||||
{
|
||||
var buf = new Uint8Array(4);
|
||||
buf[0] = (num >> 24) & 0xff;
|
||||
buf[1] = (num >> 16) & 0xff;
|
||||
buf[2] = (num >> 8) & 0xff;
|
||||
buf[3] = (num >> 0) & 0xff;
|
||||
return bytesToHexString(buf);
|
||||
}
|
||||
|
||||
function toWords(input)
|
||||
{
|
||||
if (input instanceof Uint32Array)
|
||||
{
|
||||
return input;
|
||||
}
|
||||
else if (input instanceof Uint8Array)
|
||||
{
|
||||
var tmp = new Uint8Array((input.length + 3) & ~3);
|
||||
tmp.set(input);
|
||||
return new Uint32Array(tmp.buffer);
|
||||
}
|
||||
else if (typeof input === typeof "")
|
||||
{
|
||||
return toWords(stringToBytes(input));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
exports.stringToBytes = stringToBytes;
|
||||
exports.hexStringToBytes = hexStringToBytes;
|
||||
exports.bytesToHexString = bytesToHexString;
|
||||
exports.wordsToHexString = wordsToHexString;
|
||||
exports.uint32ToHexString = uint32ToHexString;
|
||||
exports.toWords = toWords;
|
||||
47
Godeps/_workspace/src/github.com/ethereum/ethash/setup.py
generated
vendored
Normal file
47
Godeps/_workspace/src/github.com/ethereum/ethash/setup.py
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env python
|
||||
import os
|
||||
from distutils.core import setup, Extension
|
||||
sources = [
|
||||
'src/python/core.c',
|
||||
'src/libethash/io.c',
|
||||
'src/libethash/internal.c',
|
||||
'src/libethash/sha3.c']
|
||||
if os.name == 'nt':
|
||||
sources += [
|
||||
'src/libethash/util_win32.c',
|
||||
'src/libethash/io_win32.c',
|
||||
'src/libethash/mmap_win32.c',
|
||||
]
|
||||
else:
|
||||
sources += [
|
||||
'src/libethash/io_posix.c'
|
||||
]
|
||||
depends = [
|
||||
'src/libethash/ethash.h',
|
||||
'src/libethash/compiler.h',
|
||||
'src/libethash/data_sizes.h',
|
||||
'src/libethash/endian.h',
|
||||
'src/libethash/ethash.h',
|
||||
'src/libethash/io.h',
|
||||
'src/libethash/fnv.h',
|
||||
'src/libethash/internal.h',
|
||||
'src/libethash/sha3.h',
|
||||
'src/libethash/util.h',
|
||||
]
|
||||
pyethash = Extension('pyethash',
|
||||
sources=sources,
|
||||
depends=depends,
|
||||
extra_compile_args=["-Isrc/", "-std=gnu99", "-Wall"])
|
||||
|
||||
setup(
|
||||
name='pyethash',
|
||||
author="Matthew Wampler-Doty",
|
||||
author_email="matthew.wampler.doty@gmail.com",
|
||||
license='GPL',
|
||||
version='0.1.23',
|
||||
url='https://github.com/ethereum/ethash',
|
||||
download_url='https://github.com/ethereum/ethash/tarball/v23',
|
||||
description=('Python wrappers for ethash, the ethereum proof of work'
|
||||
'hashing function'),
|
||||
ext_modules=[pyethash],
|
||||
)
|
||||
58
Godeps/_workspace/src/github.com/ethereum/ethash/src/benchmark/CMakeLists.txt
generated
vendored
Normal file
58
Godeps/_workspace/src/github.com/ethereum/ethash/src/benchmark/CMakeLists.txt
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
include_directories(..)
|
||||
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
|
||||
if (MSVC)
|
||||
add_definitions("/openmp")
|
||||
endif()
|
||||
|
||||
# enable C++11, should probably be a bit more specific about compiler
|
||||
if (NOT MSVC)
|
||||
SET(CMAKE_CXX_FLAGS "-std=c++11")
|
||||
endif()
|
||||
|
||||
if (NOT MPI_FOUND)
|
||||
find_package(MPI)
|
||||
endif()
|
||||
|
||||
if (NOT CRYPTOPP_FOUND)
|
||||
find_package(CryptoPP 5.6.2)
|
||||
endif()
|
||||
|
||||
if (CRYPTOPP_FOUND)
|
||||
add_definitions(-DWITH_CRYPTOPP)
|
||||
find_package (Threads REQUIRED)
|
||||
endif()
|
||||
|
||||
if (NOT OpenCL_FOUND)
|
||||
find_package(OpenCL)
|
||||
endif()
|
||||
if (OpenCL_FOUND)
|
||||
add_definitions(-DWITH_OPENCL)
|
||||
include_directories(${OpenCL_INCLUDE_DIRS})
|
||||
list(APPEND FILES ethash_cl_miner.cpp ethash_cl_miner.h)
|
||||
endif()
|
||||
|
||||
if (MPI_FOUND)
|
||||
include_directories(${MPI_INCLUDE_PATH})
|
||||
add_executable (Benchmark_MPI_FULL benchmark.cpp)
|
||||
target_link_libraries (Benchmark_MPI_FULL ${ETHHASH_LIBS} ${MPI_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||
SET_TARGET_PROPERTIES(Benchmark_MPI_FULL PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} ${MPI_COMPILE_FLAGS} -DFULL -DMPI")
|
||||
|
||||
add_executable (Benchmark_MPI_LIGHT benchmark.cpp)
|
||||
target_link_libraries (Benchmark_MPI_LIGHT ${ETHHASH_LIBS} ${MPI_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||
SET_TARGET_PROPERTIES(Benchmark_MPI_LIGHT PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} ${MPI_COMPILE_FLAGS} -DMPI")
|
||||
endif()
|
||||
|
||||
add_executable (Benchmark_FULL benchmark.cpp)
|
||||
target_link_libraries (Benchmark_FULL ${ETHHASH_LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
||||
SET_TARGET_PROPERTIES(Benchmark_FULL PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -DFULL")
|
||||
|
||||
add_executable (Benchmark_LIGHT benchmark.cpp)
|
||||
target_link_libraries (Benchmark_LIGHT ${ETHHASH_LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
if (OpenCL_FOUND)
|
||||
add_executable (Benchmark_CL benchmark.cpp)
|
||||
target_link_libraries (Benchmark_CL ${ETHHASH_LIBS} ethash-cl ${CMAKE_THREAD_LIBS_INIT})
|
||||
SET_TARGET_PROPERTIES(Benchmark_CL PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -DOPENCL")
|
||||
endif()
|
||||
278
Godeps/_workspace/src/github.com/ethereum/ethash/src/benchmark/benchmark.cpp
generated
vendored
Normal file
278
Godeps/_workspace/src/github.com/ethereum/ethash/src/benchmark/benchmark.cpp
generated
vendored
Normal file
@@ -0,0 +1,278 @@
|
||||
/*
|
||||
This file is part of cpp-ethereum.
|
||||
|
||||
cpp-ethereum is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
cpp-ethereum is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** @file benchmark.cpp
|
||||
* @author Tim Hughes <tim@twistedfury.com>
|
||||
* @date 2015
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <chrono>
|
||||
#include <libethash/ethash.h>
|
||||
#include <libethash/util.h>
|
||||
#ifdef OPENCL
|
||||
#include <libethash-cl/ethash_cl_miner.h>
|
||||
#endif
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef WITH_CRYPTOPP
|
||||
#include <libethash/sha3_cryptopp.h>
|
||||
#include <string>
|
||||
|
||||
#else
|
||||
#include "libethash/sha3.h"
|
||||
#endif // WITH_CRYPTOPP
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
using std::chrono::high_resolution_clock;
|
||||
|
||||
#if defined(OPENCL)
|
||||
const unsigned trials = 1024*1024*32;
|
||||
#elif defined(FULL)
|
||||
const unsigned trials = 1024*1024/8;
|
||||
#else
|
||||
const unsigned trials = 1024*1024/1024;
|
||||
#endif
|
||||
uint8_t g_hashes[1024*32];
|
||||
|
||||
static char nibbleToChar(unsigned nibble)
|
||||
{
|
||||
return (char) ((nibble >= 10 ? 'a'-10 : '0') + nibble);
|
||||
}
|
||||
|
||||
static uint8_t charToNibble(char chr)
|
||||
{
|
||||
if (chr >= '0' && chr <= '9')
|
||||
{
|
||||
return (uint8_t) (chr - '0');
|
||||
}
|
||||
if (chr >= 'a' && chr <= 'z')
|
||||
{
|
||||
return (uint8_t) (chr - 'a' + 10);
|
||||
}
|
||||
if (chr >= 'A' && chr <= 'Z')
|
||||
{
|
||||
return (uint8_t) (chr - 'A' + 10);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static std::vector<uint8_t> hexStringToBytes(char const* str)
|
||||
{
|
||||
std::vector<uint8_t> bytes(strlen(str) >> 1);
|
||||
for (unsigned i = 0; i != bytes.size(); ++i)
|
||||
{
|
||||
bytes[i] = charToNibble(str[i*2 | 0]) << 4;
|
||||
bytes[i] |= charToNibble(str[i*2 | 1]);
|
||||
}
|
||||
return bytes;
|
||||
}
|
||||
|
||||
static std::string bytesToHexString(uint8_t const* bytes, unsigned size)
|
||||
{
|
||||
std::string str;
|
||||
for (unsigned i = 0; i != size; ++i)
|
||||
{
|
||||
str += nibbleToChar(bytes[i] >> 4);
|
||||
str += nibbleToChar(bytes[i] & 0xf);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
static std::string bytesToHexString(ethash_h256_t const *hash, unsigned size)
|
||||
{
|
||||
return bytesToHexString((uint8_t*)hash, size);
|
||||
}
|
||||
|
||||
extern "C" int main(void)
|
||||
{
|
||||
// params for ethash
|
||||
ethash_params params;
|
||||
ethash_params_init(¶ms, 0);
|
||||
//params.full_size = 262147 * 4096; // 1GBish;
|
||||
//params.full_size = 32771 * 4096; // 128MBish;
|
||||
//params.full_size = 8209 * 4096; // 8MBish;
|
||||
//params.cache_size = 8209*4096;
|
||||
//params.cache_size = 2053*4096;
|
||||
ethash_h256_t seed;
|
||||
ethash_h256_t previous_hash;
|
||||
|
||||
memcpy(&seed, hexStringToBytes("9410b944535a83d9adf6bbdcc80e051f30676173c16ca0d32d6f1263fc246466").data(), 32);
|
||||
memcpy(&previous_hash, hexStringToBytes("c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470").data(), 32);
|
||||
|
||||
// allocate page aligned buffer for dataset
|
||||
#ifdef FULL
|
||||
void* full_mem_buf = malloc(params.full_size + 4095);
|
||||
void* full_mem = (void*)((uintptr_t(full_mem_buf) + 4095) & ~4095);
|
||||
#endif
|
||||
void* cache_mem_buf = malloc(params.cache_size + 63);
|
||||
void* cache_mem = (void*)((uintptr_t(cache_mem_buf) + 63) & ~63);
|
||||
|
||||
ethash_cache cache;
|
||||
cache.mem = cache_mem;
|
||||
|
||||
// compute cache or full data
|
||||
{
|
||||
auto startTime = high_resolution_clock::now();
|
||||
ethash_mkcache(&cache, ¶ms, &seed);
|
||||
auto time = std::chrono::duration_cast<std::chrono::milliseconds>(high_resolution_clock::now() - startTime).count();
|
||||
|
||||
ethash_h256_t cache_hash;
|
||||
SHA3_256(&cache_hash, (uint8_t const*)cache_mem, params.cache_size);
|
||||
debugf("ethash_mkcache: %ums, sha3: %s\n", (unsigned)((time*1000)/CLOCKS_PER_SEC), bytesToHexString(&cache_hash, sizeof(cache_hash)).data());
|
||||
|
||||
// print a couple of test hashes
|
||||
{
|
||||
auto startTime = high_resolution_clock::now();
|
||||
ethash_return_value hash;
|
||||
ethash_light(&hash, &cache, ¶ms, &previous_hash, 0);
|
||||
auto time = std::chrono::duration_cast<std::chrono::milliseconds>(high_resolution_clock::now() - startTime).count();
|
||||
debugf("ethash_light test: %ums, %s\n", (unsigned)time, bytesToHexString(&hash.result, 32).data());
|
||||
}
|
||||
|
||||
#ifdef FULL
|
||||
startTime = high_resolution_clock::now();
|
||||
ethash_compute_full_data(full_mem, ¶ms, &cache);
|
||||
time = std::chrono::duration_cast<std::chrono::milliseconds>(high_resolution_clock::now() - startTime).count();
|
||||
debugf("ethash_compute_full_data: %ums\n", (unsigned)time);
|
||||
#endif // FULL
|
||||
}
|
||||
|
||||
#ifdef OPENCL
|
||||
ethash_cl_miner miner;
|
||||
{
|
||||
auto startTime = high_resolution_clock::now();
|
||||
if (!miner.init(params, &seed))
|
||||
exit(-1);
|
||||
auto time = std::chrono::duration_cast<std::chrono::milliseconds>(high_resolution_clock::now() - startTime).count();
|
||||
debugf("ethash_cl_miner init: %ums\n", (unsigned)time);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef FULL
|
||||
{
|
||||
auto startTime = high_resolution_clock::now();
|
||||
ethash_return_value hash;
|
||||
ethash_full(&hash, full_mem, ¶ms, &previous_hash, 0);
|
||||
auto time = std::chrono::duration_cast<std::chrono::milliseconds>(high_resolution_clock::now() - startTime).count();
|
||||
debugf("ethash_full test: %uns\n", (unsigned)time);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef OPENCL
|
||||
// validate 1024 hashes against CPU
|
||||
miner.hash(g_hashes, (uint8_t*)&previous_hash, 0, 1024);
|
||||
for (unsigned i = 0; i != 1024; ++i)
|
||||
{
|
||||
ethash_return_value hash;
|
||||
ethash_light(&hash, &cache, ¶ms, &previous_hash, i);
|
||||
if (memcmp(&hash.result, g_hashes + 32*i, 32) != 0)
|
||||
{
|
||||
debugf("nonce %u failed: %s %s\n", i, bytesToHexString(g_hashes + 32*i, 32).c_str(), bytesToHexString(&hash.result, 32).c_str());
|
||||
static unsigned c = 0;
|
||||
if (++c == 16)
|
||||
{
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ensure nothing else is going on
|
||||
miner.finish();
|
||||
#endif
|
||||
|
||||
auto startTime = high_resolution_clock::now();
|
||||
unsigned hash_count = trials;
|
||||
|
||||
#ifdef OPENCL
|
||||
{
|
||||
struct search_hook : ethash_cl_miner::search_hook
|
||||
{
|
||||
unsigned hash_count;
|
||||
std::vector<uint64_t> nonce_vec;
|
||||
|
||||
virtual bool found(uint64_t const* nonces, uint32_t count)
|
||||
{
|
||||
nonce_vec.insert(nonce_vec.end(), nonces, nonces + count);
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool searched(uint64_t start_nonce, uint32_t count)
|
||||
{
|
||||
// do nothing
|
||||
hash_count += count;
|
||||
return hash_count >= trials;
|
||||
}
|
||||
};
|
||||
search_hook hook;
|
||||
hook.hash_count = 0;
|
||||
|
||||
miner.search((uint8_t*)&previous_hash, 0x000000ffffffffff, hook);
|
||||
|
||||
for (unsigned i = 0; i != hook.nonce_vec.size(); ++i)
|
||||
{
|
||||
uint64_t nonce = hook.nonce_vec[i];
|
||||
ethash_return_value hash;
|
||||
ethash_light(&hash, &cache, ¶ms, &previous_hash, nonce);
|
||||
debugf("found: %.8x%.8x -> %s\n", unsigned(nonce>>32), unsigned(nonce), bytesToHexString(&hash.result, 32).c_str());
|
||||
}
|
||||
|
||||
hash_count = hook.hash_count;
|
||||
}
|
||||
#else
|
||||
{
|
||||
//#pragma omp parallel for
|
||||
for (int nonce = 0; nonce < trials; ++nonce)
|
||||
{
|
||||
ethash_return_value hash;
|
||||
#ifdef FULL
|
||||
ethash_full(&hash, full_mem, ¶ms, &previous_hash, nonce);
|
||||
#else
|
||||
ethash_light(&hash, &cache, ¶ms, &previous_hash, nonce);
|
||||
#endif // FULL
|
||||
}
|
||||
}
|
||||
#endif
|
||||
auto time = std::chrono::duration_cast<std::chrono::microseconds>(high_resolution_clock::now() - startTime).count();
|
||||
debugf("Search took: %ums\n", (unsigned)time/1000);
|
||||
|
||||
unsigned read_size = ETHASH_ACCESSES * ETHASH_MIX_BYTES;
|
||||
#if defined(OPENCL) || defined(FULL)
|
||||
debugf(
|
||||
"hashrate: %8.2f Mh/s, bw: %8.2f GB/s\n",
|
||||
(double)hash_count * (1000*1000)/time / (1000*1000),
|
||||
(double)hash_count*read_size * (1000*1000)/time / (1024*1024*1024)
|
||||
);
|
||||
#else
|
||||
debugf(
|
||||
"hashrate: %8.2f Kh/s, bw: %8.2f MB/s\n",
|
||||
(double)hash_count * (1000*1000)/time / (1000),
|
||||
(double)hash_count*read_size * (1000*1000)/time / (1024*1024)
|
||||
);
|
||||
#endif
|
||||
|
||||
free(cache_mem_buf);
|
||||
#ifdef FULL
|
||||
free(full_mem_buf);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
47
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash-cl/CMakeLists.txt
generated
vendored
Normal file
47
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash-cl/CMakeLists.txt
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set(LIBRARY ethash-cl)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
|
||||
include(bin2h.cmake)
|
||||
bin2h(SOURCE_FILE ethash_cl_miner_kernel.cl
|
||||
VARIABLE_NAME ethash_cl_miner_kernel
|
||||
HEADER_FILE ${CMAKE_CURRENT_BINARY_DIR}/ethash_cl_miner_kernel.h)
|
||||
|
||||
if (NOT MSVC)
|
||||
# Initialize CXXFLAGS for c++11
|
||||
set(CMAKE_CXX_FLAGS "-Wall -std=c++11")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
|
||||
|
||||
# Compiler-specific C++11 activation.
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
|
||||
if (NOT (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7))
|
||||
message(FATAL_ERROR "${PROJECT_NAME} requires g++ 4.7 or greater.")
|
||||
endif ()
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
else ()
|
||||
message(FATAL_ERROR "Your C++ compiler does not support C++11.")
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
set(OpenCL_FOUND TRUE)
|
||||
set(OpenCL_INCLUDE_DIRS /usr/include/CL)
|
||||
set(OpenCL_LIBRARIES -lOpenCL)
|
||||
|
||||
if (NOT OpenCL_FOUND)
|
||||
find_package(OpenCL)
|
||||
endif()
|
||||
|
||||
if (OpenCL_FOUND)
|
||||
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra -Werror -pedantic -fPIC ${CMAKE_CXX_FLAGS}")
|
||||
include_directories(${OpenCL_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
include_directories(..)
|
||||
add_library(${LIBRARY} ethash_cl_miner.cpp ethash_cl_miner.h cl.hpp)
|
||||
TARGET_LINK_LIBRARIES(${LIBRARY} ${OpenCL_LIBRARIES} ethash)
|
||||
endif()
|
||||
86
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash-cl/bin2h.cmake
generated
vendored
Normal file
86
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash-cl/bin2h.cmake
generated
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
# https://gist.github.com/sivachandran/3a0de157dccef822a230
|
||||
include(CMakeParseArguments)
|
||||
|
||||
# Function to wrap a given string into multiple lines at the given column position.
|
||||
# Parameters:
|
||||
# VARIABLE - The name of the CMake variable holding the string.
|
||||
# AT_COLUMN - The column position at which string will be wrapped.
|
||||
function(WRAP_STRING)
|
||||
set(oneValueArgs VARIABLE AT_COLUMN)
|
||||
cmake_parse_arguments(WRAP_STRING "${options}" "${oneValueArgs}" "" ${ARGN})
|
||||
|
||||
string(LENGTH ${${WRAP_STRING_VARIABLE}} stringLength)
|
||||
math(EXPR offset "0")
|
||||
|
||||
while(stringLength GREATER 0)
|
||||
|
||||
if(stringLength GREATER ${WRAP_STRING_AT_COLUMN})
|
||||
math(EXPR length "${WRAP_STRING_AT_COLUMN}")
|
||||
else()
|
||||
math(EXPR length "${stringLength}")
|
||||
endif()
|
||||
|
||||
string(SUBSTRING ${${WRAP_STRING_VARIABLE}} ${offset} ${length} line)
|
||||
set(lines "${lines}\n${line}")
|
||||
|
||||
math(EXPR stringLength "${stringLength} - ${length}")
|
||||
math(EXPR offset "${offset} + ${length}")
|
||||
endwhile()
|
||||
|
||||
set(${WRAP_STRING_VARIABLE} "${lines}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Function to embed contents of a file as byte array in C/C++ header file(.h). The header file
|
||||
# will contain a byte array and integer variable holding the size of the array.
|
||||
# Parameters
|
||||
# SOURCE_FILE - The path of source file whose contents will be embedded in the header file.
|
||||
# VARIABLE_NAME - The name of the variable for the byte array. The string "_SIZE" will be append
|
||||
# to this name and will be used a variable name for size variable.
|
||||
# HEADER_FILE - The path of header file.
|
||||
# APPEND - If specified appends to the header file instead of overwriting it
|
||||
# NULL_TERMINATE - If specified a null byte(zero) will be append to the byte array. This will be
|
||||
# useful if the source file is a text file and we want to use the file contents
|
||||
# as string. But the size variable holds size of the byte array without this
|
||||
# null byte.
|
||||
# Usage:
|
||||
# bin2h(SOURCE_FILE "Logo.png" HEADER_FILE "Logo.h" VARIABLE_NAME "LOGO_PNG")
|
||||
function(BIN2H)
|
||||
set(options APPEND NULL_TERMINATE)
|
||||
set(oneValueArgs SOURCE_FILE VARIABLE_NAME HEADER_FILE)
|
||||
cmake_parse_arguments(BIN2H "${options}" "${oneValueArgs}" "" ${ARGN})
|
||||
|
||||
# reads source file contents as hex string
|
||||
file(READ ${BIN2H_SOURCE_FILE} hexString HEX)
|
||||
string(LENGTH ${hexString} hexStringLength)
|
||||
|
||||
# appends null byte if asked
|
||||
if(BIN2H_NULL_TERMINATE)
|
||||
set(hexString "${hexString}00")
|
||||
endif()
|
||||
|
||||
# wraps the hex string into multiple lines at column 32(i.e. 16 bytes per line)
|
||||
wrap_string(VARIABLE hexString AT_COLUMN 32)
|
||||
math(EXPR arraySize "${hexStringLength} / 2")
|
||||
|
||||
# adds '0x' prefix and comma suffix before and after every byte respectively
|
||||
string(REGEX REPLACE "([0-9a-f][0-9a-f])" "0x\\1, " arrayValues ${hexString})
|
||||
# removes trailing comma
|
||||
string(REGEX REPLACE ", $" "" arrayValues ${arrayValues})
|
||||
|
||||
# converts the variable name into proper C identifier
|
||||
IF (${CMAKE_VERSION} GREATER 2.8.10) # fix for legacy cmake
|
||||
string(MAKE_C_IDENTIFIER "${BIN2H_VARIABLE_NAME}" BIN2H_VARIABLE_NAME)
|
||||
ENDIF()
|
||||
string(TOUPPER "${BIN2H_VARIABLE_NAME}" BIN2H_VARIABLE_NAME)
|
||||
|
||||
# declares byte array and the length variables
|
||||
set(arrayDefinition "const unsigned char ${BIN2H_VARIABLE_NAME}[] = { ${arrayValues} };")
|
||||
set(arraySizeDefinition "const size_t ${BIN2H_VARIABLE_NAME}_SIZE = ${arraySize};")
|
||||
|
||||
set(declarations "${arrayDefinition}\n\n${arraySizeDefinition}\n\n")
|
||||
if(BIN2H_APPEND)
|
||||
file(APPEND ${BIN2H_HEADER_FILE} "${declarations}")
|
||||
else()
|
||||
file(WRITE ${BIN2H_HEADER_FILE} "${declarations}")
|
||||
endif()
|
||||
endfunction()
|
||||
12906
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash-cl/cl.hpp
generated
vendored
Normal file
12906
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash-cl/cl.hpp
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
384
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash-cl/ethash_cl_miner.cpp
generated
vendored
Normal file
384
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash-cl/ethash_cl_miner.cpp
generated
vendored
Normal file
@@ -0,0 +1,384 @@
|
||||
/*
|
||||
This file is part of c-ethash.
|
||||
|
||||
c-ethash is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
c-ethash is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** @file ethash_cl_miner.cpp
|
||||
* @author Tim Hughes <tim@twistedfury.com>
|
||||
* @date 2015
|
||||
*/
|
||||
|
||||
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
#include <assert.h>
|
||||
#include <queue>
|
||||
#include <vector>
|
||||
#include <libethash/util.h>
|
||||
#include <libethash/ethash.h>
|
||||
#include <libethash/internal.h>
|
||||
#include "ethash_cl_miner.h"
|
||||
#include "ethash_cl_miner_kernel.h"
|
||||
|
||||
#define ETHASH_BYTES 32
|
||||
|
||||
// workaround lame platforms
|
||||
#if !CL_VERSION_1_2
|
||||
#define CL_MAP_WRITE_INVALIDATE_REGION CL_MAP_WRITE
|
||||
#define CL_MEM_HOST_READ_ONLY 0
|
||||
#endif
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
using namespace std;
|
||||
|
||||
static void add_definition(std::string& source, char const* id, unsigned value)
|
||||
{
|
||||
char buf[256];
|
||||
sprintf(buf, "#define %s %uu\n", id, value);
|
||||
source.insert(source.begin(), buf, buf + strlen(buf));
|
||||
}
|
||||
|
||||
ethash_cl_miner::search_hook::~search_hook() {}
|
||||
|
||||
ethash_cl_miner::ethash_cl_miner()
|
||||
: m_opencl_1_1()
|
||||
{
|
||||
}
|
||||
|
||||
std::string ethash_cl_miner::platform_info(unsigned _platformId, unsigned _deviceId)
|
||||
{
|
||||
std::vector<cl::Platform> platforms;
|
||||
cl::Platform::get(&platforms);
|
||||
if (platforms.empty())
|
||||
{
|
||||
cout << "No OpenCL platforms found." << endl;
|
||||
return std::string();
|
||||
}
|
||||
|
||||
// get GPU device of the selected platform
|
||||
std::vector<cl::Device> devices;
|
||||
unsigned platform_num = std::min<unsigned>(_platformId, platforms.size() - 1);
|
||||
platforms[platform_num].getDevices(CL_DEVICE_TYPE_ALL, &devices);
|
||||
if (devices.empty())
|
||||
{
|
||||
cout << "No OpenCL devices found." << endl;
|
||||
return std::string();
|
||||
}
|
||||
|
||||
// use selected default device
|
||||
unsigned device_num = std::min<unsigned>(_deviceId, devices.size() - 1);
|
||||
cl::Device& device = devices[device_num];
|
||||
std::string device_version = device.getInfo<CL_DEVICE_VERSION>();
|
||||
|
||||
return "{ \"platform\": \"" + platforms[platform_num].getInfo<CL_PLATFORM_NAME>() + "\", \"device\": \"" + device.getInfo<CL_DEVICE_NAME>() + "\", \"version\": \"" + device_version + "\" }";
|
||||
}
|
||||
|
||||
unsigned ethash_cl_miner::get_num_devices(unsigned _platformId)
|
||||
{
|
||||
std::vector<cl::Platform> platforms;
|
||||
cl::Platform::get(&platforms);
|
||||
if (platforms.empty())
|
||||
{
|
||||
cout << "No OpenCL platforms found." << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::vector<cl::Device> devices;
|
||||
unsigned platform_num = std::min<unsigned>(_platformId, platforms.size() - 1);
|
||||
platforms[platform_num].getDevices(CL_DEVICE_TYPE_ALL, &devices);
|
||||
if (devices.empty())
|
||||
{
|
||||
cout << "No OpenCL devices found." << endl;
|
||||
return 0;
|
||||
}
|
||||
return devices.size();
|
||||
}
|
||||
|
||||
void ethash_cl_miner::finish()
|
||||
{
|
||||
if (m_queue())
|
||||
m_queue.finish();
|
||||
}
|
||||
|
||||
bool ethash_cl_miner::init(uint64_t block_number, std::function<void(void*)> _fillDAG, unsigned workgroup_size, unsigned _platformId, unsigned _deviceId)
|
||||
{
|
||||
// store params
|
||||
m_fullSize = ethash_get_datasize(block_number);
|
||||
|
||||
// get all platforms
|
||||
std::vector<cl::Platform> platforms;
|
||||
cl::Platform::get(&platforms);
|
||||
if (platforms.empty())
|
||||
{
|
||||
cout << "No OpenCL platforms found." << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// use selected platform
|
||||
_platformId = std::min<unsigned>(_platformId, platforms.size() - 1);
|
||||
|
||||
cout << "Using platform: " << platforms[_platformId].getInfo<CL_PLATFORM_NAME>().c_str() << endl;
|
||||
|
||||
// get GPU device of the default platform
|
||||
std::vector<cl::Device> devices;
|
||||
platforms[_platformId].getDevices(CL_DEVICE_TYPE_ALL, &devices);
|
||||
if (devices.empty())
|
||||
{
|
||||
cout << "No OpenCL devices found." << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// use selected device
|
||||
cl::Device& device = devices[std::min<unsigned>(_deviceId, devices.size() - 1)];
|
||||
std::string device_version = device.getInfo<CL_DEVICE_VERSION>();
|
||||
cout << "Using device: " << device.getInfo<CL_DEVICE_NAME>().c_str() << "(" << device_version.c_str() << ")" << endl;
|
||||
|
||||
if (strncmp("OpenCL 1.0", device_version.c_str(), 10) == 0)
|
||||
{
|
||||
cout << "OpenCL 1.0 is not supported." << endl;
|
||||
return false;
|
||||
}
|
||||
if (strncmp("OpenCL 1.1", device_version.c_str(), 10) == 0)
|
||||
m_opencl_1_1 = true;
|
||||
|
||||
// create context
|
||||
m_context = cl::Context(std::vector<cl::Device>(&device, &device + 1));
|
||||
m_queue = cl::CommandQueue(m_context, device);
|
||||
|
||||
// use requested workgroup size, but we require multiple of 8
|
||||
m_workgroup_size = ((workgroup_size + 7) / 8) * 8;
|
||||
|
||||
// patch source code
|
||||
std::string code(ETHASH_CL_MINER_KERNEL, ETHASH_CL_MINER_KERNEL + ETHASH_CL_MINER_KERNEL_SIZE);
|
||||
add_definition(code, "GROUP_SIZE", m_workgroup_size);
|
||||
add_definition(code, "DAG_SIZE", (unsigned)(m_fullSize / ETHASH_MIX_BYTES));
|
||||
add_definition(code, "ACCESSES", ETHASH_ACCESSES);
|
||||
add_definition(code, "MAX_OUTPUTS", c_max_search_results);
|
||||
//debugf("%s", code.c_str());
|
||||
|
||||
// create miner OpenCL program
|
||||
cl::Program::Sources sources;
|
||||
sources.push_back({code.c_str(), code.size()});
|
||||
|
||||
cl::Program program(m_context, sources);
|
||||
try
|
||||
{
|
||||
program.build({device});
|
||||
}
|
||||
catch (cl::Error err)
|
||||
{
|
||||
cout << program.getBuildInfo<CL_PROGRAM_BUILD_LOG>(device).c_str();
|
||||
return false;
|
||||
}
|
||||
m_hash_kernel = cl::Kernel(program, "ethash_hash");
|
||||
m_search_kernel = cl::Kernel(program, "ethash_search");
|
||||
|
||||
// create buffer for dag
|
||||
m_dag = cl::Buffer(m_context, CL_MEM_READ_ONLY, m_fullSize);
|
||||
|
||||
// create buffer for header
|
||||
m_header = cl::Buffer(m_context, CL_MEM_READ_ONLY, 32);
|
||||
|
||||
// compute dag on CPU
|
||||
{
|
||||
// if this throws then it's because we probably need to subdivide the dag uploads for compatibility
|
||||
void* dag_ptr = m_queue.enqueueMapBuffer(m_dag, true, m_opencl_1_1 ? CL_MAP_WRITE : CL_MAP_WRITE_INVALIDATE_REGION, 0, m_fullSize);
|
||||
// memcpying 1GB: horrible... really. horrible. but necessary since we can't mmap *and* gpumap.
|
||||
_fillDAG(dag_ptr);
|
||||
m_queue.enqueueUnmapMemObject(m_dag, dag_ptr);
|
||||
}
|
||||
|
||||
// create mining buffers
|
||||
for (unsigned i = 0; i != c_num_buffers; ++i)
|
||||
{
|
||||
m_hash_buf[i] = cl::Buffer(m_context, CL_MEM_WRITE_ONLY | (!m_opencl_1_1 ? CL_MEM_HOST_READ_ONLY : 0), 32*c_hash_batch_size);
|
||||
m_search_buf[i] = cl::Buffer(m_context, CL_MEM_WRITE_ONLY, (c_max_search_results + 1) * sizeof(uint32_t));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void ethash_cl_miner::hash(uint8_t* ret, uint8_t const* header, uint64_t nonce, unsigned count)
|
||||
{
|
||||
struct pending_batch
|
||||
{
|
||||
unsigned base;
|
||||
unsigned count;
|
||||
unsigned buf;
|
||||
};
|
||||
std::queue<pending_batch> pending;
|
||||
|
||||
// update header constant buffer
|
||||
m_queue.enqueueWriteBuffer(m_header, true, 0, 32, header);
|
||||
|
||||
/*
|
||||
__kernel void ethash_combined_hash(
|
||||
__global hash32_t* g_hashes,
|
||||
__constant hash32_t const* g_header,
|
||||
__global hash128_t const* g_dag,
|
||||
ulong start_nonce,
|
||||
uint isolate
|
||||
)
|
||||
*/
|
||||
m_hash_kernel.setArg(1, m_header);
|
||||
m_hash_kernel.setArg(2, m_dag);
|
||||
m_hash_kernel.setArg(3, nonce);
|
||||
m_hash_kernel.setArg(4, ~0u); // have to pass this to stop the compile unrolling the loop
|
||||
|
||||
unsigned buf = 0;
|
||||
for (unsigned i = 0; i < count || !pending.empty(); )
|
||||
{
|
||||
// how many this batch
|
||||
if (i < count)
|
||||
{
|
||||
unsigned const this_count = std::min<unsigned>(count - i, c_hash_batch_size);
|
||||
unsigned const batch_count = std::max<unsigned>(this_count, m_workgroup_size);
|
||||
|
||||
// supply output hash buffer to kernel
|
||||
m_hash_kernel.setArg(0, m_hash_buf[buf]);
|
||||
|
||||
// execute it!
|
||||
m_queue.enqueueNDRangeKernel(
|
||||
m_hash_kernel,
|
||||
cl::NullRange,
|
||||
cl::NDRange(batch_count),
|
||||
cl::NDRange(m_workgroup_size)
|
||||
);
|
||||
m_queue.flush();
|
||||
|
||||
pending.push({i, this_count, buf});
|
||||
i += this_count;
|
||||
buf = (buf + 1) % c_num_buffers;
|
||||
}
|
||||
|
||||
// read results
|
||||
if (i == count || pending.size() == c_num_buffers)
|
||||
{
|
||||
pending_batch const& batch = pending.front();
|
||||
|
||||
// could use pinned host pointer instead, but this path isn't that important.
|
||||
uint8_t* hashes = (uint8_t*)m_queue.enqueueMapBuffer(m_hash_buf[batch.buf], true, CL_MAP_READ, 0, batch.count * ETHASH_BYTES);
|
||||
memcpy(ret + batch.base*ETHASH_BYTES, hashes, batch.count*ETHASH_BYTES);
|
||||
m_queue.enqueueUnmapMemObject(m_hash_buf[batch.buf], hashes);
|
||||
|
||||
pending.pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ethash_cl_miner::search(uint8_t const* header, uint64_t target, search_hook& hook)
|
||||
{
|
||||
struct pending_batch
|
||||
{
|
||||
uint64_t start_nonce;
|
||||
unsigned buf;
|
||||
};
|
||||
std::queue<pending_batch> pending;
|
||||
|
||||
static uint32_t const c_zero = 0;
|
||||
|
||||
// update header constant buffer
|
||||
m_queue.enqueueWriteBuffer(m_header, false, 0, 32, header);
|
||||
for (unsigned i = 0; i != c_num_buffers; ++i)
|
||||
{
|
||||
m_queue.enqueueWriteBuffer(m_search_buf[i], false, 0, 4, &c_zero);
|
||||
}
|
||||
|
||||
#if CL_VERSION_1_2 && 0
|
||||
cl::Event pre_return_event;
|
||||
if (!m_opencl_1_1)
|
||||
{
|
||||
m_queue.enqueueBarrierWithWaitList(NULL, &pre_return_event);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
m_queue.finish();
|
||||
}
|
||||
|
||||
/*
|
||||
__kernel void ethash_combined_search(
|
||||
__global hash32_t* g_hashes, // 0
|
||||
__constant hash32_t const* g_header, // 1
|
||||
__global hash128_t const* g_dag, // 2
|
||||
ulong start_nonce, // 3
|
||||
ulong target, // 4
|
||||
uint isolate // 5
|
||||
)
|
||||
*/
|
||||
m_search_kernel.setArg(1, m_header);
|
||||
m_search_kernel.setArg(2, m_dag);
|
||||
|
||||
// pass these to stop the compiler unrolling the loops
|
||||
m_search_kernel.setArg(4, target);
|
||||
m_search_kernel.setArg(5, ~0u);
|
||||
|
||||
|
||||
unsigned buf = 0;
|
||||
for (uint64_t start_nonce = 0; ; start_nonce += c_search_batch_size)
|
||||
{
|
||||
// supply output buffer to kernel
|
||||
m_search_kernel.setArg(0, m_search_buf[buf]);
|
||||
m_search_kernel.setArg(3, start_nonce);
|
||||
|
||||
// execute it!
|
||||
m_queue.enqueueNDRangeKernel(m_search_kernel, cl::NullRange, c_search_batch_size, m_workgroup_size);
|
||||
|
||||
pending.push({start_nonce, buf});
|
||||
buf = (buf + 1) % c_num_buffers;
|
||||
|
||||
// read results
|
||||
if (pending.size() == c_num_buffers)
|
||||
{
|
||||
pending_batch const& batch = pending.front();
|
||||
|
||||
// could use pinned host pointer instead
|
||||
uint32_t* results = (uint32_t*)m_queue.enqueueMapBuffer(m_search_buf[batch.buf], true, CL_MAP_READ, 0, (1+c_max_search_results) * sizeof(uint32_t));
|
||||
unsigned num_found = std::min<unsigned>(results[0], c_max_search_results);
|
||||
|
||||
uint64_t nonces[c_max_search_results];
|
||||
for (unsigned i = 0; i != num_found; ++i)
|
||||
{
|
||||
nonces[i] = batch.start_nonce + results[i+1];
|
||||
}
|
||||
|
||||
m_queue.enqueueUnmapMemObject(m_search_buf[batch.buf], results);
|
||||
|
||||
bool exit = num_found && hook.found(nonces, num_found);
|
||||
exit |= hook.searched(batch.start_nonce, c_search_batch_size); // always report searched before exit
|
||||
if (exit)
|
||||
break;
|
||||
|
||||
// reset search buffer if we're still going
|
||||
if (num_found)
|
||||
m_queue.enqueueWriteBuffer(m_search_buf[batch.buf], true, 0, 4, &c_zero);
|
||||
|
||||
pending.pop();
|
||||
}
|
||||
}
|
||||
|
||||
// not safe to return until this is ready
|
||||
#if CL_VERSION_1_2 && 0
|
||||
if (!m_opencl_1_1)
|
||||
{
|
||||
pre_return_event.wait();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
57
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash-cl/ethash_cl_miner.h
generated
vendored
Normal file
57
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash-cl/ethash_cl_miner.h
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
#pragma once
|
||||
|
||||
#define __CL_ENABLE_EXCEPTIONS
|
||||
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
#include "cl.hpp"
|
||||
#pragma clang diagnostic pop
|
||||
#else
|
||||
#include "cl.hpp"
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
#include <functional>
|
||||
#include <libethash/ethash.h>
|
||||
|
||||
class ethash_cl_miner
|
||||
{
|
||||
public:
|
||||
struct search_hook
|
||||
{
|
||||
virtual ~search_hook(); // always a virtual destructor for a class with virtuals.
|
||||
|
||||
// reports progress, return true to abort
|
||||
virtual bool found(uint64_t const* nonces, uint32_t count) = 0;
|
||||
virtual bool searched(uint64_t start_nonce, uint32_t count) = 0;
|
||||
};
|
||||
|
||||
public:
|
||||
ethash_cl_miner();
|
||||
|
||||
bool init(uint64_t block_number, std::function<void(void*)> _fillDAG, unsigned workgroup_size = 64, unsigned _platformId = 0, unsigned _deviceId = 0);
|
||||
static std::string platform_info(unsigned _platformId = 0, unsigned _deviceId = 0);
|
||||
static unsigned get_num_devices(unsigned _platformId = 0);
|
||||
|
||||
|
||||
void finish();
|
||||
void hash(uint8_t* ret, uint8_t const* header, uint64_t nonce, unsigned count);
|
||||
void search(uint8_t const* header, uint64_t target, search_hook& hook);
|
||||
|
||||
private:
|
||||
enum { c_max_search_results = 63, c_num_buffers = 2, c_hash_batch_size = 1024, c_search_batch_size = 1024*256 };
|
||||
|
||||
uint64_t m_fullSize;
|
||||
cl::Context m_context;
|
||||
cl::CommandQueue m_queue;
|
||||
cl::Kernel m_hash_kernel;
|
||||
cl::Kernel m_search_kernel;
|
||||
cl::Buffer m_dag;
|
||||
cl::Buffer m_header;
|
||||
cl::Buffer m_hash_buf[c_num_buffers];
|
||||
cl::Buffer m_search_buf[c_num_buffers];
|
||||
unsigned m_workgroup_size;
|
||||
bool m_opencl_1_1;
|
||||
};
|
||||
460
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash-cl/ethash_cl_miner_kernel.cl
generated
vendored
Normal file
460
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash-cl/ethash_cl_miner_kernel.cl
generated
vendored
Normal file
@@ -0,0 +1,460 @@
|
||||
// author Tim Hughes <tim@twistedfury.com>
|
||||
// Tested on Radeon HD 7850
|
||||
// Hashrate: 15940347 hashes/s
|
||||
// Bandwidth: 124533 MB/s
|
||||
// search kernel should fit in <= 84 VGPRS (3 wavefronts)
|
||||
|
||||
#define THREADS_PER_HASH (128 / 16)
|
||||
#define HASHES_PER_LOOP (GROUP_SIZE / THREADS_PER_HASH)
|
||||
|
||||
#define FNV_PRIME 0x01000193
|
||||
|
||||
__constant uint2 const Keccak_f1600_RC[24] = {
|
||||
(uint2)(0x00000001, 0x00000000),
|
||||
(uint2)(0x00008082, 0x00000000),
|
||||
(uint2)(0x0000808a, 0x80000000),
|
||||
(uint2)(0x80008000, 0x80000000),
|
||||
(uint2)(0x0000808b, 0x00000000),
|
||||
(uint2)(0x80000001, 0x00000000),
|
||||
(uint2)(0x80008081, 0x80000000),
|
||||
(uint2)(0x00008009, 0x80000000),
|
||||
(uint2)(0x0000008a, 0x00000000),
|
||||
(uint2)(0x00000088, 0x00000000),
|
||||
(uint2)(0x80008009, 0x00000000),
|
||||
(uint2)(0x8000000a, 0x00000000),
|
||||
(uint2)(0x8000808b, 0x00000000),
|
||||
(uint2)(0x0000008b, 0x80000000),
|
||||
(uint2)(0x00008089, 0x80000000),
|
||||
(uint2)(0x00008003, 0x80000000),
|
||||
(uint2)(0x00008002, 0x80000000),
|
||||
(uint2)(0x00000080, 0x80000000),
|
||||
(uint2)(0x0000800a, 0x00000000),
|
||||
(uint2)(0x8000000a, 0x80000000),
|
||||
(uint2)(0x80008081, 0x80000000),
|
||||
(uint2)(0x00008080, 0x80000000),
|
||||
(uint2)(0x80000001, 0x00000000),
|
||||
(uint2)(0x80008008, 0x80000000),
|
||||
};
|
||||
|
||||
void keccak_f1600_round(uint2* a, uint r, uint out_size)
|
||||
{
|
||||
#if !__ENDIAN_LITTLE__
|
||||
for (uint i = 0; i != 25; ++i)
|
||||
a[i] = a[i].yx;
|
||||
#endif
|
||||
|
||||
uint2 b[25];
|
||||
uint2 t;
|
||||
|
||||
// Theta
|
||||
b[0] = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20];
|
||||
b[1] = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21];
|
||||
b[2] = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22];
|
||||
b[3] = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23];
|
||||
b[4] = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24];
|
||||
t = b[4] ^ (uint2)(b[1].x << 1 | b[1].y >> 31, b[1].y << 1 | b[1].x >> 31);
|
||||
a[0] ^= t;
|
||||
a[5] ^= t;
|
||||
a[10] ^= t;
|
||||
a[15] ^= t;
|
||||
a[20] ^= t;
|
||||
t = b[0] ^ (uint2)(b[2].x << 1 | b[2].y >> 31, b[2].y << 1 | b[2].x >> 31);
|
||||
a[1] ^= t;
|
||||
a[6] ^= t;
|
||||
a[11] ^= t;
|
||||
a[16] ^= t;
|
||||
a[21] ^= t;
|
||||
t = b[1] ^ (uint2)(b[3].x << 1 | b[3].y >> 31, b[3].y << 1 | b[3].x >> 31);
|
||||
a[2] ^= t;
|
||||
a[7] ^= t;
|
||||
a[12] ^= t;
|
||||
a[17] ^= t;
|
||||
a[22] ^= t;
|
||||
t = b[2] ^ (uint2)(b[4].x << 1 | b[4].y >> 31, b[4].y << 1 | b[4].x >> 31);
|
||||
a[3] ^= t;
|
||||
a[8] ^= t;
|
||||
a[13] ^= t;
|
||||
a[18] ^= t;
|
||||
a[23] ^= t;
|
||||
t = b[3] ^ (uint2)(b[0].x << 1 | b[0].y >> 31, b[0].y << 1 | b[0].x >> 31);
|
||||
a[4] ^= t;
|
||||
a[9] ^= t;
|
||||
a[14] ^= t;
|
||||
a[19] ^= t;
|
||||
a[24] ^= t;
|
||||
|
||||
// Rho Pi
|
||||
b[0] = a[0];
|
||||
b[10] = (uint2)(a[1].x << 1 | a[1].y >> 31, a[1].y << 1 | a[1].x >> 31);
|
||||
b[7] = (uint2)(a[10].x << 3 | a[10].y >> 29, a[10].y << 3 | a[10].x >> 29);
|
||||
b[11] = (uint2)(a[7].x << 6 | a[7].y >> 26, a[7].y << 6 | a[7].x >> 26);
|
||||
b[17] = (uint2)(a[11].x << 10 | a[11].y >> 22, a[11].y << 10 | a[11].x >> 22);
|
||||
b[18] = (uint2)(a[17].x << 15 | a[17].y >> 17, a[17].y << 15 | a[17].x >> 17);
|
||||
b[3] = (uint2)(a[18].x << 21 | a[18].y >> 11, a[18].y << 21 | a[18].x >> 11);
|
||||
b[5] = (uint2)(a[3].x << 28 | a[3].y >> 4, a[3].y << 28 | a[3].x >> 4);
|
||||
b[16] = (uint2)(a[5].y << 4 | a[5].x >> 28, a[5].x << 4 | a[5].y >> 28);
|
||||
b[8] = (uint2)(a[16].y << 13 | a[16].x >> 19, a[16].x << 13 | a[16].y >> 19);
|
||||
b[21] = (uint2)(a[8].y << 23 | a[8].x >> 9, a[8].x << 23 | a[8].y >> 9);
|
||||
b[24] = (uint2)(a[21].x << 2 | a[21].y >> 30, a[21].y << 2 | a[21].x >> 30);
|
||||
b[4] = (uint2)(a[24].x << 14 | a[24].y >> 18, a[24].y << 14 | a[24].x >> 18);
|
||||
b[15] = (uint2)(a[4].x << 27 | a[4].y >> 5, a[4].y << 27 | a[4].x >> 5);
|
||||
b[23] = (uint2)(a[15].y << 9 | a[15].x >> 23, a[15].x << 9 | a[15].y >> 23);
|
||||
b[19] = (uint2)(a[23].y << 24 | a[23].x >> 8, a[23].x << 24 | a[23].y >> 8);
|
||||
b[13] = (uint2)(a[19].x << 8 | a[19].y >> 24, a[19].y << 8 | a[19].x >> 24);
|
||||
b[12] = (uint2)(a[13].x << 25 | a[13].y >> 7, a[13].y << 25 | a[13].x >> 7);
|
||||
b[2] = (uint2)(a[12].y << 11 | a[12].x >> 21, a[12].x << 11 | a[12].y >> 21);
|
||||
b[20] = (uint2)(a[2].y << 30 | a[2].x >> 2, a[2].x << 30 | a[2].y >> 2);
|
||||
b[14] = (uint2)(a[20].x << 18 | a[20].y >> 14, a[20].y << 18 | a[20].x >> 14);
|
||||
b[22] = (uint2)(a[14].y << 7 | a[14].x >> 25, a[14].x << 7 | a[14].y >> 25);
|
||||
b[9] = (uint2)(a[22].y << 29 | a[22].x >> 3, a[22].x << 29 | a[22].y >> 3);
|
||||
b[6] = (uint2)(a[9].x << 20 | a[9].y >> 12, a[9].y << 20 | a[9].x >> 12);
|
||||
b[1] = (uint2)(a[6].y << 12 | a[6].x >> 20, a[6].x << 12 | a[6].y >> 20);
|
||||
|
||||
// Chi
|
||||
a[0] = bitselect(b[0] ^ b[2], b[0], b[1]);
|
||||
a[1] = bitselect(b[1] ^ b[3], b[1], b[2]);
|
||||
a[2] = bitselect(b[2] ^ b[4], b[2], b[3]);
|
||||
a[3] = bitselect(b[3] ^ b[0], b[3], b[4]);
|
||||
if (out_size >= 4)
|
||||
{
|
||||
a[4] = bitselect(b[4] ^ b[1], b[4], b[0]);
|
||||
a[5] = bitselect(b[5] ^ b[7], b[5], b[6]);
|
||||
a[6] = bitselect(b[6] ^ b[8], b[6], b[7]);
|
||||
a[7] = bitselect(b[7] ^ b[9], b[7], b[8]);
|
||||
a[8] = bitselect(b[8] ^ b[5], b[8], b[9]);
|
||||
if (out_size >= 8)
|
||||
{
|
||||
a[9] = bitselect(b[9] ^ b[6], b[9], b[5]);
|
||||
a[10] = bitselect(b[10] ^ b[12], b[10], b[11]);
|
||||
a[11] = bitselect(b[11] ^ b[13], b[11], b[12]);
|
||||
a[12] = bitselect(b[12] ^ b[14], b[12], b[13]);
|
||||
a[13] = bitselect(b[13] ^ b[10], b[13], b[14]);
|
||||
a[14] = bitselect(b[14] ^ b[11], b[14], b[10]);
|
||||
a[15] = bitselect(b[15] ^ b[17], b[15], b[16]);
|
||||
a[16] = bitselect(b[16] ^ b[18], b[16], b[17]);
|
||||
a[17] = bitselect(b[17] ^ b[19], b[17], b[18]);
|
||||
a[18] = bitselect(b[18] ^ b[15], b[18], b[19]);
|
||||
a[19] = bitselect(b[19] ^ b[16], b[19], b[15]);
|
||||
a[20] = bitselect(b[20] ^ b[22], b[20], b[21]);
|
||||
a[21] = bitselect(b[21] ^ b[23], b[21], b[22]);
|
||||
a[22] = bitselect(b[22] ^ b[24], b[22], b[23]);
|
||||
a[23] = bitselect(b[23] ^ b[20], b[23], b[24]);
|
||||
a[24] = bitselect(b[24] ^ b[21], b[24], b[20]);
|
||||
}
|
||||
}
|
||||
|
||||
// Iota
|
||||
a[0] ^= Keccak_f1600_RC[r];
|
||||
|
||||
#if !__ENDIAN_LITTLE__
|
||||
for (uint i = 0; i != 25; ++i)
|
||||
a[i] = a[i].yx;
|
||||
#endif
|
||||
}
|
||||
|
||||
void keccak_f1600_no_absorb(ulong* a, uint in_size, uint out_size, uint isolate)
|
||||
{
|
||||
for (uint i = in_size; i != 25; ++i)
|
||||
{
|
||||
a[i] = 0;
|
||||
}
|
||||
#if __ENDIAN_LITTLE__
|
||||
a[in_size] ^= 0x0000000000000001;
|
||||
a[24-out_size*2] ^= 0x8000000000000000;
|
||||
#else
|
||||
a[in_size] ^= 0x0100000000000000;
|
||||
a[24-out_size*2] ^= 0x0000000000000080;
|
||||
#endif
|
||||
|
||||
// Originally I unrolled the first and last rounds to interface
|
||||
// better with surrounding code, however I haven't done this
|
||||
// without causing the AMD compiler to blow up the VGPR usage.
|
||||
uint r = 0;
|
||||
do
|
||||
{
|
||||
// This dynamic branch stops the AMD compiler unrolling the loop
|
||||
// and additionally saves about 33% of the VGPRs, enough to gain another
|
||||
// wavefront. Ideally we'd get 4 in flight, but 3 is the best I can
|
||||
// massage out of the compiler. It doesn't really seem to matter how
|
||||
// much we try and help the compiler save VGPRs because it seems to throw
|
||||
// that information away, hence the implementation of keccak here
|
||||
// doesn't bother.
|
||||
if (isolate)
|
||||
{
|
||||
keccak_f1600_round((uint2*)a, r++, 25);
|
||||
}
|
||||
}
|
||||
while (r < 23);
|
||||
|
||||
// final round optimised for digest size
|
||||
keccak_f1600_round((uint2*)a, r++, out_size);
|
||||
}
|
||||
|
||||
#define copy(dst, src, count) for (uint i = 0; i != count; ++i) { (dst)[i] = (src)[i]; }
|
||||
|
||||
#define countof(x) (sizeof(x) / sizeof(x[0]))
|
||||
|
||||
uint fnv(uint x, uint y)
|
||||
{
|
||||
return x * FNV_PRIME ^ y;
|
||||
}
|
||||
|
||||
uint4 fnv4(uint4 x, uint4 y)
|
||||
{
|
||||
return x * FNV_PRIME ^ y;
|
||||
}
|
||||
|
||||
uint fnv_reduce(uint4 v)
|
||||
{
|
||||
return fnv(fnv(fnv(v.x, v.y), v.z), v.w);
|
||||
}
|
||||
|
||||
typedef union
|
||||
{
|
||||
ulong ulongs[32 / sizeof(ulong)];
|
||||
uint uints[32 / sizeof(uint)];
|
||||
} hash32_t;
|
||||
|
||||
typedef union
|
||||
{
|
||||
ulong ulongs[64 / sizeof(ulong)];
|
||||
uint4 uint4s[64 / sizeof(uint4)];
|
||||
} hash64_t;
|
||||
|
||||
typedef union
|
||||
{
|
||||
uint uints[128 / sizeof(uint)];
|
||||
uint4 uint4s[128 / sizeof(uint4)];
|
||||
} hash128_t;
|
||||
|
||||
hash64_t init_hash(__constant hash32_t const* header, ulong nonce, uint isolate)
|
||||
{
|
||||
hash64_t init;
|
||||
uint const init_size = countof(init.ulongs);
|
||||
uint const hash_size = countof(header->ulongs);
|
||||
|
||||
// sha3_512(header .. nonce)
|
||||
ulong state[25];
|
||||
copy(state, header->ulongs, hash_size);
|
||||
state[hash_size] = nonce;
|
||||
keccak_f1600_no_absorb(state, hash_size + 1, init_size, isolate);
|
||||
|
||||
copy(init.ulongs, state, init_size);
|
||||
return init;
|
||||
}
|
||||
|
||||
uint inner_loop(uint4 init, uint thread_id, __local uint* share, __global hash128_t const* g_dag, uint isolate)
|
||||
{
|
||||
uint4 mix = init;
|
||||
|
||||
// share init0
|
||||
if (thread_id == 0)
|
||||
*share = mix.x;
|
||||
barrier(CLK_LOCAL_MEM_FENCE);
|
||||
uint init0 = *share;
|
||||
|
||||
uint a = 0;
|
||||
do
|
||||
{
|
||||
bool update_share = thread_id == (a/4) % THREADS_PER_HASH;
|
||||
|
||||
#pragma unroll
|
||||
for (uint i = 0; i != 4; ++i)
|
||||
{
|
||||
if (update_share)
|
||||
{
|
||||
uint m[4] = { mix.x, mix.y, mix.z, mix.w };
|
||||
*share = fnv(init0 ^ (a+i), m[i]) % DAG_SIZE;
|
||||
}
|
||||
barrier(CLK_LOCAL_MEM_FENCE);
|
||||
|
||||
mix = fnv4(mix, g_dag[*share].uint4s[thread_id]);
|
||||
}
|
||||
}
|
||||
while ((a += 4) != (ACCESSES & isolate));
|
||||
|
||||
return fnv_reduce(mix);
|
||||
}
|
||||
|
||||
hash32_t final_hash(hash64_t const* init, hash32_t const* mix, uint isolate)
|
||||
{
|
||||
ulong state[25];
|
||||
|
||||
hash32_t hash;
|
||||
uint const hash_size = countof(hash.ulongs);
|
||||
uint const init_size = countof(init->ulongs);
|
||||
uint const mix_size = countof(mix->ulongs);
|
||||
|
||||
// keccak_256(keccak_512(header..nonce) .. mix);
|
||||
copy(state, init->ulongs, init_size);
|
||||
copy(state + init_size, mix->ulongs, mix_size);
|
||||
keccak_f1600_no_absorb(state, init_size+mix_size, hash_size, isolate);
|
||||
|
||||
// copy out
|
||||
copy(hash.ulongs, state, hash_size);
|
||||
return hash;
|
||||
}
|
||||
|
||||
hash32_t compute_hash_simple(
|
||||
__constant hash32_t const* g_header,
|
||||
__global hash128_t const* g_dag,
|
||||
ulong nonce,
|
||||
uint isolate
|
||||
)
|
||||
{
|
||||
hash64_t init = init_hash(g_header, nonce, isolate);
|
||||
|
||||
hash128_t mix;
|
||||
for (uint i = 0; i != countof(mix.uint4s); ++i)
|
||||
{
|
||||
mix.uint4s[i] = init.uint4s[i % countof(init.uint4s)];
|
||||
}
|
||||
|
||||
uint mix_val = mix.uints[0];
|
||||
uint init0 = mix.uints[0];
|
||||
uint a = 0;
|
||||
do
|
||||
{
|
||||
uint pi = fnv(init0 ^ a, mix_val) % DAG_SIZE;
|
||||
uint n = (a+1) % countof(mix.uints);
|
||||
|
||||
#pragma unroll
|
||||
for (uint i = 0; i != countof(mix.uints); ++i)
|
||||
{
|
||||
mix.uints[i] = fnv(mix.uints[i], g_dag[pi].uints[i]);
|
||||
mix_val = i == n ? mix.uints[i] : mix_val;
|
||||
}
|
||||
}
|
||||
while (++a != (ACCESSES & isolate));
|
||||
|
||||
// reduce to output
|
||||
hash32_t fnv_mix;
|
||||
for (uint i = 0; i != countof(fnv_mix.uints); ++i)
|
||||
{
|
||||
fnv_mix.uints[i] = fnv_reduce(mix.uint4s[i]);
|
||||
}
|
||||
|
||||
return final_hash(&init, &fnv_mix, isolate);
|
||||
}
|
||||
|
||||
typedef union
|
||||
{
|
||||
struct
|
||||
{
|
||||
hash64_t init;
|
||||
uint pad; // avoid lds bank conflicts
|
||||
};
|
||||
hash32_t mix;
|
||||
} compute_hash_share;
|
||||
|
||||
hash32_t compute_hash(
|
||||
__local compute_hash_share* share,
|
||||
__constant hash32_t const* g_header,
|
||||
__global hash128_t const* g_dag,
|
||||
ulong nonce,
|
||||
uint isolate
|
||||
)
|
||||
{
|
||||
uint const gid = get_global_id(0);
|
||||
|
||||
// Compute one init hash per work item.
|
||||
hash64_t init = init_hash(g_header, nonce, isolate);
|
||||
|
||||
// Threads work together in this phase in groups of 8.
|
||||
uint const thread_id = gid % THREADS_PER_HASH;
|
||||
uint const hash_id = (gid % GROUP_SIZE) / THREADS_PER_HASH;
|
||||
|
||||
hash32_t mix;
|
||||
uint i = 0;
|
||||
do
|
||||
{
|
||||
// share init with other threads
|
||||
if (i == thread_id)
|
||||
share[hash_id].init = init;
|
||||
barrier(CLK_LOCAL_MEM_FENCE);
|
||||
|
||||
uint4 thread_init = share[hash_id].init.uint4s[thread_id % (64 / sizeof(uint4))];
|
||||
barrier(CLK_LOCAL_MEM_FENCE);
|
||||
|
||||
uint thread_mix = inner_loop(thread_init, thread_id, share[hash_id].mix.uints, g_dag, isolate);
|
||||
|
||||
share[hash_id].mix.uints[thread_id] = thread_mix;
|
||||
barrier(CLK_LOCAL_MEM_FENCE);
|
||||
|
||||
if (i == thread_id)
|
||||
mix = share[hash_id].mix;
|
||||
barrier(CLK_LOCAL_MEM_FENCE);
|
||||
}
|
||||
while (++i != (THREADS_PER_HASH & isolate));
|
||||
|
||||
return final_hash(&init, &mix, isolate);
|
||||
}
|
||||
|
||||
__attribute__((reqd_work_group_size(GROUP_SIZE, 1, 1)))
|
||||
__kernel void ethash_hash_simple(
|
||||
__global hash32_t* g_hashes,
|
||||
__constant hash32_t const* g_header,
|
||||
__global hash128_t const* g_dag,
|
||||
ulong start_nonce,
|
||||
uint isolate
|
||||
)
|
||||
{
|
||||
uint const gid = get_global_id(0);
|
||||
g_hashes[gid] = compute_hash_simple(g_header, g_dag, start_nonce + gid, isolate);
|
||||
}
|
||||
|
||||
__attribute__((reqd_work_group_size(GROUP_SIZE, 1, 1)))
|
||||
__kernel void ethash_search_simple(
|
||||
__global volatile uint* restrict g_output,
|
||||
__constant hash32_t const* g_header,
|
||||
__global hash128_t const* g_dag,
|
||||
ulong start_nonce,
|
||||
ulong target,
|
||||
uint isolate
|
||||
)
|
||||
{
|
||||
uint const gid = get_global_id(0);
|
||||
hash32_t hash = compute_hash_simple(g_header, g_dag, start_nonce + gid, isolate);
|
||||
if (as_ulong(as_uchar8(hash.ulongs[0]).s76543210) < target)
|
||||
{
|
||||
uint slot = min(MAX_OUTPUTS, atomic_inc(&g_output[0]) + 1);
|
||||
g_output[slot] = gid;
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__((reqd_work_group_size(GROUP_SIZE, 1, 1)))
|
||||
__kernel void ethash_hash(
|
||||
__global hash32_t* g_hashes,
|
||||
__constant hash32_t const* g_header,
|
||||
__global hash128_t const* g_dag,
|
||||
ulong start_nonce,
|
||||
uint isolate
|
||||
)
|
||||
{
|
||||
__local compute_hash_share share[HASHES_PER_LOOP];
|
||||
|
||||
uint const gid = get_global_id(0);
|
||||
g_hashes[gid] = compute_hash(share, g_header, g_dag, start_nonce + gid, isolate);
|
||||
}
|
||||
|
||||
__attribute__((reqd_work_group_size(GROUP_SIZE, 1, 1)))
|
||||
__kernel void ethash_search(
|
||||
__global volatile uint* restrict g_output,
|
||||
__constant hash32_t const* g_header,
|
||||
__global hash128_t const* g_dag,
|
||||
ulong start_nonce,
|
||||
ulong target,
|
||||
uint isolate
|
||||
)
|
||||
{
|
||||
__local compute_hash_share share[HASHES_PER_LOOP];
|
||||
|
||||
uint const gid = get_global_id(0);
|
||||
hash32_t hash = compute_hash(share, g_header, g_dag, start_nonce + gid, isolate);
|
||||
|
||||
if (as_ulong(as_uchar8(hash.ulongs[0]).s76543210) < target)
|
||||
{
|
||||
uint slot = min(MAX_OUTPUTS, atomic_inc(&g_output[0]) + 1);
|
||||
g_output[slot] = gid;
|
||||
}
|
||||
}
|
||||
44
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/CMakeLists.txt
generated
vendored
Normal file
44
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/CMakeLists.txt
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
set(LIBRARY ethash)
|
||||
|
||||
if (CPPETHEREUM)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
|
||||
endif ()
|
||||
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
|
||||
if (NOT MSVC)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
|
||||
endif()
|
||||
|
||||
set(FILES util.h
|
||||
io.c
|
||||
internal.c
|
||||
ethash.h
|
||||
endian.h
|
||||
compiler.h
|
||||
fnv.h
|
||||
data_sizes.h)
|
||||
|
||||
if (MSVC)
|
||||
list(APPEND FILES util_win32.c io_win32.c mmap_win32.c)
|
||||
else()
|
||||
list(APPEND FILES io_posix.c)
|
||||
endif()
|
||||
|
||||
if (NOT CRYPTOPP_FOUND)
|
||||
find_package(CryptoPP 5.6.2)
|
||||
endif()
|
||||
|
||||
if (CRYPTOPP_FOUND)
|
||||
add_definitions(-DWITH_CRYPTOPP)
|
||||
include_directories( ${CRYPTOPP_INCLUDE_DIRS} )
|
||||
list(APPEND FILES sha3_cryptopp.cpp sha3_cryptopp.h)
|
||||
else()
|
||||
list(APPEND FILES sha3.c sha3.h)
|
||||
endif()
|
||||
|
||||
add_library(${LIBRARY} ${FILES})
|
||||
|
||||
if (CRYPTOPP_FOUND)
|
||||
TARGET_LINK_LIBRARIES(${LIBRARY} ${CRYPTOPP_LIBRARIES})
|
||||
endif()
|
||||
33
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/compiler.h
generated
vendored
Normal file
33
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/compiler.h
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
This file is part of cpp-ethereum.
|
||||
|
||||
cpp-ethereum is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
cpp-ethereum is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** @file compiler.h
|
||||
* @date 2014
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
// Visual Studio doesn't support the inline keyword in C mode
|
||||
#if defined(_MSC_VER) && !defined(__cplusplus)
|
||||
#define inline __inline
|
||||
#endif
|
||||
|
||||
// pretend restrict is a standard keyword
|
||||
#if defined(_MSC_VER)
|
||||
#define restrict __restrict
|
||||
#else
|
||||
#define restrict __restrict__
|
||||
#endif
|
||||
|
||||
812
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/data_sizes.h
generated
vendored
Normal file
812
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/data_sizes.h
generated
vendored
Normal file
@@ -0,0 +1,812 @@
|
||||
/*
|
||||
This file is part of cpp-ethereum.
|
||||
|
||||
cpp-ethereum is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software FoundationUUU,either version 3 of the LicenseUUU,or
|
||||
(at your option) any later version.
|
||||
|
||||
cpp-ethereum is distributed in the hope that it will be usefulU,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with cpp-ethereum. If notUUU,see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file data_sizes.h
|
||||
* @author Matthew Wampler-Doty <negacthulhu@gmail.com>
|
||||
* @date 2015
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "compiler.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// 2048 Epochs (~20 years) worth of tabulated DAG sizes
|
||||
|
||||
// Generated with the following Mathematica Code:
|
||||
|
||||
// GetCacheSizes[n_] := Module[{
|
||||
// CacheSizeBytesInit = 2^24,
|
||||
// CacheGrowth = 2^17,
|
||||
// HashBytes = 64,
|
||||
// j = 0},
|
||||
// Reap[
|
||||
// While[j < n,
|
||||
// Module[{i =
|
||||
// Floor[(CacheSizeBytesInit + CacheGrowth * j) / HashBytes]},
|
||||
// While[! PrimeQ[i], i--];
|
||||
// Sow[i*HashBytes]; j++]]]][[2]][[1]]
|
||||
|
||||
|
||||
static const uint64_t dag_sizes[2048] = {
|
||||
1073739904U, 1082130304U, 1090514816U, 1098906752U, 1107293056U,
|
||||
1115684224U, 1124070016U, 1132461952U, 1140849536U, 1149232768U,
|
||||
1157627776U, 1166013824U, 1174404736U, 1182786944U, 1191180416U,
|
||||
1199568512U, 1207958912U, 1216345216U, 1224732032U, 1233124736U,
|
||||
1241513344U, 1249902464U, 1258290304U, 1266673792U, 1275067264U,
|
||||
1283453312U, 1291844992U, 1300234112U, 1308619904U, 1317010048U,
|
||||
1325397376U, 1333787776U, 1342176128U, 1350561664U, 1358954368U,
|
||||
1367339392U, 1375731584U, 1384118144U, 1392507008U, 1400897408U,
|
||||
1409284736U, 1417673344U, 1426062464U, 1434451072U, 1442839168U,
|
||||
1451229056U, 1459615616U, 1468006016U, 1476394112U, 1484782976U,
|
||||
1493171584U, 1501559168U, 1509948032U, 1518337664U, 1526726528U,
|
||||
1535114624U, 1543503488U, 1551892096U, 1560278656U, 1568669056U,
|
||||
1577056384U, 1585446272U, 1593831296U, 1602219392U, 1610610304U,
|
||||
1619000192U, 1627386752U, 1635773824U, 1644164224U, 1652555648U,
|
||||
1660943488U, 1669332608U, 1677721216U, 1686109312U, 1694497664U,
|
||||
1702886272U, 1711274624U, 1719661184U, 1728047744U, 1736434816U,
|
||||
1744829056U, 1753218944U, 1761606272U, 1769995904U, 1778382464U,
|
||||
1786772864U, 1795157888U, 1803550592U, 1811937664U, 1820327552U,
|
||||
1828711552U, 1837102976U, 1845488768U, 1853879936U, 1862269312U,
|
||||
1870656896U, 1879048064U, 1887431552U, 1895825024U, 1904212096U,
|
||||
1912601216U, 1920988544U, 1929379456U, 1937765504U, 1946156672U,
|
||||
1954543232U, 1962932096U, 1971321728U, 1979707264U, 1988093056U,
|
||||
1996487552U, 2004874624U, 2013262208U, 2021653888U, 2030039936U,
|
||||
2038430848U, 2046819968U, 2055208576U, 2063596672U, 2071981952U,
|
||||
2080373632U, 2088762752U, 2097149056U, 2105539712U, 2113928576U,
|
||||
2122315136U, 2130700672U, 2139092608U, 2147483264U, 2155872128U,
|
||||
2164257664U, 2172642176U, 2181035392U, 2189426048U, 2197814912U,
|
||||
2206203008U, 2214587264U, 2222979712U, 2231367808U, 2239758208U,
|
||||
2248145024U, 2256527744U, 2264922752U, 2273312128U, 2281701248U,
|
||||
2290086272U, 2298476672U, 2306867072U, 2315251072U, 2323639168U,
|
||||
2332032128U, 2340420224U, 2348808064U, 2357196416U, 2365580416U,
|
||||
2373966976U, 2382363008U, 2390748544U, 2399139968U, 2407530368U,
|
||||
2415918976U, 2424307328U, 2432695424U, 2441084288U, 2449472384U,
|
||||
2457861248U, 2466247808U, 2474637184U, 2483026816U, 2491414144U,
|
||||
2499803776U, 2508191872U, 2516582272U, 2524970368U, 2533359232U,
|
||||
2541743488U, 2550134144U, 2558525056U, 2566913408U, 2575301504U,
|
||||
2583686528U, 2592073856U, 2600467328U, 2608856192U, 2617240448U,
|
||||
2625631616U, 2634022016U, 2642407552U, 2650796416U, 2659188352U,
|
||||
2667574912U, 2675965312U, 2684352896U, 2692738688U, 2701130624U,
|
||||
2709518464U, 2717907328U, 2726293376U, 2734685056U, 2743073152U,
|
||||
2751462016U, 2759851648U, 2768232832U, 2776625536U, 2785017728U,
|
||||
2793401984U, 2801794432U, 2810182016U, 2818571648U, 2826959488U,
|
||||
2835349376U, 2843734144U, 2852121472U, 2860514432U, 2868900992U,
|
||||
2877286784U, 2885676928U, 2894069632U, 2902451584U, 2910843008U,
|
||||
2919234688U, 2927622784U, 2936011648U, 2944400768U, 2952789376U,
|
||||
2961177728U, 2969565568U, 2977951616U, 2986338944U, 2994731392U,
|
||||
3003120256U, 3011508352U, 3019895936U, 3028287104U, 3036675968U,
|
||||
3045063808U, 3053452928U, 3061837696U, 3070228352U, 3078615424U,
|
||||
3087003776U, 3095394944U, 3103782272U, 3112173184U, 3120562048U,
|
||||
3128944768U, 3137339264U, 3145725056U, 3154109312U, 3162505088U,
|
||||
3170893184U, 3179280256U, 3187669376U, 3196056704U, 3204445568U,
|
||||
3212836736U, 3221224064U, 3229612928U, 3238002304U, 3246391168U,
|
||||
3254778496U, 3263165824U, 3271556224U, 3279944576U, 3288332416U,
|
||||
3296719232U, 3305110912U, 3313500032U, 3321887104U, 3330273152U,
|
||||
3338658944U, 3347053184U, 3355440512U, 3363827072U, 3372220288U,
|
||||
3380608384U, 3388997504U, 3397384576U, 3405774208U, 3414163072U,
|
||||
3422551936U, 3430937984U, 3439328384U, 3447714176U, 3456104576U,
|
||||
3464493952U, 3472883584U, 3481268864U, 3489655168U, 3498048896U,
|
||||
3506434432U, 3514826368U, 3523213952U, 3531603584U, 3539987072U,
|
||||
3548380288U, 3556763264U, 3565157248U, 3573545344U, 3581934464U,
|
||||
3590324096U, 3598712704U, 3607098752U, 3615488384U, 3623877248U,
|
||||
3632265856U, 3640646528U, 3649043584U, 3657430144U, 3665821568U,
|
||||
3674207872U, 3682597504U, 3690984832U, 3699367808U, 3707764352U,
|
||||
3716152448U, 3724541056U, 3732925568U, 3741318016U, 3749706368U,
|
||||
3758091136U, 3766481536U, 3774872704U, 3783260032U, 3791650432U,
|
||||
3800036224U, 3808427648U, 3816815488U, 3825204608U, 3833592704U,
|
||||
3841981568U, 3850370432U, 3858755968U, 3867147904U, 3875536256U,
|
||||
3883920512U, 3892313728U, 3900702592U, 3909087872U, 3917478784U,
|
||||
3925868416U, 3934256512U, 3942645376U, 3951032192U, 3959422336U,
|
||||
3967809152U, 3976200064U, 3984588416U, 3992974976U, 4001363584U,
|
||||
4009751168U, 4018141312U, 4026530432U, 4034911616U, 4043308928U,
|
||||
4051695488U, 4060084352U, 4068472448U, 4076862848U, 4085249408U,
|
||||
4093640576U, 4102028416U, 4110413696U, 4118805632U, 4127194496U,
|
||||
4135583104U, 4143971968U, 4152360832U, 4160746112U, 4169135744U,
|
||||
4177525888U, 4185912704U, 4194303616U, 4202691968U, 4211076736U,
|
||||
4219463552U, 4227855488U, 4236246656U, 4244633728U, 4253022848U,
|
||||
4261412224U, 4269799808U, 4278184832U, 4286578048U, 4294962304U,
|
||||
4303349632U, 4311743104U, 4320130432U, 4328521088U, 4336909184U,
|
||||
4345295488U, 4353687424U, 4362073472U, 4370458496U, 4378852736U,
|
||||
4387238528U, 4395630208U, 4404019072U, 4412407424U, 4420790656U,
|
||||
4429182848U, 4437571456U, 4445962112U, 4454344064U, 4462738048U,
|
||||
4471119232U, 4479516544U, 4487904128U, 4496289664U, 4504682368U,
|
||||
4513068416U, 4521459584U, 4529846144U, 4538232704U, 4546619776U,
|
||||
4555010176U, 4563402112U, 4571790208U, 4580174464U, 4588567936U,
|
||||
4596957056U, 4605344896U, 4613734016U, 4622119808U, 4630511488U,
|
||||
4638898816U, 4647287936U, 4655675264U, 4664065664U, 4672451968U,
|
||||
4680842624U, 4689231488U, 4697620352U, 4706007424U, 4714397056U,
|
||||
4722786176U, 4731173248U, 4739562368U, 4747951744U, 4756340608U,
|
||||
4764727936U, 4773114496U, 4781504384U, 4789894784U, 4798283648U,
|
||||
4806667648U, 4815059584U, 4823449472U, 4831835776U, 4840226176U,
|
||||
4848612224U, 4857003392U, 4865391488U, 4873780096U, 4882169728U,
|
||||
4890557312U, 4898946944U, 4907333248U, 4915722368U, 4924110976U,
|
||||
4932499328U, 4940889728U, 4949276032U, 4957666432U, 4966054784U,
|
||||
4974438016U, 4982831488U, 4991221376U, 4999607168U, 5007998848U,
|
||||
5016386432U, 5024763776U, 5033164672U, 5041544576U, 5049941888U,
|
||||
5058329728U, 5066717056U, 5075107456U, 5083494272U, 5091883904U,
|
||||
5100273536U, 5108662144U, 5117048192U, 5125436032U, 5133827456U,
|
||||
5142215296U, 5150605184U, 5158993024U, 5167382144U, 5175769472U,
|
||||
5184157568U, 5192543872U, 5200936064U, 5209324928U, 5217711232U,
|
||||
5226102656U, 5234490496U, 5242877312U, 5251263872U, 5259654016U,
|
||||
5268040832U, 5276434304U, 5284819328U, 5293209728U, 5301598592U,
|
||||
5309986688U, 5318374784U, 5326764416U, 5335151488U, 5343542144U,
|
||||
5351929472U, 5360319872U, 5368706944U, 5377096576U, 5385484928U,
|
||||
5393871232U, 5402263424U, 5410650496U, 5419040384U, 5427426944U,
|
||||
5435816576U, 5444205952U, 5452594816U, 5460981376U, 5469367936U,
|
||||
5477760896U, 5486148736U, 5494536832U, 5502925952U, 5511315328U,
|
||||
5519703424U, 5528089984U, 5536481152U, 5544869504U, 5553256064U,
|
||||
5561645696U, 5570032768U, 5578423936U, 5586811264U, 5595193216U,
|
||||
5603585408U, 5611972736U, 5620366208U, 5628750464U, 5637143936U,
|
||||
5645528192U, 5653921408U, 5662310272U, 5670694784U, 5679082624U,
|
||||
5687474048U, 5695864448U, 5704251008U, 5712641408U, 5721030272U,
|
||||
5729416832U, 5737806208U, 5746194304U, 5754583936U, 5762969984U,
|
||||
5771358592U, 5779748224U, 5788137856U, 5796527488U, 5804911232U,
|
||||
5813300608U, 5821692544U, 5830082176U, 5838468992U, 5846855552U,
|
||||
5855247488U, 5863636096U, 5872024448U, 5880411008U, 5888799872U,
|
||||
5897186432U, 5905576832U, 5913966976U, 5922352768U, 5930744704U,
|
||||
5939132288U, 5947522432U, 5955911296U, 5964299392U, 5972688256U,
|
||||
5981074304U, 5989465472U, 5997851008U, 6006241408U, 6014627968U,
|
||||
6023015552U, 6031408256U, 6039796096U, 6048185216U, 6056574848U,
|
||||
6064963456U, 6073351808U, 6081736064U, 6090128768U, 6098517632U,
|
||||
6106906496U, 6115289216U, 6123680896U, 6132070016U, 6140459648U,
|
||||
6148849024U, 6157237376U, 6165624704U, 6174009728U, 6182403712U,
|
||||
6190792064U, 6199176064U, 6207569792U, 6215952256U, 6224345216U,
|
||||
6232732544U, 6241124224U, 6249510272U, 6257899136U, 6266287744U,
|
||||
6274676864U, 6283065728U, 6291454336U, 6299843456U, 6308232064U,
|
||||
6316620928U, 6325006208U, 6333395584U, 6341784704U, 6350174848U,
|
||||
6358562176U, 6366951296U, 6375337856U, 6383729536U, 6392119168U,
|
||||
6400504192U, 6408895616U, 6417283456U, 6425673344U, 6434059136U,
|
||||
6442444672U, 6450837376U, 6459223424U, 6467613056U, 6476004224U,
|
||||
6484393088U, 6492781952U, 6501170048U, 6509555072U, 6517947008U,
|
||||
6526336384U, 6534725504U, 6543112832U, 6551500672U, 6559888768U,
|
||||
6568278656U, 6576662912U, 6585055616U, 6593443456U, 6601834112U,
|
||||
6610219648U, 6618610304U, 6626999168U, 6635385472U, 6643777408U,
|
||||
6652164224U, 6660552832U, 6668941952U, 6677330048U, 6685719424U,
|
||||
6694107776U, 6702493568U, 6710882176U, 6719274112U, 6727662976U,
|
||||
6736052096U, 6744437632U, 6752825984U, 6761213824U, 6769604224U,
|
||||
6777993856U, 6786383488U, 6794770816U, 6803158144U, 6811549312U,
|
||||
6819937664U, 6828326528U, 6836706176U, 6845101696U, 6853491328U,
|
||||
6861880448U, 6870269312U, 6878655104U, 6887046272U, 6895433344U,
|
||||
6903822208U, 6912212864U, 6920596864U, 6928988288U, 6937377152U,
|
||||
6945764992U, 6954149248U, 6962544256U, 6970928768U, 6979317376U,
|
||||
6987709312U, 6996093824U, 7004487296U, 7012875392U, 7021258624U,
|
||||
7029652352U, 7038038912U, 7046427776U, 7054818944U, 7063207808U,
|
||||
7071595136U, 7079980928U, 7088372608U, 7096759424U, 7105149824U,
|
||||
7113536896U, 7121928064U, 7130315392U, 7138699648U, 7147092352U,
|
||||
7155479168U, 7163865728U, 7172249984U, 7180648064U, 7189036672U,
|
||||
7197424768U, 7205810816U, 7214196608U, 7222589824U, 7230975104U,
|
||||
7239367552U, 7247755904U, 7256145536U, 7264533376U, 7272921472U,
|
||||
7281308032U, 7289694848U, 7298088832U, 7306471808U, 7314864512U,
|
||||
7323253888U, 7331643008U, 7340029568U, 7348419712U, 7356808832U,
|
||||
7365196672U, 7373585792U, 7381973888U, 7390362752U, 7398750592U,
|
||||
7407138944U, 7415528576U, 7423915648U, 7432302208U, 7440690304U,
|
||||
7449080192U, 7457472128U, 7465860992U, 7474249088U, 7482635648U,
|
||||
7491023744U, 7499412608U, 7507803008U, 7516192384U, 7524579968U,
|
||||
7532967296U, 7541358464U, 7549745792U, 7558134656U, 7566524032U,
|
||||
7574912896U, 7583300992U, 7591690112U, 7600075136U, 7608466816U,
|
||||
7616854912U, 7625244544U, 7633629824U, 7642020992U, 7650410368U,
|
||||
7658794112U, 7667187328U, 7675574912U, 7683961984U, 7692349568U,
|
||||
7700739712U, 7709130368U, 7717519232U, 7725905536U, 7734295424U,
|
||||
7742683264U, 7751069056U, 7759457408U, 7767849088U, 7776238208U,
|
||||
7784626816U, 7793014912U, 7801405312U, 7809792128U, 7818179968U,
|
||||
7826571136U, 7834957184U, 7843347328U, 7851732352U, 7860124544U,
|
||||
7868512384U, 7876902016U, 7885287808U, 7893679744U, 7902067072U,
|
||||
7910455936U, 7918844288U, 7927230848U, 7935622784U, 7944009344U,
|
||||
7952400256U, 7960786048U, 7969176704U, 7977565312U, 7985953408U,
|
||||
7994339968U, 8002730368U, 8011119488U, 8019508096U, 8027896192U,
|
||||
8036285056U, 8044674688U, 8053062272U, 8061448832U, 8069838464U,
|
||||
8078227328U, 8086616704U, 8095006592U, 8103393664U, 8111783552U,
|
||||
8120171392U, 8128560256U, 8136949376U, 8145336704U, 8153726848U,
|
||||
8162114944U, 8170503296U, 8178891904U, 8187280768U, 8195669632U,
|
||||
8204058496U, 8212444544U, 8220834176U, 8229222272U, 8237612672U,
|
||||
8246000768U, 8254389376U, 8262775168U, 8271167104U, 8279553664U,
|
||||
8287944064U, 8296333184U, 8304715136U, 8313108352U, 8321497984U,
|
||||
8329885568U, 8338274432U, 8346663296U, 8355052928U, 8363441536U,
|
||||
8371828352U, 8380217984U, 8388606592U, 8396996224U, 8405384576U,
|
||||
8413772672U, 8422161536U, 8430549376U, 8438939008U, 8447326592U,
|
||||
8455715456U, 8464104832U, 8472492928U, 8480882048U, 8489270656U,
|
||||
8497659776U, 8506045312U, 8514434944U, 8522823808U, 8531208832U,
|
||||
8539602304U, 8547990656U, 8556378752U, 8564768384U, 8573154176U,
|
||||
8581542784U, 8589933952U, 8598322816U, 8606705024U, 8615099264U,
|
||||
8623487872U, 8631876992U, 8640264064U, 8648653952U, 8657040256U,
|
||||
8665430656U, 8673820544U, 8682209152U, 8690592128U, 8698977152U,
|
||||
8707374464U, 8715763328U, 8724151424U, 8732540032U, 8740928384U,
|
||||
8749315712U, 8757704576U, 8766089344U, 8774480768U, 8782871936U,
|
||||
8791260032U, 8799645824U, 8808034432U, 8816426368U, 8824812928U,
|
||||
8833199488U, 8841591424U, 8849976448U, 8858366336U, 8866757248U,
|
||||
8875147136U, 8883532928U, 8891923328U, 8900306816U, 8908700288U,
|
||||
8917088384U, 8925478784U, 8933867392U, 8942250368U, 8950644608U,
|
||||
8959032704U, 8967420544U, 8975809664U, 8984197504U, 8992584064U,
|
||||
9000976256U, 9009362048U, 9017752448U, 9026141312U, 9034530688U,
|
||||
9042917504U, 9051307904U, 9059694208U, 9068084864U, 9076471424U,
|
||||
9084861824U, 9093250688U, 9101638528U, 9110027648U, 9118416512U,
|
||||
9126803584U, 9135188096U, 9143581312U, 9151969664U, 9160356224U,
|
||||
9168747136U, 9177134464U, 9185525632U, 9193910144U, 9202302848U,
|
||||
9210690688U, 9219079552U, 9227465344U, 9235854464U, 9244244864U,
|
||||
9252633472U, 9261021824U, 9269411456U, 9277799296U, 9286188928U,
|
||||
9294574208U, 9302965888U, 9311351936U, 9319740032U, 9328131968U,
|
||||
9336516736U, 9344907392U, 9353296768U, 9361685888U, 9370074752U,
|
||||
9378463616U, 9386849408U, 9395239808U, 9403629184U, 9412016512U,
|
||||
9420405376U, 9428795008U, 9437181568U, 9445570688U, 9453960832U,
|
||||
9462346624U, 9470738048U, 9479121536U, 9487515008U, 9495903616U,
|
||||
9504289664U, 9512678528U, 9521067904U, 9529456256U, 9537843584U,
|
||||
9546233728U, 9554621312U, 9563011456U, 9571398784U, 9579788672U,
|
||||
9588178304U, 9596567168U, 9604954496U, 9613343104U, 9621732992U,
|
||||
9630121856U, 9638508416U, 9646898816U, 9655283584U, 9663675776U,
|
||||
9672061312U, 9680449664U, 9688840064U, 9697230464U, 9705617536U,
|
||||
9714003584U, 9722393984U, 9730772608U, 9739172224U, 9747561088U,
|
||||
9755945344U, 9764338816U, 9772726144U, 9781116544U, 9789503872U,
|
||||
9797892992U, 9806282624U, 9814670464U, 9823056512U, 9831439232U,
|
||||
9839833984U, 9848224384U, 9856613504U, 9865000576U, 9873391232U,
|
||||
9881772416U, 9890162816U, 9898556288U, 9906940544U, 9915333248U,
|
||||
9923721088U, 9932108672U, 9940496512U, 9948888448U, 9957276544U,
|
||||
9965666176U, 9974048384U, 9982441088U, 9990830464U, 9999219584U,
|
||||
10007602816U, 10015996544U, 10024385152U, 10032774016U, 10041163648U,
|
||||
10049548928U, 10057940096U, 10066329472U, 10074717824U, 10083105152U,
|
||||
10091495296U, 10099878784U, 10108272256U, 10116660608U, 10125049216U,
|
||||
10133437312U, 10141825664U, 10150213504U, 10158601088U, 10166991232U,
|
||||
10175378816U, 10183766144U, 10192157312U, 10200545408U, 10208935552U,
|
||||
10217322112U, 10225712768U, 10234099328U, 10242489472U, 10250876032U,
|
||||
10259264896U, 10267656064U, 10276042624U, 10284429184U, 10292820352U,
|
||||
10301209472U, 10309598848U, 10317987712U, 10326375296U, 10334763392U,
|
||||
10343153536U, 10351541632U, 10359930752U, 10368318592U, 10376707456U,
|
||||
10385096576U, 10393484672U, 10401867136U, 10410262144U, 10418647424U,
|
||||
10427039104U, 10435425664U, 10443810176U, 10452203648U, 10460589952U,
|
||||
10468982144U, 10477369472U, 10485759104U, 10494147712U, 10502533504U,
|
||||
10510923392U, 10519313536U, 10527702656U, 10536091264U, 10544478592U,
|
||||
10552867712U, 10561255808U, 10569642368U, 10578032768U, 10586423168U,
|
||||
10594805632U, 10603200128U, 10611588992U, 10619976064U, 10628361344U,
|
||||
10636754048U, 10645143424U, 10653531776U, 10661920384U, 10670307968U,
|
||||
10678696832U, 10687086464U, 10695475072U, 10703863168U, 10712246144U,
|
||||
10720639616U, 10729026688U, 10737414784U, 10745806208U, 10754190976U,
|
||||
10762581376U, 10770971264U, 10779356288U, 10787747456U, 10796135552U,
|
||||
10804525184U, 10812915584U, 10821301888U, 10829692288U, 10838078336U,
|
||||
10846469248U, 10854858368U, 10863247232U, 10871631488U, 10880023424U,
|
||||
10888412032U, 10896799616U, 10905188992U, 10913574016U, 10921964672U,
|
||||
10930352768U, 10938742912U, 10947132544U, 10955518592U, 10963909504U,
|
||||
10972298368U, 10980687488U, 10989074816U, 10997462912U, 11005851776U,
|
||||
11014241152U, 11022627712U, 11031017344U, 11039403904U, 11047793024U,
|
||||
11056184704U, 11064570752U, 11072960896U, 11081343872U, 11089737856U,
|
||||
11098128256U, 11106514816U, 11114904448U, 11123293568U, 11131680128U,
|
||||
11140065152U, 11148458368U, 11156845696U, 11165236864U, 11173624192U,
|
||||
11182013824U, 11190402688U, 11198790784U, 11207179136U, 11215568768U,
|
||||
11223957376U, 11232345728U, 11240734592U, 11249122688U, 11257511296U,
|
||||
11265899648U, 11274285952U, 11282675584U, 11291065472U, 11299452544U,
|
||||
11307842432U, 11316231296U, 11324616832U, 11333009024U, 11341395584U,
|
||||
11349782656U, 11358172288U, 11366560384U, 11374950016U, 11383339648U,
|
||||
11391721856U, 11400117376U, 11408504192U, 11416893568U, 11425283456U,
|
||||
11433671552U, 11442061184U, 11450444672U, 11458837888U, 11467226752U,
|
||||
11475611776U, 11484003968U, 11492392064U, 11500780672U, 11509169024U,
|
||||
11517550976U, 11525944448U, 11534335616U, 11542724224U, 11551111808U,
|
||||
11559500672U, 11567890304U, 11576277376U, 11584667008U, 11593056128U,
|
||||
11601443456U, 11609830016U, 11618221952U, 11626607488U, 11634995072U,
|
||||
11643387776U, 11651775104U, 11660161664U, 11668552576U, 11676940928U,
|
||||
11685330304U, 11693718656U, 11702106496U, 11710496128U, 11718882688U,
|
||||
11727273088U, 11735660416U, 11744050048U, 11752437376U, 11760824704U,
|
||||
11769216128U, 11777604736U, 11785991296U, 11794381952U, 11802770048U,
|
||||
11811157888U, 11819548544U, 11827932544U, 11836324736U, 11844713344U,
|
||||
11853100928U, 11861486464U, 11869879936U, 11878268032U, 11886656896U,
|
||||
11895044992U, 11903433088U, 11911822976U, 11920210816U, 11928600448U,
|
||||
11936987264U, 11945375872U, 11953761152U, 11962151296U, 11970543488U,
|
||||
11978928512U, 11987320448U, 11995708288U, 12004095104U, 12012486272U,
|
||||
12020875136U, 12029255552U, 12037652096U, 12046039168U, 12054429568U,
|
||||
12062813824U, 12071206528U, 12079594624U, 12087983744U, 12096371072U,
|
||||
12104759936U, 12113147264U, 12121534592U, 12129924992U, 12138314624U,
|
||||
12146703232U, 12155091584U, 12163481216U, 12171864704U, 12180255872U,
|
||||
12188643968U, 12197034112U, 12205424512U, 12213811328U, 12222199424U,
|
||||
12230590336U, 12238977664U, 12247365248U, 12255755392U, 12264143488U,
|
||||
12272531584U, 12280920448U, 12289309568U, 12297694592U, 12306086528U,
|
||||
12314475392U, 12322865024U, 12331253632U, 12339640448U, 12348029312U,
|
||||
12356418944U, 12364805248U, 12373196672U, 12381580928U, 12389969024U,
|
||||
12398357632U, 12406750592U, 12415138432U, 12423527552U, 12431916416U,
|
||||
12440304512U, 12448692352U, 12457081216U, 12465467776U, 12473859968U,
|
||||
12482245504U, 12490636672U, 12499025536U, 12507411584U, 12515801728U,
|
||||
12524190592U, 12532577152U, 12540966272U, 12549354368U, 12557743232U,
|
||||
12566129536U, 12574523264U, 12582911872U, 12591299456U, 12599688064U,
|
||||
12608074624U, 12616463488U, 12624845696U, 12633239936U, 12641631616U,
|
||||
12650019968U, 12658407296U, 12666795136U, 12675183232U, 12683574656U,
|
||||
12691960192U, 12700350592U, 12708740224U, 12717128576U, 12725515904U,
|
||||
12733906816U, 12742295168U, 12750680192U, 12759071872U, 12767460736U,
|
||||
12775848832U, 12784236928U, 12792626816U, 12801014656U, 12809404288U,
|
||||
12817789312U, 12826181504U, 12834568832U, 12842954624U, 12851345792U,
|
||||
12859732352U, 12868122496U, 12876512128U, 12884901248U, 12893289088U,
|
||||
12901672832U, 12910067584U, 12918455168U, 12926842496U, 12935232896U,
|
||||
12943620736U, 12952009856U, 12960396928U, 12968786816U, 12977176192U,
|
||||
12985563776U, 12993951104U, 13002341504U, 13010730368U, 13019115392U,
|
||||
13027506304U, 13035895168U, 13044272512U, 13052673152U, 13061062528U,
|
||||
13069446272U, 13077838976U, 13086227072U, 13094613632U, 13103000192U,
|
||||
13111393664U, 13119782528U, 13128157568U, 13136559232U, 13144945024U,
|
||||
13153329536U, 13161724288U, 13170111872U, 13178502784U, 13186884736U,
|
||||
13195279744U, 13203667072U, 13212057472U, 13220445824U, 13228832128U,
|
||||
13237221248U, 13245610624U, 13254000512U, 13262388352U, 13270777472U,
|
||||
13279166336U, 13287553408U, 13295943296U, 13304331904U, 13312719488U,
|
||||
13321108096U, 13329494656U, 13337885824U, 13346274944U, 13354663808U,
|
||||
13363051136U, 13371439232U, 13379825024U, 13388210816U, 13396605056U,
|
||||
13404995456U, 13413380224U, 13421771392U, 13430159744U, 13438546048U,
|
||||
13446937216U, 13455326848U, 13463708288U, 13472103808U, 13480492672U,
|
||||
13488875648U, 13497269888U, 13505657728U, 13514045312U, 13522435712U,
|
||||
13530824576U, 13539210112U, 13547599232U, 13555989376U, 13564379008U,
|
||||
13572766336U, 13581154432U, 13589544832U, 13597932928U, 13606320512U,
|
||||
13614710656U, 13623097472U, 13631477632U, 13639874944U, 13648264064U,
|
||||
13656652928U, 13665041792U, 13673430656U, 13681818496U, 13690207616U,
|
||||
13698595712U, 13706982272U, 13715373184U, 13723762048U, 13732150144U,
|
||||
13740536704U, 13748926592U, 13757316224U, 13765700992U, 13774090112U,
|
||||
13782477952U, 13790869376U, 13799259008U, 13807647872U, 13816036736U,
|
||||
13824425344U, 13832814208U, 13841202304U, 13849591424U, 13857978752U,
|
||||
13866368896U, 13874754688U, 13883145344U, 13891533184U, 13899919232U,
|
||||
13908311168U, 13916692096U, 13925085056U, 13933473152U, 13941866368U,
|
||||
13950253696U, 13958643584U, 13967032192U, 13975417216U, 13983807616U,
|
||||
13992197504U, 14000582272U, 14008973696U, 14017363072U, 14025752192U,
|
||||
14034137984U, 14042528384U, 14050918016U, 14059301504U, 14067691648U,
|
||||
14076083584U, 14084470144U, 14092852352U, 14101249664U, 14109635968U,
|
||||
14118024832U, 14126407552U, 14134804352U, 14143188608U, 14151577984U,
|
||||
14159968384U, 14168357248U, 14176741504U, 14185127296U, 14193521024U,
|
||||
14201911424U, 14210301824U, 14218685056U, 14227067264U, 14235467392U,
|
||||
14243855488U, 14252243072U, 14260630144U, 14269021568U, 14277409408U,
|
||||
14285799296U, 14294187904U, 14302571392U, 14310961792U, 14319353728U,
|
||||
14327738752U, 14336130944U, 14344518784U, 14352906368U, 14361296512U,
|
||||
14369685376U, 14378071424U, 14386462592U, 14394848128U, 14403230848U,
|
||||
14411627392U, 14420013952U, 14428402304U, 14436793472U, 14445181568U,
|
||||
14453569664U, 14461959808U, 14470347904U, 14478737024U, 14487122816U,
|
||||
14495511424U, 14503901824U, 14512291712U, 14520677504U, 14529064832U,
|
||||
14537456768U, 14545845632U, 14554234496U, 14562618496U, 14571011456U,
|
||||
14579398784U, 14587789184U, 14596172672U, 14604564608U, 14612953984U,
|
||||
14621341312U, 14629724288U, 14638120832U, 14646503296U, 14654897536U,
|
||||
14663284864U, 14671675264U, 14680061056U, 14688447616U, 14696835968U,
|
||||
14705228416U, 14713616768U, 14722003328U, 14730392192U, 14738784128U,
|
||||
14747172736U, 14755561088U, 14763947648U, 14772336512U, 14780725376U,
|
||||
14789110144U, 14797499776U, 14805892736U, 14814276992U, 14822670208U,
|
||||
14831056256U, 14839444352U, 14847836032U, 14856222848U, 14864612992U,
|
||||
14872997504U, 14881388672U, 14889775744U, 14898165376U, 14906553472U,
|
||||
14914944896U, 14923329664U, 14931721856U, 14940109696U, 14948497024U,
|
||||
14956887424U, 14965276544U, 14973663616U, 14982053248U, 14990439808U,
|
||||
14998830976U, 15007216768U, 15015605888U, 15023995264U, 15032385152U,
|
||||
15040768384U, 15049154944U, 15057549184U, 15065939072U, 15074328448U,
|
||||
15082715008U, 15091104128U, 15099493504U, 15107879296U, 15116269184U,
|
||||
15124659584U, 15133042304U, 15141431936U, 15149824384U, 15158214272U,
|
||||
15166602368U, 15174991232U, 15183378304U, 15191760512U, 15200154496U,
|
||||
15208542592U, 15216931712U, 15225323392U, 15233708416U, 15242098048U,
|
||||
15250489216U, 15258875264U, 15267265408U, 15275654528U, 15284043136U,
|
||||
15292431488U, 15300819584U, 15309208192U, 15317596544U, 15325986176U,
|
||||
15334374784U, 15342763648U, 15351151744U, 15359540608U, 15367929728U,
|
||||
15376318336U, 15384706432U, 15393092992U, 15401481856U, 15409869952U,
|
||||
15418258816U, 15426649984U, 15435037568U, 15443425664U, 15451815296U,
|
||||
15460203392U, 15468589184U, 15476979328U, 15485369216U, 15493755776U,
|
||||
15502146944U, 15510534272U, 15518924416U, 15527311232U, 15535699072U,
|
||||
15544089472U, 15552478336U, 15560866688U, 15569254528U, 15577642624U,
|
||||
15586031488U, 15594419072U, 15602809472U, 15611199104U, 15619586432U,
|
||||
15627975296U, 15636364928U, 15644753792U, 15653141888U, 15661529216U,
|
||||
15669918848U, 15678305152U, 15686696576U, 15695083136U, 15703474048U,
|
||||
15711861632U, 15720251264U, 15728636288U, 15737027456U, 15745417088U,
|
||||
15753804928U, 15762194048U, 15770582656U, 15778971008U, 15787358336U,
|
||||
15795747712U, 15804132224U, 15812523392U, 15820909696U, 15829300096U,
|
||||
15837691264U, 15846071936U, 15854466944U, 15862855808U, 15871244672U,
|
||||
15879634816U, 15888020608U, 15896409728U, 15904799104U, 15913185152U,
|
||||
15921577088U, 15929966464U, 15938354816U, 15946743424U, 15955129472U,
|
||||
15963519872U, 15971907968U, 15980296064U, 15988684928U, 15997073024U,
|
||||
16005460864U, 16013851264U, 16022241152U, 16030629248U, 16039012736U,
|
||||
16047406976U, 16055794816U, 16064181376U, 16072571264U, 16080957824U,
|
||||
16089346688U, 16097737856U, 16106125184U, 16114514816U, 16122904192U,
|
||||
16131292544U, 16139678848U, 16148066944U, 16156453504U, 16164839552U,
|
||||
16173236096U, 16181623424U, 16190012032U, 16198401152U, 16206790528U,
|
||||
16215177344U, 16223567744U, 16231956352U, 16240344704U, 16248731008U,
|
||||
16257117824U, 16265504384U, 16273898624U, 16282281856U, 16290668672U,
|
||||
16299064192U, 16307449216U, 16315842176U, 16324230016U, 16332613504U,
|
||||
16341006464U, 16349394304U, 16357783168U, 16366172288U, 16374561664U,
|
||||
16382951296U, 16391337856U, 16399726208U, 16408116352U, 16416505472U,
|
||||
16424892032U, 16433282176U, 16441668224U, 16450058624U, 16458448768U,
|
||||
16466836864U, 16475224448U, 16483613056U, 16492001408U, 16500391808U,
|
||||
16508779648U, 16517166976U, 16525555328U, 16533944192U, 16542330752U,
|
||||
16550719616U, 16559110528U, 16567497088U, 16575888512U, 16584274816U,
|
||||
16592665472U, 16601051008U, 16609442944U, 16617832064U, 16626218624U,
|
||||
16634607488U, 16642996096U, 16651385728U, 16659773824U, 16668163712U,
|
||||
16676552576U, 16684938112U, 16693328768U, 16701718144U, 16710095488U,
|
||||
16718492288U, 16726883968U, 16735272832U, 16743661184U, 16752049792U,
|
||||
16760436608U, 16768827008U, 16777214336U, 16785599104U, 16793992832U,
|
||||
16802381696U, 16810768768U, 16819151744U, 16827542656U, 16835934848U,
|
||||
16844323712U, 16852711552U, 16861101952U, 16869489536U, 16877876864U,
|
||||
16886265728U, 16894653056U, 16903044736U, 16911431296U, 16919821696U,
|
||||
16928207488U, 16936592768U, 16944987776U, 16953375616U, 16961763968U,
|
||||
16970152832U, 16978540928U, 16986929536U, 16995319168U, 17003704448U,
|
||||
17012096896U, 17020481152U, 17028870784U, 17037262208U, 17045649536U,
|
||||
17054039936U, 17062426496U, 17070814336U, 17079205504U, 17087592064U,
|
||||
17095978112U, 17104369024U, 17112759424U, 17121147776U, 17129536384U,
|
||||
17137926016U, 17146314368U, 17154700928U, 17163089792U, 17171480192U,
|
||||
17179864192U, 17188256896U, 17196644992U, 17205033856U, 17213423488U,
|
||||
17221811072U, 17230198912U, 17238588032U, 17246976896U, 17255360384U,
|
||||
17263754624U, 17272143232U, 17280530048U, 17288918912U, 17297309312U,
|
||||
17305696384U, 17314085504U, 17322475136U, 17330863744U, 17339252096U,
|
||||
17347640192U, 17356026496U, 17364413824U, 17372796544U, 17381190016U,
|
||||
17389583488U, 17397972608U, 17406360704U, 17414748544U, 17423135872U,
|
||||
17431527296U, 17439915904U, 17448303232U, 17456691584U, 17465081728U,
|
||||
17473468288U, 17481857408U, 17490247552U, 17498635904U, 17507022464U,
|
||||
17515409024U, 17523801728U, 17532189824U, 17540577664U, 17548966016U,
|
||||
17557353344U, 17565741184U, 17574131584U, 17582519168U, 17590907008U,
|
||||
17599296128U, 17607687808U, 17616076672U, 17624455808U, 17632852352U,
|
||||
17641238656U, 17649630848U, 17658018944U, 17666403968U, 17674794112U,
|
||||
17683178368U, 17691573376U, 17699962496U, 17708350592U, 17716739968U,
|
||||
17725126528U, 17733517184U, 17741898112U, 17750293888U, 17758673024U,
|
||||
17767070336U, 17775458432U, 17783848832U, 17792236928U, 17800625536U,
|
||||
17809012352U, 17817402752U, 17825785984U, 17834178944U, 17842563968U,
|
||||
17850955648U, 17859344512U, 17867732864U, 17876119424U, 17884511872U,
|
||||
17892900224U, 17901287296U, 17909677696U, 17918058112U, 17926451072U,
|
||||
17934843776U, 17943230848U, 17951609216U, 17960008576U, 17968397696U,
|
||||
17976784256U, 17985175424U, 17993564032U, 18001952128U, 18010339712U,
|
||||
18018728576U, 18027116672U, 18035503232U, 18043894144U, 18052283264U,
|
||||
18060672128U, 18069056384U, 18077449856U, 18085837184U, 18094225792U,
|
||||
18102613376U, 18111004544U, 18119388544U, 18127781248U, 18136170368U,
|
||||
18144558976U, 18152947328U, 18161336192U, 18169724288U, 18178108544U,
|
||||
18186498944U, 18194886784U, 18203275648U, 18211666048U, 18220048768U,
|
||||
18228444544U, 18236833408U, 18245220736U
|
||||
};
|
||||
|
||||
|
||||
// Generated with the following Mathematica Code:
|
||||
|
||||
// GetCacheSizes[n_] := Module[{
|
||||
// DataSetSizeBytesInit = 2^30,
|
||||
// MixBytes = 128,
|
||||
// DataSetGrowth = 2^23,
|
||||
// HashBytes = 64,
|
||||
// CacheMultiplier = 1024,
|
||||
// j = 0},
|
||||
// Reap[
|
||||
// While[j < n,
|
||||
// Module[{i = Floor[(DataSetSizeBytesInit + DataSetGrowth * j) / (CacheMultiplier * HashBytes)]},
|
||||
// While[! PrimeQ[i], i--];
|
||||
// Sow[i*HashBytes]; j++]]]][[2]][[1]]
|
||||
|
||||
const uint64_t cache_sizes[2048] = {
|
||||
16776896U, 16907456U, 17039296U, 17170112U, 17301056U, 17432512U, 17563072U,
|
||||
17693888U, 17824192U, 17955904U, 18087488U, 18218176U, 18349504U, 18481088U,
|
||||
18611392U, 18742336U, 18874304U, 19004224U, 19135936U, 19267264U, 19398208U,
|
||||
19529408U, 19660096U, 19791424U, 19922752U, 20053952U, 20184896U, 20315968U,
|
||||
20446912U, 20576576U, 20709184U, 20840384U, 20971072U, 21102272U, 21233216U,
|
||||
21364544U, 21494848U, 21626816U, 21757376U, 21887552U, 22019392U, 22151104U,
|
||||
22281536U, 22412224U, 22543936U, 22675264U, 22806464U, 22935872U, 23068096U,
|
||||
23198272U, 23330752U, 23459008U, 23592512U, 23723968U, 23854912U, 23986112U,
|
||||
24116672U, 24247616U, 24378688U, 24509504U, 24640832U, 24772544U, 24903488U,
|
||||
25034432U, 25165376U, 25296704U, 25427392U, 25558592U, 25690048U, 25820096U,
|
||||
25951936U, 26081728U, 26214208U, 26345024U, 26476096U, 26606656U, 26737472U,
|
||||
26869184U, 26998208U, 27131584U, 27262528U, 27393728U, 27523904U, 27655744U,
|
||||
27786688U, 27917888U, 28049344U, 28179904U, 28311488U, 28441792U, 28573504U,
|
||||
28700864U, 28835648U, 28966208U, 29096768U, 29228608U, 29359808U, 29490752U,
|
||||
29621824U, 29752256U, 29882816U, 30014912U, 30144448U, 30273728U, 30406976U,
|
||||
30538432U, 30670784U, 30799936U, 30932672U, 31063744U, 31195072U, 31325248U,
|
||||
31456192U, 31588288U, 31719232U, 31850432U, 31981504U, 32110784U, 32243392U,
|
||||
32372672U, 32505664U, 32636608U, 32767808U, 32897344U, 33029824U, 33160768U,
|
||||
33289664U, 33423296U, 33554368U, 33683648U, 33816512U, 33947456U, 34076992U,
|
||||
34208704U, 34340032U, 34471744U, 34600256U, 34734016U, 34864576U, 34993984U,
|
||||
35127104U, 35258176U, 35386688U, 35518528U, 35650624U, 35782336U, 35910976U,
|
||||
36044608U, 36175808U, 36305728U, 36436672U, 36568384U, 36699968U, 36830656U,
|
||||
36961984U, 37093312U, 37223488U, 37355072U, 37486528U, 37617472U, 37747904U,
|
||||
37879232U, 38009792U, 38141888U, 38272448U, 38403392U, 38535104U, 38660672U,
|
||||
38795584U, 38925632U, 39059264U, 39190336U, 39320768U, 39452096U, 39581632U,
|
||||
39713984U, 39844928U, 39974848U, 40107968U, 40238144U, 40367168U, 40500032U,
|
||||
40631744U, 40762816U, 40894144U, 41023552U, 41155904U, 41286208U, 41418304U,
|
||||
41547712U, 41680448U, 41811904U, 41942848U, 42073792U, 42204992U, 42334912U,
|
||||
42467008U, 42597824U, 42729152U, 42860096U, 42991552U, 43122368U, 43253696U,
|
||||
43382848U, 43515712U, 43646912U, 43777088U, 43907648U, 44039104U, 44170432U,
|
||||
44302144U, 44433344U, 44564288U, 44694976U, 44825152U, 44956864U, 45088448U,
|
||||
45219008U, 45350464U, 45481024U, 45612608U, 45744064U, 45874496U, 46006208U,
|
||||
46136768U, 46267712U, 46399424U, 46529344U, 46660672U, 46791488U, 46923328U,
|
||||
47053504U, 47185856U, 47316928U, 47447872U, 47579072U, 47710144U, 47839936U,
|
||||
47971648U, 48103232U, 48234176U, 48365248U, 48496192U, 48627136U, 48757312U,
|
||||
48889664U, 49020736U, 49149248U, 49283008U, 49413824U, 49545152U, 49675712U,
|
||||
49807168U, 49938368U, 50069056U, 50200256U, 50331584U, 50462656U, 50593472U,
|
||||
50724032U, 50853952U, 50986048U, 51117632U, 51248576U, 51379904U, 51510848U,
|
||||
51641792U, 51773248U, 51903296U, 52035136U, 52164032U, 52297664U, 52427968U,
|
||||
52557376U, 52690112U, 52821952U, 52952896U, 53081536U, 53213504U, 53344576U,
|
||||
53475776U, 53608384U, 53738816U, 53870528U, 54000832U, 54131776U, 54263744U,
|
||||
54394688U, 54525248U, 54655936U, 54787904U, 54918592U, 55049152U, 55181248U,
|
||||
55312064U, 55442752U, 55574336U, 55705024U, 55836224U, 55967168U, 56097856U,
|
||||
56228672U, 56358592U, 56490176U, 56621888U, 56753728U, 56884928U, 57015488U,
|
||||
57146816U, 57278272U, 57409216U, 57540416U, 57671104U, 57802432U, 57933632U,
|
||||
58064576U, 58195264U, 58326976U, 58457408U, 58588864U, 58720192U, 58849984U,
|
||||
58981696U, 59113024U, 59243456U, 59375552U, 59506624U, 59637568U, 59768512U,
|
||||
59897792U, 60030016U, 60161984U, 60293056U, 60423872U, 60554432U, 60683968U,
|
||||
60817216U, 60948032U, 61079488U, 61209664U, 61341376U, 61471936U, 61602752U,
|
||||
61733696U, 61865792U, 61996736U, 62127808U, 62259136U, 62389568U, 62520512U,
|
||||
62651584U, 62781632U, 62910784U, 63045056U, 63176128U, 63307072U, 63438656U,
|
||||
63569216U, 63700928U, 63831616U, 63960896U, 64093888U, 64225088U, 64355392U,
|
||||
64486976U, 64617664U, 64748608U, 64879424U, 65009216U, 65142464U, 65273792U,
|
||||
65402816U, 65535424U, 65666752U, 65797696U, 65927744U, 66060224U, 66191296U,
|
||||
66321344U, 66453056U, 66584384U, 66715328U, 66846656U, 66977728U, 67108672U,
|
||||
67239104U, 67370432U, 67501888U, 67631296U, 67763776U, 67895104U, 68026304U,
|
||||
68157248U, 68287936U, 68419264U, 68548288U, 68681408U, 68811968U, 68942912U,
|
||||
69074624U, 69205568U, 69337024U, 69467584U, 69599168U, 69729472U, 69861184U,
|
||||
69989824U, 70122944U, 70253888U, 70385344U, 70515904U, 70647232U, 70778816U,
|
||||
70907968U, 71040832U, 71171648U, 71303104U, 71432512U, 71564992U, 71695168U,
|
||||
71826368U, 71958464U, 72089536U, 72219712U, 72350144U, 72482624U, 72613568U,
|
||||
72744512U, 72875584U, 73006144U, 73138112U, 73268672U, 73400128U, 73530944U,
|
||||
73662272U, 73793344U, 73924544U, 74055104U, 74185792U, 74316992U, 74448832U,
|
||||
74579392U, 74710976U, 74841664U, 74972864U, 75102784U, 75233344U, 75364544U,
|
||||
75497024U, 75627584U, 75759296U, 75890624U, 76021696U, 76152256U, 76283072U,
|
||||
76414144U, 76545856U, 76676672U, 76806976U, 76937792U, 77070016U, 77200832U,
|
||||
77331392U, 77462464U, 77593664U, 77725376U, 77856448U, 77987776U, 78118336U,
|
||||
78249664U, 78380992U, 78511424U, 78642496U, 78773056U, 78905152U, 79033664U,
|
||||
79166656U, 79297472U, 79429568U, 79560512U, 79690816U, 79822784U, 79953472U,
|
||||
80084672U, 80214208U, 80346944U, 80477632U, 80608576U, 80740288U, 80870848U,
|
||||
81002048U, 81133504U, 81264448U, 81395648U, 81525952U, 81657536U, 81786304U,
|
||||
81919808U, 82050112U, 82181312U, 82311616U, 82443968U, 82573376U, 82705984U,
|
||||
82835776U, 82967744U, 83096768U, 83230528U, 83359552U, 83491264U, 83622464U,
|
||||
83753536U, 83886016U, 84015296U, 84147776U, 84277184U, 84409792U, 84540608U,
|
||||
84672064U, 84803008U, 84934336U, 85065152U, 85193792U, 85326784U, 85458496U,
|
||||
85589312U, 85721024U, 85851968U, 85982656U, 86112448U, 86244416U, 86370112U,
|
||||
86506688U, 86637632U, 86769344U, 86900672U, 87031744U, 87162304U, 87293632U,
|
||||
87424576U, 87555392U, 87687104U, 87816896U, 87947968U, 88079168U, 88211264U,
|
||||
88341824U, 88473152U, 88603712U, 88735424U, 88862912U, 88996672U, 89128384U,
|
||||
89259712U, 89390272U, 89521984U, 89652544U, 89783872U, 89914816U, 90045376U,
|
||||
90177088U, 90307904U, 90438848U, 90569152U, 90700096U, 90832832U, 90963776U,
|
||||
91093696U, 91223744U, 91356992U, 91486784U, 91618496U, 91749824U, 91880384U,
|
||||
92012224U, 92143552U, 92273344U, 92405696U, 92536768U, 92666432U, 92798912U,
|
||||
92926016U, 93060544U, 93192128U, 93322816U, 93453632U, 93583936U, 93715136U,
|
||||
93845056U, 93977792U, 94109504U, 94240448U, 94371776U, 94501184U, 94632896U,
|
||||
94764224U, 94895552U, 95023424U, 95158208U, 95287744U, 95420224U, 95550016U,
|
||||
95681216U, 95811904U, 95943872U, 96075328U, 96203584U, 96337856U, 96468544U,
|
||||
96599744U, 96731072U, 96860992U, 96992576U, 97124288U, 97254848U, 97385536U,
|
||||
97517248U, 97647808U, 97779392U, 97910464U, 98041408U, 98172608U, 98303168U,
|
||||
98434496U, 98565568U, 98696768U, 98827328U, 98958784U, 99089728U, 99220928U,
|
||||
99352384U, 99482816U, 99614272U, 99745472U, 99876416U, 100007104U,
|
||||
100138048U, 100267072U, 100401088U, 100529984U, 100662592U, 100791872U,
|
||||
100925248U, 101056064U, 101187392U, 101317952U, 101449408U, 101580608U,
|
||||
101711296U, 101841728U, 101973824U, 102104896U, 102235712U, 102366016U,
|
||||
102498112U, 102628672U, 102760384U, 102890432U, 103021888U, 103153472U,
|
||||
103284032U, 103415744U, 103545152U, 103677248U, 103808576U, 103939648U,
|
||||
104070976U, 104201792U, 104332736U, 104462528U, 104594752U, 104725952U,
|
||||
104854592U, 104988608U, 105118912U, 105247808U, 105381184U, 105511232U,
|
||||
105643072U, 105774784U, 105903296U, 106037056U, 106167872U, 106298944U,
|
||||
106429504U, 106561472U, 106691392U, 106822592U, 106954304U, 107085376U,
|
||||
107216576U, 107346368U, 107478464U, 107609792U, 107739712U, 107872192U,
|
||||
108003136U, 108131392U, 108265408U, 108396224U, 108527168U, 108657344U,
|
||||
108789568U, 108920384U, 109049792U, 109182272U, 109312576U, 109444928U,
|
||||
109572928U, 109706944U, 109837888U, 109969088U, 110099648U, 110230976U,
|
||||
110362432U, 110492992U, 110624704U, 110755264U, 110886208U, 111017408U,
|
||||
111148864U, 111279296U, 111410752U, 111541952U, 111673024U, 111803456U,
|
||||
111933632U, 112066496U, 112196416U, 112328512U, 112457792U, 112590784U,
|
||||
112715968U, 112852672U, 112983616U, 113114944U, 113244224U, 113376448U,
|
||||
113505472U, 113639104U, 113770304U, 113901376U, 114031552U, 114163264U,
|
||||
114294592U, 114425536U, 114556864U, 114687424U, 114818624U, 114948544U,
|
||||
115080512U, 115212224U, 115343296U, 115473472U, 115605184U, 115736128U,
|
||||
115867072U, 115997248U, 116128576U, 116260288U, 116391488U, 116522944U,
|
||||
116652992U, 116784704U, 116915648U, 117046208U, 117178304U, 117308608U,
|
||||
117440192U, 117569728U, 117701824U, 117833024U, 117964096U, 118094656U,
|
||||
118225984U, 118357312U, 118489024U, 118617536U, 118749632U, 118882112U,
|
||||
119012416U, 119144384U, 119275328U, 119406016U, 119537344U, 119668672U,
|
||||
119798464U, 119928896U, 120061376U, 120192832U, 120321728U, 120454336U,
|
||||
120584512U, 120716608U, 120848192U, 120979136U, 121109056U, 121241408U,
|
||||
121372352U, 121502912U, 121634752U, 121764416U, 121895744U, 122027072U,
|
||||
122157632U, 122289088U, 122421184U, 122550592U, 122682944U, 122813888U,
|
||||
122945344U, 123075776U, 123207488U, 123338048U, 123468736U, 123600704U,
|
||||
123731264U, 123861952U, 123993664U, 124124608U, 124256192U, 124386368U,
|
||||
124518208U, 124649024U, 124778048U, 124911296U, 125041088U, 125173696U,
|
||||
125303744U, 125432896U, 125566912U, 125696576U, 125829056U, 125958592U,
|
||||
126090304U, 126221248U, 126352832U, 126483776U, 126615232U, 126746432U,
|
||||
126876608U, 127008704U, 127139392U, 127270336U, 127401152U, 127532224U,
|
||||
127663552U, 127794752U, 127925696U, 128055232U, 128188096U, 128319424U,
|
||||
128449856U, 128581312U, 128712256U, 128843584U, 128973632U, 129103808U,
|
||||
129236288U, 129365696U, 129498944U, 129629888U, 129760832U, 129892288U,
|
||||
130023104U, 130154048U, 130283968U, 130416448U, 130547008U, 130678336U,
|
||||
130807616U, 130939456U, 131071552U, 131202112U, 131331776U, 131464384U,
|
||||
131594048U, 131727296U, 131858368U, 131987392U, 132120256U, 132250816U,
|
||||
132382528U, 132513728U, 132644672U, 132774976U, 132905792U, 133038016U,
|
||||
133168832U, 133299392U, 133429312U, 133562048U, 133692992U, 133823296U,
|
||||
133954624U, 134086336U, 134217152U, 134348608U, 134479808U, 134607296U,
|
||||
134741056U, 134872384U, 135002944U, 135134144U, 135265472U, 135396544U,
|
||||
135527872U, 135659072U, 135787712U, 135921472U, 136052416U, 136182848U,
|
||||
136313792U, 136444864U, 136576448U, 136707904U, 136837952U, 136970048U,
|
||||
137099584U, 137232064U, 137363392U, 137494208U, 137625536U, 137755712U,
|
||||
137887424U, 138018368U, 138149824U, 138280256U, 138411584U, 138539584U,
|
||||
138672832U, 138804928U, 138936128U, 139066688U, 139196864U, 139328704U,
|
||||
139460032U, 139590208U, 139721024U, 139852864U, 139984576U, 140115776U,
|
||||
140245696U, 140376512U, 140508352U, 140640064U, 140769856U, 140902336U,
|
||||
141032768U, 141162688U, 141294016U, 141426496U, 141556544U, 141687488U,
|
||||
141819584U, 141949888U, 142080448U, 142212544U, 142342336U, 142474432U,
|
||||
142606144U, 142736192U, 142868288U, 142997824U, 143129408U, 143258944U,
|
||||
143392448U, 143523136U, 143653696U, 143785024U, 143916992U, 144045632U,
|
||||
144177856U, 144309184U, 144440768U, 144570688U, 144701888U, 144832448U,
|
||||
144965056U, 145096384U, 145227584U, 145358656U, 145489856U, 145620928U,
|
||||
145751488U, 145883072U, 146011456U, 146144704U, 146275264U, 146407232U,
|
||||
146538176U, 146668736U, 146800448U, 146931392U, 147062336U, 147193664U,
|
||||
147324224U, 147455936U, 147586624U, 147717056U, 147848768U, 147979456U,
|
||||
148110784U, 148242368U, 148373312U, 148503232U, 148635584U, 148766144U,
|
||||
148897088U, 149028416U, 149159488U, 149290688U, 149420224U, 149551552U,
|
||||
149683136U, 149814976U, 149943616U, 150076352U, 150208064U, 150338624U,
|
||||
150470464U, 150600256U, 150732224U, 150862784U, 150993088U, 151125952U,
|
||||
151254976U, 151388096U, 151519168U, 151649728U, 151778752U, 151911104U,
|
||||
152042944U, 152174144U, 152304704U, 152435648U, 152567488U, 152698816U,
|
||||
152828992U, 152960576U, 153091648U, 153222976U, 153353792U, 153484096U,
|
||||
153616192U, 153747008U, 153878336U, 154008256U, 154139968U, 154270912U,
|
||||
154402624U, 154533824U, 154663616U, 154795712U, 154926272U, 155057984U,
|
||||
155188928U, 155319872U, 155450816U, 155580608U, 155712064U, 155843392U,
|
||||
155971136U, 156106688U, 156237376U, 156367424U, 156499264U, 156630976U,
|
||||
156761536U, 156892352U, 157024064U, 157155008U, 157284416U, 157415872U,
|
||||
157545536U, 157677248U, 157810496U, 157938112U, 158071744U, 158203328U,
|
||||
158334656U, 158464832U, 158596288U, 158727616U, 158858048U, 158988992U,
|
||||
159121216U, 159252416U, 159381568U, 159513152U, 159645632U, 159776192U,
|
||||
159906496U, 160038464U, 160169536U, 160300352U, 160430656U, 160563008U,
|
||||
160693952U, 160822208U, 160956352U, 161086784U, 161217344U, 161349184U,
|
||||
161480512U, 161611456U, 161742272U, 161873216U, 162002752U, 162135872U,
|
||||
162266432U, 162397888U, 162529216U, 162660032U, 162790976U, 162922048U,
|
||||
163052096U, 163184576U, 163314752U, 163446592U, 163577408U, 163707968U,
|
||||
163839296U, 163969984U, 164100928U, 164233024U, 164364224U, 164494912U,
|
||||
164625856U, 164756672U, 164887616U, 165019072U, 165150016U, 165280064U,
|
||||
165412672U, 165543104U, 165674944U, 165805888U, 165936832U, 166067648U,
|
||||
166198336U, 166330048U, 166461248U, 166591552U, 166722496U, 166854208U,
|
||||
166985408U, 167116736U, 167246656U, 167378368U, 167508416U, 167641024U,
|
||||
167771584U, 167903168U, 168034112U, 168164032U, 168295744U, 168427456U,
|
||||
168557632U, 168688448U, 168819136U, 168951616U, 169082176U, 169213504U,
|
||||
169344832U, 169475648U, 169605952U, 169738048U, 169866304U, 169999552U,
|
||||
170131264U, 170262464U, 170393536U, 170524352U, 170655424U, 170782016U,
|
||||
170917696U, 171048896U, 171179072U, 171310784U, 171439936U, 171573184U,
|
||||
171702976U, 171835072U, 171966272U, 172097216U, 172228288U, 172359232U,
|
||||
172489664U, 172621376U, 172747712U, 172883264U, 173014208U, 173144512U,
|
||||
173275072U, 173407424U, 173539136U, 173669696U, 173800768U, 173931712U,
|
||||
174063424U, 174193472U, 174325696U, 174455744U, 174586816U, 174718912U,
|
||||
174849728U, 174977728U, 175109696U, 175242688U, 175374272U, 175504832U,
|
||||
175636288U, 175765696U, 175898432U, 176028992U, 176159936U, 176291264U,
|
||||
176422592U, 176552512U, 176684864U, 176815424U, 176946496U, 177076544U,
|
||||
177209152U, 177340096U, 177470528U, 177600704U, 177731648U, 177864256U,
|
||||
177994816U, 178126528U, 178257472U, 178387648U, 178518464U, 178650176U,
|
||||
178781888U, 178912064U, 179044288U, 179174848U, 179305024U, 179436736U,
|
||||
179568448U, 179698496U, 179830208U, 179960512U, 180092608U, 180223808U,
|
||||
180354752U, 180485696U, 180617152U, 180748096U, 180877504U, 181009984U,
|
||||
181139264U, 181272512U, 181402688U, 181532608U, 181663168U, 181795136U,
|
||||
181926592U, 182057536U, 182190016U, 182320192U, 182451904U, 182582336U,
|
||||
182713792U, 182843072U, 182976064U, 183107264U, 183237056U, 183368384U,
|
||||
183494848U, 183631424U, 183762752U, 183893824U, 184024768U, 184154816U,
|
||||
184286656U, 184417984U, 184548928U, 184680128U, 184810816U, 184941248U,
|
||||
185072704U, 185203904U, 185335616U, 185465408U, 185596352U, 185727296U,
|
||||
185859904U, 185989696U, 186121664U, 186252992U, 186383552U, 186514112U,
|
||||
186645952U, 186777152U, 186907328U, 187037504U, 187170112U, 187301824U,
|
||||
187429184U, 187562048U, 187693504U, 187825472U, 187957184U, 188087104U,
|
||||
188218304U, 188349376U, 188481344U, 188609728U, 188743616U, 188874304U,
|
||||
189005248U, 189136448U, 189265088U, 189396544U, 189528128U, 189660992U,
|
||||
189791936U, 189923264U, 190054208U, 190182848U, 190315072U, 190447424U,
|
||||
190577984U, 190709312U, 190840768U, 190971328U, 191102656U, 191233472U,
|
||||
191364032U, 191495872U, 191626816U, 191758016U, 191888192U, 192020288U,
|
||||
192148928U, 192282176U, 192413504U, 192542528U, 192674752U, 192805952U,
|
||||
192937792U, 193068608U, 193198912U, 193330496U, 193462208U, 193592384U,
|
||||
193723456U, 193854272U, 193985984U, 194116672U, 194247232U, 194379712U,
|
||||
194508352U, 194641856U, 194772544U, 194900672U, 195035072U, 195166016U,
|
||||
195296704U, 195428032U, 195558592U, 195690304U, 195818176U, 195952576U,
|
||||
196083392U, 196214336U, 196345792U, 196476736U, 196607552U, 196739008U,
|
||||
196869952U, 197000768U, 197130688U, 197262784U, 197394368U, 197523904U,
|
||||
197656384U, 197787584U, 197916608U, 198049472U, 198180544U, 198310208U,
|
||||
198442432U, 198573632U, 198705088U, 198834368U, 198967232U, 199097792U,
|
||||
199228352U, 199360192U, 199491392U, 199621696U, 199751744U, 199883968U,
|
||||
200014016U, 200146624U, 200276672U, 200408128U, 200540096U, 200671168U,
|
||||
200801984U, 200933312U, 201062464U, 201194944U, 201326144U, 201457472U,
|
||||
201588544U, 201719744U, 201850816U, 201981632U, 202111552U, 202244032U,
|
||||
202374464U, 202505152U, 202636352U, 202767808U, 202898368U, 203030336U,
|
||||
203159872U, 203292608U, 203423296U, 203553472U, 203685824U, 203816896U,
|
||||
203947712U, 204078272U, 204208192U, 204341056U, 204472256U, 204603328U,
|
||||
204733888U, 204864448U, 204996544U, 205125568U, 205258304U, 205388864U,
|
||||
205517632U, 205650112U, 205782208U, 205913536U, 206044736U, 206176192U,
|
||||
206307008U, 206434496U, 206569024U, 206700224U, 206831168U, 206961856U,
|
||||
207093056U, 207223616U, 207355328U, 207486784U, 207616832U, 207749056U,
|
||||
207879104U, 208010048U, 208141888U, 208273216U, 208404032U, 208534336U,
|
||||
208666048U, 208796864U, 208927424U, 209059264U, 209189824U, 209321792U,
|
||||
209451584U, 209582656U, 209715136U, 209845568U, 209976896U, 210106432U,
|
||||
210239296U, 210370112U, 210501568U, 210630976U, 210763712U, 210894272U,
|
||||
211024832U, 211156672U, 211287616U, 211418176U, 211549376U, 211679296U,
|
||||
211812032U, 211942592U, 212074432U, 212204864U, 212334016U, 212467648U,
|
||||
212597824U, 212727616U, 212860352U, 212991424U, 213120832U, 213253952U,
|
||||
213385024U, 213515584U, 213645632U, 213777728U, 213909184U, 214040128U,
|
||||
214170688U, 214302656U, 214433728U, 214564544U, 214695232U, 214826048U,
|
||||
214956992U, 215089088U, 215219776U, 215350592U, 215482304U, 215613248U,
|
||||
215743552U, 215874752U, 216005312U, 216137024U, 216267328U, 216399296U,
|
||||
216530752U, 216661696U, 216790592U, 216923968U, 217054528U, 217183168U,
|
||||
217316672U, 217448128U, 217579072U, 217709504U, 217838912U, 217972672U,
|
||||
218102848U, 218233024U, 218364736U, 218496832U, 218627776U, 218759104U,
|
||||
218888896U, 219021248U, 219151936U, 219281728U, 219413056U, 219545024U,
|
||||
219675968U, 219807296U, 219938624U, 220069312U, 220200128U, 220331456U,
|
||||
220461632U, 220592704U, 220725184U, 220855744U, 220987072U, 221117888U,
|
||||
221249216U, 221378368U, 221510336U, 221642048U, 221772736U, 221904832U,
|
||||
222031808U, 222166976U, 222297536U, 222428992U, 222559936U, 222690368U,
|
||||
222820672U, 222953152U, 223083968U, 223213376U, 223345984U, 223476928U,
|
||||
223608512U, 223738688U, 223869376U, 224001472U, 224132672U, 224262848U,
|
||||
224394944U, 224524864U, 224657344U, 224788288U, 224919488U, 225050432U,
|
||||
225181504U, 225312704U, 225443776U, 225574592U, 225704768U, 225834176U,
|
||||
225966784U, 226097216U, 226229824U, 226360384U, 226491712U, 226623424U,
|
||||
226754368U, 226885312U, 227015104U, 227147456U, 227278528U, 227409472U,
|
||||
227539904U, 227669696U, 227802944U, 227932352U, 228065216U, 228196288U,
|
||||
228326464U, 228457792U, 228588736U, 228720064U, 228850112U, 228981056U,
|
||||
229113152U, 229243328U, 229375936U, 229505344U, 229636928U, 229769152U,
|
||||
229894976U, 230030272U, 230162368U, 230292416U, 230424512U, 230553152U,
|
||||
230684864U, 230816704U, 230948416U, 231079616U, 231210944U, 231342016U,
|
||||
231472448U, 231603776U, 231733952U, 231866176U, 231996736U, 232127296U,
|
||||
232259392U, 232388672U, 232521664U, 232652608U, 232782272U, 232914496U,
|
||||
233043904U, 233175616U, 233306816U, 233438528U, 233569984U, 233699776U,
|
||||
233830592U, 233962688U, 234092224U, 234221888U, 234353984U, 234485312U,
|
||||
234618304U, 234749888U, 234880832U, 235011776U, 235142464U, 235274048U,
|
||||
235403456U, 235535936U, 235667392U, 235797568U, 235928768U, 236057152U,
|
||||
236190272U, 236322752U, 236453312U, 236583616U, 236715712U, 236846528U,
|
||||
236976448U, 237108544U, 237239104U, 237371072U, 237501632U, 237630784U,
|
||||
237764416U, 237895232U, 238026688U, 238157632U, 238286912U, 238419392U,
|
||||
238548032U, 238681024U, 238812608U, 238941632U, 239075008U, 239206336U,
|
||||
239335232U, 239466944U, 239599168U, 239730496U, 239861312U, 239992384U,
|
||||
240122816U, 240254656U, 240385856U, 240516928U, 240647872U, 240779072U,
|
||||
240909632U, 241040704U, 241171904U, 241302848U, 241433408U, 241565248U,
|
||||
241696192U, 241825984U, 241958848U, 242088256U, 242220224U, 242352064U,
|
||||
242481856U, 242611648U, 242744896U, 242876224U, 243005632U, 243138496U,
|
||||
243268672U, 243400384U, 243531712U, 243662656U, 243793856U, 243924544U,
|
||||
244054592U, 244187072U, 244316608U, 244448704U, 244580032U, 244710976U,
|
||||
244841536U, 244972864U, 245104448U, 245233984U, 245365312U, 245497792U,
|
||||
245628736U, 245759936U, 245889856U, 246021056U, 246152512U, 246284224U,
|
||||
246415168U, 246545344U, 246675904U, 246808384U, 246939584U, 247070144U,
|
||||
247199552U, 247331648U, 247463872U, 247593536U, 247726016U, 247857088U,
|
||||
247987648U, 248116928U, 248249536U, 248380736U, 248512064U, 248643008U,
|
||||
248773312U, 248901056U, 249036608U, 249167552U, 249298624U, 249429184U,
|
||||
249560512U, 249692096U, 249822784U, 249954112U, 250085312U, 250215488U,
|
||||
250345792U, 250478528U, 250608704U, 250739264U, 250870976U, 251002816U,
|
||||
251133632U, 251263552U, 251395136U, 251523904U, 251657792U, 251789248U,
|
||||
251919424U, 252051392U, 252182464U, 252313408U, 252444224U, 252575552U,
|
||||
252706624U, 252836032U, 252968512U, 253099712U, 253227584U, 253361728U,
|
||||
253493056U, 253623488U, 253754432U, 253885504U, 254017216U, 254148032U,
|
||||
254279488U, 254410432U, 254541376U, 254672576U, 254803264U, 254933824U,
|
||||
255065792U, 255196736U, 255326528U, 255458752U, 255589952U, 255721408U,
|
||||
255851072U, 255983296U, 256114624U, 256244416U, 256374208U, 256507712U,
|
||||
256636096U, 256768832U, 256900544U, 257031616U, 257162176U, 257294272U,
|
||||
257424448U, 257555776U, 257686976U, 257818432U, 257949632U, 258079552U,
|
||||
258211136U, 258342464U, 258473408U, 258603712U, 258734656U, 258867008U,
|
||||
258996544U, 259127744U, 259260224U, 259391296U, 259522112U, 259651904U,
|
||||
259784384U, 259915328U, 260045888U, 260175424U, 260308544U, 260438336U,
|
||||
260570944U, 260700992U, 260832448U, 260963776U, 261092672U, 261226304U,
|
||||
261356864U, 261487936U, 261619648U, 261750592U, 261879872U, 262011968U,
|
||||
262143424U, 262274752U, 262404416U, 262537024U, 262667968U, 262799296U,
|
||||
262928704U, 263061184U, 263191744U, 263322944U, 263454656U, 263585216U,
|
||||
263716672U, 263847872U, 263978944U, 264108608U, 264241088U, 264371648U,
|
||||
264501184U, 264632768U, 264764096U, 264895936U, 265024576U, 265158464U,
|
||||
265287488U, 265418432U, 265550528U, 265681216U, 265813312U, 265943488U,
|
||||
266075968U, 266206144U, 266337728U, 266468032U, 266600384U, 266731072U,
|
||||
266862272U, 266993344U, 267124288U, 267255616U, 267386432U, 267516992U,
|
||||
267648704U, 267777728U, 267910592U, 268040512U, 268172096U, 268302784U,
|
||||
268435264U, 268566208U, 268696256U, 268828096U, 268959296U, 269090368U,
|
||||
269221312U, 269352256U, 269482688U, 269614784U, 269745856U, 269876416U,
|
||||
270007616U, 270139328U, 270270272U, 270401216U, 270531904U, 270663616U,
|
||||
270791744U, 270924736U, 271056832U, 271186112U, 271317184U, 271449536U,
|
||||
271580992U, 271711936U, 271843136U, 271973056U, 272105408U, 272236352U,
|
||||
272367296U, 272498368U, 272629568U, 272759488U, 272891456U, 273022784U,
|
||||
273153856U, 273284672U, 273415616U, 273547072U, 273677632U, 273808448U,
|
||||
273937088U, 274071488U, 274200896U, 274332992U, 274463296U, 274595392U,
|
||||
274726208U, 274857536U, 274988992U, 275118656U, 275250496U, 275382208U,
|
||||
275513024U, 275643968U, 275775296U, 275906368U, 276037184U, 276167872U,
|
||||
276297664U, 276429376U, 276560576U, 276692672U, 276822976U, 276955072U,
|
||||
277085632U, 277216832U, 277347008U, 277478848U, 277609664U, 277740992U,
|
||||
277868608U, 278002624U, 278134336U, 278265536U, 278395328U, 278526784U,
|
||||
278657728U, 278789824U, 278921152U, 279052096U, 279182912U, 279313088U,
|
||||
279443776U, 279576256U, 279706048U, 279838528U, 279969728U, 280099648U,
|
||||
280230976U, 280361408U, 280493632U, 280622528U, 280755392U, 280887104U,
|
||||
281018176U, 281147968U, 281278912U, 281411392U, 281542592U, 281673152U,
|
||||
281803712U, 281935552U, 282066496U, 282197312U, 282329024U, 282458816U,
|
||||
282590272U, 282720832U, 282853184U, 282983744U, 283115072U, 283246144U,
|
||||
283377344U, 283508416U, 283639744U, 283770304U, 283901504U, 284032576U,
|
||||
284163136U, 284294848U, 284426176U, 284556992U, 284687296U, 284819264U,
|
||||
284950208U, 285081536U
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
72
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/endian.h
generated
vendored
Normal file
72
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/endian.h
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "compiler.h"
|
||||
|
||||
#if defined(__MINGW32__) || defined(_WIN32)
|
||||
# define LITTLE_ENDIAN 1234
|
||||
# define BYTE_ORDER LITTLE_ENDIAN
|
||||
#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__)
|
||||
# include <sys/endian.h>
|
||||
#elif defined(__OpenBSD__) || defined(__SVR4)
|
||||
# include <sys/types.h>
|
||||
#elif defined(__APPLE__)
|
||||
# include <machine/endian.h>
|
||||
#elif defined( BSD ) && (BSD >= 199103)
|
||||
# include <machine/endian.h>
|
||||
#elif defined( __QNXNTO__ ) && defined( __LITTLEENDIAN__ )
|
||||
# define LITTLE_ENDIAN 1234
|
||||
# define BYTE_ORDER LITTLE_ENDIAN
|
||||
#elif defined( __QNXNTO__ ) && defined( __BIGENDIAN__ )
|
||||
# define BIG_ENDIAN 1234
|
||||
# define BYTE_ORDER BIG_ENDIAN
|
||||
#else
|
||||
# include <endian.h>
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <stdlib.h>
|
||||
#define ethash_swap_u32(input_) _byteswap_ulong(input_)
|
||||
#define ethash_swap_u64(input_) _byteswap_uint64(input_)
|
||||
#elif defined(__APPLE__)
|
||||
#include <libkern/OSByteOrder.h>
|
||||
#define ethash_swap_u32(input_) OSSwapInt32(input_)
|
||||
#define ethash_swap_u64(input_) OSSwapInt64(input_)
|
||||
#else // posix
|
||||
#include <byteswap.h>
|
||||
#define ethash_swap_u32(input_) __bswap_32(input_)
|
||||
#define ethash_swap_u64(input_) __bswap_64(input_)
|
||||
#endif
|
||||
|
||||
|
||||
#if LITTLE_ENDIAN == BYTE_ORDER
|
||||
|
||||
#define fix_endian32(dst_ ,src_) dst_ = src_
|
||||
#define fix_endian32_same(val_)
|
||||
#define fix_endian64(dst_, src_) dst_ = src_
|
||||
#define fix_endian64_same(val_)
|
||||
#define fix_endian_arr32(arr_, size_)
|
||||
#define fix_endian_arr64(arr_, size_)
|
||||
|
||||
#elif BIG_ENDIAN == BYTE_ORDER
|
||||
|
||||
#define fix_endian32(dst_, src_) dst_ = ethash_swap_u32(src_)
|
||||
#define fix_endian32_same(val_) val_ = ethash_swap_u32(val_)
|
||||
#define fix_endian64(dst_, src_) dst_ = ethash_swap_u64(src_
|
||||
#define fix_endian64_same(val_) val_ = ethash_swap_u64(val_)
|
||||
#define fix_endian_arr32(arr_, size_) \
|
||||
do { \
|
||||
for (unsigned i_ = 0; i_ < (size_), ++i_) { \
|
||||
arr_[i_] = ethash_swap_u32(arr_[i_]); \
|
||||
} \
|
||||
while (0)
|
||||
#define fix_endian_arr64(arr_, size_) \
|
||||
do { \
|
||||
for (unsigned i_ = 0; i_ < (size_), ++i_) { \
|
||||
arr_[i_] = ethash_swap_u64(arr_[i_]); \
|
||||
} \
|
||||
while (0) \
|
||||
|
||||
#else
|
||||
# error "endian not supported"
|
||||
#endif // BYTE_ORDER
|
||||
147
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/ethash.h
generated
vendored
Normal file
147
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/ethash.h
generated
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
/*
|
||||
This file is part of ethash.
|
||||
|
||||
ethash is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ethash is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with ethash. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file ethash.h
|
||||
* @date 2015
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <stddef.h>
|
||||
#include "compiler.h"
|
||||
|
||||
#define ETHASH_REVISION 23
|
||||
#define ETHASH_DATASET_BYTES_INIT 1073741824U // 2**30
|
||||
#define ETHASH_DATASET_BYTES_GROWTH 8388608U // 2**23
|
||||
#define ETHASH_CACHE_BYTES_INIT 1073741824U // 2**24
|
||||
#define ETHASH_CACHE_BYTES_GROWTH 131072U // 2**17
|
||||
#define ETHASH_EPOCH_LENGTH 30000U
|
||||
#define ETHASH_MIX_BYTES 128
|
||||
#define ETHASH_HASH_BYTES 64
|
||||
#define ETHASH_DATASET_PARENTS 256
|
||||
#define ETHASH_CACHE_ROUNDS 3
|
||||
#define ETHASH_ACCESSES 64
|
||||
#define ETHASH_DAG_MAGIC_NUM_SIZE 8
|
||||
#define ETHASH_DAG_MAGIC_NUM 0xFEE1DEADBADDCAFE
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/// Type of a seedhash/blockhash e.t.c.
|
||||
typedef struct ethash_h256 { uint8_t b[32]; } ethash_h256_t;
|
||||
|
||||
// convenience macro to statically initialize an h256_t
|
||||
// usage:
|
||||
// ethash_h256_t a = ethash_h256_static_init(1, 2, 3, ... )
|
||||
// have to provide all 32 values. If you don't provide all the rest
|
||||
// will simply be unitialized (not guranteed to be 0)
|
||||
#define ethash_h256_static_init(...) \
|
||||
{ {__VA_ARGS__} }
|
||||
|
||||
struct ethash_light;
|
||||
typedef struct ethash_light* ethash_light_t;
|
||||
struct ethash_full;
|
||||
typedef struct ethash_full* ethash_full_t;
|
||||
typedef int(*ethash_callback_t)(unsigned);
|
||||
|
||||
typedef struct ethash_return_value {
|
||||
ethash_h256_t result;
|
||||
ethash_h256_t mix_hash;
|
||||
bool success;
|
||||
} ethash_return_value_t;
|
||||
|
||||
/**
|
||||
* Allocate and initialize a new ethash_light handler
|
||||
*
|
||||
* @param block_number The block number for which to create the handler
|
||||
* @return Newly allocated ethash_light handler or NULL in case of
|
||||
* ERRNOMEM or invalid parameters used for @ref ethash_compute_cache_nodes()
|
||||
*/
|
||||
ethash_light_t ethash_light_new(uint64_t block_number);
|
||||
/**
|
||||
* Frees a previously allocated ethash_light handler
|
||||
* @param light The light handler to free
|
||||
*/
|
||||
void ethash_light_delete(ethash_light_t light);
|
||||
/**
|
||||
* Calculate the light client data
|
||||
*
|
||||
* @param light The light client handler
|
||||
* @param header_hash The header hash to pack into the mix
|
||||
* @param nonce The nonce to pack into the mix
|
||||
* @return an object of ethash_return_value_t holding the return values
|
||||
*/
|
||||
ethash_return_value_t ethash_light_compute(
|
||||
ethash_light_t light,
|
||||
ethash_h256_t const header_hash,
|
||||
uint64_t nonce
|
||||
);
|
||||
|
||||
/**
|
||||
* Allocate and initialize a new ethash_full handler
|
||||
*
|
||||
* @param light The light handler containing the cache.
|
||||
* @param callback A callback function with signature of @ref ethash_callback_t
|
||||
* It accepts an unsigned with which a progress of DAG calculation
|
||||
* can be displayed. If all goes well the callback should return 0.
|
||||
* If a non-zero value is returned then DAG generation will stop.
|
||||
* Be advised. A progress value of 100 means that DAG creation is
|
||||
* almost complete and that this function will soon return succesfully.
|
||||
* It does not mean that the function has already had a succesfull return.
|
||||
* @return Newly allocated ethash_full handler or NULL in case of
|
||||
* ERRNOMEM or invalid parameters used for @ref ethash_compute_full_data()
|
||||
*/
|
||||
ethash_full_t ethash_full_new(ethash_light_t light, ethash_callback_t callback);
|
||||
|
||||
/**
|
||||
* Frees a previously allocated ethash_full handler
|
||||
* @param full The light handler to free
|
||||
*/
|
||||
void ethash_full_delete(ethash_full_t full);
|
||||
/**
|
||||
* Calculate the full client data
|
||||
*
|
||||
* @param full The full client handler
|
||||
* @param header_hash The header hash to pack into the mix
|
||||
* @param nonce The nonce to pack into the mix
|
||||
* @return An object of ethash_return_value to hold the return value
|
||||
*/
|
||||
ethash_return_value_t ethash_full_compute(
|
||||
ethash_full_t full,
|
||||
ethash_h256_t const header_hash,
|
||||
uint64_t nonce
|
||||
);
|
||||
/**
|
||||
* Get a pointer to the full DAG data
|
||||
*/
|
||||
void const* ethash_full_dag(ethash_full_t full);
|
||||
/**
|
||||
* Get the size of the DAG data
|
||||
*/
|
||||
uint64_t ethash_full_dag_size(ethash_full_t full);
|
||||
|
||||
/**
|
||||
* Calculate the seedhash for a given block number
|
||||
*/
|
||||
ethash_h256_t ethash_get_seedhash(uint64_t block_number);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
39
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/fnv.h
generated
vendored
Normal file
39
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/fnv.h
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
This file is part of cpp-ethereum.
|
||||
|
||||
cpp-ethereum is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
cpp-ethereum is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** @file fnv.h
|
||||
* @author Matthew Wampler-Doty <negacthulhu@gmail.com>
|
||||
* @date 2015
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
#include "compiler.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define FNV_PRIME 0x01000193
|
||||
|
||||
static inline uint32_t fnv_hash(uint32_t const x, uint32_t const y)
|
||||
{
|
||||
return x * FNV_PRIME ^ y;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
496
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.c
generated
vendored
Normal file
496
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.c
generated
vendored
Normal file
@@ -0,0 +1,496 @@
|
||||
/*
|
||||
This file is part of ethash.
|
||||
|
||||
ethash is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ethash is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** @file internal.c
|
||||
* @author Tim Hughes <tim@twistedfury.com>
|
||||
* @author Matthew Wampler-Doty
|
||||
* @date 2015
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <stddef.h>
|
||||
#include <errno.h>
|
||||
#include <math.h>
|
||||
#include "mmap.h"
|
||||
#include "ethash.h"
|
||||
#include "fnv.h"
|
||||
#include "endian.h"
|
||||
#include "internal.h"
|
||||
#include "data_sizes.h"
|
||||
#include "io.h"
|
||||
|
||||
#ifdef WITH_CRYPTOPP
|
||||
|
||||
#include "sha3_cryptopp.h"
|
||||
|
||||
#else
|
||||
#include "sha3.h"
|
||||
#endif // WITH_CRYPTOPP
|
||||
|
||||
uint64_t ethash_get_datasize(uint64_t const block_number)
|
||||
{
|
||||
assert(block_number / ETHASH_EPOCH_LENGTH < 2048);
|
||||
return dag_sizes[block_number / ETHASH_EPOCH_LENGTH];
|
||||
}
|
||||
|
||||
uint64_t ethash_get_cachesize(uint64_t const block_number)
|
||||
{
|
||||
assert(block_number / ETHASH_EPOCH_LENGTH < 2048);
|
||||
return cache_sizes[block_number / ETHASH_EPOCH_LENGTH];
|
||||
}
|
||||
|
||||
// Follows Sergio's "STRICT MEMORY HARD HASHING FUNCTIONS" (2014)
|
||||
// https://bitslog.files.wordpress.com/2013/12/memohash-v0-3.pdf
|
||||
// SeqMemoHash(s, R, N)
|
||||
bool static ethash_compute_cache_nodes(
|
||||
node* const nodes,
|
||||
uint64_t cache_size,
|
||||
ethash_h256_t const* seed
|
||||
)
|
||||
{
|
||||
if (cache_size % sizeof(node) != 0) {
|
||||
return false;
|
||||
}
|
||||
uint32_t const num_nodes = (uint32_t) (cache_size / sizeof(node));
|
||||
|
||||
SHA3_512(nodes[0].bytes, (uint8_t*)seed, 32);
|
||||
|
||||
for (uint32_t i = 1; i != num_nodes; ++i) {
|
||||
SHA3_512(nodes[i].bytes, nodes[i - 1].bytes, 64);
|
||||
}
|
||||
|
||||
for (uint32_t j = 0; j != ETHASH_CACHE_ROUNDS; j++) {
|
||||
for (uint32_t i = 0; i != num_nodes; i++) {
|
||||
uint32_t const idx = nodes[i].words[0] % num_nodes;
|
||||
node data;
|
||||
data = nodes[(num_nodes - 1 + i) % num_nodes];
|
||||
for (uint32_t w = 0; w != NODE_WORDS; ++w) {
|
||||
data.words[w] ^= nodes[idx].words[w];
|
||||
}
|
||||
SHA3_512(nodes[i].bytes, data.bytes, sizeof(data));
|
||||
}
|
||||
}
|
||||
|
||||
// now perform endian conversion
|
||||
fix_endian_arr32(nodes->words, num_nodes * NODE_WORDS);
|
||||
return true;
|
||||
}
|
||||
|
||||
void ethash_calculate_dag_item(
|
||||
node* const ret,
|
||||
uint32_t node_index,
|
||||
ethash_light_t const light
|
||||
)
|
||||
{
|
||||
uint32_t num_parent_nodes = (uint32_t) (light->cache_size / sizeof(node));
|
||||
node const* cache_nodes = (node const *) light->cache;
|
||||
node const* init = &cache_nodes[node_index % num_parent_nodes];
|
||||
memcpy(ret, init, sizeof(node));
|
||||
ret->words[0] ^= node_index;
|
||||
SHA3_512(ret->bytes, ret->bytes, sizeof(node));
|
||||
#if defined(_M_X64) && ENABLE_SSE
|
||||
__m128i const fnv_prime = _mm_set1_epi32(FNV_PRIME);
|
||||
__m128i xmm0 = ret->xmm[0];
|
||||
__m128i xmm1 = ret->xmm[1];
|
||||
__m128i xmm2 = ret->xmm[2];
|
||||
__m128i xmm3 = ret->xmm[3];
|
||||
#endif
|
||||
|
||||
for (uint32_t i = 0; i != ETHASH_DATASET_PARENTS; ++i) {
|
||||
uint32_t parent_index = fnv_hash(node_index ^ i, ret->words[i % NODE_WORDS]) % num_parent_nodes;
|
||||
node const *parent = &cache_nodes[parent_index];
|
||||
|
||||
#if defined(_M_X64) && ENABLE_SSE
|
||||
{
|
||||
xmm0 = _mm_mullo_epi32(xmm0, fnv_prime);
|
||||
xmm1 = _mm_mullo_epi32(xmm1, fnv_prime);
|
||||
xmm2 = _mm_mullo_epi32(xmm2, fnv_prime);
|
||||
xmm3 = _mm_mullo_epi32(xmm3, fnv_prime);
|
||||
xmm0 = _mm_xor_si128(xmm0, parent->xmm[0]);
|
||||
xmm1 = _mm_xor_si128(xmm1, parent->xmm[1]);
|
||||
xmm2 = _mm_xor_si128(xmm2, parent->xmm[2]);
|
||||
xmm3 = _mm_xor_si128(xmm3, parent->xmm[3]);
|
||||
|
||||
// have to write to ret as values are used to compute index
|
||||
ret->xmm[0] = xmm0;
|
||||
ret->xmm[1] = xmm1;
|
||||
ret->xmm[2] = xmm2;
|
||||
ret->xmm[3] = xmm3;
|
||||
}
|
||||
#else
|
||||
{
|
||||
for (unsigned w = 0; w != NODE_WORDS; ++w) {
|
||||
ret->words[w] = fnv_hash(ret->words[w], parent->words[w]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
SHA3_512(ret->bytes, ret->bytes, sizeof(node));
|
||||
}
|
||||
|
||||
bool ethash_compute_full_data(
|
||||
void* mem,
|
||||
uint64_t full_size,
|
||||
ethash_light_t const light,
|
||||
ethash_callback_t callback
|
||||
)
|
||||
{
|
||||
if (full_size % (sizeof(uint32_t) * MIX_WORDS) != 0 ||
|
||||
(full_size % sizeof(node)) != 0) {
|
||||
return false;
|
||||
}
|
||||
uint32_t const max_n = (uint32_t)(full_size / sizeof(node));
|
||||
node* full_nodes = mem;
|
||||
double const progress_change = 1.0f / max_n;
|
||||
double progress = 0.0f;
|
||||
// now compute full nodes
|
||||
for (uint32_t n = 0; n != max_n; ++n) {
|
||||
if (callback &&
|
||||
n % (max_n / 100) == 0 &&
|
||||
callback((unsigned int)(ceil(progress * 100.0f))) != 0) {
|
||||
|
||||
return false;
|
||||
}
|
||||
progress += progress_change;
|
||||
ethash_calculate_dag_item(&(full_nodes[n]), n, light);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool ethash_hash(
|
||||
ethash_return_value_t* ret,
|
||||
node const* full_nodes,
|
||||
ethash_light_t const light,
|
||||
uint64_t full_size,
|
||||
ethash_h256_t const header_hash,
|
||||
uint64_t const nonce
|
||||
)
|
||||
{
|
||||
if (full_size % MIX_WORDS != 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// pack hash and nonce together into first 40 bytes of s_mix
|
||||
assert(sizeof(node) * 8 == 512);
|
||||
node s_mix[MIX_NODES + 1];
|
||||
memcpy(s_mix[0].bytes, &header_hash, 32);
|
||||
fix_endian64(s_mix[0].double_words[4], nonce);
|
||||
|
||||
// compute sha3-512 hash and replicate across mix
|
||||
SHA3_512(s_mix->bytes, s_mix->bytes, 40);
|
||||
fix_endian_arr32(s_mix[0].words, 16);
|
||||
|
||||
node* const mix = s_mix + 1;
|
||||
for (uint32_t w = 0; w != MIX_WORDS; ++w) {
|
||||
mix->words[w] = s_mix[0].words[w % NODE_WORDS];
|
||||
}
|
||||
|
||||
unsigned const page_size = sizeof(uint32_t) * MIX_WORDS;
|
||||
unsigned const num_full_pages = (unsigned) (full_size / page_size);
|
||||
|
||||
for (unsigned i = 0; i != ETHASH_ACCESSES; ++i) {
|
||||
uint32_t const index = fnv_hash(s_mix->words[0] ^ i, mix->words[i % MIX_WORDS]) % num_full_pages;
|
||||
|
||||
for (unsigned n = 0; n != MIX_NODES; ++n) {
|
||||
node const* dag_node;
|
||||
if (full_nodes) {
|
||||
dag_node = &full_nodes[MIX_NODES * index + n];
|
||||
} else {
|
||||
node tmp_node;
|
||||
ethash_calculate_dag_item(&tmp_node, index * MIX_NODES + n, light);
|
||||
dag_node = &tmp_node;
|
||||
}
|
||||
|
||||
#if defined(_M_X64) && ENABLE_SSE
|
||||
{
|
||||
__m128i fnv_prime = _mm_set1_epi32(FNV_PRIME);
|
||||
__m128i xmm0 = _mm_mullo_epi32(fnv_prime, mix[n].xmm[0]);
|
||||
__m128i xmm1 = _mm_mullo_epi32(fnv_prime, mix[n].xmm[1]);
|
||||
__m128i xmm2 = _mm_mullo_epi32(fnv_prime, mix[n].xmm[2]);
|
||||
__m128i xmm3 = _mm_mullo_epi32(fnv_prime, mix[n].xmm[3]);
|
||||
mix[n].xmm[0] = _mm_xor_si128(xmm0, dag_node->xmm[0]);
|
||||
mix[n].xmm[1] = _mm_xor_si128(xmm1, dag_node->xmm[1]);
|
||||
mix[n].xmm[2] = _mm_xor_si128(xmm2, dag_node->xmm[2]);
|
||||
mix[n].xmm[3] = _mm_xor_si128(xmm3, dag_node->xmm[3]);
|
||||
}
|
||||
#else
|
||||
{
|
||||
for (unsigned w = 0; w != NODE_WORDS; ++w) {
|
||||
mix[n].words[w] = fnv_hash(mix[n].words[w], dag_node->words[w]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// compress mix
|
||||
for (uint32_t w = 0; w != MIX_WORDS; w += 4) {
|
||||
uint32_t reduction = mix->words[w + 0];
|
||||
reduction = reduction * FNV_PRIME ^ mix->words[w + 1];
|
||||
reduction = reduction * FNV_PRIME ^ mix->words[w + 2];
|
||||
reduction = reduction * FNV_PRIME ^ mix->words[w + 3];
|
||||
mix->words[w / 4] = reduction;
|
||||
}
|
||||
|
||||
fix_endian_arr32(mix->words, MIX_WORDS / 4);
|
||||
memcpy(&ret->mix_hash, mix->bytes, 32);
|
||||
// final Keccak hash
|
||||
SHA3_256(&ret->result, s_mix->bytes, 64 + 32); // Keccak-256(s + compressed_mix)
|
||||
return true;
|
||||
}
|
||||
|
||||
void ethash_quick_hash(
|
||||
ethash_h256_t* return_hash,
|
||||
ethash_h256_t const* header_hash,
|
||||
uint64_t const nonce,
|
||||
ethash_h256_t const* mix_hash
|
||||
)
|
||||
{
|
||||
uint8_t buf[64 + 32];
|
||||
memcpy(buf, header_hash, 32);
|
||||
fix_endian64_same(nonce);
|
||||
memcpy(&(buf[32]), &nonce, 8);
|
||||
SHA3_512(buf, buf, 40);
|
||||
memcpy(&(buf[64]), mix_hash, 32);
|
||||
SHA3_256(return_hash, buf, 64 + 32);
|
||||
}
|
||||
|
||||
ethash_h256_t ethash_get_seedhash(uint64_t block_number)
|
||||
{
|
||||
ethash_h256_t ret;
|
||||
ethash_h256_reset(&ret);
|
||||
uint64_t const epochs = block_number / ETHASH_EPOCH_LENGTH;
|
||||
for (uint32_t i = 0; i < epochs; ++i)
|
||||
SHA3_256(&ret, (uint8_t*)&ret, 32);
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool ethash_quick_check_difficulty(
|
||||
ethash_h256_t const* header_hash,
|
||||
uint64_t const nonce,
|
||||
ethash_h256_t const* mix_hash,
|
||||
ethash_h256_t const* difficulty
|
||||
)
|
||||
{
|
||||
|
||||
ethash_h256_t return_hash;
|
||||
ethash_quick_hash(&return_hash, header_hash, nonce, mix_hash);
|
||||
return ethash_check_difficulty(&return_hash, difficulty);
|
||||
}
|
||||
|
||||
ethash_light_t ethash_light_new_internal(uint64_t cache_size, ethash_h256_t const* seed)
|
||||
{
|
||||
struct ethash_light *ret;
|
||||
ret = calloc(sizeof(*ret), 1);
|
||||
if (!ret) {
|
||||
return NULL;
|
||||
}
|
||||
ret->cache = malloc((size_t)cache_size);
|
||||
if (!ret->cache) {
|
||||
goto fail_free_light;
|
||||
}
|
||||
node* nodes = (node*)ret->cache;
|
||||
if (!ethash_compute_cache_nodes(nodes, cache_size, seed)) {
|
||||
goto fail_free_cache_mem;
|
||||
}
|
||||
ret->cache_size = cache_size;
|
||||
return ret;
|
||||
|
||||
fail_free_cache_mem:
|
||||
free(ret->cache);
|
||||
fail_free_light:
|
||||
free(ret);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ethash_light_t ethash_light_new(uint64_t block_number)
|
||||
{
|
||||
ethash_h256_t seedhash = ethash_get_seedhash(block_number);
|
||||
ethash_light_t ret;
|
||||
ret = ethash_light_new_internal(ethash_get_cachesize(block_number), &seedhash);
|
||||
ret->block_number = block_number;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ethash_light_delete(ethash_light_t light)
|
||||
{
|
||||
if (light->cache) {
|
||||
free(light->cache);
|
||||
}
|
||||
free(light);
|
||||
}
|
||||
|
||||
ethash_return_value_t ethash_light_compute_internal(
|
||||
ethash_light_t light,
|
||||
uint64_t full_size,
|
||||
ethash_h256_t const header_hash,
|
||||
uint64_t nonce
|
||||
)
|
||||
{
|
||||
ethash_return_value_t ret;
|
||||
ret.success = true;
|
||||
if (!ethash_hash(&ret, NULL, light, full_size, header_hash, nonce)) {
|
||||
ret.success = false;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
ethash_return_value_t ethash_light_compute(
|
||||
ethash_light_t light,
|
||||
ethash_h256_t const header_hash,
|
||||
uint64_t nonce
|
||||
)
|
||||
{
|
||||
uint64_t full_size = ethash_get_datasize(light->block_number);
|
||||
return ethash_light_compute_internal(light, full_size, header_hash, nonce);
|
||||
}
|
||||
|
||||
static bool ethash_mmap(struct ethash_full* ret, FILE* f)
|
||||
{
|
||||
int fd;
|
||||
char* mmapped_data;
|
||||
ret->file = f;
|
||||
if ((fd = ethash_fileno(ret->file)) == -1) {
|
||||
return false;
|
||||
}
|
||||
mmapped_data= mmap(
|
||||
NULL,
|
||||
(size_t)ret->file_size + ETHASH_DAG_MAGIC_NUM_SIZE,
|
||||
PROT_READ | PROT_WRITE,
|
||||
MAP_SHARED,
|
||||
fd,
|
||||
0
|
||||
);
|
||||
if (mmapped_data == MAP_FAILED) {
|
||||
return false;
|
||||
}
|
||||
ret->data = (node*)(mmapped_data + ETHASH_DAG_MAGIC_NUM_SIZE);
|
||||
return true;
|
||||
}
|
||||
|
||||
ethash_full_t ethash_full_new_internal(
|
||||
char const* dirname,
|
||||
ethash_h256_t const seed_hash,
|
||||
uint64_t full_size,
|
||||
ethash_light_t const light,
|
||||
ethash_callback_t callback
|
||||
)
|
||||
{
|
||||
struct ethash_full* ret;
|
||||
FILE *f = NULL;
|
||||
ret = calloc(sizeof(*ret), 1);
|
||||
if (!ret) {
|
||||
return NULL;
|
||||
}
|
||||
ret->file_size = (size_t)full_size;
|
||||
switch (ethash_io_prepare(dirname, seed_hash, &f, (size_t)full_size, false)) {
|
||||
case ETHASH_IO_FAIL:
|
||||
goto fail_free_full;
|
||||
case ETHASH_IO_MEMO_MATCH:
|
||||
if (!ethash_mmap(ret, f)) {
|
||||
goto fail_close_file;
|
||||
}
|
||||
return ret;
|
||||
case ETHASH_IO_MEMO_SIZE_MISMATCH:
|
||||
// if a DAG of same filename but unexpected size is found, silently force new file creation
|
||||
if (ethash_io_prepare(dirname, seed_hash, &f, (size_t)full_size, true) != ETHASH_IO_MEMO_MISMATCH) {
|
||||
goto fail_free_full;
|
||||
}
|
||||
// fallthrough to the mismatch case here, DO NOT go through match
|
||||
case ETHASH_IO_MEMO_MISMATCH:
|
||||
if (!ethash_mmap(ret, f)) {
|
||||
goto fail_close_file;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (!ethash_compute_full_data(ret->data, full_size, light, callback)) {
|
||||
goto fail_free_full_data;
|
||||
}
|
||||
|
||||
// after the DAG has been filled then we finalize it by writting the magic number at the beginning
|
||||
if (fseek(f, 0, SEEK_SET) != 0) {
|
||||
goto fail_free_full_data;
|
||||
}
|
||||
uint64_t const magic_num = ETHASH_DAG_MAGIC_NUM;
|
||||
if (fwrite(&magic_num, ETHASH_DAG_MAGIC_NUM_SIZE, 1, f) != 1) {
|
||||
goto fail_free_full_data;
|
||||
}
|
||||
fflush(f); // make sure the magic number IS there
|
||||
return ret;
|
||||
|
||||
fail_free_full_data:
|
||||
// could check that munmap(..) == 0 but even if it did not can't really do anything here
|
||||
munmap(ret->data, (size_t)full_size);
|
||||
fail_close_file:
|
||||
fclose(ret->file);
|
||||
fail_free_full:
|
||||
free(ret);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ethash_full_t ethash_full_new(ethash_light_t light, ethash_callback_t callback)
|
||||
{
|
||||
char strbuf[256];
|
||||
if (!ethash_get_default_dirname(strbuf, 256)) {
|
||||
return NULL;
|
||||
}
|
||||
uint64_t full_size = ethash_get_datasize(light->block_number);
|
||||
ethash_h256_t seedhash = ethash_get_seedhash(light->block_number);
|
||||
return ethash_full_new_internal(strbuf, seedhash, full_size, light, callback);
|
||||
}
|
||||
|
||||
void ethash_full_delete(ethash_full_t full)
|
||||
{
|
||||
// could check that munmap(..) == 0 but even if it did not can't really do anything here
|
||||
munmap(full->data, (size_t)full->file_size);
|
||||
if (full->file) {
|
||||
fclose(full->file);
|
||||
}
|
||||
free(full);
|
||||
}
|
||||
|
||||
ethash_return_value_t ethash_full_compute(
|
||||
ethash_full_t full,
|
||||
ethash_h256_t const header_hash,
|
||||
uint64_t nonce
|
||||
)
|
||||
{
|
||||
ethash_return_value_t ret;
|
||||
ret.success = true;
|
||||
if (!ethash_hash(
|
||||
&ret,
|
||||
(node const*)full->data,
|
||||
NULL,
|
||||
full->file_size,
|
||||
header_hash,
|
||||
nonce)) {
|
||||
ret.success = false;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void const* ethash_full_dag(ethash_full_t full)
|
||||
{
|
||||
return full->data;
|
||||
}
|
||||
|
||||
uint64_t ethash_full_dag_size(ethash_full_t full)
|
||||
{
|
||||
return full->file_size;
|
||||
}
|
||||
170
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.h
generated
vendored
Normal file
170
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.h
generated
vendored
Normal file
@@ -0,0 +1,170 @@
|
||||
#pragma once
|
||||
#include "compiler.h"
|
||||
#include "endian.h"
|
||||
#include "ethash.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#define ENABLE_SSE 0
|
||||
|
||||
#if defined(_M_X64) && ENABLE_SSE
|
||||
#include <smmintrin.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// compile time settings
|
||||
#define NODE_WORDS (64/4)
|
||||
#define MIX_WORDS (ETHASH_MIX_BYTES/4)
|
||||
#define MIX_NODES (MIX_WORDS / NODE_WORDS)
|
||||
#include <stdint.h>
|
||||
|
||||
typedef union node {
|
||||
uint8_t bytes[NODE_WORDS * 4];
|
||||
uint32_t words[NODE_WORDS];
|
||||
uint64_t double_words[NODE_WORDS / 2];
|
||||
|
||||
#if defined(_M_X64) && ENABLE_SSE
|
||||
__m128i xmm[NODE_WORDS/4];
|
||||
#endif
|
||||
|
||||
} node;
|
||||
|
||||
static inline uint8_t ethash_h256_get(ethash_h256_t const* hash, unsigned int i)
|
||||
{
|
||||
return hash->b[i];
|
||||
}
|
||||
|
||||
static inline void ethash_h256_set(ethash_h256_t* hash, unsigned int i, uint8_t v)
|
||||
{
|
||||
hash->b[i] = v;
|
||||
}
|
||||
|
||||
static inline void ethash_h256_reset(ethash_h256_t* hash)
|
||||
{
|
||||
memset(hash, 0, 32);
|
||||
}
|
||||
|
||||
// Returns if hash is less than or equal to difficulty
|
||||
static inline bool ethash_check_difficulty(
|
||||
ethash_h256_t const* hash,
|
||||
ethash_h256_t const* difficulty
|
||||
)
|
||||
{
|
||||
// Difficulty is big endian
|
||||
for (int i = 0; i < 32; i++) {
|
||||
if (ethash_h256_get(hash, i) == ethash_h256_get(difficulty, i)) {
|
||||
continue;
|
||||
}
|
||||
return ethash_h256_get(hash, i) < ethash_h256_get(difficulty, i);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ethash_quick_check_difficulty(
|
||||
ethash_h256_t const* header_hash,
|
||||
uint64_t const nonce,
|
||||
ethash_h256_t const* mix_hash,
|
||||
ethash_h256_t const* difficulty
|
||||
);
|
||||
|
||||
struct ethash_light {
|
||||
void* cache;
|
||||
uint64_t cache_size;
|
||||
uint64_t block_number;
|
||||
};
|
||||
|
||||
/**
|
||||
* Allocate and initialize a new ethash_light handler. Internal version
|
||||
*
|
||||
* @param cache_size The size of the cache in bytes
|
||||
* @param seed Block seedhash to be used during the computation of the
|
||||
* cache nodes
|
||||
* @return Newly allocated ethash_light handler or NULL in case of
|
||||
* ERRNOMEM or invalid parameters used for @ref ethash_compute_cache_nodes()
|
||||
*/
|
||||
ethash_light_t ethash_light_new_internal(uint64_t cache_size, ethash_h256_t const* seed);
|
||||
|
||||
/**
|
||||
* Calculate the light client data. Internal version.
|
||||
*
|
||||
* @param light The light client handler
|
||||
* @param full_size The size of the full data in bytes.
|
||||
* @param header_hash The header hash to pack into the mix
|
||||
* @param nonce The nonce to pack into the mix
|
||||
* @return The resulting hash.
|
||||
*/
|
||||
ethash_return_value_t ethash_light_compute_internal(
|
||||
ethash_light_t light,
|
||||
uint64_t full_size,
|
||||
ethash_h256_t const header_hash,
|
||||
uint64_t nonce
|
||||
);
|
||||
|
||||
struct ethash_full {
|
||||
FILE* file;
|
||||
uint64_t file_size;
|
||||
node* data;
|
||||
};
|
||||
|
||||
/**
|
||||
* Allocate and initialize a new ethash_full handler. Internal version.
|
||||
*
|
||||
* @param dirname The directory in which to put the DAG file.
|
||||
* @param seedhash The seed hash of the block. Used in the DAG file naming.
|
||||
* @param full_size The size of the full data in bytes.
|
||||
* @param cache A cache object to use that was allocated with @ref ethash_cache_new().
|
||||
* Iff this function succeeds the ethash_full_t will take memory
|
||||
* memory ownership of the cache and free it at deletion. If
|
||||
* not then the user still has to handle freeing of the cache himself.
|
||||
* @param callback A callback function with signature of @ref ethash_callback_t
|
||||
* It accepts an unsigned with which a progress of DAG calculation
|
||||
* can be displayed. If all goes well the callback should return 0.
|
||||
* If a non-zero value is returned then DAG generation will stop.
|
||||
* @return Newly allocated ethash_full handler or NULL in case of
|
||||
* ERRNOMEM or invalid parameters used for @ref ethash_compute_full_data()
|
||||
*/
|
||||
ethash_full_t ethash_full_new_internal(
|
||||
char const* dirname,
|
||||
ethash_h256_t const seed_hash,
|
||||
uint64_t full_size,
|
||||
ethash_light_t const light,
|
||||
ethash_callback_t callback
|
||||
);
|
||||
|
||||
void ethash_calculate_dag_item(
|
||||
node* const ret,
|
||||
uint32_t node_index,
|
||||
ethash_light_t const cache
|
||||
);
|
||||
|
||||
void ethash_quick_hash(
|
||||
ethash_h256_t* return_hash,
|
||||
ethash_h256_t const* header_hash,
|
||||
const uint64_t nonce,
|
||||
ethash_h256_t const* mix_hash
|
||||
);
|
||||
|
||||
uint64_t ethash_get_datasize(uint64_t const block_number);
|
||||
uint64_t ethash_get_cachesize(uint64_t const block_number);
|
||||
|
||||
/**
|
||||
* Compute the memory data for a full node's memory
|
||||
*
|
||||
* @param mem A pointer to an ethash full's memory
|
||||
* @param full_size The size of the full data in bytes
|
||||
* @param cache A cache object to use in the calculation
|
||||
* @param callback The callback function. Check @ref ethash_full_new() for details.
|
||||
* @return true if all went fine and false for invalid parameters
|
||||
*/
|
||||
bool ethash_compute_full_data(
|
||||
void* mem,
|
||||
uint64_t full_size,
|
||||
ethash_light_t const light,
|
||||
ethash_callback_t callback
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
102
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.c
generated
vendored
Normal file
102
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.c
generated
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
This file is part of ethash.
|
||||
|
||||
ethash is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ethash is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with ethash. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** @file io.c
|
||||
* @author Lefteris Karapetsas <lefteris@ethdev.com>
|
||||
* @date 2015
|
||||
*/
|
||||
#include "io.h"
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
enum ethash_io_rc ethash_io_prepare(
|
||||
char const* dirname,
|
||||
ethash_h256_t const seedhash,
|
||||
FILE** output_file,
|
||||
uint64_t file_size,
|
||||
bool force_create
|
||||
)
|
||||
{
|
||||
char mutable_name[DAG_MUTABLE_NAME_MAX_SIZE];
|
||||
enum ethash_io_rc ret = ETHASH_IO_FAIL;
|
||||
|
||||
// assert directory exists
|
||||
if (!ethash_mkdir(dirname)) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
ethash_io_mutable_name(ETHASH_REVISION, &seedhash, mutable_name);
|
||||
char* tmpfile = ethash_io_create_filename(dirname, mutable_name, strlen(mutable_name));
|
||||
if (!tmpfile) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
FILE *f;
|
||||
if (!force_create) {
|
||||
// try to open the file
|
||||
f = ethash_fopen(tmpfile, "rb+");
|
||||
if (f) {
|
||||
size_t found_size;
|
||||
if (!ethash_file_size(f, &found_size)) {
|
||||
fclose(f);
|
||||
goto free_memo;
|
||||
}
|
||||
if (file_size != found_size - ETHASH_DAG_MAGIC_NUM_SIZE) {
|
||||
fclose(f);
|
||||
ret = ETHASH_IO_MEMO_SIZE_MISMATCH;
|
||||
goto free_memo;
|
||||
}
|
||||
// compare the magic number, no need to care about endianess since it's local
|
||||
uint64_t magic_num;
|
||||
if (fread(&magic_num, ETHASH_DAG_MAGIC_NUM_SIZE, 1, f) != 1) {
|
||||
// I/O error
|
||||
fclose(f);
|
||||
ret = ETHASH_IO_MEMO_SIZE_MISMATCH;
|
||||
goto free_memo;
|
||||
}
|
||||
if (magic_num != ETHASH_DAG_MAGIC_NUM) {
|
||||
fclose(f);
|
||||
ret = ETHASH_IO_MEMO_SIZE_MISMATCH;
|
||||
goto free_memo;
|
||||
}
|
||||
ret = ETHASH_IO_MEMO_MATCH;
|
||||
goto set_file;
|
||||
}
|
||||
}
|
||||
|
||||
// file does not exist, will need to be created
|
||||
f = ethash_fopen(tmpfile, "wb+");
|
||||
if (!f) {
|
||||
goto free_memo;
|
||||
}
|
||||
// make sure it's of the proper size
|
||||
if (fseek(f, (long int)(file_size + ETHASH_DAG_MAGIC_NUM_SIZE - 1), SEEK_SET) != 0) {
|
||||
fclose(f);
|
||||
goto free_memo;
|
||||
}
|
||||
fputc('\n', f);
|
||||
fflush(f);
|
||||
ret = ETHASH_IO_MEMO_MISMATCH;
|
||||
goto set_file;
|
||||
|
||||
ret = ETHASH_IO_MEMO_MATCH;
|
||||
set_file:
|
||||
*output_file = f;
|
||||
free_memo:
|
||||
free(tmpfile);
|
||||
end:
|
||||
return ret;
|
||||
}
|
||||
185
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h
generated
vendored
Normal file
185
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h
generated
vendored
Normal file
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
This file is part of ethash.
|
||||
|
||||
ethash is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ethash is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with ethash. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** @file io.h
|
||||
* @author Lefteris Karapetsas <lefteris@ethdev.com>
|
||||
* @date 2015
|
||||
*/
|
||||
#pragma once
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#ifdef __cplusplus
|
||||
#define __STDC_FORMAT_MACROS 1
|
||||
#endif
|
||||
#include <inttypes.h>
|
||||
#include "endian.h"
|
||||
#include "ethash.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
// Maximum size for mutable part of DAG file name
|
||||
// 6 is for "full-R", the suffix of the filename
|
||||
// 10 is for maximum number of digits of a uint32_t (for REVISION)
|
||||
// 1 is for - and 16 is for the first 16 hex digits for first 8 bytes of
|
||||
// the seedhash and last 1 is for the null terminating character
|
||||
// Reference: https://github.com/ethereum/wiki/wiki/Ethash-DAG
|
||||
#define DAG_MUTABLE_NAME_MAX_SIZE (6 + 10 + 1 + 16 + 1)
|
||||
/// Possible return values of @see ethash_io_prepare
|
||||
enum ethash_io_rc {
|
||||
ETHASH_IO_FAIL = 0, ///< There has been an IO failure
|
||||
ETHASH_IO_MEMO_SIZE_MISMATCH, ///< DAG with revision/hash match, but file size was wrong.
|
||||
ETHASH_IO_MEMO_MISMATCH, ///< The DAG file did not exist or there was revision/hash mismatch
|
||||
ETHASH_IO_MEMO_MATCH, ///< DAG file existed and revision/hash matched. No need to do anything
|
||||
};
|
||||
|
||||
// small hack for windows. I don't feel I should use va_args and forward just
|
||||
// to have this one function properly cross-platform abstracted
|
||||
#if defined(_WIN32) && !defined(__GNUC__)
|
||||
#define snprintf(...) sprintf_s(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Prepares io for ethash
|
||||
*
|
||||
* Create the DAG directory and the DAG file if they don't exist.
|
||||
*
|
||||
* @param[in] dirname A null terminated c-string of the path of the ethash
|
||||
* data directory. If it does not exist it's created.
|
||||
* @param[in] seedhash The seedhash of the current block number, used in the
|
||||
* naming of the file as can be seen from the spec at:
|
||||
* https://github.com/ethereum/wiki/wiki/Ethash-DAG
|
||||
* @param[out] output_file If there was no failure then this will point to an open
|
||||
* file descriptor. User is responsible for closing it.
|
||||
* In the case of memo match then the file is open on read
|
||||
* mode, while on the case of mismatch a new file is created
|
||||
* on write mode
|
||||
* @param[in] file_size The size that the DAG file should have on disk
|
||||
* @param[out] force_create If true then there is no check to see if the file
|
||||
* already exists
|
||||
* @return For possible return values @see enum ethash_io_rc
|
||||
*/
|
||||
enum ethash_io_rc ethash_io_prepare(
|
||||
char const* dirname,
|
||||
ethash_h256_t const seedhash,
|
||||
FILE** output_file,
|
||||
uint64_t file_size,
|
||||
bool force_create
|
||||
);
|
||||
|
||||
/**
|
||||
* An fopen wrapper for no-warnings crossplatform fopen.
|
||||
*
|
||||
* Msvc compiler considers fopen to be insecure and suggests to use their
|
||||
* alternative. This is a wrapper for this alternative. Another way is to
|
||||
* #define _CRT_SECURE_NO_WARNINGS, but disabling all security warnings does
|
||||
* not sound like a good idea.
|
||||
*
|
||||
* @param file_name The path to the file to open
|
||||
* @param mode Opening mode. Check fopen()
|
||||
* @return The FILE* or NULL in failure
|
||||
*/
|
||||
FILE* ethash_fopen(char const* file_name, char const* mode);
|
||||
|
||||
/**
|
||||
* An strncat wrapper for no-warnings crossplatform strncat.
|
||||
*
|
||||
* Msvc compiler considers strncat to be insecure and suggests to use their
|
||||
* alternative. This is a wrapper for this alternative. Another way is to
|
||||
* #define _CRT_SECURE_NO_WARNINGS, but disabling all security warnings does
|
||||
* not sound like a good idea.
|
||||
*
|
||||
* @param des Destination buffer
|
||||
* @param dest_size Maximum size of the destination buffer. This is the
|
||||
* extra argument for the MSVC secure strncat
|
||||
* @param src Souce buffer
|
||||
* @param count Number of bytes to copy from source
|
||||
* @return If all is well returns the dest buffer. If there is an
|
||||
* error returns NULL
|
||||
*/
|
||||
char* ethash_strncat(char* dest, size_t dest_size, char const* src, size_t count);
|
||||
|
||||
/**
|
||||
* A cross-platform mkdir wrapper to create a directory or assert it's there
|
||||
*
|
||||
* @param dirname The full path of the directory to create
|
||||
* @return true if the directory was created or if it already
|
||||
* existed
|
||||
*/
|
||||
bool ethash_mkdir(char const* dirname);
|
||||
|
||||
/**
|
||||
* Get a file's size
|
||||
*
|
||||
* @param[in] f The open file stream whose size to get
|
||||
* @param[out] size Pass a size_t by reference to contain the file size
|
||||
* @return true in success and false if there was a failure
|
||||
*/
|
||||
bool ethash_file_size(FILE* f, size_t* ret_size);
|
||||
|
||||
/**
|
||||
* Get a file descriptor number from a FILE stream
|
||||
*
|
||||
* @param f The file stream whose fd to get
|
||||
* @return Platform specific fd handler
|
||||
*/
|
||||
int ethash_fileno(FILE* f);
|
||||
|
||||
/**
|
||||
* Create the filename for the DAG.
|
||||
*
|
||||
* @param dirname The directory name in which the DAG file should reside
|
||||
* If it does not end with a directory separator it is appended.
|
||||
* @param filename The actual name of the file
|
||||
* @param filename_length The length of the filename in bytes
|
||||
* @return A char* containing the full name. User must deallocate.
|
||||
*/
|
||||
char* ethash_io_create_filename(
|
||||
char const* dirname,
|
||||
char const* filename,
|
||||
size_t filename_length
|
||||
);
|
||||
|
||||
/**
|
||||
* Gets the default directory name for the DAG depending on the system
|
||||
*
|
||||
* The spec defining this directory is here: https://github.com/ethereum/wiki/wiki/Ethash-DAG
|
||||
*
|
||||
* @param[out] strbuf A string buffer of sufficient size to keep the
|
||||
* null termninated string of the directory name
|
||||
* @param[in] buffsize Size of @a strbuf in bytes
|
||||
* @return true for success and false otherwise
|
||||
*/
|
||||
bool ethash_get_default_dirname(char* strbuf, size_t buffsize);
|
||||
|
||||
static inline bool ethash_io_mutable_name(
|
||||
uint32_t revision,
|
||||
ethash_h256_t const* seed_hash,
|
||||
char* output
|
||||
)
|
||||
{
|
||||
uint64_t hash = *((uint64_t*)seed_hash);
|
||||
#if LITTLE_ENDIAN == BYTE_ORDER
|
||||
hash = ethash_swap_u64(hash);
|
||||
#endif
|
||||
return snprintf(output, DAG_MUTABLE_NAME_MAX_SIZE, "full-R%u-%016" PRIx64, revision, hash) >= 0;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
102
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io_posix.c
generated
vendored
Normal file
102
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io_posix.c
generated
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
This file is part of ethash.
|
||||
|
||||
ethash is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ethash is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with ethash. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** @file io_posix.c
|
||||
* @author Lefteris Karapetsas <lefteris@ethdev.com>
|
||||
* @date 2015
|
||||
*/
|
||||
|
||||
#include "io.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <libgen.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
FILE* ethash_fopen(char const* file_name, char const* mode)
|
||||
{
|
||||
return fopen(file_name, mode);
|
||||
}
|
||||
|
||||
char* ethash_strncat(char* dest, size_t dest_size, char const* src, size_t count)
|
||||
{
|
||||
return strlen(dest) + count + 1 <= dest_size ? strncat(dest, src, count) : NULL;
|
||||
}
|
||||
|
||||
bool ethash_mkdir(char const* dirname)
|
||||
{
|
||||
int rc = mkdir(dirname, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
|
||||
return rc != -1 || errno == EEXIST;
|
||||
}
|
||||
|
||||
int ethash_fileno(FILE *f)
|
||||
{
|
||||
return fileno(f);
|
||||
}
|
||||
|
||||
char* ethash_io_create_filename(
|
||||
char const* dirname,
|
||||
char const* filename,
|
||||
size_t filename_length
|
||||
)
|
||||
{
|
||||
size_t dirlen = strlen(dirname);
|
||||
size_t dest_size = dirlen + filename_length + 1;
|
||||
if (dirname[dirlen] != '/') {
|
||||
dest_size += 1;
|
||||
}
|
||||
char* name = malloc(dest_size);
|
||||
if (!name) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
name[0] = '\0';
|
||||
ethash_strncat(name, dest_size, dirname, dirlen);
|
||||
if (dirname[dirlen] != '/') {
|
||||
ethash_strncat(name, dest_size, "/", 1);
|
||||
}
|
||||
ethash_strncat(name, dest_size, filename, filename_length);
|
||||
return name;
|
||||
}
|
||||
|
||||
bool ethash_file_size(FILE* f, size_t* ret_size)
|
||||
{
|
||||
struct stat st;
|
||||
int fd;
|
||||
if ((fd = fileno(f)) == -1 || fstat(fd, &st) != 0) {
|
||||
return false;
|
||||
}
|
||||
*ret_size = st.st_size;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ethash_get_default_dirname(char* strbuf, size_t buffsize)
|
||||
{
|
||||
static const char dir_suffix[] = ".ethash/";
|
||||
strbuf[0] = '\0';
|
||||
char* home_dir = getenv("HOME");
|
||||
size_t len = strlen(home_dir);
|
||||
if (!ethash_strncat(strbuf, buffsize, home_dir, len)) {
|
||||
return false;
|
||||
}
|
||||
if (home_dir[len] != '/') {
|
||||
if (!ethash_strncat(strbuf, buffsize, "/", 1)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return ethash_strncat(strbuf, buffsize, dir_suffix, sizeof(dir_suffix));
|
||||
}
|
||||
100
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io_win32.c
generated
vendored
Normal file
100
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io_win32.c
generated
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
This file is part of ethash.
|
||||
|
||||
ethash is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ethash is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with ethash. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** @file io_win32.c
|
||||
* @author Lefteris Karapetsas <lefteris@ethdev.com>
|
||||
* @date 2015
|
||||
*/
|
||||
|
||||
#include "io.h"
|
||||
#include <direct.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <shlobj.h>
|
||||
|
||||
FILE* ethash_fopen(char const* file_name, char const* mode)
|
||||
{
|
||||
FILE* f;
|
||||
return fopen_s(&f, file_name, mode) == 0 ? f : NULL;
|
||||
}
|
||||
|
||||
char* ethash_strncat(char* dest, size_t dest_size, char const* src, size_t count)
|
||||
{
|
||||
return strncat_s(dest, dest_size, src, count) == 0 ? dest : NULL;
|
||||
}
|
||||
|
||||
bool ethash_mkdir(char const* dirname)
|
||||
{
|
||||
int rc = _mkdir(dirname);
|
||||
return rc != -1 || errno == EEXIST;
|
||||
}
|
||||
|
||||
int ethash_fileno(FILE* f)
|
||||
{
|
||||
return _fileno(f);
|
||||
}
|
||||
|
||||
char* ethash_io_create_filename(
|
||||
char const* dirname,
|
||||
char const* filename,
|
||||
size_t filename_length
|
||||
)
|
||||
{
|
||||
size_t dirlen = strlen(dirname);
|
||||
size_t dest_size = dirlen + filename_length + 1;
|
||||
if (dirname[dirlen] != '\\' || dirname[dirlen] != '/') {
|
||||
dest_size += 1;
|
||||
}
|
||||
char* name = malloc(dest_size);
|
||||
if (!name) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
name[0] = '\0';
|
||||
ethash_strncat(name, dest_size, dirname, dirlen);
|
||||
if (dirname[dirlen] != '\\' || dirname[dirlen] != '/') {
|
||||
ethash_strncat(name, dest_size, "\\", 1);
|
||||
}
|
||||
ethash_strncat(name, dest_size, filename, filename_length);
|
||||
return name;
|
||||
}
|
||||
|
||||
bool ethash_file_size(FILE* f, size_t* ret_size)
|
||||
{
|
||||
struct _stat st;
|
||||
int fd;
|
||||
if ((fd = _fileno(f)) == -1 || _fstat(fd, &st) != 0) {
|
||||
return false;
|
||||
}
|
||||
*ret_size = st.st_size;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ethash_get_default_dirname(char* strbuf, size_t buffsize)
|
||||
{
|
||||
static const char dir_suffix[] = "Appdata\\Ethash\\";
|
||||
strbuf[0] = '\0';
|
||||
if (!SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_PROFILE, NULL, 0, (WCHAR*)strbuf))) {
|
||||
return false;
|
||||
}
|
||||
if (!ethash_strncat(strbuf, buffsize, "\\", 1)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return ethash_strncat(strbuf, buffsize, dir_suffix, sizeof(dir_suffix));
|
||||
}
|
||||
47
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/mmap.h
generated
vendored
Normal file
47
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/mmap.h
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
This file is part of ethash.
|
||||
|
||||
ethash is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ethash is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with ethash. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** @file mmap.h
|
||||
* @author Lefteris Karapetsas <lefteris@ethdev.com>
|
||||
* @date 2015
|
||||
*/
|
||||
#pragma once
|
||||
#if defined(__MINGW32__) || defined(_WIN32)
|
||||
#include <sys/types.h>
|
||||
|
||||
#define PROT_READ 0x1
|
||||
#define PROT_WRITE 0x2
|
||||
/* This flag is only available in WinXP+ */
|
||||
#ifdef FILE_MAP_EXECUTE
|
||||
#define PROT_EXEC 0x4
|
||||
#else
|
||||
#define PROT_EXEC 0x0
|
||||
#define FILE_MAP_EXECUTE 0
|
||||
#endif
|
||||
|
||||
#define MAP_SHARED 0x01
|
||||
#define MAP_PRIVATE 0x02
|
||||
#define MAP_ANONYMOUS 0x20
|
||||
#define MAP_ANON MAP_ANONYMOUS
|
||||
#define MAP_FAILED ((void *) -1)
|
||||
|
||||
void* mmap(void* start, size_t length, int prot, int flags, int fd, off_t offset);
|
||||
void munmap(void* addr, size_t length);
|
||||
#else // posix, yay! ^_^
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
|
||||
84
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/mmap_win32.c
generated
vendored
Normal file
84
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/mmap_win32.c
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
/* mmap() replacement for Windows
|
||||
*
|
||||
* Author: Mike Frysinger <vapier@gentoo.org>
|
||||
* Placed into the public domain
|
||||
*/
|
||||
|
||||
/* References:
|
||||
* CreateFileMapping: http://msdn.microsoft.com/en-us/library/aa366537(VS.85).aspx
|
||||
* CloseHandle: http://msdn.microsoft.com/en-us/library/ms724211(VS.85).aspx
|
||||
* MapViewOfFile: http://msdn.microsoft.com/en-us/library/aa366761(VS.85).aspx
|
||||
* UnmapViewOfFile: http://msdn.microsoft.com/en-us/library/aa366882(VS.85).aspx
|
||||
*/
|
||||
|
||||
#include <io.h>
|
||||
#include <windows.h>
|
||||
#include "mmap.h"
|
||||
|
||||
#ifdef __USE_FILE_OFFSET64
|
||||
# define DWORD_HI(x) (x >> 32)
|
||||
# define DWORD_LO(x) ((x) & 0xffffffff)
|
||||
#else
|
||||
# define DWORD_HI(x) (0)
|
||||
# define DWORD_LO(x) (x)
|
||||
#endif
|
||||
|
||||
void* mmap(void* start, size_t length, int prot, int flags, int fd, off_t offset)
|
||||
{
|
||||
if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC))
|
||||
return MAP_FAILED;
|
||||
if (fd == -1) {
|
||||
if (!(flags & MAP_ANON) || offset)
|
||||
return MAP_FAILED;
|
||||
} else if (flags & MAP_ANON)
|
||||
return MAP_FAILED;
|
||||
|
||||
DWORD flProtect;
|
||||
if (prot & PROT_WRITE) {
|
||||
if (prot & PROT_EXEC)
|
||||
flProtect = PAGE_EXECUTE_READWRITE;
|
||||
else
|
||||
flProtect = PAGE_READWRITE;
|
||||
} else if (prot & PROT_EXEC) {
|
||||
if (prot & PROT_READ)
|
||||
flProtect = PAGE_EXECUTE_READ;
|
||||
else if (prot & PROT_EXEC)
|
||||
flProtect = PAGE_EXECUTE;
|
||||
} else
|
||||
flProtect = PAGE_READONLY;
|
||||
|
||||
off_t end = length + offset;
|
||||
HANDLE mmap_fd, h;
|
||||
if (fd == -1)
|
||||
mmap_fd = INVALID_HANDLE_VALUE;
|
||||
else
|
||||
mmap_fd = (HANDLE)_get_osfhandle(fd);
|
||||
h = CreateFileMapping(mmap_fd, NULL, flProtect, DWORD_HI(end), DWORD_LO(end), NULL);
|
||||
if (h == NULL)
|
||||
return MAP_FAILED;
|
||||
|
||||
DWORD dwDesiredAccess;
|
||||
if (prot & PROT_WRITE)
|
||||
dwDesiredAccess = FILE_MAP_WRITE;
|
||||
else
|
||||
dwDesiredAccess = FILE_MAP_READ;
|
||||
if (prot & PROT_EXEC)
|
||||
dwDesiredAccess |= FILE_MAP_EXECUTE;
|
||||
if (flags & MAP_PRIVATE)
|
||||
dwDesiredAccess |= FILE_MAP_COPY;
|
||||
void *ret = MapViewOfFile(h, dwDesiredAccess, DWORD_HI(offset), DWORD_LO(offset), length);
|
||||
if (ret == NULL) {
|
||||
ret = MAP_FAILED;
|
||||
}
|
||||
// since we are handling the file ourselves with fd, close the Windows Handle here
|
||||
CloseHandle(h);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void munmap(void* addr, size_t length)
|
||||
{
|
||||
UnmapViewOfFile(addr);
|
||||
}
|
||||
|
||||
#undef DWORD_HI
|
||||
#undef DWORD_LO
|
||||
151
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3.c
generated
vendored
Normal file
151
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3.c
generated
vendored
Normal file
@@ -0,0 +1,151 @@
|
||||
/** libkeccak-tiny
|
||||
*
|
||||
* A single-file implementation of SHA-3 and SHAKE.
|
||||
*
|
||||
* Implementor: David Leon Gil
|
||||
* License: CC0, attribution kindly requested. Blame taken too,
|
||||
* but not liability.
|
||||
*/
|
||||
#include "sha3.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/******** The Keccak-f[1600] permutation ********/
|
||||
|
||||
/*** Constants. ***/
|
||||
static const uint8_t rho[24] = \
|
||||
{ 1, 3, 6, 10, 15, 21,
|
||||
28, 36, 45, 55, 2, 14,
|
||||
27, 41, 56, 8, 25, 43,
|
||||
62, 18, 39, 61, 20, 44};
|
||||
static const uint8_t pi[24] = \
|
||||
{10, 7, 11, 17, 18, 3,
|
||||
5, 16, 8, 21, 24, 4,
|
||||
15, 23, 19, 13, 12, 2,
|
||||
20, 14, 22, 9, 6, 1};
|
||||
static const uint64_t RC[24] = \
|
||||
{1ULL, 0x8082ULL, 0x800000000000808aULL, 0x8000000080008000ULL,
|
||||
0x808bULL, 0x80000001ULL, 0x8000000080008081ULL, 0x8000000000008009ULL,
|
||||
0x8aULL, 0x88ULL, 0x80008009ULL, 0x8000000aULL,
|
||||
0x8000808bULL, 0x800000000000008bULL, 0x8000000000008089ULL, 0x8000000000008003ULL,
|
||||
0x8000000000008002ULL, 0x8000000000000080ULL, 0x800aULL, 0x800000008000000aULL,
|
||||
0x8000000080008081ULL, 0x8000000000008080ULL, 0x80000001ULL, 0x8000000080008008ULL};
|
||||
|
||||
/*** Helper macros to unroll the permutation. ***/
|
||||
#define rol(x, s) (((x) << s) | ((x) >> (64 - s)))
|
||||
#define REPEAT6(e) e e e e e e
|
||||
#define REPEAT24(e) REPEAT6(e e e e)
|
||||
#define REPEAT5(e) e e e e e
|
||||
#define FOR5(v, s, e) \
|
||||
v = 0; \
|
||||
REPEAT5(e; v += s;)
|
||||
|
||||
/*** Keccak-f[1600] ***/
|
||||
static inline void keccakf(void* state) {
|
||||
uint64_t* a = (uint64_t*)state;
|
||||
uint64_t b[5] = {0};
|
||||
uint64_t t = 0;
|
||||
uint8_t x, y;
|
||||
|
||||
for (int i = 0; i < 24; i++) {
|
||||
// Theta
|
||||
FOR5(x, 1,
|
||||
b[x] = 0;
|
||||
FOR5(y, 5,
|
||||
b[x] ^= a[x + y]; ))
|
||||
FOR5(x, 1,
|
||||
FOR5(y, 5,
|
||||
a[y + x] ^= b[(x + 4) % 5] ^ rol(b[(x + 1) % 5], 1); ))
|
||||
// Rho and pi
|
||||
t = a[1];
|
||||
x = 0;
|
||||
REPEAT24(b[0] = a[pi[x]];
|
||||
a[pi[x]] = rol(t, rho[x]);
|
||||
t = b[0];
|
||||
x++; )
|
||||
// Chi
|
||||
FOR5(y,
|
||||
5,
|
||||
FOR5(x, 1,
|
||||
b[x] = a[y + x];)
|
||||
FOR5(x, 1,
|
||||
a[y + x] = b[x] ^ ((~b[(x + 1) % 5]) & b[(x + 2) % 5]); ))
|
||||
// Iota
|
||||
a[0] ^= RC[i];
|
||||
}
|
||||
}
|
||||
|
||||
/******** The FIPS202-defined functions. ********/
|
||||
|
||||
/*** Some helper macros. ***/
|
||||
|
||||
#define _(S) do { S } while (0)
|
||||
#define FOR(i, ST, L, S) \
|
||||
_(for (size_t i = 0; i < L; i += ST) { S; })
|
||||
#define mkapply_ds(NAME, S) \
|
||||
static inline void NAME(uint8_t* dst, \
|
||||
const uint8_t* src, \
|
||||
size_t len) { \
|
||||
FOR(i, 1, len, S); \
|
||||
}
|
||||
#define mkapply_sd(NAME, S) \
|
||||
static inline void NAME(const uint8_t* src, \
|
||||
uint8_t* dst, \
|
||||
size_t len) { \
|
||||
FOR(i, 1, len, S); \
|
||||
}
|
||||
|
||||
mkapply_ds(xorin, dst[i] ^= src[i]) // xorin
|
||||
mkapply_sd(setout, dst[i] = src[i]) // setout
|
||||
|
||||
#define P keccakf
|
||||
#define Plen 200
|
||||
|
||||
// Fold P*F over the full blocks of an input.
|
||||
#define foldP(I, L, F) \
|
||||
while (L >= rate) { \
|
||||
F(a, I, rate); \
|
||||
P(a); \
|
||||
I += rate; \
|
||||
L -= rate; \
|
||||
}
|
||||
|
||||
/** The sponge-based hash construction. **/
|
||||
static inline int hash(uint8_t* out, size_t outlen,
|
||||
const uint8_t* in, size_t inlen,
|
||||
size_t rate, uint8_t delim) {
|
||||
if ((out == NULL) || ((in == NULL) && inlen != 0) || (rate >= Plen)) {
|
||||
return -1;
|
||||
}
|
||||
uint8_t a[Plen] = {0};
|
||||
// Absorb input.
|
||||
foldP(in, inlen, xorin);
|
||||
// Xor in the DS and pad frame.
|
||||
a[inlen] ^= delim;
|
||||
a[rate - 1] ^= 0x80;
|
||||
// Xor in the last block.
|
||||
xorin(a, in, inlen);
|
||||
// Apply P
|
||||
P(a);
|
||||
// Squeeze output.
|
||||
foldP(out, outlen, setout);
|
||||
setout(a, out, outlen);
|
||||
memset(a, 0, 200);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define defsha3(bits) \
|
||||
int sha3_##bits(uint8_t* out, size_t outlen, \
|
||||
const uint8_t* in, size_t inlen) { \
|
||||
if (outlen > (bits/8)) { \
|
||||
return -1; \
|
||||
} \
|
||||
return hash(out, outlen, in, inlen, 200 - (bits / 4), 0x01); \
|
||||
}
|
||||
|
||||
/*** FIPS202 SHA3 FOFs ***/
|
||||
defsha3(256)
|
||||
defsha3(512)
|
||||
31
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3.h
generated
vendored
Normal file
31
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3.h
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "compiler.h"
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
struct ethash_h256;
|
||||
|
||||
#define decsha3(bits) \
|
||||
int sha3_##bits(uint8_t*, size_t, uint8_t const*, size_t);
|
||||
|
||||
decsha3(256)
|
||||
decsha3(512)
|
||||
|
||||
static inline void SHA3_256(struct ethash_h256 const* ret, uint8_t const* data, size_t const size)
|
||||
{
|
||||
sha3_256((uint8_t*)ret, 32, data, size);
|
||||
}
|
||||
|
||||
static inline void SHA3_512(uint8_t* ret, uint8_t const* data, size_t const size)
|
||||
{
|
||||
sha3_512(ret, 64, data, size);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
37
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3_cryptopp.cpp
generated
vendored
Normal file
37
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3_cryptopp.cpp
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
This file is part of ethash.
|
||||
|
||||
ethash is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ethash is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with ethash. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file sha3.cpp
|
||||
* @author Tim Hughes <tim@twistedfury.com>
|
||||
* @date 2015
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#include <cryptopp/sha3.h>
|
||||
|
||||
extern "C" {
|
||||
struct ethash_h256;
|
||||
typedef struct ethash_h256 ethash_h256_t;
|
||||
void SHA3_256(ethash_h256_t const* ret, uint8_t const* data, size_t size)
|
||||
{
|
||||
CryptoPP::SHA3_256().CalculateDigest((uint8_t*)ret, data, size);
|
||||
}
|
||||
|
||||
void SHA3_512(uint8_t* const ret, uint8_t const* data, size_t size)
|
||||
{
|
||||
CryptoPP::SHA3_512().CalculateDigest(ret, data, size);
|
||||
}
|
||||
}
|
||||
18
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3_cryptopp.h
generated
vendored
Normal file
18
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3_cryptopp.h
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "compiler.h"
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct ethash_h256;
|
||||
|
||||
void SHA3_256(struct ethash_h256 const* ret, uint8_t const* data, size_t size);
|
||||
void SHA3_512(uint8_t* const ret, uint8_t const* data, size_t size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
47
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util.h
generated
vendored
Normal file
47
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util.h
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
This file is part of ethash.
|
||||
|
||||
ethash is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ethash is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with ethash. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** @file util.h
|
||||
* @author Tim Hughes <tim@twistedfury.com>
|
||||
* @date 2015
|
||||
*/
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
#include "compiler.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
void debugf(char const* str, ...);
|
||||
#else
|
||||
#define debugf printf
|
||||
#endif
|
||||
|
||||
static inline uint32_t min_u32(uint32_t a, uint32_t b)
|
||||
{
|
||||
return a < b ? a : b;
|
||||
}
|
||||
|
||||
static inline uint32_t clamp_u32(uint32_t x, uint32_t min_, uint32_t max_)
|
||||
{
|
||||
return x < min_ ? min_ : (x > max_ ? max_ : x);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
38
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util_win32.c
generated
vendored
Normal file
38
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util_win32.c
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
This file is part of cpp-ethereum.
|
||||
|
||||
cpp-ethereum is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
cpp-ethereum is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** @file util.c
|
||||
* @author Tim Hughes <tim@twistedfury.com>
|
||||
* @date 2015
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include "util.h"
|
||||
|
||||
|
||||
// foward declare without all of Windows.h
|
||||
__declspec(dllimport) void __stdcall OutputDebugStringA(char const* lpOutputString);
|
||||
|
||||
void debugf(char const* str, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, str);
|
||||
|
||||
char buf[1<<16];
|
||||
_vsnprintf_s(buf, sizeof(buf), sizeof(buf), str, args);
|
||||
buf[sizeof(buf)-1] = '\0';
|
||||
OutputDebugStringA(buf);
|
||||
}
|
||||
267
Godeps/_workspace/src/github.com/ethereum/ethash/src/python/core.c
generated
vendored
Normal file
267
Godeps/_workspace/src/github.com/ethereum/ethash/src/python/core.c
generated
vendored
Normal file
@@ -0,0 +1,267 @@
|
||||
#include <Python.h>
|
||||
#include <alloca.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include "../libethash/ethash.h"
|
||||
#include "../libethash/internal.h"
|
||||
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
#define PY_STRING_FORMAT "y#"
|
||||
#define PY_CONST_STRING_FORMAT "y"
|
||||
#else
|
||||
#define PY_STRING_FORMAT "s#"
|
||||
#define PY_CONST_STRING_FORMAT "s"
|
||||
#endif
|
||||
|
||||
#define MIX_WORDS (ETHASH_MIX_BYTES/4)
|
||||
|
||||
static PyObject *
|
||||
mkcache_bytes(PyObject *self, PyObject *args) {
|
||||
unsigned long block_number;
|
||||
unsigned long cache_size;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "k", &block_number))
|
||||
return 0;
|
||||
|
||||
ethash_light_t L = ethash_light_new(block_number);
|
||||
PyObject * val = Py_BuildValue(PY_STRING_FORMAT, L->cache, L->cache_size);
|
||||
free(L->cache);
|
||||
return val;
|
||||
}
|
||||
|
||||
/*
|
||||
static PyObject *
|
||||
calc_dataset_bytes(PyObject *self, PyObject *args) {
|
||||
char *cache_bytes;
|
||||
unsigned long full_size;
|
||||
int cache_size;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "k" PY_STRING_FORMAT, &full_size, &cache_bytes, &cache_size))
|
||||
return 0;
|
||||
|
||||
if (full_size % MIX_WORDS != 0) {
|
||||
char error_message[1024];
|
||||
sprintf(error_message, "The size of data set must be a multiple of %i bytes (was %lu)", MIX_WORDS, full_size);
|
||||
PyErr_SetString(PyExc_ValueError, error_message);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (cache_size % ETHASH_HASH_BYTES != 0) {
|
||||
char error_message[1024];
|
||||
sprintf(error_message, "The size of the cache must be a multiple of %i bytes (was %i)", ETHASH_HASH_BYTES, cache_size);
|
||||
PyErr_SetString(PyExc_ValueError, error_message);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ethash_params params;
|
||||
params.cache_size = (size_t) cache_size;
|
||||
params.full_size = (size_t) full_size;
|
||||
ethash_cache cache;
|
||||
cache.mem = (void *) cache_bytes;
|
||||
void *mem = malloc(params.full_size);
|
||||
ethash_compute_full_data(mem, ¶ms, &cache);
|
||||
PyObject * val = Py_BuildValue(PY_STRING_FORMAT, (char *) mem, full_size);
|
||||
free(mem);
|
||||
return val;
|
||||
}*/
|
||||
|
||||
// hashimoto_light(full_size, cache, header, nonce)
|
||||
static PyObject *
|
||||
hashimoto_light(PyObject *self, PyObject *args) {
|
||||
char *cache_bytes;
|
||||
char *header;
|
||||
unsigned long block_number;
|
||||
unsigned long long nonce;
|
||||
int cache_size, header_size;
|
||||
if (!PyArg_ParseTuple(args, "k" PY_STRING_FORMAT PY_STRING_FORMAT "K", &block_number, &cache_bytes, &cache_size, &header, &header_size, &nonce))
|
||||
return 0;
|
||||
if (header_size != 32) {
|
||||
char error_message[1024];
|
||||
sprintf(error_message, "Seed must be 32 bytes long (was %i)", header_size);
|
||||
PyErr_SetString(PyExc_ValueError, error_message);
|
||||
return 0;
|
||||
}
|
||||
struct ethash_light *s;
|
||||
s = calloc(sizeof(*s), 1);
|
||||
s->cache = cache_bytes;
|
||||
s->cache_size = cache_size;
|
||||
s->block_number = block_number;
|
||||
struct ethash_h256 *h;
|
||||
h = calloc(sizeof(*h), 1);
|
||||
for (int i = 0; i < 32; i++) h->b[i] = header[i];
|
||||
struct ethash_return_value out = ethash_light_compute(s, *h, nonce);
|
||||
return Py_BuildValue("{" PY_CONST_STRING_FORMAT ":" PY_STRING_FORMAT "," PY_CONST_STRING_FORMAT ":" PY_STRING_FORMAT "}",
|
||||
"mix digest", &out.mix_hash, 32,
|
||||
"result", &out.result, 32);
|
||||
}
|
||||
/*
|
||||
// hashimoto_full(dataset, header, nonce)
|
||||
static PyObject *
|
||||
hashimoto_full(PyObject *self, PyObject *args) {
|
||||
char *full_bytes;
|
||||
char *header;
|
||||
unsigned long long nonce;
|
||||
int full_size, header_size;
|
||||
|
||||
if (!PyArg_ParseTuple(args, PY_STRING_FORMAT PY_STRING_FORMAT "K", &full_bytes, &full_size, &header, &header_size, &nonce))
|
||||
return 0;
|
||||
|
||||
if (full_size % MIX_WORDS != 0) {
|
||||
char error_message[1024];
|
||||
sprintf(error_message, "The size of data set must be a multiple of %i bytes (was %i)", MIX_WORDS, full_size);
|
||||
PyErr_SetString(PyExc_ValueError, error_message);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (header_size != 32) {
|
||||
char error_message[1024];
|
||||
sprintf(error_message, "Header must be 32 bytes long (was %i)", header_size);
|
||||
PyErr_SetString(PyExc_ValueError, error_message);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
ethash_return_value out;
|
||||
ethash_params params;
|
||||
params.full_size = (size_t) full_size;
|
||||
ethash_full(&out, (void *) full_bytes, ¶ms, (ethash_h256_t *) header, nonce);
|
||||
return Py_BuildValue("{" PY_CONST_STRING_FORMAT ":" PY_STRING_FORMAT ", " PY_CONST_STRING_FORMAT ":" PY_STRING_FORMAT "}",
|
||||
"mix digest", &out.mix_hash, 32,
|
||||
"result", &out.result, 32);
|
||||
}
|
||||
|
||||
// mine(dataset_bytes, header, difficulty_bytes)
|
||||
static PyObject *
|
||||
mine(PyObject *self, PyObject *args) {
|
||||
char *full_bytes;
|
||||
char *header;
|
||||
char *difficulty;
|
||||
srand(time(0));
|
||||
uint64_t nonce = ((uint64_t) rand()) << 32 | rand();
|
||||
int full_size, header_size, difficulty_size;
|
||||
|
||||
if (!PyArg_ParseTuple(args, PY_STRING_FORMAT PY_STRING_FORMAT PY_STRING_FORMAT, &full_bytes, &full_size, &header, &header_size, &difficulty, &difficulty_size))
|
||||
return 0;
|
||||
|
||||
if (full_size % MIX_WORDS != 0) {
|
||||
char error_message[1024];
|
||||
sprintf(error_message, "The size of data set must be a multiple of %i bytes (was %i)", MIX_WORDS, full_size);
|
||||
PyErr_SetString(PyExc_ValueError, error_message);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (header_size != 32) {
|
||||
char error_message[1024];
|
||||
sprintf(error_message, "Header must be 32 bytes long (was %i)", header_size);
|
||||
PyErr_SetString(PyExc_ValueError, error_message);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (difficulty_size != 32) {
|
||||
char error_message[1024];
|
||||
sprintf(error_message, "Difficulty must be an array of 32 bytes (only had %i)", difficulty_size);
|
||||
PyErr_SetString(PyExc_ValueError, error_message);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ethash_return_value out;
|
||||
ethash_params params;
|
||||
params.full_size = (size_t) full_size;
|
||||
|
||||
// TODO: Multi threading?
|
||||
do {
|
||||
ethash_full(&out, (void *) full_bytes, ¶ms, (const ethash_h256_t *) header, nonce++);
|
||||
// TODO: disagrees with the spec https://github.com/ethereum/wiki/wiki/Ethash#mining
|
||||
} while (!ethash_check_difficulty(&out.result, (const ethash_h256_t *) difficulty));
|
||||
|
||||
return Py_BuildValue("{" PY_CONST_STRING_FORMAT ":" PY_STRING_FORMAT ", " PY_CONST_STRING_FORMAT ":" PY_STRING_FORMAT ", " PY_CONST_STRING_FORMAT ":K}",
|
||||
"mix digest", &out.mix_hash, 32,
|
||||
"result", &out.result, 32,
|
||||
"nonce", nonce);
|
||||
}
|
||||
*/
|
||||
|
||||
//get_seedhash(block_number)
|
||||
static PyObject *
|
||||
get_seedhash(PyObject *self, PyObject *args) {
|
||||
unsigned long block_number;
|
||||
if (!PyArg_ParseTuple(args, "k", &block_number))
|
||||
return 0;
|
||||
if (block_number >= ETHASH_EPOCH_LENGTH * 2048) {
|
||||
char error_message[1024];
|
||||
sprintf(error_message, "Block number must be less than %i (was %lu)", ETHASH_EPOCH_LENGTH * 2048, block_number);
|
||||
|
||||
PyErr_SetString(PyExc_ValueError, error_message);
|
||||
return 0;
|
||||
}
|
||||
ethash_h256_t seedhash = ethash_get_seedhash(block_number);
|
||||
return Py_BuildValue(PY_STRING_FORMAT, (char *) &seedhash, 32);
|
||||
}
|
||||
|
||||
static PyMethodDef PyethashMethods[] =
|
||||
{
|
||||
{"get_seedhash", get_seedhash, METH_VARARGS,
|
||||
"get_seedhash(block_number)\n\n"
|
||||
"Gets the seedhash for a block."},
|
||||
{"mkcache_bytes", mkcache_bytes, METH_VARARGS,
|
||||
"mkcache_bytes(block_number)\n\n"
|
||||
"Makes a byte array for the cache for given block number\n"},
|
||||
/*{"calc_dataset_bytes", calc_dataset_bytes, METH_VARARGS,
|
||||
"calc_dataset_bytes(full_size, cache_bytes)\n\n"
|
||||
"Makes a byte array for the dataset for a given size given cache bytes"},*/
|
||||
{"hashimoto_light", hashimoto_light, METH_VARARGS,
|
||||
"hashimoto_light(block_number, cache_bytes, header, nonce)\n\n"
|
||||
"Runs the hashimoto hashing function just using cache bytes. Takes an int (full_size), byte array (cache_bytes), another byte array (header), and an int (nonce). Returns an object containing the mix digest, and hash result."},
|
||||
/*{"hashimoto_full", hashimoto_full, METH_VARARGS,
|
||||
"hashimoto_full(dataset_bytes, header, nonce)\n\n"
|
||||
"Runs the hashimoto hashing function using the dataset bytes. Useful for testing. Returns an object containing the mix digest (byte array), and hash result (another byte array)."},
|
||||
{"mine", mine, METH_VARARGS,
|
||||
"mine(dataset_bytes, header, difficulty_bytes)\n\n"
|
||||
"Mine for an adequate header. Returns an object containing the mix digest (byte array), hash result (another byte array) and nonce (an int)."},*/
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
static struct PyModuleDef PyethashModule = {
|
||||
PyModuleDef_HEAD_INIT,
|
||||
"pyethash",
|
||||
"...",
|
||||
-1,
|
||||
PyethashMethods
|
||||
};
|
||||
|
||||
PyMODINIT_FUNC PyInit_pyethash(void) {
|
||||
PyObject *module = PyModule_Create(&PyethashModule);
|
||||
// Following Spec: https://github.com/ethereum/wiki/wiki/Ethash#definitions
|
||||
PyModule_AddIntConstant(module, "REVISION", (long) ETHASH_REVISION);
|
||||
PyModule_AddIntConstant(module, "DATASET_BYTES_INIT", (long) ETHASH_DATASET_BYTES_INIT);
|
||||
PyModule_AddIntConstant(module, "DATASET_BYTES_GROWTH", (long) ETHASH_DATASET_BYTES_GROWTH);
|
||||
PyModule_AddIntConstant(module, "CACHE_BYTES_INIT", (long) ETHASH_CACHE_BYTES_INIT);
|
||||
PyModule_AddIntConstant(module, "CACHE_BYTES_GROWTH", (long) ETHASH_CACHE_BYTES_GROWTH);
|
||||
PyModule_AddIntConstant(module, "EPOCH_LENGTH", (long) ETHASH_EPOCH_LENGTH);
|
||||
PyModule_AddIntConstant(module, "MIX_BYTES", (long) ETHASH_MIX_BYTES);
|
||||
PyModule_AddIntConstant(module, "HASH_BYTES", (long) ETHASH_HASH_BYTES);
|
||||
PyModule_AddIntConstant(module, "DATASET_PARENTS", (long) ETHASH_DATASET_PARENTS);
|
||||
PyModule_AddIntConstant(module, "CACHE_ROUNDS", (long) ETHASH_CACHE_ROUNDS);
|
||||
PyModule_AddIntConstant(module, "ACCESSES", (long) ETHASH_ACCESSES);
|
||||
return module;
|
||||
}
|
||||
#else
|
||||
PyMODINIT_FUNC
|
||||
initpyethash(void) {
|
||||
PyObject *module = Py_InitModule("pyethash", PyethashMethods);
|
||||
// Following Spec: https://github.com/ethereum/wiki/wiki/Ethash#definitions
|
||||
PyModule_AddIntConstant(module, "REVISION", (long) ETHASH_REVISION);
|
||||
PyModule_AddIntConstant(module, "DATASET_BYTES_INIT", (long) ETHASH_DATASET_BYTES_INIT);
|
||||
PyModule_AddIntConstant(module, "DATASET_BYTES_GROWTH", (long) ETHASH_DATASET_BYTES_GROWTH);
|
||||
PyModule_AddIntConstant(module, "CACHE_BYTES_INIT", (long) ETHASH_CACHE_BYTES_INIT);
|
||||
PyModule_AddIntConstant(module, "CACHE_BYTES_GROWTH", (long) ETHASH_CACHE_BYTES_GROWTH);
|
||||
PyModule_AddIntConstant(module, "EPOCH_LENGTH", (long) ETHASH_EPOCH_LENGTH);
|
||||
PyModule_AddIntConstant(module, "MIX_BYTES", (long) ETHASH_MIX_BYTES);
|
||||
PyModule_AddIntConstant(module, "HASH_BYTES", (long) ETHASH_HASH_BYTES);
|
||||
PyModule_AddIntConstant(module, "DATASET_PARENTS", (long) ETHASH_DATASET_PARENTS);
|
||||
PyModule_AddIntConstant(module, "CACHE_ROUNDS", (long) ETHASH_CACHE_ROUNDS);
|
||||
PyModule_AddIntConstant(module, "ACCESSES", (long) ETHASH_ACCESSES);
|
||||
}
|
||||
#endif
|
||||
66
Godeps/_workspace/src/github.com/ethereum/ethash/test/c/CMakeLists.txt
generated
vendored
Normal file
66
Godeps/_workspace/src/github.com/ethereum/ethash/test/c/CMakeLists.txt
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
if (MSVC)
|
||||
if (NOT BOOST_ROOT)
|
||||
set (BOOST_ROOT "$ENV{BOOST_ROOT}")
|
||||
endif()
|
||||
set (CMAKE_PREFIX_PATH BOOST_ROOT)
|
||||
endif()
|
||||
|
||||
IF( NOT Boost_FOUND )
|
||||
# use multithreaded boost libraries, with -mt suffix
|
||||
set(Boost_USE_MULTITHREADED ON)
|
||||
|
||||
if (MSVC)
|
||||
# TODO handle other msvc versions or it will fail find them
|
||||
set(Boost_COMPILER -vc120)
|
||||
# use static boost libraries *.lib
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
elseif (APPLE)
|
||||
|
||||
# use static boost libraries *.a
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
|
||||
elseif (UNIX)
|
||||
# use dynamic boost libraries .dll
|
||||
set(Boost_USE_STATIC_LIBS OFF)
|
||||
|
||||
endif()
|
||||
find_package(Boost 1.48.0 COMPONENTS unit_test_framework system filesystem)
|
||||
ENDIF()
|
||||
|
||||
IF (Boost_FOUND)
|
||||
message(STATUS "boost header: ${Boost_INCLUDE_DIRS}")
|
||||
message(STATUS "boost libs : ${Boost_LIBRARIES}")
|
||||
|
||||
include_directories( ${Boost_INCLUDE_DIR} )
|
||||
include_directories(../../src)
|
||||
|
||||
link_directories(${Boost_LIBRARY_DIRS})
|
||||
file(GLOB HEADERS "*.h")
|
||||
if ((NOT MSVC) AND (NOT APPLE))
|
||||
ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK)
|
||||
endif()
|
||||
if (NOT CRYPTOPP_FOUND)
|
||||
find_package (CryptoPP)
|
||||
endif()
|
||||
|
||||
if (CRYPTOPP_FOUND)
|
||||
add_definitions(-DWITH_CRYPTOPP)
|
||||
endif()
|
||||
|
||||
if (NOT MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ")
|
||||
endif()
|
||||
|
||||
add_executable (Test "./test.cpp" ${HEADERS})
|
||||
target_link_libraries(Test ${ETHHASH_LIBS})
|
||||
target_link_libraries(Test ${Boost_FILESYSTEM_LIBRARIES})
|
||||
target_link_libraries(Test ${Boost_SYSTEM_LIBRARIES})
|
||||
target_link_libraries(Test ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
|
||||
|
||||
if (CRYPTOPP_FOUND)
|
||||
TARGET_LINK_LIBRARIES(Test ${CRYPTOPP_LIBRARIES})
|
||||
endif()
|
||||
|
||||
enable_testing ()
|
||||
add_test(NAME ethash COMMAND Test)
|
||||
ENDIF()
|
||||
668
Godeps/_workspace/src/github.com/ethereum/ethash/test/c/test.cpp
generated
vendored
Normal file
668
Godeps/_workspace/src/github.com/ethereum/ethash/test/c/test.cpp
generated
vendored
Normal file
@@ -0,0 +1,668 @@
|
||||
#include <iomanip>
|
||||
#include <libethash/fnv.h>
|
||||
#include <libethash/ethash.h>
|
||||
#include <libethash/internal.h>
|
||||
#include <libethash/io.h>
|
||||
|
||||
#ifdef WITH_CRYPTOPP
|
||||
|
||||
#include <libethash/sha3_cryptopp.h>
|
||||
|
||||
#else
|
||||
#include <libethash/sha3.h>
|
||||
#endif // WITH_CRYPTOPP
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <Shlobj.h>
|
||||
#endif
|
||||
|
||||
#define BOOST_TEST_MODULE Daggerhashimoto
|
||||
#define BOOST_TEST_MAIN
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <vector>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
using namespace std;
|
||||
using byte = uint8_t;
|
||||
using bytes = std::vector<byte>;
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
// Just an alloca "wrapper" to silence uint64_t to size_t conversion warnings in windows
|
||||
// consider replacing alloca calls with something better though!
|
||||
#define our_alloca(param__) alloca((size_t)(param__))
|
||||
|
||||
|
||||
// some functions taken from eth::dev for convenience.
|
||||
std::string bytesToHexString(const uint8_t *str, const uint64_t s)
|
||||
{
|
||||
std::ostringstream ret;
|
||||
|
||||
for (size_t i = 0; i < s; ++i)
|
||||
ret << std::hex << std::setfill('0') << std::setw(2) << std::nouppercase << (int) str[i];
|
||||
|
||||
return ret.str();
|
||||
}
|
||||
|
||||
std::string blockhashToHexString(ethash_h256_t* _hash)
|
||||
{
|
||||
return bytesToHexString((uint8_t*)_hash, 32);
|
||||
}
|
||||
|
||||
int fromHex(char _i)
|
||||
{
|
||||
if (_i >= '0' && _i <= '9')
|
||||
return _i - '0';
|
||||
if (_i >= 'a' && _i <= 'f')
|
||||
return _i - 'a' + 10;
|
||||
if (_i >= 'A' && _i <= 'F')
|
||||
return _i - 'A' + 10;
|
||||
|
||||
BOOST_REQUIRE_MESSAGE(false, "should never get here");
|
||||
return -1;
|
||||
}
|
||||
|
||||
bytes hexStringToBytes(std::string const& _s)
|
||||
{
|
||||
unsigned s = (_s[0] == '0' && _s[1] == 'x') ? 2 : 0;
|
||||
std::vector<uint8_t> ret;
|
||||
ret.reserve((_s.size() - s + 1) / 2);
|
||||
|
||||
if (_s.size() % 2)
|
||||
try
|
||||
{
|
||||
ret.push_back(fromHex(_s[s++]));
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
ret.push_back(0);
|
||||
}
|
||||
for (unsigned i = s; i < _s.size(); i += 2)
|
||||
try
|
||||
{
|
||||
ret.push_back((byte)(fromHex(_s[i]) * 16 + fromHex(_s[i + 1])));
|
||||
}
|
||||
catch (...){
|
||||
ret.push_back(0);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
ethash_h256_t stringToBlockhash(std::string const& _s)
|
||||
{
|
||||
ethash_h256_t ret;
|
||||
bytes b = hexStringToBytes(_s);
|
||||
memcpy(&ret, b.data(), b.size());
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(fnv_hash_check) {
|
||||
uint32_t x = 1235U;
|
||||
const uint32_t
|
||||
y = 9999999U,
|
||||
expected = (FNV_PRIME * x) ^y;
|
||||
|
||||
x = fnv_hash(x, y);
|
||||
|
||||
BOOST_REQUIRE_MESSAGE(x == expected,
|
||||
"\nexpected: " << expected << "\n"
|
||||
<< "actual: " << x << "\n");
|
||||
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(SHA256_check) {
|
||||
ethash_h256_t input;
|
||||
ethash_h256_t out;
|
||||
memcpy(&input, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 32);
|
||||
SHA3_256(&out, (uint8_t*)&input, 32);
|
||||
const std::string
|
||||
expected = "2b5ddf6f4d21c23de216f44d5e4bdc68e044b71897837ea74c83908be7037cd7",
|
||||
actual = bytesToHexString((uint8_t*)&out, 32);
|
||||
BOOST_REQUIRE_MESSAGE(expected == actual,
|
||||
"\nexpected: " << expected.c_str() << "\n"
|
||||
<< "actual: " << actual.c_str() << "\n");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(SHA512_check) {
|
||||
uint8_t input[64], out[64];
|
||||
memcpy(input, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 64);
|
||||
SHA3_512(out, input, 64);
|
||||
const std::string
|
||||
expected = "0be8a1d334b4655fe58c6b38789f984bb13225684e86b20517a55ab2386c7b61c306f25e0627c60064cecd6d80cd67a82b3890bd1289b7ceb473aad56a359405",
|
||||
actual = bytesToHexString(out, 64);
|
||||
BOOST_REQUIRE_MESSAGE(expected == actual,
|
||||
"\nexpected: " << expected.c_str() << "\n"
|
||||
<< "actual: " << actual.c_str() << "\n");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_swap_endian32) {
|
||||
uint32_t v32 = (uint32_t)0xBAADF00D;
|
||||
v32 = ethash_swap_u32(v32);
|
||||
BOOST_REQUIRE_EQUAL(v32, (uint32_t)0x0DF0ADBA);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_swap_endian64) {
|
||||
uint64_t v64 = (uint64_t)0xFEE1DEADDEADBEEF;
|
||||
v64 = ethash_swap_u64(v64);
|
||||
BOOST_REQUIRE_EQUAL(v64, (uint64_t)0xEFBEADDEADDEE1FE);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(ethash_params_init_genesis_check) {
|
||||
uint64_t full_size = ethash_get_datasize(0);
|
||||
uint64_t cache_size = ethash_get_cachesize(0);
|
||||
BOOST_REQUIRE_MESSAGE(full_size < ETHASH_DATASET_BYTES_INIT,
|
||||
"\nfull size: " << full_size << "\n"
|
||||
<< "should be less than or equal to: " << ETHASH_DATASET_BYTES_INIT << "\n");
|
||||
BOOST_REQUIRE_MESSAGE(full_size + 20 * ETHASH_MIX_BYTES >= ETHASH_DATASET_BYTES_INIT,
|
||||
"\nfull size + 20*MIX_BYTES: " << full_size + 20 * ETHASH_MIX_BYTES << "\n"
|
||||
<< "should be greater than or equal to: " << ETHASH_DATASET_BYTES_INIT << "\n");
|
||||
BOOST_REQUIRE_MESSAGE(cache_size < ETHASH_DATASET_BYTES_INIT / 32,
|
||||
"\ncache size: " << cache_size << "\n"
|
||||
<< "should be less than or equal to: " << ETHASH_DATASET_BYTES_INIT / 32 << "\n");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(ethash_params_init_genesis_calcifide_check) {
|
||||
uint64_t full_size = ethash_get_datasize(0);
|
||||
uint64_t cache_size = ethash_get_cachesize(0);
|
||||
const uint32_t expected_full_size = 1073739904;
|
||||
const uint32_t expected_cache_size = 16776896;
|
||||
BOOST_REQUIRE_MESSAGE(full_size == expected_full_size,
|
||||
"\nexpected: " << expected_cache_size << "\n"
|
||||
<< "actual: " << full_size << "\n");
|
||||
BOOST_REQUIRE_MESSAGE(cache_size == expected_cache_size,
|
||||
"\nexpected: " << expected_cache_size << "\n"
|
||||
<< "actual: " << cache_size << "\n");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(ethash_check_difficulty_check) {
|
||||
ethash_h256_t hash;
|
||||
ethash_h256_t target;
|
||||
memcpy(&hash, "11111111111111111111111111111111", 32);
|
||||
memcpy(&target, "22222222222222222222222222222222", 32);
|
||||
BOOST_REQUIRE_MESSAGE(
|
||||
ethash_check_difficulty(&hash, &target),
|
||||
"\nexpected \"" << std::string((char *) &hash, 32).c_str() << "\" to have the same or less difficulty than \"" << std::string((char *) &target, 32).c_str() << "\"\n");
|
||||
BOOST_REQUIRE_MESSAGE(
|
||||
ethash_check_difficulty(&hash, &hash), "");
|
||||
// "\nexpected \"" << hash << "\" to have the same or less difficulty than \"" << hash << "\"\n");
|
||||
memcpy(&target, "11111111111111111111111111111112", 32);
|
||||
BOOST_REQUIRE_MESSAGE(
|
||||
ethash_check_difficulty(&hash, &target), "");
|
||||
// "\nexpected \"" << hash << "\" to have the same or less difficulty than \"" << target << "\"\n");
|
||||
memcpy(&target, "11111111111111111111111111111110", 32);
|
||||
BOOST_REQUIRE_MESSAGE(
|
||||
!ethash_check_difficulty(&hash, &target), "");
|
||||
// "\nexpected \"" << hash << "\" to have more difficulty than \"" << target << "\"\n");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_ethash_io_mutable_name) {
|
||||
char mutable_name[DAG_MUTABLE_NAME_MAX_SIZE];
|
||||
// should have at least 8 bytes provided since this is what we test :)
|
||||
ethash_h256_t seed1 = ethash_h256_static_init(0, 10, 65, 255, 34, 55, 22, 8);
|
||||
ethash_io_mutable_name(1, &seed1, mutable_name);
|
||||
BOOST_REQUIRE_EQUAL(0, strcmp(mutable_name, "full-R1-000a41ff22371608"));
|
||||
ethash_h256_t seed2 = ethash_h256_static_init(0, 0, 0, 0, 0, 0, 0, 0);
|
||||
ethash_io_mutable_name(44, &seed2, mutable_name);
|
||||
BOOST_REQUIRE_EQUAL(0, strcmp(mutable_name, "full-R44-0000000000000000"));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_ethash_dir_creation) {
|
||||
ethash_h256_t seedhash;
|
||||
FILE *f = NULL;
|
||||
memset(&seedhash, 0, 32);
|
||||
BOOST_REQUIRE_EQUAL(
|
||||
ETHASH_IO_MEMO_MISMATCH,
|
||||
ethash_io_prepare("./test_ethash_directory/", seedhash, &f, 64, false)
|
||||
);
|
||||
BOOST_REQUIRE(f);
|
||||
|
||||
// let's make sure that the directory was created
|
||||
BOOST_REQUIRE(fs::is_directory(fs::path("./test_ethash_directory/")));
|
||||
|
||||
// cleanup
|
||||
fclose(f);
|
||||
fs::remove_all("./test_ethash_directory/");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_ethash_io_memo_file_match) {
|
||||
uint64_t full_size;
|
||||
uint64_t cache_size;
|
||||
ethash_h256_t seed;
|
||||
ethash_h256_t hash;
|
||||
FILE* f;
|
||||
memcpy(&seed, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 32);
|
||||
memcpy(&hash, "~~~X~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 32);
|
||||
|
||||
cache_size = 1024;
|
||||
full_size = 1024 * 32;
|
||||
|
||||
ethash_light_t light = ethash_light_new_internal(cache_size, &seed);
|
||||
ethash_full_t full = ethash_full_new_internal(
|
||||
"./test_ethash_directory/",
|
||||
seed,
|
||||
full_size,
|
||||
light,
|
||||
NULL
|
||||
);
|
||||
BOOST_ASSERT(full);
|
||||
// let's make sure that the directory was created
|
||||
BOOST_REQUIRE(fs::is_directory(fs::path("./test_ethash_directory/")));
|
||||
// delete the full here so that memory is properly unmapped and FILE handler freed
|
||||
ethash_full_delete(full);
|
||||
// and check that we have a match when checking again
|
||||
BOOST_REQUIRE_EQUAL(
|
||||
ETHASH_IO_MEMO_MATCH,
|
||||
ethash_io_prepare("./test_ethash_directory/", seed, &f, full_size, false)
|
||||
);
|
||||
BOOST_REQUIRE(f);
|
||||
|
||||
// cleanup
|
||||
fclose(f);
|
||||
ethash_light_delete(light);
|
||||
fs::remove_all("./test_ethash_directory/");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_ethash_io_memo_file_size_mismatch) {
|
||||
static const int blockn = 0;
|
||||
ethash_h256_t seedhash = ethash_get_seedhash(blockn);
|
||||
FILE *f = NULL;
|
||||
BOOST_REQUIRE_EQUAL(
|
||||
ETHASH_IO_MEMO_MISMATCH,
|
||||
ethash_io_prepare("./test_ethash_directory/", seedhash, &f, 64, false)
|
||||
);
|
||||
BOOST_REQUIRE(f);
|
||||
fclose(f);
|
||||
|
||||
// let's make sure that the directory was created
|
||||
BOOST_REQUIRE(fs::is_directory(fs::path("./test_ethash_directory/")));
|
||||
// and check that we get the size mismatch detected if we request diffferent size
|
||||
BOOST_REQUIRE_EQUAL(
|
||||
ETHASH_IO_MEMO_SIZE_MISMATCH,
|
||||
ethash_io_prepare("./test_ethash_directory/", seedhash, &f, 65, false)
|
||||
);
|
||||
|
||||
// cleanup
|
||||
fs::remove_all("./test_ethash_directory/");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_ethash_get_default_dirname) {
|
||||
char result[256];
|
||||
// this is really not an easy thing to test for in a unit test, so yeah it does look ugly
|
||||
#ifdef _WIN32
|
||||
char homedir[256];
|
||||
BOOST_REQUIRE(SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_PROFILE, NULL, 0, (WCHAR*)homedir)));
|
||||
BOOST_REQUIRE(ethash_get_default_dirname(result, 256));
|
||||
std::string res = std::string(homedir) + std::string("\\Appdata\\Ethash\\");
|
||||
#else
|
||||
char* homedir = getenv("HOME");
|
||||
BOOST_REQUIRE(ethash_get_default_dirname(result, 256));
|
||||
std::string res = std::string(homedir) + std::string("/.ethash/");
|
||||
#endif
|
||||
BOOST_CHECK_MESSAGE(strcmp(res.c_str(), result) == 0,
|
||||
"Expected \"" + res + "\" but got \"" + std::string(result) + "\""
|
||||
);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(light_and_full_client_checks) {
|
||||
uint64_t full_size;
|
||||
uint64_t cache_size;
|
||||
ethash_h256_t seed;
|
||||
ethash_h256_t hash;
|
||||
ethash_h256_t difficulty;
|
||||
ethash_return_value_t light_out;
|
||||
ethash_return_value_t full_out;
|
||||
memcpy(&seed, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 32);
|
||||
memcpy(&hash, "~~~X~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 32);
|
||||
|
||||
// Set the difficulty
|
||||
ethash_h256_set(&difficulty, 0, 197);
|
||||
ethash_h256_set(&difficulty, 1, 90);
|
||||
for (int i = 2; i < 32; i++)
|
||||
ethash_h256_set(&difficulty, i, 255);
|
||||
|
||||
cache_size = 1024;
|
||||
full_size = 1024 * 32;
|
||||
|
||||
ethash_light_t light = ethash_light_new_internal(cache_size, &seed);
|
||||
ethash_full_t full = ethash_full_new_internal(
|
||||
"./test_ethash_directory/",
|
||||
seed,
|
||||
full_size,
|
||||
light,
|
||||
NULL
|
||||
);
|
||||
BOOST_ASSERT(full);
|
||||
{
|
||||
const std::string
|
||||
expected = "2da2b506f21070e1143d908e867962486d6b0a02e31d468fd5e3a7143aafa76a14201f63374314e2a6aaf84ad2eb57105dea3378378965a1b3873453bb2b78f9a8620b2ebeca41fbc773bb837b5e724d6eb2de570d99858df0d7d97067fb8103b21757873b735097b35d3bea8fd1c359a9e8a63c1540c76c9784cf8d975e995ca8620b2ebeca41fbc773bb837b5e724d6eb2de570d99858df0d7d97067fb8103b21757873b735097b35d3bea8fd1c359a9e8a63c1540c76c9784cf8d975e995ca8620b2ebeca41fbc773bb837b5e724d6eb2de570d99858df0d7d97067fb8103b21757873b735097b35d3bea8fd1c359a9e8a63c1540c76c9784cf8d975e995c259440b89fa3481c2c33171477c305c8e1e421f8d8f6d59585449d0034f3e421808d8da6bbd0b6378f567647cc6c4ba6c434592b198ad444e7284905b7c6adaf70bf43ec2daa7bd5e8951aa609ab472c124cf9eba3d38cff5091dc3f58409edcc386c743c3bd66f92408796ee1e82dd149eaefbf52b00ce33014a6eb3e50625413b072a58bc01da28262f42cbe4f87d4abc2bf287d15618405a1fe4e386fcdafbb171064bd99901d8f81dd6789396ce5e364ac944bbbd75a7827291c70b42d26385910cd53ca535ab29433dd5c5714d26e0dce95514c5ef866329c12e958097e84462197c2b32087849dab33e88b11da61d52f9dbc0b92cc61f742c07dbbf751c49d7678624ee60dfbe62e5e8c47a03d8247643f3d16ad8c8e663953bcda1f59d7e2d4a9bf0768e789432212621967a8f41121ad1df6ae1fa78782530695414c6213942865b2730375019105cae91a4c17a558d4b63059661d9f108362143107babe0b848de412e4da59168cce82bfbff3c99e022dd6ac1e559db991f2e3f7bb910cefd173e65ed00a8d5d416534e2c8416ff23977dbf3eb7180b75c71580d08ce95efeb9b0afe904ea12285a392aff0c8561ff79fca67f694a62b9e52377485c57cc3598d84cac0a9d27960de0cc31ff9bbfe455acaa62c8aa5d2cce96f345da9afe843d258a99c4eaf3650fc62efd81c7b81cd0d534d2d71eeda7a6e315d540b4473c80f8730037dc2ae3e47b986240cfc65ccc565f0d8cde0bc68a57e39a271dda57440b3598bee19f799611d25731a96b5dbbbefdff6f4f656161462633030d62560ea4e9c161cf78fc96a2ca5aaa32453a6c5dea206f766244e8c9d9a8dc61185ce37f1fc804459c5f07434f8ecb34141b8dcae7eae704c950b55556c5f40140c3714b45eddb02637513268778cbf937a33e4e33183685f9deb31ef54e90161e76d969587dd782eaa94e289420e7c2ee908517f5893a26fdb5873d68f92d118d4bcf98d7a4916794d6ab290045e30f9ea00ca547c584b8482b0331ba1539a0f2714fddc3a0b06b0cfbb6a607b8339c39bcfd6640b1f653e9d70ef6c985b",
|
||||
actual = bytesToHexString((uint8_t const *) light->cache, cache_size);
|
||||
|
||||
BOOST_REQUIRE_MESSAGE(expected == actual,
|
||||
"\nexpected: " << expected.c_str() << "\n"
|
||||
<< "actual: " << actual.c_str() << "\n");
|
||||
}
|
||||
{
|
||||
node node;
|
||||
ethash_calculate_dag_item(&node, 0, light);
|
||||
const std::string
|
||||
actual = bytesToHexString((uint8_t const *) &node, sizeof(node)),
|
||||
expected = "b1698f829f90b35455804e5185d78f549fcb1bdce2bee006d4d7e68eb154b596be1427769eb1c3c3e93180c760af75f81d1023da6a0ffbe321c153a7c0103597";
|
||||
BOOST_REQUIRE_MESSAGE(actual == expected,
|
||||
"\n" << "expected: " << expected.c_str() << "\n"
|
||||
<< "actual: " << actual.c_str() << "\n");
|
||||
}
|
||||
{
|
||||
for (int i = 0; i < full_size / sizeof(node); ++i) {
|
||||
for (uint32_t j = 0; j < 32; ++j) {
|
||||
node expected_node;
|
||||
ethash_calculate_dag_item(&expected_node, j, light);
|
||||
const std::string
|
||||
actual = bytesToHexString((uint8_t const *) &(full->data[j]), sizeof(node)),
|
||||
expected = bytesToHexString((uint8_t const *) &expected_node, sizeof(node));
|
||||
BOOST_REQUIRE_MESSAGE(actual == expected,
|
||||
"\ni: " << j << "\n"
|
||||
<< "expected: " << expected.c_str() << "\n"
|
||||
<< "actual: " << actual.c_str() << "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
uint64_t nonce = 0x7c7c597c;
|
||||
full_out = ethash_full_compute(full, hash, nonce);
|
||||
BOOST_REQUIRE(full_out.success);
|
||||
light_out = ethash_light_compute_internal(light, full_size, hash, nonce);
|
||||
BOOST_REQUIRE(light_out.success);
|
||||
const std::string
|
||||
light_result_string = blockhashToHexString(&light_out.result),
|
||||
full_result_string = blockhashToHexString(&full_out.result);
|
||||
BOOST_REQUIRE_MESSAGE(light_result_string == full_result_string,
|
||||
"\nlight result: " << light_result_string.c_str() << "\n"
|
||||
<< "full result: " << full_result_string.c_str() << "\n");
|
||||
const std::string
|
||||
light_mix_hash_string = blockhashToHexString(&light_out.mix_hash),
|
||||
full_mix_hash_string = blockhashToHexString(&full_out.mix_hash);
|
||||
BOOST_REQUIRE_MESSAGE(full_mix_hash_string == light_mix_hash_string,
|
||||
"\nlight mix hash: " << light_mix_hash_string.c_str() << "\n"
|
||||
<< "full mix hash: " << full_mix_hash_string.c_str() << "\n");
|
||||
ethash_h256_t check_hash;
|
||||
ethash_quick_hash(&check_hash, &hash, nonce, &full_out.mix_hash);
|
||||
const std::string check_hash_string = blockhashToHexString(&check_hash);
|
||||
BOOST_REQUIRE_MESSAGE(check_hash_string == full_result_string,
|
||||
"\ncheck hash string: " << check_hash_string.c_str() << "\n"
|
||||
<< "full result: " << full_result_string.c_str() << "\n");
|
||||
}
|
||||
{
|
||||
full_out = ethash_full_compute(full, hash, 5);
|
||||
BOOST_REQUIRE(full_out.success);
|
||||
std::string
|
||||
light_result_string = blockhashToHexString(&light_out.result),
|
||||
full_result_string = blockhashToHexString(&full_out.result);
|
||||
BOOST_REQUIRE_MESSAGE(light_result_string != full_result_string,
|
||||
"\nlight result and full result should differ: " << light_result_string.c_str() << "\n");
|
||||
|
||||
light_out = ethash_light_compute_internal(light, full_size, hash, 5);
|
||||
BOOST_REQUIRE(light_out.success);
|
||||
light_result_string = blockhashToHexString(&light_out.result);
|
||||
BOOST_REQUIRE_MESSAGE(light_result_string == full_result_string,
|
||||
"\nlight result and full result should be the same\n"
|
||||
<< "light result: " << light_result_string.c_str() << "\n"
|
||||
<< "full result: " << full_result_string.c_str() << "\n");
|
||||
std::string
|
||||
light_mix_hash_string = blockhashToHexString(&light_out.mix_hash),
|
||||
full_mix_hash_string = blockhashToHexString(&full_out.mix_hash);
|
||||
BOOST_REQUIRE_MESSAGE(full_mix_hash_string == light_mix_hash_string,
|
||||
"\nlight mix hash: " << light_mix_hash_string.c_str() << "\n"
|
||||
<< "full mix hash: " << full_mix_hash_string.c_str() << "\n");
|
||||
BOOST_REQUIRE_MESSAGE(ethash_check_difficulty(&full_out.result, &difficulty),
|
||||
"ethash_check_difficulty failed"
|
||||
);
|
||||
BOOST_REQUIRE_MESSAGE(ethash_quick_check_difficulty(&hash, 5U, &full_out.mix_hash, &difficulty),
|
||||
"ethash_quick_check_difficulty failed"
|
||||
);
|
||||
}
|
||||
ethash_light_delete(light);
|
||||
ethash_full_delete(full);
|
||||
fs::remove_all("./test_ethash_directory/");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(ethash_full_new_when_dag_exists_with_wrong_size) {
|
||||
uint64_t full_size;
|
||||
uint64_t cache_size;
|
||||
ethash_h256_t seed;
|
||||
ethash_h256_t hash;
|
||||
ethash_return_value_t full_out;
|
||||
ethash_return_value_t light_out;
|
||||
memcpy(&seed, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 32);
|
||||
memcpy(&hash, "~~~X~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 32);
|
||||
|
||||
cache_size = 1024;
|
||||
full_size = 1024 * 32;
|
||||
|
||||
// first make a DAG file of "wrong size"
|
||||
FILE *f;
|
||||
BOOST_REQUIRE_EQUAL(
|
||||
ETHASH_IO_MEMO_MISMATCH,
|
||||
ethash_io_prepare("./test_ethash_directory/", seed, &f, 64, false)
|
||||
);
|
||||
fclose(f);
|
||||
|
||||
// then create new DAG, which should detect the wrong size and force create a new file
|
||||
ethash_light_t light = ethash_light_new_internal(cache_size, &seed);
|
||||
BOOST_ASSERT(light);
|
||||
ethash_full_t full = ethash_full_new_internal(
|
||||
"./test_ethash_directory/",
|
||||
seed,
|
||||
full_size,
|
||||
light,
|
||||
NULL
|
||||
);
|
||||
BOOST_ASSERT(full);
|
||||
{
|
||||
uint64_t nonce = 0x7c7c597c;
|
||||
full_out = ethash_full_compute(full, hash, nonce);
|
||||
BOOST_REQUIRE(full_out.success);
|
||||
light_out = ethash_light_compute_internal(light, full_size, hash, nonce);
|
||||
BOOST_REQUIRE(light_out.success);
|
||||
const std::string
|
||||
light_result_string = blockhashToHexString(&light_out.result),
|
||||
full_result_string = blockhashToHexString(&full_out.result);
|
||||
BOOST_REQUIRE_MESSAGE(light_result_string == full_result_string,
|
||||
"\nlight result: " << light_result_string.c_str() << "\n"
|
||||
<< "full result: " << full_result_string.c_str() << "\n");
|
||||
const std::string
|
||||
light_mix_hash_string = blockhashToHexString(&light_out.mix_hash),
|
||||
full_mix_hash_string = blockhashToHexString(&full_out.mix_hash);
|
||||
BOOST_REQUIRE_MESSAGE(full_mix_hash_string == light_mix_hash_string,
|
||||
"\nlight mix hash: " << light_mix_hash_string.c_str() << "\n"
|
||||
<< "full mix hash: " << full_mix_hash_string.c_str() << "\n");
|
||||
ethash_h256_t check_hash;
|
||||
ethash_quick_hash(&check_hash, &hash, nonce, &full_out.mix_hash);
|
||||
const std::string check_hash_string = blockhashToHexString(&check_hash);
|
||||
BOOST_REQUIRE_MESSAGE(check_hash_string == full_result_string,
|
||||
"\ncheck hash string: " << check_hash_string.c_str() << "\n"
|
||||
<< "full result: " << full_result_string.c_str() << "\n");
|
||||
}
|
||||
|
||||
ethash_light_delete(light);
|
||||
ethash_full_delete(full);
|
||||
fs::remove_all("./test_ethash_directory/");
|
||||
}
|
||||
|
||||
static bool g_executed = false;
|
||||
static unsigned g_prev_progress = 0;
|
||||
static int test_full_callback(unsigned _progress)
|
||||
{
|
||||
g_executed = true;
|
||||
BOOST_CHECK(_progress >= g_prev_progress);
|
||||
g_prev_progress = _progress;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test_full_callback_that_fails(unsigned _progress)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int test_full_callback_create_incomplete_dag(unsigned _progress)
|
||||
{
|
||||
if (_progress >= 30) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(full_client_callback) {
|
||||
uint64_t full_size;
|
||||
uint64_t cache_size;
|
||||
ethash_h256_t seed;
|
||||
ethash_h256_t hash;
|
||||
memcpy(&seed, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 32);
|
||||
memcpy(&hash, "~~~X~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 32);
|
||||
|
||||
cache_size = 1024;
|
||||
full_size = 1024 * 32;
|
||||
|
||||
ethash_light_t light = ethash_light_new_internal(cache_size, &seed);
|
||||
ethash_full_t full = ethash_full_new_internal(
|
||||
"./test_ethash_directory/",
|
||||
seed,
|
||||
full_size,
|
||||
light,
|
||||
test_full_callback
|
||||
);
|
||||
BOOST_ASSERT(full);
|
||||
BOOST_CHECK(g_executed);
|
||||
BOOST_REQUIRE_EQUAL(g_prev_progress, 100);
|
||||
|
||||
ethash_full_delete(full);
|
||||
ethash_light_delete(light);
|
||||
fs::remove_all("./test_ethash_directory/");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(failing_full_client_callback) {
|
||||
uint64_t full_size;
|
||||
uint64_t cache_size;
|
||||
ethash_h256_t seed;
|
||||
ethash_h256_t hash;
|
||||
memcpy(&seed, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 32);
|
||||
memcpy(&hash, "~~~X~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 32);
|
||||
|
||||
cache_size = 1024;
|
||||
full_size = 1024 * 32;
|
||||
|
||||
ethash_light_t light = ethash_light_new_internal(cache_size, &seed);
|
||||
ethash_full_t full = ethash_full_new_internal(
|
||||
"./test_ethash_directory/",
|
||||
seed,
|
||||
full_size,
|
||||
light,
|
||||
test_full_callback_that_fails
|
||||
);
|
||||
BOOST_ASSERT(!full);
|
||||
ethash_light_delete(light);
|
||||
fs::remove_all("./test_ethash_directory/");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_incomplete_dag_file) {
|
||||
uint64_t full_size;
|
||||
uint64_t cache_size;
|
||||
ethash_h256_t seed;
|
||||
ethash_h256_t hash;
|
||||
memcpy(&seed, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 32);
|
||||
memcpy(&hash, "~~~X~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 32);
|
||||
|
||||
cache_size = 1024;
|
||||
full_size = 1024 * 32;
|
||||
|
||||
ethash_light_t light = ethash_light_new_internal(cache_size, &seed);
|
||||
// create a full but stop at 30%, so no magic number is written
|
||||
ethash_full_t full = ethash_full_new_internal(
|
||||
"./test_ethash_directory/",
|
||||
seed,
|
||||
full_size,
|
||||
light,
|
||||
test_full_callback_create_incomplete_dag
|
||||
);
|
||||
BOOST_ASSERT(!full);
|
||||
FILE *f = NULL;
|
||||
// confirm that we get a size_mismatch because the magic number is missing
|
||||
BOOST_REQUIRE_EQUAL(
|
||||
ETHASH_IO_MEMO_SIZE_MISMATCH,
|
||||
ethash_io_prepare("./test_ethash_directory/", seed, &f, full_size, false)
|
||||
);
|
||||
ethash_light_delete(light);
|
||||
fs::remove_all("./test_ethash_directory/");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_block22_verification) {
|
||||
// from POC-9 testnet, epoch 0
|
||||
ethash_light_t light = ethash_light_new(22);
|
||||
ethash_h256_t seedhash = stringToBlockhash("372eca2454ead349c3df0ab5d00b0b706b23e49d469387db91811cee0358fc6d");
|
||||
BOOST_ASSERT(light);
|
||||
ethash_return_value_t ret = ethash_light_compute(
|
||||
light,
|
||||
seedhash,
|
||||
0x495732e0ed7a801cU
|
||||
);
|
||||
BOOST_REQUIRE_EQUAL(blockhashToHexString(&ret.result), "00000b184f1fdd88bfd94c86c39e65db0c36144d5e43f745f722196e730cb614");
|
||||
ethash_h256_t difficulty = ethash_h256_static_init(0x2, 0x5, 0x40);
|
||||
BOOST_REQUIRE(ethash_check_difficulty(&ret.result, &difficulty));
|
||||
ethash_light_delete(light);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_block30001_verification) {
|
||||
// from POC-9 testnet, epoch 1
|
||||
ethash_light_t light = ethash_light_new(30001);
|
||||
ethash_h256_t seedhash = stringToBlockhash("7e44356ee3441623bc72a683fd3708fdf75e971bbe294f33e539eedad4b92b34");
|
||||
BOOST_ASSERT(light);
|
||||
ethash_return_value_t ret = ethash_light_compute(
|
||||
light,
|
||||
seedhash,
|
||||
0x318df1c8adef7e5eU
|
||||
);
|
||||
ethash_h256_t difficulty = ethash_h256_static_init(0x17, 0x62, 0xff);
|
||||
BOOST_REQUIRE(ethash_check_difficulty(&ret.result, &difficulty));
|
||||
ethash_light_delete(light);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_block60000_verification) {
|
||||
// from POC-9 testnet, epoch 2
|
||||
ethash_light_t light = ethash_light_new(60000);
|
||||
ethash_h256_t seedhash = stringToBlockhash("5fc898f16035bf5ac9c6d9077ae1e3d5fc1ecc3c9fd5bee8bb00e810fdacbaa0");
|
||||
BOOST_ASSERT(light);
|
||||
ethash_return_value_t ret = ethash_light_compute(
|
||||
light,
|
||||
seedhash,
|
||||
0x50377003e5d830caU
|
||||
);
|
||||
ethash_h256_t difficulty = ethash_h256_static_init(0x25, 0xa6, 0x1e);
|
||||
BOOST_REQUIRE(ethash_check_difficulty(&ret.result, &difficulty));
|
||||
ethash_light_delete(light);
|
||||
}
|
||||
|
||||
// Test of Full DAG creation with the minimal ethash.h API.
|
||||
// Commented out since travis tests would take too much time.
|
||||
// Uncomment and run on your own machine if you want to confirm
|
||||
// it works fine.
|
||||
#if 0
|
||||
static int progress_cb(unsigned _progress)
|
||||
{
|
||||
printf("CREATING DAG. PROGRESS: %u\n", _progress);
|
||||
fflush(stdout);
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(full_dag_test) {
|
||||
ethash_light_t light = ethash_light_new(55);
|
||||
BOOST_ASSERT(light);
|
||||
ethash_full_t full = ethash_full_new(light, progress_cb);
|
||||
BOOST_ASSERT(full);
|
||||
ethash_light_delete(light);
|
||||
ethash_full_delete(full);
|
||||
}
|
||||
#endif
|
||||
32
Godeps/_workspace/src/github.com/ethereum/ethash/test/c/test.sh
generated
vendored
Normal file
32
Godeps/_workspace/src/github.com/ethereum/ethash/test/c/test.sh
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Strict mode
|
||||
set -e
|
||||
|
||||
VALGRIND_ARGS="--tool=memcheck"
|
||||
VALGRIND_ARGS+=" --leak-check=yes"
|
||||
VALGRIND_ARGS+=" --track-origins=yes"
|
||||
VALGRIND_ARGS+=" --show-reachable=yes"
|
||||
VALGRIND_ARGS+=" --num-callers=20"
|
||||
VALGRIND_ARGS+=" --track-fds=yes"
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
|
||||
done
|
||||
TEST_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
rm -rf $TEST_DIR/build
|
||||
mkdir -p $TEST_DIR/build
|
||||
cd $TEST_DIR/build ;
|
||||
cmake ../../.. > /dev/null
|
||||
make Test
|
||||
./test/c/Test
|
||||
|
||||
# If we have valgrind also run memory check tests
|
||||
if hash valgrind 2>/dev/null; then
|
||||
echo "======== Running tests under valgrind ========";
|
||||
cd $TEST_DIR/build/ && valgrind $VALGRIND_ARGS ./test/c/Test
|
||||
fi
|
||||
1
Godeps/_workspace/src/github.com/ethereum/ethash/test/python/.gitignore
generated
vendored
Normal file
1
Godeps/_workspace/src/github.com/ethereum/ethash/test/python/.gitignore
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
python-virtual-env/
|
||||
3
Godeps/_workspace/src/github.com/ethereum/ethash/test/python/requirements.txt
generated
vendored
Normal file
3
Godeps/_workspace/src/github.com/ethereum/ethash/test/python/requirements.txt
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
pyethereum==0.7.522
|
||||
nose==1.3.4
|
||||
pysha3==0.3
|
||||
30
Godeps/_workspace/src/github.com/ethereum/ethash/test/python/test.sh
generated
vendored
Normal file
30
Godeps/_workspace/src/github.com/ethereum/ethash/test/python/test.sh
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Strict mode
|
||||
set -e
|
||||
|
||||
if [ -x "$(which virtualenv2)" ] ; then
|
||||
VIRTUALENV_EXEC=virtualenv2
|
||||
elif [ -x "$(which virtualenv)" ] ; then
|
||||
VIRTUALENV_EXEC=virtualenv
|
||||
else
|
||||
echo "Could not find a suitable version of virtualenv"
|
||||
false
|
||||
fi
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
|
||||
done
|
||||
TEST_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
[ -d $TEST_DIR/python-virtual-env ] || $VIRTUALENV_EXEC --system-site-packages $TEST_DIR/python-virtual-env
|
||||
source $TEST_DIR/python-virtual-env/bin/activate
|
||||
pip install -r $TEST_DIR/requirements.txt > /dev/null
|
||||
# force installation of nose in virtualenv even if existing in thereuser's system
|
||||
pip install nose -I
|
||||
pip install --upgrade --no-deps --force-reinstall -e $TEST_DIR/../..
|
||||
cd $TEST_DIR
|
||||
nosetests --with-doctest -v --nocapture
|
||||
105
Godeps/_workspace/src/github.com/ethereum/ethash/test/python/test_pyethash.py
generated
vendored
Normal file
105
Godeps/_workspace/src/github.com/ethereum/ethash/test/python/test_pyethash.py
generated
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
import pyethash
|
||||
from random import randint
|
||||
|
||||
def test_get_cache_size_not_None():
|
||||
for _ in range(100):
|
||||
block_num = randint(0,12456789)
|
||||
out = pyethash.get_cache_size(block_num)
|
||||
assert out != None
|
||||
|
||||
def test_get_full_size_not_None():
|
||||
for _ in range(100):
|
||||
block_num = randint(0,12456789)
|
||||
out = pyethash.get_full_size(block_num)
|
||||
assert out != None
|
||||
|
||||
def test_get_cache_size_based_on_EPOCH():
|
||||
for _ in range(100):
|
||||
block_num = randint(0,12456789)
|
||||
out1 = pyethash.get_cache_size(block_num)
|
||||
out2 = pyethash.get_cache_size((block_num // pyethash.EPOCH_LENGTH) * pyethash.EPOCH_LENGTH)
|
||||
assert out1 == out2
|
||||
|
||||
def test_get_full_size_based_on_EPOCH():
|
||||
for _ in range(100):
|
||||
block_num = randint(0,12456789)
|
||||
out1 = pyethash.get_full_size(block_num)
|
||||
out2 = pyethash.get_full_size((block_num // pyethash.EPOCH_LENGTH) * pyethash.EPOCH_LENGTH)
|
||||
assert out1 == out2
|
||||
|
||||
# See light_and_full_client_checks in test.cpp
|
||||
def test_mkcache_is_as_expected():
|
||||
actual = pyethash.mkcache_bytes(
|
||||
1024,
|
||||
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~").encode('hex')
|
||||
expected = "2da2b506f21070e1143d908e867962486d6b0a02e31d468fd5e3a7143aafa76a14201f63374314e2a6aaf84ad2eb57105dea3378378965a1b3873453bb2b78f9a8620b2ebeca41fbc773bb837b5e724d6eb2de570d99858df0d7d97067fb8103b21757873b735097b35d3bea8fd1c359a9e8a63c1540c76c9784cf8d975e995ca8620b2ebeca41fbc773bb837b5e724d6eb2de570d99858df0d7d97067fb8103b21757873b735097b35d3bea8fd1c359a9e8a63c1540c76c9784cf8d975e995ca8620b2ebeca41fbc773bb837b5e724d6eb2de570d99858df0d7d97067fb8103b21757873b735097b35d3bea8fd1c359a9e8a63c1540c76c9784cf8d975e995c259440b89fa3481c2c33171477c305c8e1e421f8d8f6d59585449d0034f3e421808d8da6bbd0b6378f567647cc6c4ba6c434592b198ad444e7284905b7c6adaf70bf43ec2daa7bd5e8951aa609ab472c124cf9eba3d38cff5091dc3f58409edcc386c743c3bd66f92408796ee1e82dd149eaefbf52b00ce33014a6eb3e50625413b072a58bc01da28262f42cbe4f87d4abc2bf287d15618405a1fe4e386fcdafbb171064bd99901d8f81dd6789396ce5e364ac944bbbd75a7827291c70b42d26385910cd53ca535ab29433dd5c5714d26e0dce95514c5ef866329c12e958097e84462197c2b32087849dab33e88b11da61d52f9dbc0b92cc61f742c07dbbf751c49d7678624ee60dfbe62e5e8c47a03d8247643f3d16ad8c8e663953bcda1f59d7e2d4a9bf0768e789432212621967a8f41121ad1df6ae1fa78782530695414c6213942865b2730375019105cae91a4c17a558d4b63059661d9f108362143107babe0b848de412e4da59168cce82bfbff3c99e022dd6ac1e559db991f2e3f7bb910cefd173e65ed00a8d5d416534e2c8416ff23977dbf3eb7180b75c71580d08ce95efeb9b0afe904ea12285a392aff0c8561ff79fca67f694a62b9e52377485c57cc3598d84cac0a9d27960de0cc31ff9bbfe455acaa62c8aa5d2cce96f345da9afe843d258a99c4eaf3650fc62efd81c7b81cd0d534d2d71eeda7a6e315d540b4473c80f8730037dc2ae3e47b986240cfc65ccc565f0d8cde0bc68a57e39a271dda57440b3598bee19f799611d25731a96b5dbbbefdff6f4f656161462633030d62560ea4e9c161cf78fc96a2ca5aaa32453a6c5dea206f766244e8c9d9a8dc61185ce37f1fc804459c5f07434f8ecb34141b8dcae7eae704c950b55556c5f40140c3714b45eddb02637513268778cbf937a33e4e33183685f9deb31ef54e90161e76d969587dd782eaa94e289420e7c2ee908517f5893a26fdb5873d68f92d118d4bcf98d7a4916794d6ab290045e30f9ea00ca547c584b8482b0331ba1539a0f2714fddc3a0b06b0cfbb6a607b8339c39bcfd6640b1f653e9d70ef6c985b"
|
||||
assert actual == expected
|
||||
|
||||
def test_calc_dataset_is_not_None():
|
||||
cache = pyethash.mkcache_bytes(
|
||||
1024,
|
||||
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
|
||||
assert pyethash.calc_dataset_bytes(1024 * 32, cache) != None
|
||||
|
||||
def test_light_and_full_agree():
|
||||
cache = pyethash.mkcache_bytes(
|
||||
1024,
|
||||
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
|
||||
full_size = 1024 * 32
|
||||
header = "~~~~~X~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
light_result = pyethash.hashimoto_light(full_size, cache, header, 0)
|
||||
dataset = pyethash.calc_dataset_bytes(full_size, cache)
|
||||
full_result = pyethash.hashimoto_full(dataset, header, 0)
|
||||
assert light_result["mix digest"] != None
|
||||
assert len(light_result["mix digest"]) == 32
|
||||
assert light_result["mix digest"] == full_result["mix digest"]
|
||||
assert light_result["result"] != None
|
||||
assert len(light_result["result"]) == 32
|
||||
assert light_result["result"] == full_result["result"]
|
||||
|
||||
def int_to_bytes(i):
|
||||
b = []
|
||||
for _ in range(32):
|
||||
b.append(chr(i & 0xff))
|
||||
i >>= 8
|
||||
b.reverse()
|
||||
return "".join(b)
|
||||
|
||||
def test_mining_basic():
|
||||
easy_difficulty = int_to_bytes(2**256 - 1)
|
||||
assert easy_difficulty.encode('hex') == 'f' * 64
|
||||
cache = pyethash.mkcache_bytes(
|
||||
1024,
|
||||
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
|
||||
full_size = 1024 * 32
|
||||
header = "~~~~~X~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
dataset = pyethash.calc_dataset_bytes(full_size, cache)
|
||||
# Check type of outputs
|
||||
assert type(pyethash.mine(dataset,header,easy_difficulty)) == dict
|
||||
assert type(pyethash.mine(dataset,header,easy_difficulty)["nonce"]) == long
|
||||
assert type(pyethash.mine(dataset,header,easy_difficulty)["mix digest"]) == str
|
||||
assert type(pyethash.mine(dataset,header,easy_difficulty)["result"]) == str
|
||||
|
||||
def test_mining_doesnt_always_return_the_same_value():
|
||||
easy_difficulty1 = int_to_bytes(int(2**256 * 0.999))
|
||||
# 1 in 1000 difficulty
|
||||
easy_difficulty2 = int_to_bytes(int(2**256 * 0.001))
|
||||
assert easy_difficulty1 != easy_difficulty2
|
||||
cache = pyethash.mkcache_bytes(
|
||||
1024,
|
||||
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
|
||||
full_size = 1024 * 32
|
||||
header = "~~~~~X~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
dataset = pyethash.calc_dataset_bytes(full_size, cache)
|
||||
# Check type of outputs
|
||||
assert pyethash.mine(dataset, header, easy_difficulty1)['nonce'] != pyethash.mine(dataset, header, easy_difficulty2)['nonce']
|
||||
|
||||
def test_get_seedhash():
|
||||
assert pyethash.get_seedhash(0).encode('hex') == '0' * 64
|
||||
import hashlib, sha3
|
||||
expected = pyethash.get_seedhash(0)
|
||||
#print "checking seed hashes:",
|
||||
for i in range(0, 30000*2048, 30000):
|
||||
#print i // 30000,
|
||||
assert pyethash.get_seedhash(i) == expected
|
||||
expected = hashlib.sha3_256(expected).digest()
|
||||
32
Godeps/_workspace/src/github.com/ethereum/ethash/test/test.sh
generated
vendored
Normal file
32
Godeps/_workspace/src/github.com/ethereum/ethash/test/test.sh
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Strict mode
|
||||
set -e
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
|
||||
done
|
||||
TEST_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
echo -e "\n################# Testing JS ##################"
|
||||
# TODO: Use mocha and real testing tools instead of rolling our own
|
||||
cd $TEST_DIR/../js
|
||||
if [ -x "$(which nodejs)" ] ; then
|
||||
nodejs test.js
|
||||
fi
|
||||
if [ -x "$(which node)" ] ; then
|
||||
node test.js
|
||||
fi
|
||||
|
||||
echo -e "\n################# Testing C ##################"
|
||||
$TEST_DIR/c/test.sh
|
||||
|
||||
# Temporarily commenting out python tests until they conform to the API
|
||||
#echo -e "\n################# Testing Python ##################"
|
||||
#$TEST_DIR/python/test.sh
|
||||
|
||||
echo "################# Testing Go ##################"
|
||||
cd $TEST_DIR/.. && go test -timeout 9999s
|
||||
5
Godeps/_workspace/src/github.com/howeyc/fsnotify/.gitignore
generated
vendored
Normal file
5
Godeps/_workspace/src/github.com/howeyc/fsnotify/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# Setup a Global .gitignore for OS and editor generated files:
|
||||
# https://help.github.com/articles/ignoring-files
|
||||
# git config --global core.excludesfile ~/.gitignore_global
|
||||
|
||||
.vagrant
|
||||
28
Godeps/_workspace/src/github.com/howeyc/fsnotify/AUTHORS
generated
vendored
Normal file
28
Godeps/_workspace/src/github.com/howeyc/fsnotify/AUTHORS
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
# Names should be added to this file as
|
||||
# Name or Organization <email address>
|
||||
# The email address is not required for organizations.
|
||||
|
||||
# You can update this list using the following command:
|
||||
#
|
||||
# $ git shortlog -se | awk '{print $2 " " $3 " " $4}'
|
||||
|
||||
# Please keep the list sorted.
|
||||
|
||||
Adrien Bustany <adrien@bustany.org>
|
||||
Caleb Spare <cespare@gmail.com>
|
||||
Case Nelson <case@teammating.com>
|
||||
Chris Howey <howeyc@gmail.com> <chris@howey.me>
|
||||
Christoffer Buchholz <christoffer.buchholz@gmail.com>
|
||||
Dave Cheney <dave@cheney.net>
|
||||
Francisco Souza <f@souza.cc>
|
||||
John C Barstow
|
||||
Kelvin Fo <vmirage@gmail.com>
|
||||
Nathan Youngman <git@nathany.com>
|
||||
Paul Hammond <paul@paulhammond.org>
|
||||
Pursuit92 <JoshChase@techpursuit.net>
|
||||
Rob Figueiredo <robfig@gmail.com>
|
||||
Travis Cline <travis.cline@gmail.com>
|
||||
Tudor Golubenco <tudor.g@gmail.com>
|
||||
bronze1man <bronze1man@gmail.com>
|
||||
debrando <denis.brandolini@gmail.com>
|
||||
henrikedwards <henrik.edwards@gmail.com>
|
||||
160
Godeps/_workspace/src/github.com/howeyc/fsnotify/CHANGELOG.md
generated
vendored
Normal file
160
Godeps/_workspace/src/github.com/howeyc/fsnotify/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,160 @@
|
||||
# Changelog
|
||||
|
||||
## v0.9.0 / 2014-01-17
|
||||
|
||||
* IsAttrib() for events that only concern a file's metadata [#79][] (thanks @abustany)
|
||||
* [Fix] kqueue: fix deadlock [#77][] (thanks @cespare)
|
||||
* [NOTICE] Development has moved to `code.google.com/p/go.exp/fsnotify` in preparation for inclusion in the Go standard library.
|
||||
|
||||
## v0.8.12 / 2013-11-13
|
||||
|
||||
* [API] Remove FD_SET and friends from Linux adapter
|
||||
|
||||
## v0.8.11 / 2013-11-02
|
||||
|
||||
* [Doc] Add Changelog [#72][] (thanks @nathany)
|
||||
* [Doc] Spotlight and double modify events on OS X [#62][] (reported by @paulhammond)
|
||||
|
||||
## v0.8.10 / 2013-10-19
|
||||
|
||||
* [Fix] kqueue: remove file watches when parent directory is removed [#71][] (reported by @mdwhatcott)
|
||||
* [Fix] kqueue: race between Close and readEvents [#70][] (reported by @bernerdschaefer)
|
||||
* [Doc] specify OS-specific limits in README (thanks @debrando)
|
||||
|
||||
## v0.8.9 / 2013-09-08
|
||||
|
||||
* [Doc] Contributing (thanks @nathany)
|
||||
* [Doc] update package path in example code [#63][] (thanks @paulhammond)
|
||||
* [Doc] GoCI badge in README (Linux only) [#60][]
|
||||
* [Doc] Cross-platform testing with Vagrant [#59][] (thanks @nathany)
|
||||
|
||||
## v0.8.8 / 2013-06-17
|
||||
|
||||
* [Fix] Windows: handle `ERROR_MORE_DATA` on Windows [#49][] (thanks @jbowtie)
|
||||
|
||||
## v0.8.7 / 2013-06-03
|
||||
|
||||
* [API] Make syscall flags internal
|
||||
* [Fix] inotify: ignore event changes
|
||||
* [Fix] race in symlink test [#45][] (reported by @srid)
|
||||
* [Fix] tests on Windows
|
||||
* lower case error messages
|
||||
|
||||
## v0.8.6 / 2013-05-23
|
||||
|
||||
* kqueue: Use EVT_ONLY flag on Darwin
|
||||
* [Doc] Update README with full example
|
||||
|
||||
## v0.8.5 / 2013-05-09
|
||||
|
||||
* [Fix] inotify: allow monitoring of "broken" symlinks (thanks @tsg)
|
||||
|
||||
## v0.8.4 / 2013-04-07
|
||||
|
||||
* [Fix] kqueue: watch all file events [#40][] (thanks @ChrisBuchholz)
|
||||
|
||||
## v0.8.3 / 2013-03-13
|
||||
|
||||
* [Fix] inoitfy/kqueue memory leak [#36][] (reported by @nbkolchin)
|
||||
* [Fix] kqueue: use fsnFlags for watching a directory [#33][] (reported by @nbkolchin)
|
||||
|
||||
## v0.8.2 / 2013-02-07
|
||||
|
||||
* [Doc] add Authors
|
||||
* [Fix] fix data races for map access [#29][] (thanks @fsouza)
|
||||
|
||||
## v0.8.1 / 2013-01-09
|
||||
|
||||
* [Fix] Windows path separators
|
||||
* [Doc] BSD License
|
||||
|
||||
## v0.8.0 / 2012-11-09
|
||||
|
||||
* kqueue: directory watching improvements (thanks @vmirage)
|
||||
* inotify: add `IN_MOVED_TO` [#25][] (requested by @cpisto)
|
||||
* [Fix] kqueue: deleting watched directory [#24][] (reported by @jakerr)
|
||||
|
||||
## v0.7.4 / 2012-10-09
|
||||
|
||||
* [Fix] inotify: fixes from https://codereview.appspot.com/5418045/ (ugorji)
|
||||
* [Fix] kqueue: preserve watch flags when watching for delete [#21][] (reported by @robfig)
|
||||
* [Fix] kqueue: watch the directory even if it isn't a new watch (thanks @robfig)
|
||||
* [Fix] kqueue: modify after recreation of file
|
||||
|
||||
## v0.7.3 / 2012-09-27
|
||||
|
||||
* [Fix] kqueue: watch with an existing folder inside the watched folder (thanks @vmirage)
|
||||
* [Fix] kqueue: no longer get duplicate CREATE events
|
||||
|
||||
## v0.7.2 / 2012-09-01
|
||||
|
||||
* kqueue: events for created directories
|
||||
|
||||
## v0.7.1 / 2012-07-14
|
||||
|
||||
* [Fix] for renaming files
|
||||
|
||||
## v0.7.0 / 2012-07-02
|
||||
|
||||
* [Feature] FSNotify flags
|
||||
* [Fix] inotify: Added file name back to event path
|
||||
|
||||
## v0.6.0 / 2012-06-06
|
||||
|
||||
* kqueue: watch files after directory created (thanks @tmc)
|
||||
|
||||
## v0.5.1 / 2012-05-22
|
||||
|
||||
* [Fix] inotify: remove all watches before Close()
|
||||
|
||||
## v0.5.0 / 2012-05-03
|
||||
|
||||
* [API] kqueue: return errors during watch instead of sending over channel
|
||||
* kqueue: match symlink behavior on Linux
|
||||
* inotify: add `DELETE_SELF` (requested by @taralx)
|
||||
* [Fix] kqueue: handle EINTR (reported by @robfig)
|
||||
* [Doc] Godoc example [#1][] (thanks @davecheney)
|
||||
|
||||
## v0.4.0 / 2012-03-30
|
||||
|
||||
* Go 1 released: build with go tool
|
||||
* [Feature] Windows support using winfsnotify
|
||||
* Windows does not have attribute change notifications
|
||||
* Roll attribute notifications into IsModify
|
||||
|
||||
## v0.3.0 / 2012-02-19
|
||||
|
||||
* kqueue: add files when watch directory
|
||||
|
||||
## v0.2.0 / 2011-12-30
|
||||
|
||||
* update to latest Go weekly code
|
||||
|
||||
## v0.1.0 / 2011-10-19
|
||||
|
||||
* kqueue: add watch on file creation to match inotify
|
||||
* kqueue: create file event
|
||||
* inotify: ignore `IN_IGNORED` events
|
||||
* event String()
|
||||
* linux: common FileEvent functions
|
||||
* initial commit
|
||||
|
||||
[#79]: https://github.com/howeyc/fsnotify/pull/79
|
||||
[#77]: https://github.com/howeyc/fsnotify/pull/77
|
||||
[#72]: https://github.com/howeyc/fsnotify/issues/72
|
||||
[#71]: https://github.com/howeyc/fsnotify/issues/71
|
||||
[#70]: https://github.com/howeyc/fsnotify/issues/70
|
||||
[#63]: https://github.com/howeyc/fsnotify/issues/63
|
||||
[#62]: https://github.com/howeyc/fsnotify/issues/62
|
||||
[#60]: https://github.com/howeyc/fsnotify/issues/60
|
||||
[#59]: https://github.com/howeyc/fsnotify/issues/59
|
||||
[#49]: https://github.com/howeyc/fsnotify/issues/49
|
||||
[#45]: https://github.com/howeyc/fsnotify/issues/45
|
||||
[#40]: https://github.com/howeyc/fsnotify/issues/40
|
||||
[#36]: https://github.com/howeyc/fsnotify/issues/36
|
||||
[#33]: https://github.com/howeyc/fsnotify/issues/33
|
||||
[#29]: https://github.com/howeyc/fsnotify/issues/29
|
||||
[#25]: https://github.com/howeyc/fsnotify/issues/25
|
||||
[#24]: https://github.com/howeyc/fsnotify/issues/24
|
||||
[#21]: https://github.com/howeyc/fsnotify/issues/21
|
||||
[#1]: https://github.com/howeyc/fsnotify/issues/1
|
||||
7
Godeps/_workspace/src/github.com/howeyc/fsnotify/CONTRIBUTING.md
generated
vendored
Normal file
7
Godeps/_workspace/src/github.com/howeyc/fsnotify/CONTRIBUTING.md
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
# Contributing
|
||||
|
||||
## Moving Notice
|
||||
|
||||
There is a fork being actively developed with a new API in preparation for the Go Standard Library:
|
||||
[github.com/go-fsnotify/fsnotify](https://github.com/go-fsnotify/fsnotify)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user