Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d14eb24141 | ||
|
|
820015872b | ||
|
|
f57b1b3c3d | ||
|
|
a85ceb3cca | ||
|
|
254ae66ed3 | ||
|
|
3206fe873e | ||
|
|
63046fce58 | ||
|
|
b76863d055 | ||
|
|
d7ed74ab94 | ||
|
|
7388f5f1cd | ||
|
|
c211338218 | ||
|
|
8ac89af8bd | ||
|
|
bbbaf59591 | ||
|
|
169419896f | ||
|
|
0543dca502 | ||
|
|
cc6011d57a | ||
|
|
fc4407ef7e | ||
|
|
03735a125f | ||
|
|
5baeda9ff1 | ||
|
|
9b9794b5e0 | ||
|
|
0697d60a48 | ||
|
|
cfe6c82a31 | ||
|
|
3e30228d95 | ||
|
|
7264b53e5f | ||
|
|
60836d8523 | ||
|
|
ef89c2e47a | ||
|
|
2d9e3e1847 | ||
|
|
30136a9697 | ||
|
|
db7ccd66d3 | ||
|
|
cfe6483102 | ||
|
|
561566e723 | ||
|
|
c2dcc4c898 | ||
|
|
d09bfdc4ff | ||
|
|
358ef4536f | ||
|
|
5061a35e66 | ||
|
|
cd9a1e8c9e | ||
|
|
646902e75e | ||
|
|
40d26cb868 | ||
|
|
b64aa51c0c | ||
|
|
8206441834 | ||
|
|
d713783736 | ||
|
|
57dffaa2ce | ||
|
|
9e81dd2360 | ||
|
|
e2798969d7 | ||
|
|
1c31ec66f2 | ||
|
|
241f9fc7b0 | ||
|
|
270192486a | ||
|
|
a799503c97 | ||
|
|
9685928087 | ||
|
|
0e4b2fad99 | ||
|
|
3c4571a4e0 | ||
|
|
046147eb1d | ||
|
|
7834520e54 | ||
|
|
8e5b4d4b6f | ||
|
|
4544a074d9 | ||
|
|
9b78501392 | ||
|
|
f59ddcc88d | ||
|
|
a4955a2b79 | ||
|
|
92ae1a565b | ||
|
|
15a56ca25e | ||
|
|
9dcaa829ea | ||
|
|
9f65799a3d | ||
|
|
886587848b | ||
|
|
a97fc6dba8 | ||
|
|
c124e88d12 | ||
|
|
17f3870296 | ||
|
|
4626d42d08 | ||
|
|
e1e760055c | ||
|
|
45bf6c3bf3 | ||
|
|
fef0cc764d | ||
|
|
72049afcf6 | ||
|
|
d26c06dbf3 | ||
|
|
268decd655 | ||
|
|
7ae246c839 | ||
|
|
c7c454e4fb | ||
|
|
8e27297a81 | ||
|
|
2cdec72985 | ||
|
|
0085ac534d | ||
|
|
7828a79a96 | ||
|
|
5576c21e67 | ||
|
|
e49cfb1d2b | ||
|
|
1e541d0225 | ||
|
|
0974afd26d | ||
|
|
8d93594771 | ||
|
|
1136ac70e8 | ||
|
|
dc8d5a39ea | ||
|
|
8329e649b0 | ||
|
|
66da8b164f | ||
|
|
ea48577864 | ||
|
|
597146b136 | ||
|
|
30dd0c1e11 | ||
|
|
88772c4266 | ||
|
|
dc1d9e1c84 | ||
|
|
69ea65835d | ||
|
|
d5bae3a8c6 | ||
|
|
f14010bd5b | ||
|
|
87094fc83f | ||
|
|
7c179cfeab | ||
|
|
7582c221d1 | ||
|
|
c109895848 | ||
|
|
eccedada40 | ||
|
|
25d54accf8 | ||
|
|
d07685f0e9 | ||
|
|
2445c00c7e | ||
|
|
4c1d3ef514 | ||
|
|
4614c7d4c2 | ||
|
|
bbf1ef0dc3 | ||
|
|
3433c9e708 | ||
|
|
2cd5d75a2e | ||
|
|
2535b8adef | ||
|
|
4edab7bb7f | ||
|
|
fd8658e317 | ||
|
|
51d21d8c86 | ||
|
|
b4c3307cdf | ||
|
|
4e8d10cb44 | ||
|
|
e96875a425 | ||
|
|
5ab0035348 | ||
|
|
4ddff96b1e | ||
|
|
a08d84c1df | ||
|
|
21c71bfac1 | ||
|
|
6baaed3581 | ||
|
|
152dbfd5d1 | ||
|
|
a56d14086b | ||
|
|
aee87693f8 | ||
|
|
976b4affd9 | ||
|
|
e222b6ad9c | ||
|
|
19b17374e8 | ||
|
|
43989122bb | ||
|
|
72712d6047 | ||
|
|
0b52d2cc15 | ||
|
|
8304102136 | ||
|
|
3381aefcfa | ||
|
|
279a365cb1 | ||
|
|
2c9e00da56 | ||
|
|
f7cae69704 | ||
|
|
b7d58bcdbc | ||
|
|
13a856b843 | ||
|
|
8da38985c3 | ||
|
|
60cf6c6b97 | ||
|
|
35c2b34564 | ||
|
|
ef2e048efc | ||
|
|
6b3261aa33 | ||
|
|
1849c02cb6 | ||
|
|
1ec74a89e2 | ||
|
|
c591792de9 | ||
|
|
3108543ae5 | ||
|
|
1eb221c743 | ||
|
|
bebf6bc2e7 | ||
|
|
9e91cc2138 | ||
|
|
c5b939cfb7 | ||
|
|
5bd411ca27 | ||
|
|
a533cda6f0 | ||
|
|
fe4b07b8ae | ||
|
|
f9f2ccd904 | ||
|
|
d9e87d7c32 | ||
|
|
a0092c0770 | ||
|
|
3100131125 | ||
|
|
988880cf83 | ||
|
|
c3fb9672c4 | ||
|
|
0a2d94e425 | ||
|
|
8d9073cd31 | ||
|
|
d075961ffa | ||
|
|
7a72409b61 | ||
|
|
34fc530fba | ||
|
|
f257ff2f97 | ||
|
|
7ad5822c5b | ||
|
|
9a8f9f0a94 | ||
|
|
6421cecafb | ||
|
|
be544d6d89 | ||
|
|
3c89ecafdd | ||
|
|
35ec4eec52 | ||
|
|
e47f737a2f | ||
|
|
ac671a065b | ||
|
|
74116cc550 | ||
|
|
406070a5c3 | ||
|
|
0ccafd5b53 | ||
|
|
940f517aa3 | ||
|
|
216e5f65ad | ||
|
|
a74685d66d | ||
|
|
b7791d2845 | ||
|
|
d151a82d78 | ||
|
|
8ce61fbd52 | ||
|
|
90c24aade3 | ||
|
|
6b3f787fee | ||
|
|
4ebe4ce1b7 | ||
|
|
8c79740ee8 | ||
|
|
59d027ca02 | ||
|
|
37a7345a90 | ||
|
|
c519d4651b | ||
|
|
9b3b609e40 | ||
|
|
6254f53716 | ||
|
|
f05dc46432 | ||
|
|
3de0982a4a | ||
|
|
c2184fb3bf | ||
|
|
919c09fcb0 | ||
|
|
1d9dbd40ec | ||
|
|
0cd953a6f3 | ||
|
|
4db2b72351 | ||
|
|
dd54fcbdbd | ||
|
|
3123cf7ac6 | ||
|
|
6b579dd4ce | ||
|
|
16dfaa3e27 | ||
|
|
d7842b9f84 | ||
|
|
115034fccb | ||
|
|
309e957a85 | ||
|
|
d7007e402e | ||
|
|
91323a21cf | ||
|
|
fea893d76c | ||
|
|
761bc6ba4c | ||
|
|
75172feb4e | ||
|
|
3285fb1608 | ||
|
|
03a4c6910d | ||
|
|
485b958599 | ||
|
|
da47ba2f67 | ||
|
|
c39195488a | ||
|
|
227fb0ae9b | ||
|
|
b12ff5b503 | ||
|
|
0946c72b88 | ||
|
|
7d49b046d4 | ||
|
|
5f0426c840 | ||
|
|
73e239cc5f | ||
|
|
ad670f721a | ||
|
|
028a4a70cf | ||
|
|
77d7960347 | ||
|
|
39821146bd | ||
|
|
7d505a41ac | ||
|
|
e457b2f0d6 | ||
|
|
c9cf7fd4d4 | ||
|
|
b0371dd33d | ||
|
|
25e16c3565 | ||
|
|
7b39527863 | ||
|
|
d861b08866 | ||
|
|
fb438dc108 | ||
|
|
4e6b4f179b | ||
|
|
00d038c8f3 | ||
|
|
a9f6a68952 | ||
|
|
b9142bbc5a | ||
|
|
6c812f663e | ||
|
|
a93ec9783a | ||
|
|
2d184d77b6 | ||
|
|
bce299ccc7 | ||
|
|
235cebd14a | ||
|
|
a638aa9d53 | ||
|
|
67cce0ef7e | ||
|
|
82f4267bf6 | ||
|
|
45a9ca29c4 | ||
|
|
7f4e813277 | ||
|
|
3805ff4a0c | ||
|
|
464cfd475e | ||
|
|
fe469ae57f | ||
|
|
550ef9a1c4 | ||
|
|
935adfb51a | ||
|
|
3974df4a62 | ||
|
|
4870974161 | ||
|
|
8c4b0037f5 | ||
|
|
2c6f763ef2 | ||
|
|
ca28de02d8 | ||
|
|
bfc15ea029 | ||
|
|
6e8b8a5920 | ||
|
|
099f3b6a62 | ||
|
|
142d182bc1 | ||
|
|
1437871d88 | ||
|
|
352bf69409 | ||
|
|
9bdf3d23e1 | ||
|
|
be8ecfa707 | ||
|
|
51da0d0259 | ||
|
|
f55b78a994 | ||
|
|
e1a44c93f8 | ||
|
|
07e7087a09 | ||
|
|
2c79c7e2f6 | ||
|
|
09f6637fe0 | ||
|
|
3784db3308 | ||
|
|
2b950ff5dd | ||
|
|
09339c9cfb | ||
|
|
ccadd88af5 | ||
|
|
cc02a0efc2 | ||
|
|
43a1385b79 | ||
|
|
5101464e3b | ||
|
|
3d71478d38 | ||
|
|
4989ed445e | ||
|
|
d9413039ec | ||
|
|
eba0c9be34 | ||
|
|
48c9e9f3cc | ||
|
|
81ebde88db | ||
|
|
79ced9d0f8 | ||
|
|
a4058b84ce | ||
|
|
7bf211a52b | ||
|
|
d5f722792f | ||
|
|
0f02906c9b | ||
|
|
9582e228b1 | ||
|
|
45f20431f9 | ||
|
|
7554e6d7f9 | ||
|
|
cb8f26f177 | ||
|
|
b5dfce7861 | ||
|
|
2ca5a65544 | ||
|
|
17deb136db | ||
|
|
8c9710c76c | ||
|
|
32f7ecb261 | ||
|
|
fb77fde710 | ||
|
|
3c67bb90d7 | ||
|
|
dabb168853 | ||
|
|
45e5b3b219 | ||
|
|
a6b7469923 | ||
|
|
cb5dab3033 | ||
|
|
21d0038ff2 | ||
|
|
c094d8f2e8 | ||
|
|
c465d6a6c2 | ||
|
|
73d35bc985 | ||
|
|
2a8ccb065b | ||
|
|
8f04a50ce1 | ||
|
|
888aa5586b | ||
|
|
99f56f5d22 | ||
|
|
ad6281090d | ||
|
|
f0d334d3e2 | ||
|
|
5f829b048f | ||
|
|
1a961e66ff | ||
|
|
fdb0e22656 | ||
|
|
132ee1915f | ||
|
|
44bf4f3c8f | ||
|
|
6237767d5a | ||
|
|
dec9d96417 | ||
|
|
b167c87267 | ||
|
|
2280fe8e8e | ||
|
|
575d6dcd2d | ||
|
|
f729490c6b | ||
|
|
b32124cdd6 | ||
|
|
3d4321ee38 | ||
|
|
85034b382e | ||
|
|
77a51d1ad4 | ||
|
|
33e0cdc2d7 | ||
|
|
6519faa2fe | ||
|
|
5e3a234cbe | ||
|
|
e54c31d2d5 | ||
|
|
66c0537251 | ||
|
|
ac58516593 | ||
|
|
c3da6322b5 | ||
|
|
3d241500cf | ||
|
|
ded8224f66 | ||
|
|
f8814881a1 | ||
|
|
cc2852cd48 | ||
|
|
467637a9eb | ||
|
|
3cfc292d84 | ||
|
|
6acf94a810 | ||
|
|
31367fb4c4 | ||
|
|
12d6074e3b | ||
|
|
ff30386051 | ||
|
|
601f99ac16 | ||
|
|
87fe5c6101 | ||
|
|
68399ca31c | ||
|
|
2a6d7fd80f | ||
|
|
4725f510d8 | ||
|
|
be0ba22222 | ||
|
|
c8781392be | ||
|
|
b97164fcfb | ||
|
|
0dfb92281b | ||
|
|
4fe80c40da | ||
|
|
f0fac5115a | ||
|
|
46dd389d0d | ||
|
|
1e28e21ab5 | ||
|
|
7832c62c5d | ||
|
|
d025ee9dbe | ||
|
|
a9a9cb4319 | ||
|
|
aa727cb9b1 | ||
|
|
b8c9a99f20 | ||
|
|
aff995b0d0 | ||
|
|
2cc7e5dfdc | ||
|
|
5235a150b1 | ||
|
|
c6372ea9de | ||
|
|
7df4cc44c4 | ||
|
|
d47cf40544 | ||
|
|
7f5d88e95c | ||
|
|
d09663c066 | ||
|
|
ef97c9b69f | ||
|
|
d855e6c8b1 | ||
|
|
cd66f7eb43 | ||
|
|
6a35a7ba4c | ||
|
|
a3e146dc68 | ||
|
|
b81305a4a9 | ||
|
|
73884b34bc | ||
|
|
6166a34db2 | ||
|
|
6fa7da4b1c | ||
|
|
c3e426c491 | ||
|
|
21e023f0db | ||
|
|
063be001b3 | ||
|
|
5dff02e8bc | ||
|
|
60a59407d8 | ||
|
|
20a5aecfca | ||
|
|
c2e7b5a67d | ||
|
|
8f32303d07 | ||
|
|
891b1e7782 | ||
|
|
f26394fd3b | ||
|
|
4d83d42b4c | ||
|
|
57f1108df2 | ||
|
|
2641a9abe5 | ||
|
|
6b193ab350 | ||
|
|
b1bb37511c | ||
|
|
319187d6d6 | ||
|
|
02eb789f84 | ||
|
|
5a9338a27f | ||
|
|
eb6924277f | ||
|
|
325419404d | ||
|
|
bd8f371fd5 | ||
|
|
1783ff2845 | ||
|
|
d388527ffa | ||
|
|
19494088bd | ||
|
|
920dad524a | ||
|
|
ec89bcac8e | ||
|
|
a916c1f4ad | ||
|
|
a9a0ac92d7 | ||
|
|
da8a8bd1ef | ||
|
|
d9c746891d | ||
|
|
67817005b5 | ||
|
|
24d11de5a7 | ||
|
|
9251c87323 | ||
|
|
e12fab90d1 | ||
|
|
0a194b5b01 | ||
|
|
8d028adc53 | ||
|
|
dfca15395e | ||
|
|
e21f2362fe | ||
|
|
1ce328e8a9 | ||
|
|
038a5f999f | ||
|
|
5d3704c7ea | ||
|
|
87037c06c9 | ||
|
|
dd412c0f50 | ||
|
|
bf44befff6 | ||
|
|
e61874bb6f | ||
|
|
1e5331768f | ||
|
|
ec9a3a4f7c | ||
|
|
e439a3a8dc | ||
|
|
19f70d7a11 | ||
|
|
afe7ed5b05 | ||
|
|
d4bf004d74 | ||
|
|
e4d06a088b | ||
|
|
0929088b12 | ||
|
|
7b4838fc9b | ||
|
|
0cf9533248 | ||
|
|
84ff0b8a9f | ||
|
|
d467dcfeaf | ||
|
|
8e68ba4751 | ||
|
|
0f2a85ba9f | ||
|
|
7674a0a91e | ||
|
|
5bc1a66572 | ||
|
|
9b56067213 | ||
|
|
9a9df2fc3c | ||
|
|
9989d8d1d4 | ||
|
|
f9471f297e | ||
|
|
146b693e4a | ||
|
|
7295b7e329 | ||
|
|
e2441ea3e7 | ||
|
|
119e51912e | ||
|
|
dd950f5b0d | ||
|
|
78a9bad1e1 | ||
|
|
0c6eaf5484 | ||
|
|
1010068ddb | ||
|
|
82eec3d8d7 | ||
|
|
ee7b37d3f3 | ||
|
|
143d82d242 | ||
|
|
8b91b38855 | ||
|
|
1098f0d2a3 | ||
|
|
ab53cec022 | ||
|
|
6f5f8e5648 | ||
|
|
edfd707c22 | ||
|
|
1870f30af8 | ||
|
|
90106f5f08 | ||
|
|
9924b7b438 | ||
|
|
aa37faab0a | ||
|
|
dc10f8ce72 | ||
|
|
996686c1da | ||
|
|
488785d013 | ||
|
|
3abdc01230 | ||
|
|
8da04a584f | ||
|
|
27cc61d45e | ||
|
|
7371c30064 | ||
|
|
140d163895 | ||
|
|
dc33bdc1dc | ||
|
|
74df4fab83 | ||
|
|
1e5cd3d7a1 | ||
|
|
a54e9b64aa | ||
|
|
74660704e3 | ||
|
|
7439893a2a | ||
|
|
e27e49e9dc | ||
|
|
34ed729c59 | ||
|
|
adaeeca3fd | ||
|
|
dac75563d3 | ||
|
|
cbc76adcaa | ||
|
|
69a9cb383d | ||
|
|
4343073c00 | ||
|
|
fe60d4be88 | ||
|
|
ae337807f5 | ||
|
|
9ae30ac08e | ||
|
|
62fa85c0a4 | ||
|
|
7bb873dad9 | ||
|
|
5f6c1c14cb | ||
|
|
d43189ad33 | ||
|
|
fcad76fc51 | ||
|
|
97e6e1684e | ||
|
|
67a0d3e926 | ||
|
|
183fb9f9ff | ||
|
|
9815ddef1f | ||
|
|
f6d0847453 | ||
|
|
b0b9f0d65f | ||
|
|
0cec80f676 | ||
|
|
48c64143e3 | ||
|
|
a8712422bc | ||
|
|
97f65bd283 | ||
|
|
fd3c1c50f1 | ||
|
|
b153e4bb9f | ||
|
|
db9856a8db | ||
|
|
75ecea265d | ||
|
|
be8751cb73 | ||
|
|
fb25ecb4a1 | ||
|
|
f1cb7d27ac | ||
|
|
dee494e12f | ||
|
|
b13a121915 | ||
|
|
7486ee9537 | ||
|
|
4a20ccc28e | ||
|
|
f80dd2b307 | ||
|
|
b208cf6d32 | ||
|
|
39e78ff17e | ||
|
|
a8177ea7fe | ||
|
|
bedcfc154b | ||
|
|
4c38b4aa3c | ||
|
|
f6cfe266e0 | ||
|
|
4905e65f14 | ||
|
|
ccb250b410 | ||
|
|
aca57ffc62 | ||
|
|
7f375f42d8 | ||
|
|
eedcc2034d | ||
|
|
24c9a167d7 | ||
|
|
909df8ef1f | ||
|
|
3b27cb3671 | ||
|
|
3fe0db4a7d | ||
|
|
8b55814ab2 | ||
|
|
575e471553 | ||
|
|
0f5f1aebed | ||
|
|
50e17eb1ab | ||
|
|
158cc2f660 | ||
|
|
1066a31acd | ||
|
|
1f9d0f4582 | ||
|
|
a6d65233f1 | ||
|
|
eff2fe7a1b | ||
|
|
20efdc70b3 | ||
|
|
f0d8fb8f1a | ||
|
|
f7a380e9b7 | ||
|
|
e9c7cf6f63 | ||
|
|
68f1661452 | ||
|
|
36fd1b91ae | ||
|
|
a4ec430ac0 | ||
|
|
519614b2fd | ||
|
|
bf0118c8ef | ||
|
|
a4db0820bc | ||
|
|
ee7528413e | ||
|
|
7952fc8324 | ||
|
|
652773d2cf | ||
|
|
2a17787242 | ||
|
|
0a53ad5721 | ||
|
|
6da6bdc863 | ||
|
|
42ad2bb83f | ||
|
|
f309a65cb4 | ||
|
|
77e19ab1a4 | ||
|
|
1a996b6ef3 | ||
|
|
b882f1a010 | ||
|
|
82a030e6ff | ||
|
|
0758b85179 | ||
|
|
ab3d9bd080 | ||
|
|
8ff813f689 | ||
|
|
88ae72c0d3 | ||
|
|
312aa4be26 | ||
|
|
cbb06fce9d | ||
|
|
f259e497c4 | ||
|
|
dd4172ac66 | ||
|
|
66029e60d3 | ||
|
|
364f484f04 | ||
|
|
9dd5159414 | ||
|
|
13e38d6fd8 | ||
|
|
10dcb64715 | ||
|
|
7551b51e7d | ||
|
|
adb418aafc | ||
|
|
270da80d64 | ||
|
|
b2027cfd66 | ||
|
|
7f1f4eeac6 | ||
|
|
7a7446c8bd | ||
|
|
ddbae294e6 | ||
|
|
8c71b744f3 | ||
|
|
479b5d31a9 | ||
|
|
4cbf4230e8 | ||
|
|
6a610187e0 | ||
|
|
eb2a4aebba | ||
|
|
21a2e67755 | ||
|
|
3b9e312615 | ||
|
|
26dab04c9e | ||
|
|
00713c0d11 | ||
|
|
751b5f3027 | ||
|
|
e8261b000e | ||
|
|
41ecb70297 | ||
|
|
09ee104b8c | ||
|
|
e3a4964787 | ||
|
|
9bf72910a4 | ||
|
|
ee39e20e6d | ||
|
|
399d6db6f6 | ||
|
|
0821ce44b5 | ||
|
|
ea279111c6 | ||
|
|
674ce02e58 | ||
|
|
8dfa2767ec | ||
|
|
20dad7f07f | ||
|
|
751cc4c44d | ||
|
|
2318e6d8e9 | ||
|
|
61b4a492c3 | ||
|
|
9db3d01e09 | ||
|
|
8da73ad3dd | ||
|
|
b8c16d8ac5 | ||
|
|
429c0951f3 | ||
|
|
74e103c791 | ||
|
|
f941950ee2 | ||
|
|
846df2eef1 | ||
|
|
34ed058c97 | ||
|
|
eae0290978 | ||
|
|
561368570e | ||
|
|
3467d1fed0 | ||
|
|
d02ff232e5 | ||
|
|
2d1c6a5402 | ||
|
|
eab3b65629 | ||
|
|
20b435732a | ||
|
|
929617273d | ||
|
|
2717bf7d49 | ||
|
|
5cd2ebc960 | ||
|
|
9b4afe9816 | ||
|
|
23bb5598d5 | ||
|
|
af1d7813e9 | ||
|
|
16c2e5a585 | ||
|
|
c02750edbd | ||
|
|
7204ddafec | ||
|
|
faeba9a7e4 | ||
|
|
190d238a1f | ||
|
|
715451b5fb | ||
|
|
87f1895405 | ||
|
|
923d817751 | ||
|
|
0728209b66 | ||
|
|
b8b9dcc2ee | ||
|
|
f35e879852 | ||
|
|
34f4f12eb9 | ||
|
|
fa63bf758d | ||
|
|
f6b396ae64 | ||
|
|
2c7fd58e34 | ||
|
|
982f2c9634 | ||
|
|
f2fd42b47a | ||
|
|
1b4ccad938 | ||
|
|
a9de1ce8e0 | ||
|
|
ac752d5ec2 | ||
|
|
632d8d02d2 | ||
|
|
48aeb26e02 | ||
|
|
1694af8b5e | ||
|
|
83bcab9cd2 | ||
|
|
bdc7f4b3f5 | ||
|
|
39202a3d79 | ||
|
|
912065a121 | ||
|
|
c8466afac2 | ||
|
|
2619e162c1 | ||
|
|
e1112e17f8 | ||
|
|
92b2ead74c | ||
|
|
bbed9b94c1 | ||
|
|
73d07311db | ||
|
|
1cdff47477 | ||
|
|
511a5c3f82 | ||
|
|
853885e2ff | ||
|
|
d83936a66a | ||
|
|
5517d2bf56 | ||
|
|
f21ab49ac5 | ||
|
|
925a458abe | ||
|
|
76946c447f | ||
|
|
2faa29b1c4 | ||
|
|
6826cc311d | ||
|
|
5e17ce0a0b | ||
|
|
e8d299d3b6 | ||
|
|
7637aa2ab6 | ||
|
|
ab067d1d3a | ||
|
|
e6f84666c7 | ||
|
|
4c5429af15 | ||
|
|
0a0ac3b7c9 | ||
|
|
24833ce9fb | ||
|
|
ec2c18dc87 | ||
|
|
7384609e74 | ||
|
|
3047649650 | ||
|
|
d298dac3f3 | ||
|
|
1574bca8a8 | ||
|
|
ec2f6c6b80 | ||
|
|
838cc60161 | ||
|
|
310c61a5cc | ||
|
|
318cc15323 | ||
|
|
3a64ceb4d6 | ||
|
|
d0f21c0095 | ||
|
|
46dc15dd29 | ||
|
|
8dc654b513 | ||
|
|
7000ac3f3f | ||
|
|
43c2e8d8e9 | ||
|
|
0231139b01 | ||
|
|
d6ee6446dd | ||
|
|
7b666efcf8 | ||
|
|
eb5d2198fc | ||
|
|
34e44ebd1c | ||
|
|
bf2f4bc040 | ||
|
|
9dc4559aba | ||
|
|
eba8856261 | ||
|
|
a8c5aa471a | ||
|
|
52f6dcf092 | ||
|
|
dec79f3742 | ||
|
|
8bdcac0f3e | ||
|
|
8426b674a3 | ||
|
|
da391bcc8d | ||
|
|
2d7443d454 | ||
|
|
991987ed76 | ||
|
|
ec24ebf2cf | ||
|
|
6ba0976085 | ||
|
|
2b88d01a01 | ||
|
|
0c09f24cbf | ||
|
|
61d22afeba | ||
|
|
9f1ed6e8c3 | ||
|
|
bbc4113cac | ||
|
|
91194bf422 | ||
|
|
9c5f940b00 | ||
|
|
455b4043b8 | ||
|
|
bd83ee7931 | ||
|
|
f6bdf7c09a | ||
|
|
2db8afb8c2 | ||
|
|
e033129dd3 | ||
|
|
f9dc590100 | ||
|
|
8996aafe0d | ||
|
|
9dc25ef7af | ||
|
|
2b84f4d407 | ||
|
|
097c8b674c | ||
|
|
ba649d4b94 | ||
|
|
6ed1614db0 | ||
|
|
df5b6a8380 | ||
|
|
1f82a8b99e | ||
|
|
0c95d96f32 | ||
|
|
c2f5f84118 | ||
|
|
b3b5e3d8f0 | ||
|
|
506d3f3cd9 | ||
|
|
516a8c5ee5 | ||
|
|
2f81e9d374 | ||
|
|
2d8703bb8d | ||
|
|
76e60d9bc3 | ||
|
|
9d5370be5f | ||
|
|
fc1a06bc45 | ||
|
|
fce80374f4 | ||
|
|
420c9f10c2 | ||
|
|
5a39681a2e | ||
|
|
7a1b7db7c8 | ||
|
|
03a643da52 | ||
|
|
383f0ce450 | ||
|
|
c6c668676c | ||
|
|
7b01dde063 | ||
|
|
8c25f65024 | ||
|
|
1e478e3545 | ||
|
|
6c75a8978b | ||
|
|
640267fc2b | ||
|
|
33c7c3ee12 | ||
|
|
f9b41d34ae | ||
|
|
d4bec79451 | ||
|
|
ac1a8b4daf | ||
|
|
28838c1759 | ||
|
|
50ecb0dac9 | ||
|
|
e22bc01cbd | ||
|
|
6c28713a4c | ||
|
|
fc9023386c | ||
|
|
e6cae9bcc3 | ||
|
|
a9eeca1302 | ||
|
|
8c695e42ca | ||
|
|
0aa7fd47d5 | ||
|
|
70596042d6 | ||
|
|
caf616234b | ||
|
|
375187aa70 | ||
|
|
71eccdc0e3 | ||
|
|
639b1e48f5 | ||
|
|
0bb4cb4472 | ||
|
|
cc51543851 | ||
|
|
22540390e1 | ||
|
|
98565eb67c | ||
|
|
cf6a47ecb7 | ||
|
|
fa60b9f9d3 | ||
|
|
644120ca31 | ||
|
|
a50a625b3b | ||
|
|
7297c13331 | ||
|
|
f73399bfac | ||
|
|
a056cd78f7 | ||
|
|
a30f3c86c2 | ||
|
|
e70bdd86a7 | ||
|
|
bc9f33c2e0 | ||
|
|
872b89ee93 | ||
|
|
ae53062518 | ||
|
|
17f76c9cb3 | ||
|
|
5de944146a | ||
|
|
9dc6092cb0 | ||
|
|
a32a2ef04e | ||
|
|
ecfa0ae3da | ||
|
|
03595052ce | ||
|
|
1f94c53dd2 | ||
|
|
9c426373f2 | ||
|
|
c03e30a01f | ||
|
|
07f7a77ac0 | ||
|
|
3b9ea2c9a4 | ||
|
|
1beb13dd80 | ||
|
|
ddae84abb3 | ||
|
|
863b9a2c98 | ||
|
|
9d44bbdb48 | ||
|
|
8d93dd5adc | ||
|
|
48502961cf | ||
|
|
3c8bec61d3 | ||
|
|
7296c7df1a | ||
|
|
f3ee6603de | ||
|
|
ee0aabda1d | ||
|
|
08d37a4b0f | ||
|
|
f975ea99cb | ||
|
|
f030d41dc7 | ||
|
|
8d079bfcd1 | ||
|
|
d39b8654a6 | ||
|
|
ce7816a968 | ||
|
|
2ee572e68f | ||
|
|
4bbd850898 | ||
|
|
34eae6e608 | ||
|
|
6a0302fec6 | ||
|
|
c94cc293c2 | ||
|
|
cae7792a1e | ||
|
|
7f6b2fe4f1 | ||
|
|
eba430bbc0 | ||
|
|
01280c8d04 | ||
|
|
ec141ac9c9 | ||
|
|
590c892a6a | ||
|
|
ff8a50c366 | ||
|
|
46ef6c8ab7 | ||
|
|
b09eabc478 | ||
|
|
e49fcea6e3 | ||
|
|
68ed9f4ffc | ||
|
|
af94687d45 | ||
|
|
26964ecf0f | ||
|
|
77d19af359 | ||
|
|
120b82f243 | ||
|
|
a0fea30a11 | ||
|
|
8bb3e0a64d | ||
|
|
bbded12923 | ||
|
|
e8ba5d7606 | ||
|
|
af66b31a44 | ||
|
|
b000a40f28 | ||
|
|
3c85322523 | ||
|
|
a469b8bc04 | ||
|
|
78b8261a3a | ||
|
|
f20ca70c01 | ||
|
|
4e4148fc1c | ||
|
|
c22482f907 | ||
|
|
870e139fce | ||
|
|
4d58648c02 | ||
|
|
ebbb182537 | ||
|
|
1cd5377b45 | ||
|
|
1d1f0527ee | ||
|
|
37a5f77415 | ||
|
|
ced3c7efe4 | ||
|
|
c3b8f366ed | ||
|
|
de78876b1a | ||
|
|
64c25b049c | ||
|
|
8a4fe4f3ad | ||
|
|
8811b8c1fd | ||
|
|
190b01fdf9 | ||
|
|
f145d08c10 | ||
|
|
53382b7e15 | ||
|
|
6ad0242617 | ||
|
|
a7c2408c0a | ||
|
|
ce1eabaed6 | ||
|
|
f602541ede | ||
|
|
3f718e6efc | ||
|
|
ce7a985df6 | ||
|
|
6d83f7e7bd | ||
|
|
b73c00943c | ||
|
|
abaac8ef48 | ||
|
|
a2f8e7068e | ||
|
|
4d47873219 | ||
|
|
cf985486e5 | ||
|
|
b930c3fc93 | ||
|
|
dd26a96828 | ||
|
|
6865ddfc12 | ||
|
|
e888e69d4d | ||
|
|
2089059792 | ||
|
|
27739e0364 | ||
|
|
698ee271d6 | ||
|
|
543c75b293 | ||
|
|
b09c46f6f7 | ||
|
|
f2cc19e6aa | ||
|
|
814a0a123f | ||
|
|
179383540f | ||
|
|
8be1c8310d | ||
|
|
ef02d776ca | ||
|
|
750ff448ad | ||
|
|
e3abab6d4d | ||
|
|
d3ffae72fb | ||
|
|
87f751188e | ||
|
|
3469abaefd | ||
|
|
797364ee5c | ||
|
|
36c05fc4b9 | ||
|
|
79624febc0 | ||
|
|
0a9d4de126 | ||
|
|
b6f6994db4 | ||
|
|
ff7bed720a | ||
|
|
00c0f48b02 | ||
|
|
94c45cf2a0 | ||
|
|
58f77b2a1c | ||
|
|
7170e69b22 | ||
|
|
239ee2437c | ||
|
|
ced368db31 | ||
|
|
6a991e5c15 | ||
|
|
523d22262b | ||
|
|
08197a327e | ||
|
|
b7cb2a7aa5 | ||
|
|
decc5c74ef | ||
|
|
fbe0f886b6 | ||
|
|
7e23d6e2ef | ||
|
|
49458d1085 | ||
|
|
289c12bd9a | ||
|
|
9a6326b027 | ||
|
|
51f573f1ea | ||
|
|
c8b7cd8862 | ||
|
|
21c112d059 | ||
|
|
9432e1b5b2 | ||
|
|
8269d2f83c | ||
|
|
5a4b6be974 | ||
|
|
35e8ce60a9 | ||
|
|
8b6dd9f603 | ||
|
|
084f0ebdab | ||
|
|
58640c1521 | ||
|
|
7ffdfd12f8 | ||
|
|
cb9a30f285 | ||
|
|
e48bef809f | ||
|
|
f5d7570102 | ||
|
|
a600c60cf8 | ||
|
|
695eabd026 | ||
|
|
e81b51a647 | ||
|
|
b7e95ff090 | ||
|
|
3ca41be686 | ||
|
|
3152046173 | ||
|
|
3a98dc8a95 | ||
|
|
d737b28916 | ||
|
|
97c0dac876 | ||
|
|
006494b1fa | ||
|
|
149d343201 | ||
|
|
496cc79ba8 | ||
|
|
3591768745 | ||
|
|
d615f6761a | ||
|
|
5b29894048 | ||
|
|
d17f0cfa40 | ||
|
|
b2f70c7120 | ||
|
|
238707bd93 | ||
|
|
87cdf1e3a0 | ||
|
|
57fd47022e | ||
|
|
5eafd3bf6b | ||
|
|
640b5b0ea9 | ||
|
|
e4fb2f4680 | ||
|
|
a4909f54e4 | ||
|
|
f7065c6f0c | ||
|
|
64f7f837e7 | ||
|
|
130d36acd9 | ||
|
|
e94c28cfa2 | ||
|
|
a697dec30c | ||
|
|
bac09e9b9f | ||
|
|
b179f8f86a | ||
|
|
962d04ae17 | ||
|
|
f28e3bfe37 | ||
|
|
6474c86d32 | ||
|
|
769ea8cdfe | ||
|
|
052e77dd5a | ||
|
|
1a4b0cb12a | ||
|
|
f9aa95c987 | ||
|
|
a5d06fb4a4 | ||
|
|
d5e5d90bdc | ||
|
|
e62678e4e6 | ||
|
|
558ac24f7e | ||
|
|
6f22f6a59f | ||
|
|
5ec74f8abe | ||
|
|
16d7547e03 | ||
|
|
767112dcda | ||
|
|
81e23d1d8c | ||
|
|
ace90a4354 | ||
|
|
267e7096cc | ||
|
|
e7cded7511 | ||
|
|
33fbd715c0 | ||
|
|
25ba5b867c | ||
|
|
c8f431447c | ||
|
|
1b83a1d09a | ||
|
|
d2fb7a7151 | ||
|
|
7ad3447598 | ||
|
|
5e5bc8e705 | ||
|
|
886d1e8a19 | ||
|
|
6de7a035fa | ||
|
|
48d2497eb2 | ||
|
|
6494754ab9 | ||
|
|
a8153627c6 | ||
|
|
ed38966edb | ||
|
|
85551d1e54 | ||
|
|
ca31363180 | ||
|
|
a8f11eb3c3 | ||
|
|
151805121c | ||
|
|
0422d2a021 | ||
|
|
8586762dde | ||
|
|
ffdf70257b | ||
|
|
6079d60aa1 | ||
|
|
d46d012f8c | ||
|
|
baf926b360 | ||
|
|
82339869dc | ||
|
|
f70343bb63 | ||
|
|
4ab56ae3d1 | ||
|
|
39b4031684 | ||
|
|
71f8965393 | ||
|
|
66857e72a4 | ||
|
|
15eb5d47eb | ||
|
|
86242139da | ||
|
|
460bdc4148 | ||
|
|
1052126522 | ||
|
|
fdb42ac876 | ||
|
|
6486f986e8 | ||
|
|
bc4075e2ed | ||
|
|
11525c7d0d | ||
|
|
bb12ae9ce6 | ||
|
|
66b4ad0c44 | ||
|
|
4bff2d718e | ||
|
|
af7a7b4dc6 | ||
|
|
ec20d9a2a8 | ||
|
|
b0aee3d335 | ||
|
|
5e2ddbfd86 | ||
|
|
f086ebbb8e | ||
|
|
e5bf6a5bfc | ||
|
|
76fa86d54b | ||
|
|
60d89506a5 | ||
|
|
2893f1eb9e | ||
|
|
a08cbf412d | ||
|
|
0bd65356f9 | ||
|
|
2e2b39455f | ||
|
|
1f9fbe34e4 | ||
|
|
506d7ae50e | ||
|
|
342cb00625 | ||
|
|
952fc01efd | ||
|
|
3eebe301fe | ||
|
|
19c0a81c42 | ||
|
|
9fc7f9904b | ||
|
|
b04a516063 | ||
|
|
241e946d91 | ||
|
|
e45375dc26 | ||
|
|
ec8e243323 | ||
|
|
af0e9368d4 | ||
|
|
285483b81a | ||
|
|
73a91d5569 | ||
|
|
e24c78be32 | ||
|
|
b11184de68 | ||
|
|
61d02fc5d7 | ||
|
|
f0217f6821 | ||
|
|
09644914a6 | ||
|
|
b5c24d6a48 | ||
|
|
bdd2ac2c25 | ||
|
|
76376f0d33 | ||
|
|
9749da46ae | ||
|
|
1c05295e89 | ||
|
|
4d0f28215a | ||
|
|
0bba72bc5a | ||
|
|
87089b8e83 | ||
|
|
6a58148a89 | ||
|
|
15091052be | ||
|
|
5cd7e9a9b8 | ||
|
|
7cb530c334 | ||
|
|
5e0324cc91 | ||
|
|
6293e227ea | ||
|
|
d6d83a5c76 | ||
|
|
93fc883b90 | ||
|
|
dd21803598 | ||
|
|
af2f2282c2 | ||
|
|
869a76c9bb | ||
|
|
44b2964a6a | ||
|
|
8fddb57e0a | ||
|
|
c7a5a0cab0 | ||
|
|
c13aab3ffc | ||
|
|
95a9a76598 | ||
|
|
923cfa3d50 | ||
|
|
2c489168c2 | ||
|
|
f3292b4d34 | ||
|
|
9769829b72 | ||
|
|
36243d15cc | ||
|
|
f4645f570c | ||
|
|
61603ccfce | ||
|
|
a26cfc639c | ||
|
|
90602931d8 | ||
|
|
d1b330028c | ||
|
|
7a6b1930bf | ||
|
|
c271361552 | ||
|
|
17789bc814 | ||
|
|
d7c16e161a | ||
|
|
e71c17d7e7 | ||
|
|
17d87eb157 | ||
|
|
bf11bcc084 | ||
|
|
bd291109df | ||
|
|
ac89ba9b8d | ||
|
|
5ab634e375 | ||
|
|
bb1978d976 | ||
|
|
bea94ce8ac | ||
|
|
9561f93594 | ||
|
|
d44d5c3304 | ||
|
|
ec541e2057 | ||
|
|
8169bf6b97 | ||
|
|
56c8ad1221 | ||
|
|
6814f2e38c | ||
|
|
5f043b9a78 | ||
|
|
c9092cd1c7 | ||
|
|
86cc65d894 | ||
|
|
8ef2647fa9 | ||
|
|
3ff9e99416 | ||
|
|
1731046011 | ||
|
|
c3d96184b6 | ||
|
|
c255c606a7 | ||
|
|
cc69faa1fd | ||
|
|
0f53cd86c8 | ||
|
|
212c8f188d | ||
|
|
dec248adec | ||
|
|
98e6a066f4 | ||
|
|
c90db54a3d | ||
|
|
927d156933 | ||
|
|
c71f91073f | ||
|
|
ab28387692 | ||
|
|
c4905d02b9 | ||
|
|
ee39880fb5 | ||
|
|
926b3e56b9 | ||
|
|
e060df5367 | ||
|
|
a3294d4a0d | ||
|
|
19ce0ab246 | ||
|
|
75a1cc0d33 | ||
|
|
05228529b0 | ||
|
|
3cbeadfbc3 | ||
|
|
3d4938c0e2 | ||
|
|
1b850b8a2b | ||
|
|
ebd33f1869 | ||
|
|
ac846b4df3 | ||
|
|
0d427c9b90 | ||
|
|
dc6194f862 | ||
|
|
de50214e1f | ||
|
|
5ec4a88c35 | ||
|
|
31c141e757 | ||
|
|
9d5760d899 | ||
|
|
7945e1ea3c | ||
|
|
d94c40e371 | ||
|
|
31f22122e8 | ||
|
|
506582aa2b | ||
|
|
a02b251c9b | ||
|
|
34cbb6fa79 | ||
|
|
33679b56fd | ||
|
|
8897c4d560 | ||
|
|
f0c18ccbe7 | ||
|
|
e560d83c51 | ||
|
|
eca7addc67 | ||
|
|
263f3ba5c9 | ||
|
|
f514123ef0 | ||
|
|
9f461db0d0 | ||
|
|
7de8670616 | ||
|
|
8c7908b200 | ||
|
|
e7722e039f | ||
|
|
039bc0208a | ||
|
|
d57900a069 | ||
|
|
c1153302aa | ||
|
|
1086a3297f | ||
|
|
5c613934ca | ||
|
|
6d7e9092f8 | ||
|
|
8bb6f328dc | ||
|
|
7f03b13579 | ||
|
|
09008ea991 | ||
|
|
ee234212e6 | ||
|
|
277b243f52 | ||
|
|
0973ac753f | ||
|
|
f41cfbfb97 | ||
|
|
a70980c81a | ||
|
|
12a962f656 | ||
|
|
5936444f3e | ||
|
|
c7d42f00c6 | ||
|
|
b1318a9958 | ||
|
|
d2560d260c | ||
|
|
f40a61cf9a | ||
|
|
e0623578bf | ||
|
|
ead8daaa14 | ||
|
|
23b4b9e230 | ||
|
|
947017e334 | ||
|
|
7fd0d6507f | ||
|
|
ad1e9ef086 | ||
|
|
2f1d08e417 | ||
|
|
55f4eb80ba | ||
|
|
7c160ff65e | ||
|
|
fc5d5faaed | ||
|
|
5394f1763c | ||
|
|
050b67c9d6 | ||
|
|
4b87cb45ee | ||
|
|
f0e1db319c | ||
|
|
3950715237 | ||
|
|
ae9ba14b59 | ||
|
|
ad6c6fbe35 | ||
|
|
ffa5c20c88 | ||
|
|
5a6218eeca | ||
|
|
200531dd96 | ||
|
|
15a2f048ac | ||
|
|
d317a4042c | ||
|
|
c2d717aba5 | ||
|
|
ef74777df1 | ||
|
|
f6dbf99fb5 | ||
|
|
0b2d9e15b4 | ||
|
|
d14e5e75e8 | ||
|
|
df11ef34d2 | ||
|
|
4fc619262c | ||
|
|
2750eee86d | ||
|
|
71cb03345b | ||
|
|
22c8ca6c40 | ||
|
|
237a8965eb | ||
|
|
7d872c7863 | ||
|
|
0d08858dfb | ||
|
|
5c6d63c93d | ||
|
|
c8c10d2bb0 | ||
|
|
f4d3e9ea6a | ||
|
|
3713d3488d | ||
|
|
9b46d03c91 | ||
|
|
fe4e738580 | ||
|
|
205b0c4263 | ||
|
|
78eef25f1a | ||
|
|
c9305fd070 | ||
|
|
20774280b9 | ||
|
|
74bd2557af | ||
|
|
605fc8ecd8 | ||
|
|
6b745c53dc | ||
|
|
98c60b38fc | ||
|
|
be4515ec9a | ||
|
|
dcb1b64696 | ||
|
|
1190a60c7a | ||
|
|
82ecf207c6 | ||
|
|
84c7f1bf58 | ||
|
|
5ac453fe07 | ||
|
|
c2f39d653d | ||
|
|
748178f536 | ||
|
|
ffbef69dc7 | ||
|
|
3757124323 | ||
|
|
e65f214b3c | ||
|
|
f14004e56b | ||
|
|
dadc004dd6 | ||
|
|
3697d9e1f0 | ||
|
|
94524f7330 | ||
|
|
17d8a3e5d6 | ||
|
|
39996d7612 | ||
|
|
601ee4320f | ||
|
|
6e4f6fa92d | ||
|
|
b7103c29dd | ||
|
|
e53209e5ae | ||
|
|
501fbd3114 | ||
|
|
5626f43e2b | ||
|
|
0185cb48fb | ||
|
|
9a49eb06da | ||
|
|
3fbc012231 | ||
|
|
3938cf33d8 | ||
|
|
38b3d0c87c | ||
|
|
15a2fa6199 | ||
|
|
e834209d40 | ||
|
|
9607d21828 | ||
|
|
6fbbf36143 | ||
|
|
db25f3282e | ||
|
|
ceb92838e7 | ||
|
|
afb98f2cfc | ||
|
|
ed785fb087 | ||
|
|
3921180d77 | ||
|
|
ef36e0311e | ||
|
|
bf4cbe1204 | ||
|
|
28eee4da25 | ||
|
|
933ccf6deb | ||
|
|
9ac41322e5 | ||
|
|
c3233e03ef | ||
|
|
111871bb28 | ||
|
|
bf5b5f43e3 | ||
|
|
2ed8ebff09 | ||
|
|
34eb856d09 | ||
|
|
2d644bdfb0 | ||
|
|
741e5cf103 | ||
|
|
d745c04fe6 | ||
|
|
3a3c63956a | ||
|
|
153bdf576a | ||
|
|
6525ee6510 | ||
|
|
1780ddd329 | ||
|
|
85ad972ca8 | ||
|
|
a90b60799a | ||
|
|
47e8f74da9 | ||
|
|
fac28072ab | ||
|
|
ab77541f36 | ||
|
|
9eb769f340 | ||
|
|
1e81d6f848 | ||
|
|
dc393f4b77 | ||
|
|
dd1de530c3 | ||
|
|
74cd887249 | ||
|
|
b40bb35652 | ||
|
|
dfe257af86 | ||
|
|
ebb2a09107 | ||
|
|
c157909b4e | ||
|
|
a744239b22 | ||
|
|
9b4417be87 | ||
|
|
84f807e278 | ||
|
|
448635a945 | ||
|
|
638e3e6b3d | ||
|
|
bfe711bd42 | ||
|
|
d5eed91e7f | ||
|
|
15abf49211 | ||
|
|
b7eec0586c | ||
|
|
e639124a69 | ||
|
|
22bca7a16e | ||
|
|
6f66b354e5 | ||
|
|
f98e3320ae | ||
|
|
73c958222b | ||
|
|
e43230e46a | ||
|
|
dd07bc29eb | ||
|
|
790bbfcc99 | ||
|
|
994e70d43a | ||
|
|
7d5e19716a | ||
|
|
11530c675d | ||
|
|
1c474352fe | ||
|
|
3b2d635390 | ||
|
|
055c532d31 | ||
|
|
55e08f96a6 | ||
|
|
3e0a9180bc | ||
|
|
01ed71b243 | ||
|
|
595c058517 | ||
|
|
e04b0a6995 | ||
|
|
8961848ab1 | ||
|
|
6fb1c72b7d | ||
|
|
400d79d6ab | ||
|
|
ce6018f387 | ||
|
|
65d9dca917 | ||
|
|
2232b08351 | ||
|
|
0732ab6ad5 | ||
|
|
fb568768c5 | ||
|
|
7fd56e0add | ||
|
|
38a3f8cf4c | ||
|
|
8d8a5b36b6 | ||
|
|
a70cc7beb1 | ||
|
|
c5421699b1 | ||
|
|
d9f809864f | ||
|
|
bb23f509d7 | ||
|
|
254e184677 | ||
|
|
6c07141abd | ||
|
|
5822fc1d5b | ||
|
|
2cd7ea257c | ||
|
|
0a21b72f9c | ||
|
|
80280f6f4a | ||
|
|
810a8e76d1 | ||
|
|
bd3b4906d1 | ||
|
|
d9c740f014 | ||
|
|
ec63a18960 | ||
|
|
fab0618b6b | ||
|
|
13e57e7aa8 | ||
|
|
1299c9162c | ||
|
|
a64f33dbcc | ||
|
|
836b66e110 | ||
|
|
802119d789 | ||
|
|
f94135cadd | ||
|
|
474c0f980e | ||
|
|
2cf0f791f2 | ||
|
|
aec4d1dc60 | ||
|
|
8d28bb5a66 | ||
|
|
1d5e553f9c | ||
|
|
9d79c52d20 | ||
|
|
1ac03e2f1d | ||
|
|
801f05f45e | ||
|
|
345196aa3b | ||
|
|
a01b52421e | ||
|
|
86cedfe8b2 | ||
|
|
709128225b | ||
|
|
59a5bacb2e | ||
|
|
3a21df31ee | ||
|
|
0e3407ec2f | ||
|
|
fd6609e961 | ||
|
|
b0b5e045ff | ||
|
|
f293d7cccc | ||
|
|
974ed29c36 | ||
|
|
53eb033034 | ||
|
|
f2545b98ab | ||
|
|
1bf51e855d | ||
|
|
e4da2a695b | ||
|
|
1a905d9a42 | ||
|
|
7d9d0c15d3 | ||
|
|
d34f5c2712 | ||
|
|
a56dd66c98 | ||
|
|
3946bc6662 | ||
|
|
6647dd8f08 | ||
|
|
9371122bed | ||
|
|
734cd8ee08 | ||
|
|
d85d9d05bb | ||
|
|
1d7b87b3a9 | ||
|
|
f0cfde36f2 | ||
|
|
7e220d2741 | ||
|
|
c4b1351a43 | ||
|
|
90d2597bc3 | ||
|
|
c1508c94c2 | ||
|
|
1a0d805bad | ||
|
|
1a802469f5 | ||
|
|
646ae7e2d1 | ||
|
|
563d76ff9f | ||
|
|
54d0473e85 | ||
|
|
ec8a61c3af | ||
|
|
0315eaff8a | ||
|
|
b34f44c867 | ||
|
|
ea7056835f | ||
|
|
0bb4cdadd9 | ||
|
|
08f6520557 | ||
|
|
38b108752e | ||
|
|
0ee7870bdf | ||
|
|
37d46ecdb2 | ||
|
|
2a7911c7d6 | ||
|
|
fc2d9b4fd2 | ||
|
|
832020fa81 | ||
|
|
78606ed4b8 | ||
|
|
a04ba606e6 | ||
|
|
ebf2e7ee70 | ||
|
|
b31881f424 | ||
|
|
c0a6f6fd08 | ||
|
|
7e1b1ca730 | ||
|
|
163d176f0a | ||
|
|
0f7eab5100 | ||
|
|
cbf78d474a | ||
|
|
3615e0de34 | ||
|
|
e73c081d36 | ||
|
|
663bf6e3af | ||
|
|
60194cbafd | ||
|
|
7d2eb5faf7 | ||
|
|
5969f3d213 | ||
|
|
6ddde88389 | ||
|
|
e9992ed6b4 | ||
|
|
4db823a3be | ||
|
|
78732513c8 | ||
|
|
79557bb878 | ||
|
|
4094b02ae9 | ||
|
|
9cc7c118a8 | ||
|
|
d3dad51c76 | ||
|
|
5bf35de955 | ||
|
|
f8928c654b | ||
|
|
b3903f4ffd | ||
|
|
46c3f76edc | ||
|
|
3488408b7a | ||
|
|
b7b164b84c | ||
|
|
7c353b7d76 | ||
|
|
3d9841b61a | ||
|
|
87e2d2c7b0 | ||
|
|
ff59619af4 | ||
|
|
b79f2b86b5 | ||
|
|
386fd7a459 | ||
|
|
d4f41901ef | ||
|
|
f170da3e78 | ||
|
|
5dc15be98a | ||
|
|
88c7cfc745 | ||
|
|
867478697d | ||
|
|
d27e8cf73a | ||
|
|
4490caa4f7 | ||
|
|
1b25f2c531 | ||
|
|
9d911d1fa0 | ||
|
|
494feb9f6d | ||
|
|
2a04943a67 | ||
|
|
731b29ce91 | ||
|
|
28fbb70858 | ||
|
|
44f402c64e | ||
|
|
c7f391ca44 | ||
|
|
5ed9c5e168 | ||
|
|
51b1a86d19 | ||
|
|
20c46677d0 | ||
|
|
efb5f232f7 | ||
|
|
9edf9561b2 | ||
|
|
5d4eb018ee | ||
|
|
10fbce056b | ||
|
|
cbc6d6a572 | ||
|
|
fb1af9e3d2 | ||
|
|
c9e410a6f4 | ||
|
|
c8d72b59c0 | ||
|
|
cd71d4a2f7 | ||
|
|
ed0cc59e66 | ||
|
|
d4f1b48f52 | ||
|
|
08bec02170 | ||
|
|
c9f27b83e1 | ||
|
|
8327585b3b | ||
|
|
727815d6dd | ||
|
|
2968f74c6c | ||
|
|
431499f43f | ||
|
|
d809283d23 | ||
|
|
b49275fe6b | ||
|
|
87c7ce588e | ||
|
|
26d0a7c742 | ||
|
|
b01887c7ec | ||
|
|
745031c020 | ||
|
|
3ccfc09e01 | ||
|
|
e8750275c9 | ||
|
|
f0d7ea4cc6 | ||
|
|
ea5322af82 | ||
|
|
0b23f68fb2 | ||
|
|
1c00129f76 | ||
|
|
454700af05 | ||
|
|
d9b482d90a | ||
|
|
09c2c97069 | ||
|
|
88faf0ce78 | ||
|
|
aef83eec31 | ||
|
|
5bd222c266 | ||
|
|
d3e7f789b2 | ||
|
|
87c6e292f1 | ||
|
|
b597ad0b3f | ||
|
|
40dd99dea3 | ||
|
|
6ea2686219 | ||
|
|
6bca90c4f7 | ||
|
|
20fa7bd852 | ||
|
|
6b80119eff | ||
|
|
1fc5469eb1 | ||
|
|
bf2769a0c2 | ||
|
|
325b601bea | ||
|
|
126642912e | ||
|
|
57ee16d565 | ||
|
|
9f0fba063d | ||
|
|
757fb51415 | ||
|
|
b1c5655138 | ||
|
|
4d97dcaa93 | ||
|
|
96db1b4685 | ||
|
|
9e21c52d04 | ||
|
|
5fa801f9f2 | ||
|
|
0301768b79 | ||
|
|
4c6dedfa4f | ||
|
|
6652d55455 | ||
|
|
3e03dd3e80 | ||
|
|
84b8a22423 | ||
|
|
ada03e12fc | ||
|
|
d66c801350 | ||
|
|
91846939f6 | ||
|
|
c85127d76b | ||
|
|
166bf65e88 | ||
|
|
f68bdc406f | ||
|
|
8390482d6c | ||
|
|
783f454f8e | ||
|
|
86a67bd245 | ||
|
|
099b0b65c0 | ||
|
|
505652efa0 | ||
|
|
a20088330f | ||
|
|
a20e2504bb | ||
|
|
b07bc150e1 | ||
|
|
46c6588aa1 | ||
|
|
e36c672c9a | ||
|
|
c044e1ea8c | ||
|
|
25b6c1b6ca | ||
|
|
c25d72d911 | ||
|
|
73613d1583 | ||
|
|
1e6542d12d | ||
|
|
3cffaa43f7 | ||
|
|
08792e794f | ||
|
|
7fa26d59da | ||
|
|
74469829e5 | ||
|
|
ba414742a6 | ||
|
|
f6fcfb6dde | ||
|
|
c5b90c0144 | ||
|
|
f669881849 | ||
|
|
d0b70ea6df | ||
|
|
51af43d492 | ||
|
|
8a49ad4586 | ||
|
|
2ae068c2d2 | ||
|
|
5e07e8dbbd | ||
|
|
8d2c68505e | ||
|
|
44f1e7c401 | ||
|
|
fd2945469e | ||
|
|
b0f0827cff | ||
|
|
c1e2c415c4 | ||
|
|
a258b96602 | ||
|
|
82ef76b1cb | ||
|
|
aaa9982932 | ||
|
|
1cdb4bc9e7 | ||
|
|
fddb0c9e66 | ||
|
|
5c78d2b6d2 | ||
|
|
a4113cbb52 | ||
|
|
afa3bda3c8 | ||
|
|
61d7edd15f | ||
|
|
c2106de7e1 | ||
|
|
0bf1be6198 | ||
|
|
af7c20e440 | ||
|
|
17771a2b89 | ||
|
|
8840097fe2 | ||
|
|
7d333efd45 | ||
|
|
ec65815c57 | ||
|
|
640b0c71e6 | ||
|
|
4208876ef3 | ||
|
|
bff9117360 | ||
|
|
6b3c4c70d2 | ||
|
|
0292fd8d91 | ||
|
|
94a41270d0 | ||
|
|
75d78bfa53 | ||
|
|
88263db831 | ||
|
|
3ef96404ee | ||
|
|
13f9370f8c | ||
|
|
1c349270bf | ||
|
|
c28f0f6286 | ||
|
|
b20939d211 | ||
|
|
b76c45fc2b | ||
|
|
1bbfccd082 | ||
|
|
cee7e06832 | ||
|
|
03dff4b382 | ||
|
|
f546b20a01 | ||
|
|
0e8d9a264f | ||
|
|
66a4c98bee | ||
|
|
36101db500 | ||
|
|
6bff298d1e | ||
|
|
c832f8ffbb | ||
|
|
d7fe46dbde | ||
|
|
5951186463 | ||
|
|
7191042bb8 | ||
|
|
a80fbcc252 | ||
|
|
c321758afd | ||
|
|
ca8f59a643 | ||
|
|
8110882617 | ||
|
|
a283b66541 | ||
|
|
569de37e16 | ||
|
|
669f3394c7 | ||
|
|
87ec2c7378 | ||
|
|
ea7a31cad1 | ||
|
|
c894ade25e | ||
|
|
a3fe127a92 | ||
|
|
7f526be879 | ||
|
|
71ae174e29 | ||
|
|
2277d134cc | ||
|
|
880aa265f1 | ||
|
|
ea639e64a4 | ||
|
|
b60fdee5e2 | ||
|
|
44f07fb81d | ||
|
|
60a85fadd3 | ||
|
|
68367125e1 | ||
|
|
6112f60681 | ||
|
|
ecc74e2ae5 | ||
|
|
c2dae43965 | ||
|
|
6e3a25d255 | ||
|
|
4e13cf1d85 | ||
|
|
0fee1897eb | ||
|
|
9dd51467fe | ||
|
|
cec6dca72f | ||
|
|
58df2b9bcf | ||
|
|
cc6bdd6295 | ||
|
|
7a044f9f78 | ||
|
|
e77acde005 | ||
|
|
ece5082096 | ||
|
|
0723026a56 | ||
|
|
0b7346f4a1 | ||
|
|
a357db1ff6 | ||
|
|
a2287f8d0a | ||
|
|
076decd6e9 | ||
|
|
d40461de94 | ||
|
|
4b1492be0d | ||
|
|
1676246743 | ||
|
|
f7c9f6d142 | ||
|
|
6022339091 | ||
|
|
25d97afa60 | ||
|
|
df635b963c | ||
|
|
6d0a054170 | ||
|
|
177d3af77f | ||
|
|
35f71c619b | ||
|
|
31a80ccce4 | ||
|
|
3194cec8df | ||
|
|
57fd3c5801 | ||
|
|
86617f1bda | ||
|
|
35f36c598c | ||
|
|
36bd7816fe | ||
|
|
fd632392d4 | ||
|
|
423b48866f | ||
|
|
745bc24343 | ||
|
|
04a823c7d0 | ||
|
|
56af4c2fcb | ||
|
|
77daf6812a | ||
|
|
c7e964ec42 | ||
|
|
694e2c2a4f | ||
|
|
df6537fae8 | ||
|
|
71f6542571 | ||
|
|
5a6294c08e | ||
|
|
f0390786d6 | ||
|
|
719d18c670 | ||
|
|
a116dcd3bb | ||
|
|
e2dd3dcf88 | ||
|
|
822f0c3cb2 | ||
|
|
63fb39016b | ||
|
|
e79f8d58ca | ||
|
|
a469dfb583 | ||
|
|
6cbc545f84 | ||
|
|
ea1e24d8f9 | ||
|
|
6fcb4d93c9 | ||
|
|
36031c9d0f | ||
|
|
a70f5e2440 | ||
|
|
6c42aab567 | ||
|
|
27631a1746 | ||
|
|
320f5cebc7 | ||
|
|
ea2a583803 | ||
|
|
9965801258 | ||
|
|
24ed0521c7 | ||
|
|
d8fed79810 | ||
|
|
c30db15efa | ||
|
|
817869b915 | ||
|
|
3038dd9440 | ||
|
|
276b2c737a | ||
|
|
62543b94c9 | ||
|
|
4d607ed276 | ||
|
|
26e2865e35 | ||
|
|
f7c94c9eb5 | ||
|
|
25a91f89fd | ||
|
|
246f055145 | ||
|
|
8c3bf0d4cb | ||
|
|
e49f24e95f | ||
|
|
48a18ff771 | ||
|
|
37161057c6 | ||
|
|
68d1157495 | ||
|
|
19c3b2f4b6 | ||
|
|
7051c332a1 | ||
|
|
0f2a0b7c97 | ||
|
|
bb6ef42d0c | ||
|
|
3c591d4968 | ||
|
|
cf356a8e35 | ||
|
|
3a0ce58cda | ||
|
|
2d7038dc18 | ||
|
|
25a0e67841 | ||
|
|
be64209292 | ||
|
|
0006cb1c27 | ||
|
|
836d38ed2a | ||
|
|
ec71017785 | ||
|
|
faf9449107 | ||
|
|
f93bbd6bc3 | ||
|
|
ca12d655ea | ||
|
|
72e486791b | ||
|
|
874c28bd88 | ||
|
|
aa7c0a3544 | ||
|
|
3624a3b450 | ||
|
|
c4c50699cc | ||
|
|
6a3d760cfe | ||
|
|
8ceaf66a81 | ||
|
|
fdd2562f32 | ||
|
|
28457021f8 | ||
|
|
459716bd6e | ||
|
|
41e0e6762c | ||
|
|
a5ee60c1c9 | ||
|
|
1391c1d607 | ||
|
|
8e5d47061f | ||
|
|
28ea43c89e | ||
|
|
59adcfe1a1 | ||
|
|
cb38ba12a7 | ||
|
|
dc8e146aa1 | ||
|
|
9200f5b516 | ||
|
|
5c1026c745 | ||
|
|
95e8c85aa9 | ||
|
|
0d179d67a3 | ||
|
|
99ce40f736 | ||
|
|
d2315f4fd7 | ||
|
|
6370404985 | ||
|
|
1ed38fff6f | ||
|
|
ba48713219 | ||
|
|
dfc1e6a2b9 | ||
|
|
4237331222 | ||
|
|
223bcdc261 | ||
|
|
087124ce42 | ||
|
|
c5cfd8f40e | ||
|
|
b70a23a10a | ||
|
|
ccf55bcd01 | ||
|
|
d227660d6c | ||
|
|
ca6202fc19 | ||
|
|
f6b5a40813 | ||
|
|
69c0cefe5e | ||
|
|
ad8772e191 | ||
|
|
e095767bc6 | ||
|
|
610f19bea1 | ||
|
|
4637559c6e | ||
|
|
766dcff6c6 | ||
|
|
b30dc39e37 | ||
|
|
a23178633a | ||
|
|
7c074e1cd4 | ||
|
|
4a8b96a6d2 | ||
|
|
290a206012 | ||
|
|
7b86b3843f | ||
|
|
553adb2ad0 | ||
|
|
cc55a78fb4 | ||
|
|
bd1df09098 | ||
|
|
c61fae05d6 | ||
|
|
e3cb5bfa07 | ||
|
|
09f6034f2f | ||
|
|
63b8a76bf6 | ||
|
|
5fe536a058 | ||
|
|
342184e532 | ||
|
|
e5c169ddf8 | ||
|
|
622ba2b0e3 | ||
|
|
fbfe8f8d14 | ||
|
|
3c96fda59b | ||
|
|
7cb03dde44 | ||
|
|
db34f89251 | ||
|
|
98b9972fa5 | ||
|
|
dd5507036f | ||
|
|
75da209de1 | ||
|
|
bb8a2bfff7 | ||
|
|
a7f8febed7 | ||
|
|
21d291531e | ||
|
|
d133fa0d74 | ||
|
|
2653a9447b | ||
|
|
bc04903741 | ||
|
|
5501418727 | ||
|
|
2737b3635f | ||
|
|
e29688530d | ||
|
|
2eec26b648 | ||
|
|
d4d1d87680 | ||
|
|
869be3e361 | ||
|
|
15376c19be | ||
|
|
f92b610a03 | ||
|
|
268f6447cb | ||
|
|
ed93c647d2 | ||
|
|
f60db358ee | ||
|
|
ad6bd840a9 | ||
|
|
0fa9e8d9f5 | ||
|
|
481e265ec7 | ||
|
|
583833017b | ||
|
|
d50ebcf9eb | ||
|
|
c448531551 | ||
|
|
81ddf7e1d2 | ||
|
|
180035296e | ||
|
|
afe24a3e65 | ||
|
|
9058201de0 | ||
|
|
49a54f8a13 | ||
|
|
5cebc7f5cd | ||
|
|
4e7e475a5e | ||
|
|
f8a5bc94e5 | ||
|
|
6b0b441329 | ||
|
|
1c8aad7a07 | ||
|
|
7743a6a71d | ||
|
|
65a18e78dd | ||
|
|
12a0cbf4e1 | ||
|
|
55c2073813 | ||
|
|
39bc8c45c3 | ||
|
|
46465f5409 | ||
|
|
7b5f23e17d | ||
|
|
380efc5ae0 | ||
|
|
d1a123997d | ||
|
|
722419dffc | ||
|
|
bcd69f812e | ||
|
|
1075cd9995 | ||
|
|
e5be1ff157 | ||
|
|
398fe55083 | ||
|
|
b4ee537f7c | ||
|
|
b0ad30a5d8 | ||
|
|
26d17e2e69 | ||
|
|
43b619b2c6 | ||
|
|
0e4426e084 | ||
|
|
a27943ea14 | ||
|
|
b8b24da292 | ||
|
|
45eef03576 | ||
|
|
270f77df24 | ||
|
|
dc580b9eff | ||
|
|
fed7e94d8d | ||
|
|
9bb0ca2f0d | ||
|
|
3d82becadc | ||
|
|
e2b92c99ef | ||
|
|
fea7275148 | ||
|
|
64581fc81b | ||
|
|
37ae302fc6 | ||
|
|
c51cc02a87 | ||
|
|
6c92fbd8de | ||
|
|
065215cc27 | ||
|
|
eb8a88dbd6 | ||
|
|
62e3258dda | ||
|
|
9959d2c70d | ||
|
|
19e8b6e11f | ||
|
|
63447d1ec3 | ||
|
|
75fac93544 | ||
|
|
23f7faa74c | ||
|
|
284fdb2fcb | ||
|
|
44b27bbfc8 | ||
|
|
35d2d55a27 | ||
|
|
292f1953e1 | ||
|
|
5cd0828dd3 | ||
|
|
077281a77a | ||
|
|
7055d250d0 | ||
|
|
8c0196301d | ||
|
|
f99aacd9dc | ||
|
|
43b83bec83 | ||
|
|
fc1b4658fc | ||
|
|
05a28ea346 | ||
|
|
624f986978 | ||
|
|
91a9957918 | ||
|
|
8cd18e47e7 | ||
|
|
517868f73c | ||
|
|
18d80f4ed5 | ||
|
|
2e2c751d75 | ||
|
|
7aa5e2cbe1 | ||
|
|
7d6db20081 | ||
|
|
911ec9444b | ||
|
|
2883c6bab3 | ||
|
|
f5fed54195 | ||
|
|
91b1446375 | ||
|
|
56df145052 | ||
|
|
9e873f77f9 | ||
|
|
27bbd91635 | ||
|
|
2c73c80c9f | ||
|
|
3a3a9b5f4e | ||
|
|
3f89ed4579 | ||
|
|
02b01b89f2 | ||
|
|
4a6af0b938 | ||
|
|
9c5b4e3cc9 | ||
|
|
b3f087dbc7 | ||
|
|
aa90257ec7 | ||
|
|
348bbc81ca | ||
|
|
4231e7f3ff | ||
|
|
4cbc82619d | ||
|
|
1b0d802941 | ||
|
|
dc72a1e58d | ||
|
|
1d5333c737 | ||
|
|
d289041ff3 | ||
|
|
f287483397 | ||
|
|
1ac3b6c173 | ||
|
|
1d090765ba | ||
|
|
6c6050528a | ||
|
|
835d376ca6 | ||
|
|
68e9fd8541 | ||
|
|
e49f8f8c61 | ||
|
|
b396322f1e | ||
|
|
ea434e3469 | ||
|
|
84587ac232 | ||
|
|
9fbc83fe9d | ||
|
|
965972a719 | ||
|
|
34d19c4a72 | ||
|
|
9b0910767d | ||
|
|
32cc077e1f | ||
|
|
1e7bec48b6 | ||
|
|
c035837a14 | ||
|
|
cb5eb8983b | ||
|
|
9c86cb7954 | ||
|
|
ef94c1eccc | ||
|
|
64eaa5e3aa | ||
|
|
826f584aa8 | ||
|
|
c5530aee5f | ||
|
|
817f01593e | ||
|
|
79727f0e97 | ||
|
|
abac82c1c6 | ||
|
|
02c51c6059 | ||
|
|
46b45d0387 | ||
|
|
e6c549c457 | ||
|
|
1aa2983216 | ||
|
|
a095f89c81 | ||
|
|
287902f01b | ||
|
|
7dc3e4e7a1 | ||
|
|
0b31aad901 | ||
|
|
1791d8e4ee | ||
|
|
b7c2054a66 | ||
|
|
81f16d7061 | ||
|
|
5c151a3a09 | ||
|
|
3c46c6cbb9 | ||
|
|
d31f09c174 | ||
|
|
063eeb34ec | ||
|
|
f06192601c | ||
|
|
091221ba2c | ||
|
|
7c22111ae0 | ||
|
|
daac3eed09 | ||
|
|
32ee7feea8 | ||
|
|
2026848a77 | ||
|
|
a7b205603c | ||
|
|
291d14f2d4 | ||
|
|
4a68137cfa | ||
|
|
b2f0374426 | ||
|
|
5fcca6ed0c | ||
|
|
a05c44ad1e | ||
|
|
f9880c8931 | ||
|
|
b876896628 | ||
|
|
375c2a3363 | ||
|
|
5dbc749000 | ||
|
|
36fbd91280 | ||
|
|
d2ad3e7ff1 | ||
|
|
072f1f112e | ||
|
|
6c79f98d3c | ||
|
|
8edebbb684 | ||
|
|
4839ca631a | ||
|
|
5018fe90de | ||
|
|
379144bcfe | ||
|
|
d2cd0ece5f | ||
|
|
10b7ccaa92 | ||
|
|
925eb618de | ||
|
|
96800de052 | ||
|
|
9df659b647 | ||
|
|
aec0bd5d11 | ||
|
|
c1c9c2c578 | ||
|
|
c739fa3ca1 | ||
|
|
355dfcb6c1 | ||
|
|
8f7c291e33 | ||
|
|
71fbb3df24 | ||
|
|
9cfa9b2c57 | ||
|
|
b9b8178e30 | ||
|
|
089cefb77b | ||
|
|
ee9ea1faab | ||
|
|
22b2cf8b0c | ||
|
|
10bd3c9dda | ||
|
|
6c3147fcf4 | ||
|
|
5e8d169c50 | ||
|
|
8657a35fd7 | ||
|
|
97c0b60a22 | ||
|
|
8a284d6c49 |
No files matched your search
@@ -0,0 +1,202 @@
|
|||||||
|
name: ci
|
||||||
|
on: ["push", "pull_request"]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
lint:
|
||||||
|
name: lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-python@v1
|
||||||
|
with:
|
||||||
|
python-version: '3.7'
|
||||||
|
- name: extract pip cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
|
||||||
|
restore-keys: ${{ runner.os }}-pip-
|
||||||
|
- run: pip install --user --upgrade pip wheel
|
||||||
|
- run: pip install -e .[torrent,lint]
|
||||||
|
- run: make lint
|
||||||
|
|
||||||
|
tests-unit:
|
||||||
|
name: "tests / unit"
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-latest
|
||||||
|
- macos-latest
|
||||||
|
- windows-latest
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-python@v1
|
||||||
|
with:
|
||||||
|
python-version: '3.7'
|
||||||
|
- name: set pip cache dir
|
||||||
|
id: pip-cache
|
||||||
|
run: echo "::set-output name=dir::$(pip cache dir)"
|
||||||
|
- name: extract pip cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ steps.pip-cache.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
|
||||||
|
restore-keys: ${{ runner.os }}-pip-
|
||||||
|
- id: os-name
|
||||||
|
uses: ASzc/change-string-case-action@v1
|
||||||
|
with:
|
||||||
|
string: ${{ runner.os }}
|
||||||
|
- run: pip install --user --upgrade pip wheel
|
||||||
|
- if: startsWith(runner.os, 'linux')
|
||||||
|
run: pip install -e .[torrent,test]
|
||||||
|
- if: startsWith(runner.os, 'linux')
|
||||||
|
env:
|
||||||
|
HOME: /tmp
|
||||||
|
run: make test-unit-coverage
|
||||||
|
- if: startsWith(runner.os, 'linux') != true
|
||||||
|
run: pip install -e .[test]
|
||||||
|
- if: startsWith(runner.os, 'linux') != true
|
||||||
|
env:
|
||||||
|
HOME: /tmp
|
||||||
|
run: coverage run --source=lbry -m unittest tests/unit/test_conf.py
|
||||||
|
- name: submit coverage report
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
COVERALLS_FLAG_NAME: tests-unit-${{ steps.os-name.outputs.lowercase }}
|
||||||
|
COVERALLS_PARALLEL: true
|
||||||
|
run: |
|
||||||
|
pip install coveralls
|
||||||
|
coveralls --service=github
|
||||||
|
|
||||||
|
tests-integration:
|
||||||
|
name: "tests / integration"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
test:
|
||||||
|
- datanetwork
|
||||||
|
- blockchain
|
||||||
|
- blockchain_legacy_search
|
||||||
|
- other
|
||||||
|
steps:
|
||||||
|
- name: Configure sysctl limits
|
||||||
|
run: |
|
||||||
|
sudo swapoff -a
|
||||||
|
sudo sysctl -w vm.swappiness=1
|
||||||
|
sudo sysctl -w fs.file-max=262144
|
||||||
|
sudo sysctl -w vm.max_map_count=262144
|
||||||
|
- name: Runs Elasticsearch
|
||||||
|
uses: elastic/elastic-github-actions/elasticsearch@master
|
||||||
|
with:
|
||||||
|
stack-version: 7.6.0
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-python@v1
|
||||||
|
with:
|
||||||
|
python-version: '3.7'
|
||||||
|
- if: matrix.test == 'other'
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y --no-install-recommends ffmpeg
|
||||||
|
- name: extract pip cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ./.tox
|
||||||
|
key: tox-integration-${{ matrix.test }}-${{ hashFiles('setup.py') }}
|
||||||
|
restore-keys: txo-integration-${{ matrix.test }}-
|
||||||
|
- run: pip install tox coverage coveralls
|
||||||
|
- run: tox -e ${{ matrix.test }}
|
||||||
|
- name: submit coverage report
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
COVERALLS_FLAG_NAME: tests-integration-${{ matrix.test }}
|
||||||
|
COVERALLS_PARALLEL: true
|
||||||
|
run: |
|
||||||
|
coverage combine tests
|
||||||
|
coveralls --service=github
|
||||||
|
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
needs: ["tests-unit", "tests-integration"]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: finalize coverage report submission
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
pip install coveralls
|
||||||
|
coveralls --service=github --finish
|
||||||
|
|
||||||
|
build:
|
||||||
|
needs: ["lint", "tests-unit", "tests-integration"]
|
||||||
|
name: "build / binary"
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-18.04
|
||||||
|
- macos-latest
|
||||||
|
- windows-latest
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-python@v1
|
||||||
|
with:
|
||||||
|
python-version: '3.7'
|
||||||
|
- id: os-name
|
||||||
|
uses: ASzc/change-string-case-action@v1
|
||||||
|
with:
|
||||||
|
string: ${{ runner.os }}
|
||||||
|
- name: set pip cache dir
|
||||||
|
id: pip-cache
|
||||||
|
run: echo "::set-output name=dir::$(pip cache dir)"
|
||||||
|
- name: extract pip cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ steps.pip-cache.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
|
||||||
|
restore-keys: ${{ runner.os }}-pip-
|
||||||
|
- run: pip install pyinstaller==4.4
|
||||||
|
- run: pip install -e .
|
||||||
|
- if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
run: python docker/set_build.py
|
||||||
|
- if: startsWith(runner.os, 'linux') || startsWith(runner.os, 'mac')
|
||||||
|
name: Build & Run (Unix)
|
||||||
|
run: |
|
||||||
|
pyinstaller --onefile --name lbrynet lbry/extras/cli.py
|
||||||
|
dist/lbrynet --version
|
||||||
|
- if: startsWith(runner.os, 'windows')
|
||||||
|
name: Build & Run (Windows)
|
||||||
|
run: |
|
||||||
|
pip install pywin32==301
|
||||||
|
pyinstaller --additional-hooks-dir=scripts/. --icon=icons/lbry256.ico --onefile --name lbrynet lbry/extras/cli.py
|
||||||
|
dist/lbrynet.exe --version
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: lbrynet-${{ steps.os-name.outputs.lowercase }}
|
||||||
|
path: dist/
|
||||||
|
|
||||||
|
release:
|
||||||
|
name: "release"
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
needs: ["build"]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions/download-artifact@v2
|
||||||
|
- name: upload binaries
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.RELEASE_API_TOKEN }}
|
||||||
|
run: |
|
||||||
|
pip install githubrelease
|
||||||
|
chmod +x lbrynet-macos/lbrynet
|
||||||
|
chmod +x lbrynet-linux/lbrynet
|
||||||
|
zip --junk-paths lbrynet-mac.zip lbrynet-macos/lbrynet
|
||||||
|
zip --junk-paths lbrynet-linux.zip lbrynet-linux/lbrynet
|
||||||
|
zip --junk-paths lbrynet-windows.zip lbrynet-windows/lbrynet.exe
|
||||||
|
ls -lh
|
||||||
|
githubrelease release lbryio/lbry-sdk info ${GITHUB_REF#refs/tags/}
|
||||||
|
githubrelease asset lbryio/lbry-sdk upload ${GITHUB_REF#refs/tags/} \
|
||||||
|
lbrynet-mac.zip lbrynet-linux.zip lbrynet-windows.zip
|
||||||
|
githubrelease release lbryio/lbry-sdk publish ${GITHUB_REF#refs/tags/}
|
||||||
|
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
name: slack
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: "slack notification"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: LoveToKnow/slackify-markdown-action@v1.0.0
|
||||||
|
id: markdown
|
||||||
|
with:
|
||||||
|
text: "There is a new SDK release: ${{github.event.release.html_url}}\n${{ github.event.release.body }}"
|
||||||
|
- uses: slackapi/slack-github-action@v1.14.0
|
||||||
|
env:
|
||||||
|
CHANGELOG: '<!channel> ${{ steps.markdown.outputs.text }}'
|
||||||
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_RELEASE_BOT_WEBHOOK }}
|
||||||
|
with:
|
||||||
|
payload: '{"type": "mrkdwn", "text": ${{ toJSON(env.CHANGELOG) }} }'
|
||||||
|
|
||||||
@@ -1,2 +1,22 @@
|
|||||||
/.idea
|
/.idea
|
||||||
/.DS_Store
|
/.DS_Store
|
||||||
|
/build
|
||||||
|
/dist
|
||||||
|
/.tox
|
||||||
|
/.coverage*
|
||||||
|
/lbry-venv
|
||||||
|
/venv
|
||||||
|
/lbry/blockchain
|
||||||
|
|
||||||
|
lbry.egg-info
|
||||||
|
__pycache__
|
||||||
|
_trial_temp/
|
||||||
|
trending*.log
|
||||||
|
|
||||||
|
/tests/integration/blockchain/files
|
||||||
|
/tests/.coverage.*
|
||||||
|
|
||||||
|
/lbry/wallet/bin
|
||||||
|
|
||||||
|
/.vscode
|
||||||
|
/.gitignore
|
||||||
@@ -1,146 +0,0 @@
|
|||||||
sudo: required
|
|
||||||
dist: xenial
|
|
||||||
language: python
|
|
||||||
python: "3.7"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
include:
|
|
||||||
|
|
||||||
- stage: code quality
|
|
||||||
name: "pylint & mypy"
|
|
||||||
install:
|
|
||||||
- make install
|
|
||||||
script: make lint
|
|
||||||
|
|
||||||
- stage: test
|
|
||||||
name: "LBRY Unit Tests"
|
|
||||||
install:
|
|
||||||
- make install
|
|
||||||
script:
|
|
||||||
- cd lbry && HOME=/tmp coverage run -p --source=lbry -m unittest discover -vv tests.unit
|
|
||||||
after_success:
|
|
||||||
- coverage combine lbry/
|
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
|
||||||
|
|
||||||
- name: "LBRY Integration Tests"
|
|
||||||
install:
|
|
||||||
- pip install coverage tox-travis
|
|
||||||
- sudo mount -o mode=1777,nosuid,nodev -t tmpfs tmpfs /tmp
|
|
||||||
script: cd lbry && tox
|
|
||||||
after_success:
|
|
||||||
- coverage combine lbry
|
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
|
||||||
|
|
||||||
- &torba-tests
|
|
||||||
name: "Torba Unit Tests"
|
|
||||||
env: TESTTYPE=unit
|
|
||||||
install:
|
|
||||||
- pip install coverage tox-travis
|
|
||||||
script: cd torba && tox
|
|
||||||
after_success:
|
|
||||||
- coverage combine torba/tests
|
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
|
||||||
|
|
||||||
- <<: *torba-tests
|
|
||||||
name: "Torba Integration Tests"
|
|
||||||
env: TESTTYPE=integration
|
|
||||||
|
|
||||||
- name: "Run Examples"
|
|
||||||
install:
|
|
||||||
- make install
|
|
||||||
script:
|
|
||||||
- cd lbry && HOME=/tmp coverage run -p --source=lbry scripts/generate_json_api.py
|
|
||||||
after_success:
|
|
||||||
- coverage combine lbry
|
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
|
||||||
|
|
||||||
- &build
|
|
||||||
stage: build
|
|
||||||
name: "Linux"
|
|
||||||
env: OS=linux
|
|
||||||
install:
|
|
||||||
- pip install pyinstaller awscli
|
|
||||||
- cd torba && pip install -e . && cd ..
|
|
||||||
- cd lbry
|
|
||||||
- python scripts/set_build.py
|
|
||||||
- pip install -e .
|
|
||||||
script:
|
|
||||||
- pyinstaller -F -n lbrynet lbry/extras/cli.py
|
|
||||||
- cd dist
|
|
||||||
- chmod +x lbrynet
|
|
||||||
- zip -j lbrynet-${OS}.zip lbrynet
|
|
||||||
- shasum -a 256 -b lbrynet-${OS}.zip
|
|
||||||
- ./lbrynet --version
|
|
||||||
after_success:
|
|
||||||
- aws configure set aws_access_key_id $ARTIFACTS_KEY
|
|
||||||
- aws configure set aws_secret_access_key $ARTIFACTS_SECRET
|
|
||||||
- aws configure set region us-east-1
|
|
||||||
- export S3_PATH="daemon/build-${TRAVIS_BUILD_NUMBER}_commit-${TRAVIS_COMMIT:0:7}_branch-${TRAVIS_BRANCH}$([ ! -z ${TRAVIS_TAG} ] && echo _tag-${TRAVIS_TAG})"
|
|
||||||
- aws s3 cp lbrynet-${OS}.zip s3://build.lbry.io/${S3_PATH}/lbrynet-${OS}.zip
|
|
||||||
deploy:
|
|
||||||
provider: releases
|
|
||||||
api_key:
|
|
||||||
secure: "unnR+aSJ1937Cl1PyBBZzGuZvV5W5TGcXELhXTgyOeeI6FgO/j80qmbNxJDA7qdFH/hvVicQFWoflhZu2dxN5rYP5BQJW3q3XoOLY3XAc1s1vicFkwqn3TIfdFiJTz+/D9eBUBBhHKeYFxm3M+thvklTLgjKl6fflh14NfGuNTevK9yQke8wewW3f9UmFTo1qNOPF1OsTZRbwua6oQYa59P+KukoPt4Dsu1VtILtTkj7hfEsUL79cjotwO3gkhYftxbl/xeDSZWOt+9Nhb8ZKmQG/uDx4JiTMm5lWRk4QB7pUujZ1CftxCYWz/lJx9nuJpdCOgP624tcHymErNlD+vGLwMTNslcXGYkAJH6xvGyxBJ+Obc8vRVnZbRM26BfH34TcPK1ueRxHSrDUbzMIIUsgcoZAxBuim8uDPp+K7bGqiygzSs2vQfr9U5Jhe9/F8sPdtNctfJZEfgmthNTeVFjyNsGIfIt754uGSfACqM7wDLh6fbKx7M+FHlNyOdvYCrbKUOAYXmTikYIpVDvlaaeMO+N+uW8Rhvm1j+JU7CVwhMavLySaPVc6Dt5OxiMMmxw9mVrjW9bBPjS5AkrS5MOA13T5wapoLzH6+gE92U4HzA6ilMcwRaQPSFnK2JU7tzyt2Wy1PH4MjHowXI2WyICG1x510dD3tX1P/1px8ro="
|
|
||||||
file: lbrynet-${OS}.zip
|
|
||||||
skip_cleanup: true
|
|
||||||
overwrite: true
|
|
||||||
draft: true
|
|
||||||
on:
|
|
||||||
tags: true
|
|
||||||
|
|
||||||
- <<: *build
|
|
||||||
name: "Mac"
|
|
||||||
os: osx
|
|
||||||
osx_image: xcode8.3
|
|
||||||
language: shell
|
|
||||||
env: OS=mac
|
|
||||||
before_install:
|
|
||||||
- brew upgrade python || true
|
|
||||||
- pip3 install --user --upgrade pip virtualenv
|
|
||||||
- /Users/travis/Library/Python/3.7/bin/virtualenv $HOME/venv
|
|
||||||
- source $HOME/venv/bin/activate
|
|
||||||
before_cache:
|
|
||||||
- brew cleanup
|
|
||||||
|
|
||||||
- <<: *build
|
|
||||||
name: "Windows"
|
|
||||||
os: windows
|
|
||||||
language: shell
|
|
||||||
env:
|
|
||||||
- OS=windows
|
|
||||||
- PATH=/c/Python37:/c/Python37/Scripts:/C/Windows/System32/downlevel:$PATH
|
|
||||||
before_install:
|
|
||||||
- choco install python --x86
|
|
||||||
- python -m pip install --upgrade pip
|
|
||||||
- pip install pywin32
|
|
||||||
script:
|
|
||||||
- pyinstaller --additional-hooks-dir=scripts/. --icon=icons/lbry256.ico -F -n lbrynet lbry/extras/cli.py
|
|
||||||
- cd dist
|
|
||||||
- 7z a -tzip lbrynet-windows.zip lbrynet.exe
|
|
||||||
- sha256sum -b lbrynet-windows.zip
|
|
||||||
- ./lbrynet.exe --version
|
|
||||||
- if: tag IS present
|
|
||||||
stage: build
|
|
||||||
name: "Wallet Server Docker Image - Tagged Release"
|
|
||||||
script:
|
|
||||||
- set -e
|
|
||||||
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
|
|
||||||
- travis_retry docker build -t lbry/wallet-server:$TRAVIS_TAG -f lbry/scripts/Dockerfile.wallet_server .
|
|
||||||
- docker push lbry/wallet-server:$TRAVIS_TAG
|
|
||||||
|
|
||||||
- if: tag IS blank AND branch = master AND NOT type IN (pull_request)
|
|
||||||
stage: build
|
|
||||||
name: "Wallet Server Docker Image - Master"
|
|
||||||
script:
|
|
||||||
- set -e
|
|
||||||
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
|
|
||||||
- travis_retry docker build -t lbry/wallet-server:master -f lbry/scripts/Dockerfile.wallet_server .
|
|
||||||
- docker push lbry/wallet-server:master
|
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- $HOME/venv
|
|
||||||
- $HOME/.cache/pip
|
|
||||||
- $HOME/Library/Caches/pip
|
|
||||||
- $HOME/Library/Caches/Homebrew
|
|
||||||
- $TRAVIS_BUILD_DIR/.tox
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# Installing LBRY
|
# Installing LBRY
|
||||||
|
|
||||||
If only the JSON-RPC API server is needed, the recommended way to install LBRY is to use a pre-built binary. We provide binaries for all major operating systems. See the [README](README.md).
|
If only the JSON-RPC API server is needed, the recommended way to install LBRY is to use a pre-built binary. We provide binaries for all major operating systems. See the [README](README.md)!
|
||||||
|
|
||||||
These instructions are for installing LBRY from source, which is recommended if you are interested in doing development work or LBRY is not available on your operating system (godspeed, TempleOS users).
|
These instructions are for installing LBRY from source, which is recommended if you are interested in doing development work or LBRY is not available on your operating system (godspeed, TempleOS users).
|
||||||
|
|
||||||
@@ -9,36 +9,48 @@ Here's a video walkthrough of this setup, which is itself hosted by the LBRY net
|
|||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
Running `lbrynet` from source requires Python 3.7 or higher. Get the installer for your OS [here](https://www.python.org/downloads/release/python-370/)
|
Running `lbrynet` from source requires Python 3.7. Get the installer for your OS [here](https://www.python.org/downloads/release/python-370/).
|
||||||
|
|
||||||
After installing python 3, you'll need to install some additional libraries depending on your operating system.
|
After installing Python 3.7, you'll need to install some additional libraries depending on your operating system.
|
||||||
|
|
||||||
|
Because of [issue #2769](https://github.com/lbryio/lbry-sdk/issues/2769)
|
||||||
|
at the moment the `lbrynet` daemon will only work correctly with Python 3.7.
|
||||||
|
If Python 3.8+ is used, the daemon will start but the RPC server
|
||||||
|
may not accept messages, returning the following:
|
||||||
|
```
|
||||||
|
Could not connect to daemon. Are you sure it's running?
|
||||||
|
```
|
||||||
|
|
||||||
### macOS
|
### macOS
|
||||||
|
|
||||||
macOS users will need to install [xcode command line tools](https://developer.xamarin.com/guides/testcloud/calabash/configuring/osx/install-xcode-command-line-tools/) and [homebrew](http://brew.sh/).
|
macOS users will need to install [xcode command line tools](https://developer.xamarin.com/guides/testcloud/calabash/configuring/osx/install-xcode-command-line-tools/) and [homebrew](http://brew.sh/).
|
||||||
|
|
||||||
These environment variables also need to be set
|
These environment variables also need to be set:
|
||||||
1. PYTHONUNBUFFERED=1
|
```
|
||||||
2. EVENT_NOKQUEUE=1
|
PYTHONUNBUFFERED=1
|
||||||
|
EVENT_NOKQUEUE=1
|
||||||
|
```
|
||||||
|
|
||||||
Remaining dependencies can then be installed by running:
|
Remaining dependencies can then be installed by running:
|
||||||
|
|
||||||
```
|
```
|
||||||
brew install python protobuf
|
brew install python protobuf
|
||||||
```
|
```
|
||||||
|
|
||||||
Assistance installing Python3: https://docs.python-guide.org/starting/install3/osx/
|
Assistance installing Python3: https://docs.python-guide.org/starting/install3/osx/.
|
||||||
|
|
||||||
### Linux
|
### Linux
|
||||||
|
|
||||||
On Ubuntu (16.04 minimum, we recommend 18.04), install the following:
|
On Ubuntu (we recommend 18.04 or 20.04), install the following:
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo add-apt-repository ppa:deadsnakes/ppa
|
sudo add-apt-repository ppa:deadsnakes/ppa
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install build-essential python3.7 python3.7-dev git python3.7-venv libssl-dev python-protobuf
|
sudo apt-get install build-essential python3.7 python3.7-dev git python3.7-venv libssl-dev python-protobuf
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The [deadsnakes PPA](https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa) provides Python 3.7
|
||||||
|
for those Ubuntu distributions that no longer have it in their
|
||||||
|
official repositories.
|
||||||
|
|
||||||
On Raspbian, you will also need to install `python-pyparsing`.
|
On Raspbian, you will also need to install `python-pyparsing`.
|
||||||
|
|
||||||
If you're running another Linux distro, install the equivalent of the above packages for your system.
|
If you're running another Linux distro, install the equivalent of the above packages for your system.
|
||||||
@@ -47,65 +59,119 @@ If you're running another Linux distro, install the equivalent of the above pack
|
|||||||
|
|
||||||
### Linux/Mac
|
### Linux/Mac
|
||||||
|
|
||||||
To install on Linux/Mac:
|
Clone the repository:
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/lbryio/lbry-sdk.git
|
||||||
|
cd lbry-sdk
|
||||||
|
```
|
||||||
|
|
||||||
```
|
Create a Python virtual environment for lbry-sdk:
|
||||||
Clone the repository:
|
```bash
|
||||||
$ git clone https://github.com/lbryio/lbry-sdk.git
|
python3.7 -m venv lbry-venv
|
||||||
$ cd lbry-sdk
|
```
|
||||||
|
|
||||||
Create a Python virtual environment for lbry-sdk:
|
Activate virtual environment:
|
||||||
$ python3.7 -m venv lbry-venv
|
```bash
|
||||||
|
source lbry-venv/bin/activate
|
||||||
Activating lbry-sdk virtual environment:
|
```
|
||||||
$ source lbry-venv/bin/activate
|
|
||||||
|
|
||||||
Make sure you're on Python 3.7+ (as the default Python in virtual environment):
|
|
||||||
$ python --version
|
|
||||||
|
|
||||||
Install packages:
|
Make sure you're on Python 3.7+ as default in the virtual environment:
|
||||||
$ make install
|
```bash
|
||||||
|
python --version
|
||||||
|
```
|
||||||
|
|
||||||
If you are on Linux and using PyCharm, generates initial configs:
|
Install packages:
|
||||||
$ make idea
|
```bash
|
||||||
```
|
make install
|
||||||
|
```
|
||||||
|
|
||||||
To verify your installation, `which lbrynet` should return a path inside of the `lbry-venv` folder created by the `python3.7 -m venv lbry-venv` command.
|
If you are on Linux and using PyCharm, generates initial configs:
|
||||||
|
```bash
|
||||||
|
make idea
|
||||||
|
```
|
||||||
|
|
||||||
|
To verify your installation, `which lbrynet` should return a path inside
|
||||||
|
of the `lbry-venv` folder.
|
||||||
|
```bash
|
||||||
|
(lbry-venv) $ which lbrynet
|
||||||
|
/opt/lbry-sdk/lbry-venv/bin/lbrynet
|
||||||
|
```
|
||||||
|
|
||||||
|
To exit the virtual environment simply use the command `deactivate`.
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
To install on Windows:
|
Clone the repository:
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/lbryio/lbry-sdk.git
|
||||||
|
cd lbry-sdk
|
||||||
|
```
|
||||||
|
|
||||||
```
|
Create a Python virtual environment for lbry-sdk:
|
||||||
Clone the repository:
|
```bash
|
||||||
> git clone https://github.com/lbryio/lbry-sdk.git
|
python -m venv lbry-venv
|
||||||
> cd lbry-sdk
|
```
|
||||||
|
|
||||||
Create a Python virtual environment for lbry-sdk:
|
Activate virtual environment:
|
||||||
> python -m venv lbry-venv
|
```bash
|
||||||
|
lbry-venv\Scripts\activate
|
||||||
|
```
|
||||||
|
|
||||||
Activating lbry-sdk virtual environment:
|
Install packages:
|
||||||
> lbry-venv\Scripts\activate
|
```bash
|
||||||
|
pip install -e .
|
||||||
Install packages:
|
```
|
||||||
> cd torba
|
|
||||||
> pip install -e .
|
|
||||||
> cd ../lbry
|
|
||||||
> pip install -e .
|
|
||||||
```
|
|
||||||
|
|
||||||
## Run the tests
|
## Run the tests
|
||||||
|
### Elasticsearch
|
||||||
|
|
||||||
To run the unit tests from the repo directory:
|
For running integration tests, Elasticsearch is required to be available at localhost:9200/
|
||||||
|
|
||||||
```
|
The easiest way to start it is using docker with:
|
||||||
python -m unittest discover -s lbry tests.unit
|
```bash
|
||||||
```
|
make elastic-docker
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternative installation methods are available [at Elasticsearch website](https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html).
|
||||||
|
|
||||||
|
To run the unit and integration tests from the repo directory:
|
||||||
|
```
|
||||||
|
python -m unittest discover tests.unit
|
||||||
|
python -m unittest discover tests.integration
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
To start the API server:
|
To start the API server:
|
||||||
`lbrynet start`
|
```
|
||||||
|
lbrynet start
|
||||||
|
```
|
||||||
|
|
||||||
|
Whenever the code inside [lbry-sdk/lbry](./lbry)
|
||||||
|
is modified we should run `make install` to recompile the `lbrynet`
|
||||||
|
executable with the newest code.
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
When developing, remember to enter the environment,
|
||||||
|
and if you wish start the server interactively.
|
||||||
|
```bash
|
||||||
|
$ source lbry-venv/bin/activate
|
||||||
|
|
||||||
|
(lbry-venv) $ python lbry/extras/cli.py start
|
||||||
|
```
|
||||||
|
|
||||||
|
Parameters can be passed in the same way.
|
||||||
|
```bash
|
||||||
|
(lbry-venv) $ python lbry/extras/cli.py wallet balance
|
||||||
|
```
|
||||||
|
|
||||||
|
If a Python debugger (`pdb` or `ipdb`) is installed we can also start it
|
||||||
|
in this way, set up break points, and step through the code.
|
||||||
|
```bash
|
||||||
|
(lbry-venv) $ pip install ipdb
|
||||||
|
|
||||||
|
(lbry-venv) $ ipdb lbry/extras/cli.py
|
||||||
|
```
|
||||||
|
|
||||||
Happy hacking!
|
Happy hacking!
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2015-2019 LBRY Inc
|
Copyright (c) 2015-2020 LBRY Inc
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
|
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,
|
"Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
include README.md
|
include README.md
|
||||||
include CHANGELOG.md
|
include CHANGELOG.md
|
||||||
include LICENSE
|
include LICENSE
|
||||||
recursive-include torba *.txt *.py
|
recursive-include lbry *.txt *.py
|
||||||
@@ -1,18 +1,26 @@
|
|||||||
|
.PHONY: install tools lint test test-unit test-unit-coverage test-integration idea
|
||||||
|
|
||||||
install:
|
install:
|
||||||
cd torba && pip install -e .
|
pip install -e .
|
||||||
cd lbry && pip install -e .
|
|
||||||
pip install mypy==0.701
|
|
||||||
pip install coverage astroid pylint
|
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
cd lbry && pylint lbry
|
pylint --rcfile=setup.cfg lbry
|
||||||
cd torba && pylint --rcfile=setup.cfg torba
|
#mypy --ignore-missing-imports lbry
|
||||||
cd torba && mypy --ignore-missing-imports torba
|
|
||||||
|
|
||||||
test:
|
test: test-unit test-integration
|
||||||
cd lbry && tox
|
|
||||||
cd torba && tox
|
test-unit:
|
||||||
|
python -m unittest discover tests.unit
|
||||||
|
|
||||||
|
test-unit-coverage:
|
||||||
|
coverage run --source=lbry -m unittest discover -vv tests.unit
|
||||||
|
|
||||||
|
test-integration:
|
||||||
|
tox
|
||||||
|
|
||||||
idea:
|
idea:
|
||||||
mkdir -p .idea
|
mkdir -p .idea
|
||||||
cp -r lbry/scripts/idea/* .idea
|
cp -r scripts/idea/* .idea
|
||||||
|
|
||||||
|
elastic-docker:
|
||||||
|
docker run -d -v lbryhub:/usr/share/elasticsearch/data -p 9200:9200 -p 9300:9300 -e"ES_JAVA_OPTS=-Xms512m -Xmx512m" -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.12.1
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
# <img src="https://raw.githubusercontent.com/lbryio/lbry-sdk/master/lbry/lbry.png" alt="LBRY" width="48" height="36" /> LBRY SDK [](https://travis-ci.org/lbryio/lbry-sdk) [](https://codecov.io/gh/lbryio/lbry-sdk)
|
# <img src="https://raw.githubusercontent.com/lbryio/lbry-sdk/master/lbry.png" alt="LBRY" width="48" height="36" /> LBRY SDK [](https://github.com/lbryio/lbry-sdk/actions/workflows/main.yml) [](https://coveralls.io/github/lbryio/lbry-sdk)
|
||||||
|
|
||||||
LBRY is a decentralized peer-to-peer protocol for publishing and accessing digital content. It utilizes the [LBRY blockchain](https://github.com/lbryio/lbrycrd) as a global namespace and database of digital content. Blockchain entries contain searchable content metadata, identities, rights and access rules. LBRY also provides a data network that consists of peers (seeders) uploading and downloading data from other peers, possibly in exchange for payments, as well as a distributed hash table used by peers to discover other peers.
|
LBRY is a decentralized peer-to-peer protocol for publishing and accessing digital content. It utilizes the [LBRY blockchain](https://github.com/lbryio/lbrycrd) as a global namespace and database of digital content. Blockchain entries contain searchable content metadata, identities, rights and access rules. LBRY also provides a data network that consists of peers (seeders) uploading and downloading data from other peers, possibly in exchange for payments, as well as a distributed hash table used by peers to discover other peers.
|
||||||
|
|
||||||
LBRY SDK for Python is currently the most full featured implementation of the LBRY Network protocols and includes many useful components and tools for building decentralized applications. Primary features and components:
|
LBRY SDK for Python is currently the most fully featured implementation of the LBRY Network protocols and includes many useful components and tools for building decentralized applications. Primary features and components include:
|
||||||
|
|
||||||
* Built on Python 3.7+ and `asyncio`.
|
* Built on Python 3.7 and `asyncio`.
|
||||||
* Kademlia DHT (Distributed Hash Table) implementation for finding peers to download from and announcing to peers what we have to host ([lbry.dht](https://github.com/lbryio/lbry-sdk/tree/master/lbry/lbry/dht)).
|
* Kademlia DHT (Distributed Hash Table) implementation for finding peers to download from and announcing to peers what we have to host ([lbry.dht](https://github.com/lbryio/lbry-sdk/tree/master/lbry/dht)).
|
||||||
* Blob exchange protocol for transferring encrypted blobs of content and negotiating payments ([lbry.blob_exchange](https://github.com/lbryio/lbry-sdk/tree/master/lbry/lbry/blob_exchange)).
|
* Blob exchange protocol for transferring encrypted blobs of content and negotiating payments ([lbry.blob_exchange](https://github.com/lbryio/lbry-sdk/tree/master/lbry/blob_exchange)).
|
||||||
* Protobuf schema for encoding and decoding metadata stored on the blockchain ([lbry.schema](https://github.com/lbryio/lbry-sdk/tree/master/lbry/lbry/schema)).
|
* Protobuf schema for encoding and decoding metadata stored on the blockchain ([lbry.schema](https://github.com/lbryio/lbry-sdk/tree/master/lbry/schema)).
|
||||||
* Wallet implementation for the LBRY blockchain ([lbry.wallet](https://github.com/lbryio/lbry-sdk/tree/master/lbry/lbry/wallet)).
|
* Wallet implementation for the LBRY blockchain ([lbry.wallet](https://github.com/lbryio/lbry-sdk/tree/master/lbry/wallet)).
|
||||||
* Daemon with a JSON-RPC API to ease building end user applications in any language and for automating various tasks ([lbry.extras.daemon](https://github.com/lbryio/lbry-sdk/tree/master/lbry/lbry/extras/daemon)).
|
* Daemon with a JSON-RPC API to ease building end user applications in any language and for automating various tasks ([lbry.extras.daemon](https://github.com/lbryio/lbry-sdk/tree/master/lbry/extras/daemon)).
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ This project is MIT licensed. For the full license, see [LICENSE](LICENSE).
|
|||||||
|
|
||||||
## Security
|
## Security
|
||||||
|
|
||||||
We take security seriously. Please contact security@lbry.com regarding any security issues. [Our GPG key is here](https://lbry.com/faq/gpg-key) if you need it.
|
We take security seriously. Please contact security@lbry.com regarding any security issues. [Our PGP key is here](https://lbry.com/faq/pgp-key) if you need it.
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
|
||||||
@@ -53,4 +53,4 @@ The documentation for the API can be found [here](https://lbry.tech/api/sdk).
|
|||||||
|
|
||||||
Daemon defaults, ports, and other settings are documented [here](https://lbry.tech/resources/daemon-settings).
|
Daemon defaults, ports, and other settings are documented [here](https://lbry.tech/resources/daemon-settings).
|
||||||
|
|
||||||
Settings can be configured using a daemon-settings.yml file. An example can be found [here](https://github.com/lbryio/lbry-sdk/blob/master/lbry/example_daemon_settings.yml).
|
Settings can be configured using a daemon-settings.yml file. An example can be found [here](https://github.com/lbryio/lbry-sdk/blob/master/example_daemon_settings.yml).
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Security Policy
|
||||||
|
|
||||||
|
## Supported Versions
|
||||||
|
|
||||||
|
While we are not at v1.0 yet, only the latest release will be supported.
|
||||||
|
|
||||||
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
See https://lbry.com/faq/security
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
FROM debian:10-slim
|
||||||
|
|
||||||
|
ARG user=lbry
|
||||||
|
ARG projects_dir=/home/$user
|
||||||
|
|
||||||
|
ARG DOCKER_TAG
|
||||||
|
ARG DOCKER_COMMIT=docker
|
||||||
|
ENV DOCKER_TAG=$DOCKER_TAG DOCKER_COMMIT=$DOCKER_COMMIT
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get -y --no-install-recommends install \
|
||||||
|
wget \
|
||||||
|
automake libtool \
|
||||||
|
tar unzip \
|
||||||
|
build-essential \
|
||||||
|
pkg-config \
|
||||||
|
libleveldb-dev \
|
||||||
|
python3.7 \
|
||||||
|
python3-dev \
|
||||||
|
python3-pip \
|
||||||
|
python3-wheel \
|
||||||
|
python3-setuptools && \
|
||||||
|
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN groupadd -g 999 $user && useradd -m -u 999 -g $user $user
|
||||||
|
|
||||||
|
COPY . $projects_dir
|
||||||
|
RUN chown -R $user:$user $projects_dir
|
||||||
|
|
||||||
|
USER $user
|
||||||
|
WORKDIR $projects_dir
|
||||||
|
|
||||||
|
RUN make install
|
||||||
|
RUN python3 docker/set_build.py
|
||||||
|
RUN rm ~/.cache -rf
|
||||||
|
ENTRYPOINT ["python3", "scripts/dht_node.py"]
|
||||||
|
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
FROM debian:10-slim
|
||||||
|
|
||||||
|
ARG user=lbry
|
||||||
|
ARG db_dir=/database
|
||||||
|
ARG projects_dir=/home/$user
|
||||||
|
|
||||||
|
ARG DOCKER_TAG
|
||||||
|
ARG DOCKER_COMMIT=docker
|
||||||
|
ENV DOCKER_TAG=$DOCKER_TAG DOCKER_COMMIT=$DOCKER_COMMIT
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get -y --no-install-recommends install \
|
||||||
|
wget \
|
||||||
|
tar unzip \
|
||||||
|
build-essential \
|
||||||
|
automake libtool \
|
||||||
|
pkg-config \
|
||||||
|
libleveldb-dev \
|
||||||
|
python3.7 \
|
||||||
|
python3-dev \
|
||||||
|
python3-pip \
|
||||||
|
python3-wheel \
|
||||||
|
python3-setuptools && \
|
||||||
|
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN groupadd -g 999 $user && useradd -m -u 999 -g $user $user
|
||||||
|
RUN mkdir -p $db_dir
|
||||||
|
RUN chown -R $user:$user $db_dir
|
||||||
|
|
||||||
|
COPY . $projects_dir
|
||||||
|
RUN chown -R $user:$user $projects_dir
|
||||||
|
|
||||||
|
USER $user
|
||||||
|
WORKDIR $projects_dir
|
||||||
|
|
||||||
|
RUN pip install uvloop
|
||||||
|
RUN make install
|
||||||
|
RUN python3 docker/set_build.py
|
||||||
|
RUN rm ~/.cache -rf
|
||||||
|
|
||||||
|
# entry point
|
||||||
|
ARG host=0.0.0.0
|
||||||
|
ARG tcp_port=50001
|
||||||
|
ARG daemon_url=http://lbry:lbry@localhost:9245/
|
||||||
|
VOLUME $db_dir
|
||||||
|
ENV TCP_PORT=$tcp_port
|
||||||
|
ENV HOST=$host
|
||||||
|
ENV DAEMON_URL=$daemon_url
|
||||||
|
ENV DB_DIRECTORY=$db_dir
|
||||||
|
ENV MAX_SESSIONS=1000000000
|
||||||
|
ENV MAX_SEND=1000000000000000000
|
||||||
|
ENV EVENT_LOOP_POLICY=uvloop
|
||||||
|
COPY ./docker/wallet_server_entrypoint.sh /entrypoint.sh
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
FROM debian:10-slim
|
||||||
|
|
||||||
|
ARG user=lbry
|
||||||
|
ARG downloads_dir=/database
|
||||||
|
ARG projects_dir=/home/$user
|
||||||
|
|
||||||
|
ARG DOCKER_TAG
|
||||||
|
ARG DOCKER_COMMIT=docker
|
||||||
|
ENV DOCKER_TAG=$DOCKER_TAG DOCKER_COMMIT=$DOCKER_COMMIT
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get -y --no-install-recommends install \
|
||||||
|
wget \
|
||||||
|
automake libtool \
|
||||||
|
tar unzip \
|
||||||
|
build-essential \
|
||||||
|
pkg-config \
|
||||||
|
libleveldb-dev \
|
||||||
|
python3.7 \
|
||||||
|
python3-dev \
|
||||||
|
python3-pip \
|
||||||
|
python3-wheel \
|
||||||
|
python3-setuptools && \
|
||||||
|
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN groupadd -g 999 $user && useradd -m -u 999 -g $user $user
|
||||||
|
RUN mkdir -p $downloads_dir
|
||||||
|
RUN chown -R $user:$user $downloads_dir
|
||||||
|
|
||||||
|
COPY . $projects_dir
|
||||||
|
RUN chown -R $user:$user $projects_dir
|
||||||
|
|
||||||
|
USER $user
|
||||||
|
WORKDIR $projects_dir
|
||||||
|
|
||||||
|
RUN pip install uvloop
|
||||||
|
RUN make install
|
||||||
|
RUN python3 docker/set_build.py
|
||||||
|
RUN rm ~/.cache -rf
|
||||||
|
|
||||||
|
# entry point
|
||||||
|
VOLUME $downloads_dir
|
||||||
|
COPY ./docker/webconf.yaml /webconf.yaml
|
||||||
|
ENTRYPOINT ["/home/lbry/.local/bin/lbrynet", "start", "--config=/webconf.yaml"]
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
### How to run with docker-compose
|
||||||
|
1. Edit config file and after that fix permissions with
|
||||||
|
```
|
||||||
|
sudo chown -R 999:999 webconf.yaml
|
||||||
|
```
|
||||||
|
2. Start SDK with
|
||||||
|
```
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
version: "3"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
wallet_server:
|
||||||
|
es01:
|
||||||
|
|
||||||
|
services:
|
||||||
|
wallet_server:
|
||||||
|
depends_on:
|
||||||
|
- es01
|
||||||
|
image: lbry/wallet-server:${WALLET_SERVER_TAG:-latest-release}
|
||||||
|
restart: always
|
||||||
|
network_mode: host
|
||||||
|
ports:
|
||||||
|
- "50001:50001" # rpc port
|
||||||
|
- "2112:2112" # uncomment to enable prometheus
|
||||||
|
volumes:
|
||||||
|
- "wallet_server:/database"
|
||||||
|
environment:
|
||||||
|
- DAEMON_URL=http://lbry:lbry@127.0.0.1:9245
|
||||||
|
- TCP_PORT=50001
|
||||||
|
- PROMETHEUS_PORT=2112
|
||||||
|
- QUERY_TIMEOUT_MS=3000 # how long search queries allowed to run before cancelling, in milliseconds
|
||||||
|
- TRENDING_ALGORITHMS=variable_decay
|
||||||
|
- MAX_SEND=10000000000000 # deprecated. leave it high until its removed
|
||||||
|
- MAX_SUBS=1000000000000 # deprecated. leave it high until its removed
|
||||||
|
- FILTERING_CHANNEL_IDS=770bd7ecba84fd2f7607fb15aedd2b172c2e153f 95e5db68a3101df19763f3a5182e4b12ba393ee8
|
||||||
|
- BLOCKING_CHANNEL_IDS=dd687b357950f6f271999971f43c785e8067c3a9 06871aa438032244202840ec59a469b303257cad b4a2528f436eca1bf3bf3e10ff3f98c57bd6c4c6 e4e230b131082f6b10c8f7994bbb83f29e8e6fb9
|
||||||
|
es01:
|
||||||
|
image: docker.elastic.co/elasticsearch/elasticsearch:7.11.0
|
||||||
|
container_name: es01
|
||||||
|
environment:
|
||||||
|
- node.name=es01
|
||||||
|
- discovery.type=single-node
|
||||||
|
- indices.query.bool.max_clause_count=4096
|
||||||
|
- bootstrap.memory_lock=true
|
||||||
|
- "ES_JAVA_OPTS=-Xms8g -Xmx8g" # no more than 32, remember to disable swap
|
||||||
|
ulimits:
|
||||||
|
memlock:
|
||||||
|
soft: -1
|
||||||
|
hard: -1
|
||||||
|
volumes:
|
||||||
|
- es01:/usr/share/elasticsearch/data
|
||||||
|
ports:
|
||||||
|
- 127.0.0.1:9200:9200
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
websdk:
|
||||||
|
image: vshyba/websdk
|
||||||
|
ports:
|
||||||
|
- '5279:5279'
|
||||||
|
- '5280:5280'
|
||||||
|
volumes:
|
||||||
|
- ./webconf.yaml:/webconf.yaml
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
|
cd "$DIR/../.." ## make sure we're in the right place. Docker Hub screws this up sometimes
|
||||||
|
echo "docker build dir: $(pwd)"
|
||||||
|
|
||||||
|
docker build --build-arg DOCKER_TAG=$DOCKER_TAG --build-arg DOCKER_COMMIT=$SOURCE_COMMIT -f $DOCKERFILE_PATH -t $IMAGE_NAME .
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# requires powershell and .NET 4+. see https://chocolatey.org/install for more info.
|
||||||
|
|
||||||
|
$chocoVersion = powershell choco -v
|
||||||
|
if(-not($chocoVersion)){
|
||||||
|
Write-Output "Chocolatey is not installed, installing now"
|
||||||
|
Write-Output "IF YOU KEEP GETTING THIS MESSAGE ON EVERY BUILD, TRY RESTARTING THE GITLAB RUNNER SO IT GETS CHOCO INTO IT'S ENV"
|
||||||
|
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
Write-Output "Chocolatey version $chocoVersion is already installed"
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import logging
|
||||||
|
import lbry.build_info as build_info_mod
|
||||||
|
|
||||||
|
log = logging.getLogger()
|
||||||
|
log.addHandler(logging.StreamHandler())
|
||||||
|
log.setLevel(logging.DEBUG)
|
||||||
|
|
||||||
|
|
||||||
|
def _check_and_set(d: dict, key: str, value: str):
|
||||||
|
try:
|
||||||
|
d[key]
|
||||||
|
except KeyError:
|
||||||
|
raise Exception(f"{key} var does not exist in {build_info_mod.__file__}")
|
||||||
|
d[key] = value
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
build_info = {item: build_info_mod.__dict__[item] for item in dir(build_info_mod) if not item.startswith("__")}
|
||||||
|
|
||||||
|
commit_hash = os.getenv('DOCKER_COMMIT', os.getenv('GITHUB_SHA'))
|
||||||
|
if commit_hash is None:
|
||||||
|
raise ValueError("Commit hash not found in env vars")
|
||||||
|
_check_and_set(build_info, "COMMIT_HASH", commit_hash[:6])
|
||||||
|
|
||||||
|
docker_tag = os.getenv('DOCKER_TAG')
|
||||||
|
if docker_tag:
|
||||||
|
_check_and_set(build_info, "DOCKER_TAG", docker_tag)
|
||||||
|
_check_and_set(build_info, "BUILD", "docker")
|
||||||
|
else:
|
||||||
|
if re.match(r'refs/tags/v\d+\.\d+\.\d+$', str(os.getenv('GITHUB_REF'))):
|
||||||
|
_check_and_set(build_info, "BUILD", "release")
|
||||||
|
else:
|
||||||
|
_check_and_set(build_info, "BUILD", "qa")
|
||||||
|
|
||||||
|
log.debug("build info: %s", ", ".join([f"{k}={v}" for k, v in build_info.items()]))
|
||||||
|
with open(build_info_mod.__file__, 'w') as f:
|
||||||
|
f.write("\n".join([f"{k} = \"{v}\"" for k, v in build_info.items()]) + "\n")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.exit(main())
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# entrypoint for wallet server Docker image
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
SNAPSHOT_URL="${SNAPSHOT_URL:-}" #off by default. latest snapshot at https://lbry.com/snapshot/wallet
|
||||||
|
|
||||||
|
if [[ -n "$SNAPSHOT_URL" ]] && [[ ! -f /database/claims.db ]]; then
|
||||||
|
files="$(ls)"
|
||||||
|
echo "Downloading wallet snapshot from $SNAPSHOT_URL"
|
||||||
|
wget --no-verbose --trust-server-names --content-disposition "$SNAPSHOT_URL"
|
||||||
|
echo "Extracting snapshot..."
|
||||||
|
filename="$(grep -vf <(echo "$files") <(ls))" # finds the file that was not there before
|
||||||
|
case "$filename" in
|
||||||
|
*.tgz|*.tar.gz|*.tar.bz2 ) tar xvf "$filename" --directory /database ;;
|
||||||
|
*.zip ) unzip "$filename" -d /database ;;
|
||||||
|
* ) echo "Don't know how to extract ${filename}. SNAPSHOT COULD NOT BE LOADED" && exit 1 ;;
|
||||||
|
esac
|
||||||
|
rm "$filename"
|
||||||
|
fi
|
||||||
|
|
||||||
|
/home/lbry/.local/bin/lbry-hub-elastic-sync /database/claims.db
|
||||||
|
echo 'starting server'
|
||||||
|
/home/lbry/.local/bin/lbry-hub "$@"
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
allowed_origin: "*"
|
||||||
|
max_key_fee: "0.0 USD"
|
||||||
|
save_files: false
|
||||||
|
save_blobs: false
|
||||||
|
streaming_server: "0.0.0.0:5280"
|
||||||
|
api: "0.0.0.0:5279"
|
||||||
|
data_dir: /tmp
|
||||||
|
download_dir: /tmp
|
||||||
|
wallet_dir: /tmp
|
||||||
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 361 KiB After Width: | Height: | Size: 361 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
@@ -1 +0,0 @@
|
|||||||
/CHANGELOG.md merge=union
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
.DS_Store
|
|
||||||
/build
|
|
||||||
/dist
|
|
||||||
/.tox
|
|
||||||
/.idea
|
|
||||||
/.coverage
|
|
||||||
/lbry-venv
|
|
||||||
|
|
||||||
lbry.egg-info
|
|
||||||
__pycache__
|
|
||||||
_trial_temp/
|
|
||||||
|
|
||||||
/tests/integration/files
|
|
||||||
@@ -1,441 +0,0 @@
|
|||||||
[MASTER]
|
|
||||||
|
|
||||||
# Specify a configuration file.
|
|
||||||
#rcfile=
|
|
||||||
|
|
||||||
# Python code to execute, usually for sys.path manipulation such as
|
|
||||||
# pygtk.require().
|
|
||||||
#init-hook=
|
|
||||||
|
|
||||||
# Add files or directories to the blacklist. They should be base names, not
|
|
||||||
# paths.
|
|
||||||
ignore=CVS,schema
|
|
||||||
|
|
||||||
# Add files or directories matching the regex patterns to the
|
|
||||||
# blacklist. The regex matches against base names, not paths.
|
|
||||||
# `\.#.*` - add emacs tmp files to the blacklist
|
|
||||||
ignore-patterns=\.#.*
|
|
||||||
|
|
||||||
# Pickle collected data for later comparisons.
|
|
||||||
persistent=yes
|
|
||||||
|
|
||||||
# List of plugins (as comma separated values of python modules names) to load,
|
|
||||||
# usually to register additional checkers.
|
|
||||||
load-plugins=
|
|
||||||
|
|
||||||
# Use multiple processes to speed up Pylint.
|
|
||||||
jobs=4
|
|
||||||
|
|
||||||
# Allow loading of arbitrary C extensions. Extensions are imported into the
|
|
||||||
# active Python interpreter and may run arbitrary code.
|
|
||||||
unsafe-load-any-extension=no
|
|
||||||
|
|
||||||
# A comma-separated list of package or module names from where C extensions may
|
|
||||||
# be loaded. Extensions are loading into the active Python interpreter and may
|
|
||||||
# run arbitrary code
|
|
||||||
# extension-pkg-whitelist=
|
|
||||||
|
|
||||||
# Allow optimization of some AST trees. This will activate a peephole AST
|
|
||||||
# optimizer, which will apply various small optimizations. For instance, it can
|
|
||||||
# be used to obtain the result of joining multiple strings with the addition
|
|
||||||
# operator. Joining a lot of strings can lead to a maximum recursion error in
|
|
||||||
# Pylint and this flag can prevent that. It has one side effect, the resulting
|
|
||||||
# AST will be different than the one from reality.
|
|
||||||
optimize-ast=no
|
|
||||||
|
|
||||||
|
|
||||||
[MESSAGES CONTROL]
|
|
||||||
|
|
||||||
# Only show warnings with the listed confidence levels. Leave empty to show
|
|
||||||
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
|
|
||||||
confidence=
|
|
||||||
|
|
||||||
# Enable the message, report, category or checker with the given id(s). You can
|
|
||||||
# either give multiple identifier separated by comma (,) or put this option
|
|
||||||
# multiple time (only on the command line, not in the configuration file where
|
|
||||||
# it should appear only once). See also the "--disable" option for examples.
|
|
||||||
#enable=
|
|
||||||
|
|
||||||
# Disable the message, report, category or checker with the given id(s). You
|
|
||||||
# can either give multiple identifiers separated by comma (,) or put this
|
|
||||||
# option multiple times (only on the command line, not in the configuration
|
|
||||||
# file where it should appear only once).You can also use "--disable=all" to
|
|
||||||
# disable everything first and then re-enable specific checks. For example, if
|
|
||||||
# you want to run only the similarities checker, you can use "--disable=all
|
|
||||||
# --enable=similarities". If you want to run only the classes checker, but have
|
|
||||||
# no Warning level messages displayed, use"--disable=all --enable=classes
|
|
||||||
# --disable=W"
|
|
||||||
disable=
|
|
||||||
anomalous-backslash-in-string,
|
|
||||||
arguments-differ,
|
|
||||||
attribute-defined-outside-init,
|
|
||||||
bad-continuation,
|
|
||||||
bare-except,
|
|
||||||
broad-except,
|
|
||||||
cell-var-from-loop,
|
|
||||||
consider-iterating-dictionary,
|
|
||||||
dangerous-default-value,
|
|
||||||
duplicate-code,
|
|
||||||
fixme,
|
|
||||||
invalid-name,
|
|
||||||
len-as-condition,
|
|
||||||
locally-disabled,
|
|
||||||
logging-not-lazy,
|
|
||||||
missing-docstring,
|
|
||||||
no-else-return,
|
|
||||||
no-init,
|
|
||||||
no-member,
|
|
||||||
no-self-use,
|
|
||||||
protected-access,
|
|
||||||
redefined-builtin,
|
|
||||||
redefined-outer-name,
|
|
||||||
redefined-variable-type,
|
|
||||||
relative-import,
|
|
||||||
signature-differs,
|
|
||||||
super-init-not-called,
|
|
||||||
too-few-public-methods,
|
|
||||||
too-many-arguments,
|
|
||||||
too-many-branches,
|
|
||||||
too-many-instance-attributes,
|
|
||||||
too-many-lines,
|
|
||||||
too-many-locals,
|
|
||||||
too-many-nested-blocks,
|
|
||||||
too-many-public-methods,
|
|
||||||
too-many-return-statements,
|
|
||||||
too-many-statements,
|
|
||||||
trailing-newlines,
|
|
||||||
undefined-loop-variable,
|
|
||||||
ungrouped-imports,
|
|
||||||
unnecessary-lambda,
|
|
||||||
unused-argument,
|
|
||||||
unused-variable,
|
|
||||||
wrong-import-order,
|
|
||||||
wrong-import-position,
|
|
||||||
deprecated-lambda,
|
|
||||||
simplifiable-if-statement,
|
|
||||||
unidiomatic-typecheck,
|
|
||||||
inconsistent-return-statements,
|
|
||||||
keyword-arg-before-vararg,
|
|
||||||
assignment-from-no-return,
|
|
||||||
useless-return,
|
|
||||||
assignment-from-none,
|
|
||||||
stop-iteration-return
|
|
||||||
|
|
||||||
|
|
||||||
[REPORTS]
|
|
||||||
|
|
||||||
# Set the output format. Available formats are text, parseable, colorized, msvs
|
|
||||||
# (visual studio) and html. You can also give a reporter class, eg
|
|
||||||
# mypackage.mymodule.MyReporterClass.
|
|
||||||
output-format=text
|
|
||||||
|
|
||||||
# Put messages in a separate file for each module / package specified on the
|
|
||||||
# command line instead of printing them on stdout. Reports (if any) will be
|
|
||||||
# written in a file name "pylint_global.[txt|html]".
|
|
||||||
files-output=no
|
|
||||||
|
|
||||||
# Tells whether to display a full report or only the messages
|
|
||||||
reports=no
|
|
||||||
|
|
||||||
# Python expression which should return a note less than 10 (10 is the highest
|
|
||||||
# note). You have access to the variables errors warning, statement which
|
|
||||||
# respectively contain the number of errors / warnings messages and the total
|
|
||||||
# number of statements analyzed. This is used by the global evaluation report
|
|
||||||
# (RP0004).
|
|
||||||
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
|
|
||||||
|
|
||||||
# Template used to display messages. This is a python new-style format string
|
|
||||||
# used to format the message information. See doc for all details
|
|
||||||
#msg-template=
|
|
||||||
|
|
||||||
|
|
||||||
[VARIABLES]
|
|
||||||
|
|
||||||
# Tells whether we should check for unused import in __init__ files.
|
|
||||||
init-import=no
|
|
||||||
|
|
||||||
# A regular expression matching the name of dummy variables (i.e. expectedly
|
|
||||||
# not used).
|
|
||||||
dummy-variables-rgx=_$|dummy
|
|
||||||
|
|
||||||
# List of additional names supposed to be defined in builtins. Remember that
|
|
||||||
# you should avoid to define new builtins when possible.
|
|
||||||
additional-builtins=
|
|
||||||
|
|
||||||
# List of strings which can identify a callback function by name. A callback
|
|
||||||
# name must start or end with one of those strings.
|
|
||||||
callbacks=cb_,_cb
|
|
||||||
|
|
||||||
|
|
||||||
[LOGGING]
|
|
||||||
|
|
||||||
# Logging modules to check that the string format arguments are in logging
|
|
||||||
# function parameter format
|
|
||||||
logging-modules=logging
|
|
||||||
|
|
||||||
|
|
||||||
[BASIC]
|
|
||||||
|
|
||||||
# List of builtins function names that should not be used, separated by a comma
|
|
||||||
bad-functions=map,filter,input
|
|
||||||
|
|
||||||
# Good variable names which should always be accepted, separated by a comma
|
|
||||||
# allow `d` as its used frequently for deferred callback chains
|
|
||||||
good-names=i,j,k,ex,Run,_,d
|
|
||||||
|
|
||||||
# Bad variable names which should always be refused, separated by a comma
|
|
||||||
bad-names=foo,bar,baz,toto,tutu,tata
|
|
||||||
|
|
||||||
# Colon-delimited sets of names that determine each other's naming style when
|
|
||||||
# the name regexes allow several styles.
|
|
||||||
name-group=
|
|
||||||
|
|
||||||
# Include a hint for the correct naming format with invalid-name
|
|
||||||
include-naming-hint=no
|
|
||||||
|
|
||||||
# Regular expression matching correct function names
|
|
||||||
function-rgx=[a-z_][a-z0-9_]{2,30}$
|
|
||||||
|
|
||||||
# Naming hint for function names
|
|
||||||
function-name-hint=[a-z_][a-z0-9_]{2,30}$
|
|
||||||
|
|
||||||
# Regular expression matching correct variable names
|
|
||||||
variable-rgx=[a-z_][a-z0-9_]{2,30}$
|
|
||||||
|
|
||||||
# Naming hint for variable names
|
|
||||||
variable-name-hint=[a-z_][a-z0-9_]{2,30}$
|
|
||||||
|
|
||||||
# Regular expression matching correct constant names
|
|
||||||
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
|
|
||||||
|
|
||||||
# Naming hint for constant names
|
|
||||||
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
|
|
||||||
|
|
||||||
# Regular expression matching correct attribute names
|
|
||||||
attr-rgx=[a-z_][a-z0-9_]{2,30}$
|
|
||||||
|
|
||||||
# Naming hint for attribute names
|
|
||||||
attr-name-hint=[a-z_][a-z0-9_]{2,30}$
|
|
||||||
|
|
||||||
# Regular expression matching correct argument names
|
|
||||||
argument-rgx=[a-z_][a-z0-9_]{2,30}$
|
|
||||||
|
|
||||||
# Naming hint for argument names
|
|
||||||
argument-name-hint=[a-z_][a-z0-9_]{2,30}$
|
|
||||||
|
|
||||||
# Regular expression matching correct class attribute names
|
|
||||||
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
|
|
||||||
|
|
||||||
# Naming hint for class attribute names
|
|
||||||
class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
|
|
||||||
|
|
||||||
# Regular expression matching correct inline iteration names
|
|
||||||
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
|
|
||||||
|
|
||||||
# Naming hint for inline iteration names
|
|
||||||
inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
|
|
||||||
|
|
||||||
# Regular expression matching correct class names
|
|
||||||
class-rgx=[A-Z_][a-zA-Z0-9]+$
|
|
||||||
|
|
||||||
# Naming hint for class names
|
|
||||||
class-name-hint=[A-Z_][a-zA-Z0-9]+$
|
|
||||||
|
|
||||||
# Regular expression matching correct module names
|
|
||||||
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
|
|
||||||
|
|
||||||
# Naming hint for module names
|
|
||||||
module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
|
|
||||||
|
|
||||||
# Regular expression matching correct method names
|
|
||||||
method-rgx=[a-z_][a-z0-9_]{2,30}$
|
|
||||||
|
|
||||||
# Naming hint for method names
|
|
||||||
method-name-hint=[a-z_][a-z0-9_]{2,30}$
|
|
||||||
|
|
||||||
# Regular expression which should only match function or class names that do
|
|
||||||
# not require a docstring.
|
|
||||||
no-docstring-rgx=^_
|
|
||||||
|
|
||||||
# Minimum line length for functions/classes that require docstrings, shorter
|
|
||||||
# ones are exempt.
|
|
||||||
docstring-min-length=-1
|
|
||||||
|
|
||||||
|
|
||||||
[ELIF]
|
|
||||||
|
|
||||||
# Maximum number of nested blocks for function / method body
|
|
||||||
max-nested-blocks=5
|
|
||||||
|
|
||||||
|
|
||||||
[SPELLING]
|
|
||||||
|
|
||||||
# Spelling dictionary name. Available dictionaries: none. To make it working
|
|
||||||
# install python-enchant package.
|
|
||||||
spelling-dict=
|
|
||||||
|
|
||||||
# List of comma separated words that should not be checked.
|
|
||||||
spelling-ignore-words=
|
|
||||||
|
|
||||||
# A path to a file that contains private dictionary; one word per line.
|
|
||||||
spelling-private-dict-file=
|
|
||||||
|
|
||||||
# Tells whether to store unknown words to indicated private dictionary in
|
|
||||||
# --spelling-private-dict-file option instead of raising a message.
|
|
||||||
spelling-store-unknown-words=no
|
|
||||||
|
|
||||||
|
|
||||||
[FORMAT]
|
|
||||||
|
|
||||||
# Maximum number of characters on a single line.
|
|
||||||
max-line-length=120
|
|
||||||
|
|
||||||
# Regexp for a line that is allowed to be longer than the limit.
|
|
||||||
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
|
|
||||||
|
|
||||||
# Allow the body of an if to be on the same line as the test if there is no
|
|
||||||
# else.
|
|
||||||
single-line-if-stmt=no
|
|
||||||
|
|
||||||
# List of optional constructs for which whitespace checking is disabled. `dict-
|
|
||||||
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
|
|
||||||
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
|
|
||||||
# `empty-line` allows space-only lines.
|
|
||||||
no-space-check=trailing-comma,dict-separator
|
|
||||||
|
|
||||||
# Maximum number of lines in a module
|
|
||||||
max-module-lines=1000
|
|
||||||
|
|
||||||
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
|
|
||||||
# tab).
|
|
||||||
indent-string=' '
|
|
||||||
|
|
||||||
# Number of spaces of indent required inside a hanging or continued line.
|
|
||||||
indent-after-paren=4
|
|
||||||
|
|
||||||
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
|
|
||||||
expected-line-ending-format=
|
|
||||||
|
|
||||||
|
|
||||||
[MISCELLANEOUS]
|
|
||||||
|
|
||||||
# List of note tags to take in consideration, separated by a comma.
|
|
||||||
notes=FIXME,XXX,TODO
|
|
||||||
|
|
||||||
|
|
||||||
[SIMILARITIES]
|
|
||||||
|
|
||||||
# Minimum lines number of a similarity.
|
|
||||||
min-similarity-lines=4
|
|
||||||
|
|
||||||
# Ignore comments when computing similarities.
|
|
||||||
ignore-comments=yes
|
|
||||||
|
|
||||||
# Ignore docstrings when computing similarities.
|
|
||||||
ignore-docstrings=yes
|
|
||||||
|
|
||||||
# Ignore imports when computing similarities.
|
|
||||||
ignore-imports=no
|
|
||||||
|
|
||||||
|
|
||||||
[TYPECHECK]
|
|
||||||
|
|
||||||
# Tells whether missing members accessed in mixin class should be ignored. A
|
|
||||||
# mixin class is detected if its name ends with "mixin" (case insensitive).
|
|
||||||
ignore-mixin-members=yes
|
|
||||||
|
|
||||||
# List of module names for which member attributes should not be checked
|
|
||||||
# (useful for modules/projects where namespaces are manipulated during runtime
|
|
||||||
# and thus existing member attributes cannot be deduced by static analysis. It
|
|
||||||
# supports qualified module names, as well as Unix pattern matching.
|
|
||||||
ignored-modules=leveldb,distutils
|
|
||||||
# Ignoring distutils because: https://github.com/PyCQA/pylint/issues/73
|
|
||||||
|
|
||||||
# List of classes names for which member attributes should not be checked
|
|
||||||
# (useful for classes with attributes dynamically set). This supports can work
|
|
||||||
# with qualified names.
|
|
||||||
# ignored-classes=
|
|
||||||
|
|
||||||
|
|
||||||
# List of members which are set dynamically and missed by pylint inference
|
|
||||||
# system, and so shouldn't trigger E1101 when accessed. Python regular
|
|
||||||
# expressions are accepted.
|
|
||||||
generated-members=lbrynet.lbrynet_daemon.LBRYDaemon.Parameters
|
|
||||||
|
|
||||||
|
|
||||||
[IMPORTS]
|
|
||||||
|
|
||||||
# Deprecated modules which should not be used, separated by a comma
|
|
||||||
deprecated-modules=regsub,TERMIOS,Bastion,rexec
|
|
||||||
|
|
||||||
# Create a graph of every (i.e. internal and external) dependencies in the
|
|
||||||
# given file (report RP0402 must not be disabled)
|
|
||||||
import-graph=
|
|
||||||
|
|
||||||
# Create a graph of external dependencies in the given file (report RP0402 must
|
|
||||||
# not be disabled)
|
|
||||||
ext-import-graph=
|
|
||||||
|
|
||||||
# Create a graph of internal dependencies in the given file (report RP0402 must
|
|
||||||
# not be disabled)
|
|
||||||
int-import-graph=
|
|
||||||
|
|
||||||
|
|
||||||
[DESIGN]
|
|
||||||
|
|
||||||
# Maximum number of arguments for function / method
|
|
||||||
max-args=10
|
|
||||||
|
|
||||||
# Argument names that match this expression will be ignored. Default to name
|
|
||||||
# with leading underscore
|
|
||||||
ignored-argument-names=_.*
|
|
||||||
|
|
||||||
# Maximum number of locals for function / method body
|
|
||||||
max-locals=15
|
|
||||||
|
|
||||||
# Maximum number of return / yield for function / method body
|
|
||||||
max-returns=6
|
|
||||||
|
|
||||||
# Maximum number of branch for function / method body
|
|
||||||
max-branches=12
|
|
||||||
|
|
||||||
# Maximum number of statements in function / method body
|
|
||||||
max-statements=50
|
|
||||||
|
|
||||||
# Maximum number of parents for a class (see R0901).
|
|
||||||
max-parents=8
|
|
||||||
|
|
||||||
# Maximum number of attributes for a class (see R0902).
|
|
||||||
max-attributes=7
|
|
||||||
|
|
||||||
# Minimum number of public methods for a class (see R0903).
|
|
||||||
min-public-methods=2
|
|
||||||
|
|
||||||
# Maximum number of public methods for a class (see R0904).
|
|
||||||
max-public-methods=20
|
|
||||||
|
|
||||||
# Maximum number of boolean expressions in a if statement
|
|
||||||
max-bool-expr=5
|
|
||||||
|
|
||||||
|
|
||||||
[CLASSES]
|
|
||||||
|
|
||||||
# List of method names used to declare (i.e. assign) instance attributes.
|
|
||||||
defining-attr-methods=__init__,__new__,setUp
|
|
||||||
|
|
||||||
# List of valid names for the first argument in a class method.
|
|
||||||
valid-classmethod-first-arg=cls
|
|
||||||
|
|
||||||
# List of valid names for the first argument in a metaclass class method.
|
|
||||||
valid-metaclass-classmethod-first-arg=mcs
|
|
||||||
|
|
||||||
# List of member names, which should be excluded from the protected access
|
|
||||||
# warning.
|
|
||||||
exclude-protected=_asdict,_fields,_replace,_source,_make
|
|
||||||
|
|
||||||
|
|
||||||
[EXCEPTIONS]
|
|
||||||
|
|
||||||
# Exceptions that will emit a warning when being caught. Defaults to
|
|
||||||
# "Exception"
|
|
||||||
overgeneral-exceptions=Exception
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
# <img src="https://raw.githubusercontent.com/lbryio/lbry-sdk/master/lbry/lbry.png" alt="LBRY" width="48" height="36" /> LBRY SDK [](https://travis-ci.org/lbryio/lbry-sdk) [](https://codecov.io/gh/lbryio/lbry-sdk)
|
|
||||||
|
|
||||||
LBRY is a decentralized peer-to-peer protocol for publishing and accessing digital content. It utilizes the [LBRY blockchain](https://github.com/lbryio/lbrycrd) as a global namespace and database of digital content. Blockchain entries contain searchable content metadata, identities, rights and access rules. LBRY also provides a data network that consists of peers (seeders) uploading and downloading data from other peers, possibly in exchange for payments, as well as a distributed hash table used by peers to discover other peers.
|
|
||||||
|
|
||||||
LBRY SDK for Python is currently the most full featured implementation of the LBRY Network protocols and includes many useful components and tools for building decentralized applications. Primary features and components:
|
|
||||||
|
|
||||||
* Built on Python 3.7+ and `asyncio`.
|
|
||||||
* Kademlia DHT (Distributed Hash Table) implementation for finding peers to download from and announcing to peers what we have to host ([lbry.dht](https://github.com/lbryio/lbry-sdk/tree/master/lbry/lbry/dht)).
|
|
||||||
* Blob exchange protocol for transferring encrypted blobs of content and negotiating payments ([lbry.blob_exchange](https://github.com/lbryio/lbry-sdk/tree/master/lbry/lbry/blob_exchange)).
|
|
||||||
* Protobuf schema for encoding and decoding metadata stored on the blockchain ([lbry.schema](https://github.com/lbryio/lbry-sdk/tree/master/lbry/lbry/schema)).
|
|
||||||
* Wallet implementation for the LBRY blockchain ([lbry.wallet](https://github.com/lbryio/lbry-sdk/tree/master/lbry/lbry/wallet)).
|
|
||||||
* Daemon with a JSON-RPC API to ease building end user applications in any language and for automating various tasks ([lbry.extras.daemon](https://github.com/lbryio/lbry-sdk/tree/master/lbry/lbry/extras/daemon)).
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
Our [releases page](https://github.com/lbryio/lbry-sdk/releases) contains pre-built binaries of the latest release, pre-releases, and past releases for macOS, Debian-based Linux, and Windows. [Automated travis builds](http://build.lbry.io/daemon/) are also available for testing.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Run `lbrynet start` to launch the API server.
|
|
||||||
|
|
||||||
By default, `lbrynet` will provide a JSON-RPC server at `http://localhost:5279`. It is easy to interact with via cURL or sane programming languages.
|
|
||||||
|
|
||||||
Our [quickstart guide](https://lbry.tech/playground) provides a simple walkthrough and examples for learning.
|
|
||||||
|
|
||||||
With the daemon running, `lbrynet commands` will show you a list of commands.
|
|
||||||
|
|
||||||
The full API is documented [here](https://lbry.tech/api/sdk).
|
|
||||||
|
|
||||||
## Running from source
|
|
||||||
|
|
||||||
Installing from source is also relatively painless. Full instructions are in [INSTALL.md](INSTALL.md)
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
Contributions to this project are welcome, encouraged, and compensated. For more details, please check [this](https://lbry.tech/contribute) link.
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
This project is MIT licensed. For the full license, see [LICENSE](LICENSE).
|
|
||||||
|
|
||||||
## Security
|
|
||||||
|
|
||||||
We take security seriously. Please contact security@lbry.com regarding any security issues. [Our GPG key is here](https://lbry.com/faq/gpg-key) if you need it.
|
|
||||||
|
|
||||||
## Contact
|
|
||||||
|
|
||||||
The primary contact for this project is [@eukreign](mailto:lex@lbry.com).
|
|
||||||
|
|
||||||
## Additional information and links
|
|
||||||
|
|
||||||
The documentation for the API can be found [here](https://lbry.tech/api/sdk).
|
|
||||||
|
|
||||||
Daemon defaults, ports, and other settings are documented [here](https://lbry.tech/resources/daemon-settings).
|
|
||||||
|
|
||||||
Settings can be configured using a daemon-settings.yml file. An example can be found [here](https://github.com/lbryio/lbry-sdk/blob/master/lbry/example_daemon_settings.yml).
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
__version__ = "0.104.0"
|
||||||
|
version = tuple(map(int, __version__.split('.'))) # pylint: disable=invalid-name
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
from lbry.utils import get_lbry_hash_obj
|
||||||
|
|
||||||
|
MAX_BLOB_SIZE = 2 * 2 ** 20
|
||||||
|
|
||||||
|
# digest_size is in bytes, and blob hashes are hex encoded
|
||||||
|
BLOBHASH_LENGTH = get_lbry_hash_obj().digest_size * 2
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import time
|
||||||
import asyncio
|
import asyncio
|
||||||
import binascii
|
import binascii
|
||||||
import logging
|
import logging
|
||||||
@@ -9,18 +10,20 @@ from io import BytesIO
|
|||||||
from cryptography.hazmat.primitives.ciphers import Cipher, modes
|
from cryptography.hazmat.primitives.ciphers import Cipher, modes
|
||||||
from cryptography.hazmat.primitives.ciphers.algorithms import AES
|
from cryptography.hazmat.primitives.ciphers.algorithms import AES
|
||||||
from cryptography.hazmat.primitives.padding import PKCS7
|
from cryptography.hazmat.primitives.padding import PKCS7
|
||||||
|
from cryptography.hazmat.backends import default_backend
|
||||||
|
|
||||||
from lbry.cryptoutils import backend, get_lbry_hash_obj
|
from lbry.utils import get_lbry_hash_obj
|
||||||
from lbry.error import DownloadCancelledError, InvalidBlobHashError, InvalidDataError
|
from lbry.error import DownloadCancelledError, InvalidBlobHashError, InvalidDataError
|
||||||
|
|
||||||
from lbry.blob import MAX_BLOB_SIZE, blobhash_length
|
from lbry.blob import MAX_BLOB_SIZE, BLOBHASH_LENGTH
|
||||||
from lbry.blob.blob_info import BlobInfo
|
from lbry.blob.blob_info import BlobInfo
|
||||||
from lbry.blob.writer import HashBlobWriter
|
from lbry.blob.writer import HashBlobWriter
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
_hexmatch = re.compile("^[a-f,0-9]+$")
|
HEXMATCH = re.compile("^[a-f,0-9]+$")
|
||||||
|
BACKEND = default_backend()
|
||||||
|
|
||||||
|
|
||||||
def is_valid_blobhash(blobhash: str) -> bool:
|
def is_valid_blobhash(blobhash: str) -> bool:
|
||||||
@@ -31,11 +34,11 @@ def is_valid_blobhash(blobhash: str) -> bool:
|
|||||||
|
|
||||||
@return: True/False
|
@return: True/False
|
||||||
"""
|
"""
|
||||||
return len(blobhash) == blobhash_length and _hexmatch.match(blobhash)
|
return len(blobhash) == BLOBHASH_LENGTH and HEXMATCH.match(blobhash)
|
||||||
|
|
||||||
|
|
||||||
def encrypt_blob_bytes(key: bytes, iv: bytes, unencrypted: bytes) -> typing.Tuple[bytes, str]:
|
def encrypt_blob_bytes(key: bytes, iv: bytes, unencrypted: bytes) -> typing.Tuple[bytes, str]:
|
||||||
cipher = Cipher(AES(key), modes.CBC(iv), backend=backend)
|
cipher = Cipher(AES(key), modes.CBC(iv), backend=BACKEND)
|
||||||
padder = PKCS7(AES.block_size).padder()
|
padder = PKCS7(AES.block_size).padder()
|
||||||
encryptor = cipher.encryptor()
|
encryptor = cipher.encryptor()
|
||||||
encrypted = encryptor.update(padder.update(unencrypted) + padder.finalize()) + encryptor.finalize()
|
encrypted = encryptor.update(padder.update(unencrypted) + padder.finalize()) + encryptor.finalize()
|
||||||
@@ -47,7 +50,7 @@ def encrypt_blob_bytes(key: bytes, iv: bytes, unencrypted: bytes) -> typing.Tupl
|
|||||||
def decrypt_blob_bytes(data: bytes, length: int, key: bytes, iv: bytes) -> bytes:
|
def decrypt_blob_bytes(data: bytes, length: int, key: bytes, iv: bytes) -> bytes:
|
||||||
if len(data) != length:
|
if len(data) != length:
|
||||||
raise ValueError("unexpected length")
|
raise ValueError("unexpected length")
|
||||||
cipher = Cipher(AES(key), modes.CBC(iv), backend=backend)
|
cipher = Cipher(AES(key), modes.CBC(iv), backend=BACKEND)
|
||||||
unpadder = PKCS7(AES.block_size).unpadder()
|
unpadder = PKCS7(AES.block_size).unpadder()
|
||||||
decryptor = cipher.decryptor()
|
decryptor = cipher.decryptor()
|
||||||
return unpadder.update(decryptor.update(data) + decryptor.finalize()) + unpadder.finalize()
|
return unpadder.update(decryptor.update(data) + decryptor.finalize()) + unpadder.finalize()
|
||||||
@@ -68,12 +71,16 @@ class AbstractBlob:
|
|||||||
'writers',
|
'writers',
|
||||||
'verified',
|
'verified',
|
||||||
'writing',
|
'writing',
|
||||||
'readers'
|
'readers',
|
||||||
|
'added_on',
|
||||||
|
'is_mine',
|
||||||
]
|
]
|
||||||
|
|
||||||
def __init__(self, loop: asyncio.AbstractEventLoop, blob_hash: str, length: typing.Optional[int] = None,
|
def __init__(
|
||||||
blob_completed_callback: typing.Optional[typing.Callable[['AbstractBlob'], asyncio.Task]] = None,
|
self, loop: asyncio.AbstractEventLoop, blob_hash: str, length: typing.Optional[int] = None,
|
||||||
blob_directory: typing.Optional[str] = None):
|
blob_completed_callback: typing.Optional[typing.Callable[['AbstractBlob'], asyncio.Task]] = None,
|
||||||
|
blob_directory: typing.Optional[str] = None, added_on: typing.Optional[int] = None, is_mine: bool = False,
|
||||||
|
):
|
||||||
self.loop = loop
|
self.loop = loop
|
||||||
self.blob_hash = blob_hash
|
self.blob_hash = blob_hash
|
||||||
self.length = length
|
self.length = length
|
||||||
@@ -83,6 +90,8 @@ class AbstractBlob:
|
|||||||
self.verified: asyncio.Event = asyncio.Event(loop=self.loop)
|
self.verified: asyncio.Event = asyncio.Event(loop=self.loop)
|
||||||
self.writing: asyncio.Event = asyncio.Event(loop=self.loop)
|
self.writing: asyncio.Event = asyncio.Event(loop=self.loop)
|
||||||
self.readers: typing.List[typing.BinaryIO] = []
|
self.readers: typing.List[typing.BinaryIO] = []
|
||||||
|
self.added_on = added_on or time.time()
|
||||||
|
self.is_mine = is_mine
|
||||||
|
|
||||||
if not is_valid_blobhash(blob_hash):
|
if not is_valid_blobhash(blob_hash):
|
||||||
raise InvalidBlobHashError(blob_hash)
|
raise InvalidBlobHashError(blob_hash)
|
||||||
@@ -108,7 +117,7 @@ class AbstractBlob:
|
|||||||
if reader in self.readers:
|
if reader in self.readers:
|
||||||
self.readers.remove(reader)
|
self.readers.remove(reader)
|
||||||
|
|
||||||
def _write_blob(self, blob_bytes: bytes):
|
def _write_blob(self, blob_bytes: bytes) -> asyncio.Task:
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
def set_length(self, length) -> None:
|
def set_length(self, length) -> None:
|
||||||
@@ -142,7 +151,7 @@ class AbstractBlob:
|
|||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
while self.writers:
|
while self.writers:
|
||||||
peer, writer = self.writers.popitem()
|
_, writer = self.writers.popitem()
|
||||||
if writer and writer.finished and not writer.finished.done() and not self.loop.is_closed():
|
if writer and writer.finished and not writer.finished.done() and not self.loop.is_closed():
|
||||||
writer.finished.cancel()
|
writer.finished.cancel()
|
||||||
while self.readers:
|
while self.readers:
|
||||||
@@ -163,7 +172,10 @@ class AbstractBlob:
|
|||||||
if not self.is_readable():
|
if not self.is_readable():
|
||||||
raise OSError('blob files cannot be read')
|
raise OSError('blob files cannot be read')
|
||||||
with self.reader_context() as handle:
|
with self.reader_context() as handle:
|
||||||
return await self.loop.sendfile(writer.transport, handle, count=self.get_length())
|
try:
|
||||||
|
return await self.loop.sendfile(writer.transport, handle, count=self.get_length())
|
||||||
|
except (ConnectionError, BrokenPipeError, RuntimeError, OSError, AttributeError):
|
||||||
|
return -1
|
||||||
|
|
||||||
def decrypt(self, key: bytes, iv: bytes) -> bytes:
|
def decrypt(self, key: bytes, iv: bytes) -> bytes:
|
||||||
"""
|
"""
|
||||||
@@ -175,29 +187,36 @@ class AbstractBlob:
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
async def create_from_unencrypted(
|
async def create_from_unencrypted(
|
||||||
cls, loop: asyncio.AbstractEventLoop, blob_dir: typing.Optional[str], key: bytes, iv: bytes,
|
cls, loop: asyncio.AbstractEventLoop, blob_dir: typing.Optional[str], key: bytes, iv: bytes,
|
||||||
unencrypted: bytes, blob_num: int,
|
unencrypted: bytes, blob_num: int, added_on: int, is_mine: bool,
|
||||||
blob_completed_callback: typing.Optional[typing.Callable[['AbstractBlob'], None]] = None) -> BlobInfo:
|
blob_completed_callback: typing.Optional[typing.Callable[['AbstractBlob'], None]] = None,
|
||||||
|
) -> BlobInfo:
|
||||||
"""
|
"""
|
||||||
Create an encrypted BlobFile from plaintext bytes
|
Create an encrypted BlobFile from plaintext bytes
|
||||||
"""
|
"""
|
||||||
|
|
||||||
blob_bytes, blob_hash = encrypt_blob_bytes(key, iv, unencrypted)
|
blob_bytes, blob_hash = encrypt_blob_bytes(key, iv, unencrypted)
|
||||||
length = len(blob_bytes)
|
length = len(blob_bytes)
|
||||||
blob = cls(loop, blob_hash, length, blob_completed_callback, blob_dir)
|
blob = cls(loop, blob_hash, length, blob_completed_callback, blob_dir, added_on, is_mine)
|
||||||
writer = blob.get_blob_writer()
|
writer = blob.get_blob_writer()
|
||||||
writer.write(blob_bytes)
|
writer.write(blob_bytes)
|
||||||
await blob.verified.wait()
|
await blob.verified.wait()
|
||||||
return BlobInfo(blob_num, length, binascii.hexlify(iv).decode(), blob_hash)
|
return BlobInfo(blob_num, length, binascii.hexlify(iv).decode(), blob_hash, added_on, is_mine)
|
||||||
|
|
||||||
def save_verified_blob(self, verified_bytes: bytes):
|
def save_verified_blob(self, verified_bytes: bytes):
|
||||||
if self.verified.is_set():
|
if self.verified.is_set():
|
||||||
return
|
return
|
||||||
if self.is_writeable():
|
|
||||||
self._write_blob(verified_bytes)
|
def update_events(_):
|
||||||
self.verified.set()
|
self.verified.set()
|
||||||
|
self.writing.clear()
|
||||||
|
|
||||||
|
if self.is_writeable():
|
||||||
|
self.writing.set()
|
||||||
|
task = self._write_blob(verified_bytes)
|
||||||
|
task.add_done_callback(update_events)
|
||||||
if self.blob_completed_callback:
|
if self.blob_completed_callback:
|
||||||
self.blob_completed_callback(self)
|
task.add_done_callback(lambda _: self.blob_completed_callback(self))
|
||||||
|
|
||||||
def get_blob_writer(self, peer_address: typing.Optional[str] = None,
|
def get_blob_writer(self, peer_address: typing.Optional[str] = None,
|
||||||
peer_port: typing.Optional[int] = None) -> HashBlobWriter:
|
peer_port: typing.Optional[int] = None) -> HashBlobWriter:
|
||||||
@@ -237,11 +256,13 @@ class BlobBuffer(AbstractBlob):
|
|||||||
"""
|
"""
|
||||||
An in-memory only blob
|
An in-memory only blob
|
||||||
"""
|
"""
|
||||||
def __init__(self, loop: asyncio.AbstractEventLoop, blob_hash: str, length: typing.Optional[int] = None,
|
def __init__(
|
||||||
blob_completed_callback: typing.Optional[typing.Callable[['AbstractBlob'], asyncio.Task]] = None,
|
self, loop: asyncio.AbstractEventLoop, blob_hash: str, length: typing.Optional[int] = None,
|
||||||
blob_directory: typing.Optional[str] = None):
|
blob_completed_callback: typing.Optional[typing.Callable[['AbstractBlob'], asyncio.Task]] = None,
|
||||||
|
blob_directory: typing.Optional[str] = None, added_on: typing.Optional[int] = None, is_mine: bool = False
|
||||||
|
):
|
||||||
self._verified_bytes: typing.Optional[BytesIO] = None
|
self._verified_bytes: typing.Optional[BytesIO] = None
|
||||||
super().__init__(loop, blob_hash, length, blob_completed_callback, blob_directory)
|
super().__init__(loop, blob_hash, length, blob_completed_callback, blob_directory, added_on, is_mine)
|
||||||
|
|
||||||
@contextlib.contextmanager
|
@contextlib.contextmanager
|
||||||
def _reader_context(self) -> typing.ContextManager[typing.BinaryIO]:
|
def _reader_context(self) -> typing.ContextManager[typing.BinaryIO]:
|
||||||
@@ -256,9 +277,11 @@ class BlobBuffer(AbstractBlob):
|
|||||||
self.verified.clear()
|
self.verified.clear()
|
||||||
|
|
||||||
def _write_blob(self, blob_bytes: bytes):
|
def _write_blob(self, blob_bytes: bytes):
|
||||||
if self._verified_bytes:
|
async def write():
|
||||||
raise OSError("already have bytes for blob")
|
if self._verified_bytes:
|
||||||
self._verified_bytes = BytesIO(blob_bytes)
|
raise OSError("already have bytes for blob")
|
||||||
|
self._verified_bytes = BytesIO(blob_bytes)
|
||||||
|
return self.loop.create_task(write())
|
||||||
|
|
||||||
def delete(self):
|
def delete(self):
|
||||||
if self._verified_bytes:
|
if self._verified_bytes:
|
||||||
@@ -276,10 +299,12 @@ class BlobFile(AbstractBlob):
|
|||||||
"""
|
"""
|
||||||
A blob existing on the local file system
|
A blob existing on the local file system
|
||||||
"""
|
"""
|
||||||
def __init__(self, loop: asyncio.AbstractEventLoop, blob_hash: str, length: typing.Optional[int] = None,
|
def __init__(
|
||||||
blob_completed_callback: typing.Optional[typing.Callable[['AbstractBlob'], asyncio.Task]] = None,
|
self, loop: asyncio.AbstractEventLoop, blob_hash: str, length: typing.Optional[int] = None,
|
||||||
blob_directory: typing.Optional[str] = None):
|
blob_completed_callback: typing.Optional[typing.Callable[['AbstractBlob'], asyncio.Task]] = None,
|
||||||
super().__init__(loop, blob_hash, length, blob_completed_callback, blob_directory)
|
blob_directory: typing.Optional[str] = None, added_on: typing.Optional[int] = None, is_mine: bool = False
|
||||||
|
):
|
||||||
|
super().__init__(loop, blob_hash, length, blob_completed_callback, blob_directory, added_on, is_mine)
|
||||||
if not blob_directory or not os.path.isdir(blob_directory):
|
if not blob_directory or not os.path.isdir(blob_directory):
|
||||||
raise OSError(f"invalid blob directory '{blob_directory}'")
|
raise OSError(f"invalid blob directory '{blob_directory}'")
|
||||||
self.file_path = os.path.join(self.blob_directory, self.blob_hash)
|
self.file_path = os.path.join(self.blob_directory, self.blob_hash)
|
||||||
@@ -314,22 +339,28 @@ class BlobFile(AbstractBlob):
|
|||||||
handle.close()
|
handle.close()
|
||||||
|
|
||||||
def _write_blob(self, blob_bytes: bytes):
|
def _write_blob(self, blob_bytes: bytes):
|
||||||
with open(self.file_path, 'wb') as f:
|
def _write_blob():
|
||||||
f.write(blob_bytes)
|
with open(self.file_path, 'wb') as f:
|
||||||
|
f.write(blob_bytes)
|
||||||
|
|
||||||
|
async def write_blob():
|
||||||
|
await self.loop.run_in_executor(None, _write_blob)
|
||||||
|
|
||||||
|
return self.loop.create_task(write_blob())
|
||||||
|
|
||||||
def delete(self):
|
def delete(self):
|
||||||
|
super().delete()
|
||||||
if os.path.isfile(self.file_path):
|
if os.path.isfile(self.file_path):
|
||||||
os.remove(self.file_path)
|
os.remove(self.file_path)
|
||||||
return super().delete()
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
async def create_from_unencrypted(
|
async def create_from_unencrypted(
|
||||||
cls, loop: asyncio.AbstractEventLoop, blob_dir: typing.Optional[str], key: bytes, iv: bytes,
|
cls, loop: asyncio.AbstractEventLoop, blob_dir: typing.Optional[str], key: bytes, iv: bytes,
|
||||||
unencrypted: bytes, blob_num: int,
|
unencrypted: bytes, blob_num: int, added_on: float, is_mine: bool,
|
||||||
blob_completed_callback: typing.Optional[typing.Callable[['AbstractBlob'],
|
blob_completed_callback: typing.Optional[typing.Callable[['AbstractBlob'], asyncio.Task]] = None
|
||||||
asyncio.Task]] = None) -> BlobInfo:
|
) -> BlobInfo:
|
||||||
if not blob_dir or not os.path.isdir(blob_dir):
|
if not blob_dir or not os.path.isdir(blob_dir):
|
||||||
raise OSError(f"cannot create blob in directory: '{blob_dir}'")
|
raise OSError(f"cannot create blob in directory: '{blob_dir}'")
|
||||||
return await super().create_from_unencrypted(
|
return await super().create_from_unencrypted(
|
||||||
loop, blob_dir, key, iv, unencrypted, blob_num, blob_completed_callback
|
loop, blob_dir, key, iv, unencrypted, blob_num, added_on, is_mine, blob_completed_callback
|
||||||
)
|
)
|
||||||
@@ -7,13 +7,19 @@ class BlobInfo:
|
|||||||
'blob_num',
|
'blob_num',
|
||||||
'length',
|
'length',
|
||||||
'iv',
|
'iv',
|
||||||
|
'added_on',
|
||||||
|
'is_mine'
|
||||||
]
|
]
|
||||||
|
|
||||||
def __init__(self, blob_num: int, length: int, iv: str, blob_hash: typing.Optional[str] = None):
|
def __init__(
|
||||||
|
self, blob_num: int, length: int, iv: str,
|
||||||
|
blob_hash: typing.Optional[str] = None, added_on=0, is_mine=False):
|
||||||
self.blob_hash = blob_hash
|
self.blob_hash = blob_hash
|
||||||
self.blob_num = blob_num
|
self.blob_num = blob_num
|
||||||
self.length = length
|
self.length = length
|
||||||
self.iv = iv
|
self.iv = iv
|
||||||
|
self.added_on = added_on
|
||||||
|
self.is_mine = is_mine
|
||||||
|
|
||||||
def as_dict(self) -> typing.Dict:
|
def as_dict(self) -> typing.Dict:
|
||||||
d = {
|
d = {
|
||||||
@@ -2,7 +2,7 @@ import os
|
|||||||
import typing
|
import typing
|
||||||
import asyncio
|
import asyncio
|
||||||
import logging
|
import logging
|
||||||
from lbry.utils import LRUCache
|
from lbry.utils import LRUCacheWithMetrics
|
||||||
from lbry.blob.blob_file import is_valid_blobhash, BlobFile, BlobBuffer, AbstractBlob
|
from lbry.blob.blob_file import is_valid_blobhash, BlobFile, BlobBuffer, AbstractBlob
|
||||||
from lbry.stream.descriptor import StreamDescriptor
|
from lbry.stream.descriptor import StreamDescriptor
|
||||||
from lbry.connection_manager import ConnectionManager
|
from lbry.connection_manager import ConnectionManager
|
||||||
@@ -32,38 +32,34 @@ class BlobManager:
|
|||||||
else self._node_data_store.completed_blobs
|
else self._node_data_store.completed_blobs
|
||||||
self.blobs: typing.Dict[str, AbstractBlob] = {}
|
self.blobs: typing.Dict[str, AbstractBlob] = {}
|
||||||
self.config = config
|
self.config = config
|
||||||
self.decrypted_blob_lru_cache = None if not self.config.blob_lru_cache_size else LRUCache(
|
self.decrypted_blob_lru_cache = None if not self.config.blob_lru_cache_size else LRUCacheWithMetrics(
|
||||||
self.config.blob_lru_cache_size)
|
self.config.blob_lru_cache_size)
|
||||||
self.connection_manager = ConnectionManager(loop)
|
self.connection_manager = ConnectionManager(loop)
|
||||||
|
|
||||||
def _get_blob(self, blob_hash: str, length: typing.Optional[int] = None):
|
def _get_blob(self, blob_hash: str, length: typing.Optional[int] = None, is_mine: bool = False):
|
||||||
if self.config.save_blobs:
|
if self.config.save_blobs or (
|
||||||
|
is_valid_blobhash(blob_hash) and os.path.isfile(os.path.join(self.blob_dir, blob_hash))):
|
||||||
return BlobFile(
|
return BlobFile(
|
||||||
self.loop, blob_hash, length, self.blob_completed, self.blob_dir
|
self.loop, blob_hash, length, self.blob_completed, self.blob_dir, is_mine=is_mine
|
||||||
)
|
|
||||||
else:
|
|
||||||
if is_valid_blobhash(blob_hash) and os.path.isfile(os.path.join(self.blob_dir, blob_hash)):
|
|
||||||
return BlobFile(
|
|
||||||
self.loop, blob_hash, length, self.blob_completed, self.blob_dir
|
|
||||||
)
|
|
||||||
return BlobBuffer(
|
|
||||||
self.loop, blob_hash, length, self.blob_completed, self.blob_dir
|
|
||||||
)
|
)
|
||||||
|
return BlobBuffer(
|
||||||
|
self.loop, blob_hash, length, self.blob_completed, self.blob_dir, is_mine=is_mine
|
||||||
|
)
|
||||||
|
|
||||||
def get_blob(self, blob_hash, length: typing.Optional[int] = None):
|
def get_blob(self, blob_hash, length: typing.Optional[int] = None, is_mine: bool = False):
|
||||||
if blob_hash in self.blobs:
|
if blob_hash in self.blobs:
|
||||||
if self.config.save_blobs and isinstance(self.blobs[blob_hash], BlobBuffer):
|
if self.config.save_blobs and isinstance(self.blobs[blob_hash], BlobBuffer):
|
||||||
buffer = self.blobs.pop(blob_hash)
|
buffer = self.blobs.pop(blob_hash)
|
||||||
if blob_hash in self.completed_blob_hashes:
|
if blob_hash in self.completed_blob_hashes:
|
||||||
self.completed_blob_hashes.remove(blob_hash)
|
self.completed_blob_hashes.remove(blob_hash)
|
||||||
self.blobs[blob_hash] = self._get_blob(blob_hash, length)
|
self.blobs[blob_hash] = self._get_blob(blob_hash, length, is_mine)
|
||||||
if buffer.is_readable():
|
if buffer.is_readable():
|
||||||
with buffer.reader_context() as reader:
|
with buffer.reader_context() as reader:
|
||||||
self.blobs[blob_hash].write_blob(reader.read())
|
self.blobs[blob_hash].write_blob(reader.read())
|
||||||
if length and self.blobs[blob_hash].length is None:
|
if length and self.blobs[blob_hash].length is None:
|
||||||
self.blobs[blob_hash].set_length(length)
|
self.blobs[blob_hash].set_length(length)
|
||||||
else:
|
else:
|
||||||
self.blobs[blob_hash] = self._get_blob(blob_hash, length)
|
self.blobs[blob_hash] = self._get_blob(blob_hash, length, is_mine)
|
||||||
return self.blobs[blob_hash]
|
return self.blobs[blob_hash]
|
||||||
|
|
||||||
def is_blob_verified(self, blob_hash: str, length: typing.Optional[int] = None) -> bool:
|
def is_blob_verified(self, blob_hash: str, length: typing.Optional[int] = None) -> bool:
|
||||||
@@ -82,6 +78,7 @@ class BlobManager:
|
|||||||
return {
|
return {
|
||||||
item.name for item in os.scandir(self.blob_dir) if is_valid_blobhash(item.name)
|
item.name for item in os.scandir(self.blob_dir) if is_valid_blobhash(item.name)
|
||||||
}
|
}
|
||||||
|
|
||||||
in_blobfiles_dir = await self.loop.run_in_executor(None, get_files_in_blob_dir)
|
in_blobfiles_dir = await self.loop.run_in_executor(None, get_files_in_blob_dir)
|
||||||
to_add = await self.storage.sync_missing_blobs(in_blobfiles_dir)
|
to_add = await self.storage.sync_missing_blobs(in_blobfiles_dir)
|
||||||
if to_add:
|
if to_add:
|
||||||
@@ -108,9 +105,13 @@ class BlobManager:
|
|||||||
if isinstance(blob, BlobFile):
|
if isinstance(blob, BlobFile):
|
||||||
if blob.blob_hash not in self.completed_blob_hashes:
|
if blob.blob_hash not in self.completed_blob_hashes:
|
||||||
self.completed_blob_hashes.add(blob.blob_hash)
|
self.completed_blob_hashes.add(blob.blob_hash)
|
||||||
return self.loop.create_task(self.storage.add_blobs((blob.blob_hash, blob.length), finished=True))
|
return self.loop.create_task(self.storage.add_blobs(
|
||||||
|
(blob.blob_hash, blob.length, blob.added_on, blob.is_mine), finished=True)
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
return self.loop.create_task(self.storage.add_blobs((blob.blob_hash, blob.length), finished=False))
|
return self.loop.create_task(self.storage.add_blobs(
|
||||||
|
(blob.blob_hash, blob.length, blob.added_on, blob.is_mine), finished=False)
|
||||||
|
)
|
||||||
|
|
||||||
def check_completed_blobs(self, blob_hashes: typing.List[str]) -> typing.List[str]:
|
def check_completed_blobs(self, blob_hashes: typing.List[str]) -> typing.List[str]:
|
||||||
"""Returns of the blobhashes_to_check, which are valid"""
|
"""Returns of the blobhashes_to_check, which are valid"""
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
import asyncio
|
||||||
|
import logging
|
||||||
|
|
||||||
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
class DiskSpaceManager:
|
||||||
|
|
||||||
|
def __init__(self, config, db, blob_manager, cleaning_interval=30 * 60):
|
||||||
|
self.config = config
|
||||||
|
self.db = db
|
||||||
|
self.blob_manager = blob_manager
|
||||||
|
self.cleaning_interval = cleaning_interval
|
||||||
|
self.running = False
|
||||||
|
self.task = None
|
||||||
|
|
||||||
|
async def get_space_used_bytes(self):
|
||||||
|
return await self.db.get_stored_blob_disk_usage()
|
||||||
|
|
||||||
|
async def get_space_used_mb(self):
|
||||||
|
return int(await self.get_space_used_bytes()/1024.0/1024.0)
|
||||||
|
|
||||||
|
async def clean(self):
|
||||||
|
if not self.config.blob_storage_limit:
|
||||||
|
return 0
|
||||||
|
delete = []
|
||||||
|
available = (self.config.blob_storage_limit*1024*1024) - await self.get_space_used_bytes()
|
||||||
|
if available > 0:
|
||||||
|
return 0
|
||||||
|
for blob_hash, file_size, _ in await self.db.get_stored_blobs(is_mine=False):
|
||||||
|
delete.append(blob_hash)
|
||||||
|
available += file_size
|
||||||
|
if available > 0:
|
||||||
|
break
|
||||||
|
if delete:
|
||||||
|
await self.db.stop_all_files()
|
||||||
|
await self.blob_manager.delete_blobs(delete, delete_from_db=True)
|
||||||
|
return len(delete)
|
||||||
|
|
||||||
|
async def cleaning_loop(self):
|
||||||
|
while self.running:
|
||||||
|
await asyncio.sleep(self.cleaning_interval)
|
||||||
|
await self.clean()
|
||||||
|
|
||||||
|
async def start(self):
|
||||||
|
self.running = True
|
||||||
|
self.task = asyncio.create_task(self.cleaning_loop())
|
||||||
|
self.task.add_done_callback(lambda _: log.info("Stopping blob cleanup service."))
|
||||||
|
|
||||||
|
async def stop(self):
|
||||||
|
if self.running:
|
||||||
|
self.running = False
|
||||||
|
self.task.cancel()
|
||||||
@@ -3,7 +3,7 @@ import logging
|
|||||||
import asyncio
|
import asyncio
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from lbry.error import InvalidBlobHashError, InvalidDataError
|
from lbry.error import InvalidBlobHashError, InvalidDataError
|
||||||
from lbry.cryptoutils import get_lbry_hash_obj
|
from lbry.utils import get_lbry_hash_obj
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@@ -33,13 +33,13 @@ class HashBlobWriter:
|
|||||||
def write(self, data: bytes):
|
def write(self, data: bytes):
|
||||||
expected_length = self.get_length()
|
expected_length = self.get_length()
|
||||||
if not expected_length:
|
if not expected_length:
|
||||||
raise IOError("unknown blob length")
|
raise OSError("unknown blob length")
|
||||||
if self.buffer is None:
|
if self.buffer is None:
|
||||||
log.warning("writer has already been closed")
|
log.warning("writer has already been closed")
|
||||||
if not self.finished.done():
|
if not self.finished.done():
|
||||||
self.finished.cancel()
|
self.finished.cancel()
|
||||||
return
|
return
|
||||||
raise IOError('I/O operation on closed file')
|
raise OSError('I/O operation on closed file')
|
||||||
|
|
||||||
self._hashsum.update(data)
|
self._hashsum.update(data)
|
||||||
self.len_so_far += len(data)
|
self.len_so_far += len(data)
|
||||||
@@ -67,7 +67,7 @@ class BlobExchangeClientProtocol(asyncio.Protocol):
|
|||||||
self.blob.set_length(blob_response.length)
|
self.blob.set_length(blob_response.length)
|
||||||
elif blob_response and not blob_response.error and self.blob.blob_hash != blob_response.blob_hash:
|
elif blob_response and not blob_response.error and self.blob.blob_hash != blob_response.blob_hash:
|
||||||
# the server started sending a blob we didn't request
|
# the server started sending a blob we didn't request
|
||||||
log.warning("%s started sending blob we didnt request %s instead of %s", self.peer_address,
|
log.warning("%s started sending blob we didn't request %s instead of %s", self.peer_address,
|
||||||
blob_response.blob_hash, self.blob.blob_hash)
|
blob_response.blob_hash, self.blob.blob_hash)
|
||||||
return
|
return
|
||||||
if response.responses:
|
if response.responses:
|
||||||
@@ -83,12 +83,10 @@ class BlobExchangeClientProtocol(asyncio.Protocol):
|
|||||||
if len(data) > (self.blob.get_length() - self._blob_bytes_received):
|
if len(data) > (self.blob.get_length() - self._blob_bytes_received):
|
||||||
data = data[:(self.blob.get_length() - self._blob_bytes_received)]
|
data = data[:(self.blob.get_length() - self._blob_bytes_received)]
|
||||||
log.warning("got more than asked from %s:%d, probable sendfile bug", self.peer_address, self.peer_port)
|
log.warning("got more than asked from %s:%d, probable sendfile bug", self.peer_address, self.peer_port)
|
||||||
else:
|
|
||||||
data = data
|
|
||||||
self._blob_bytes_received += len(data)
|
self._blob_bytes_received += len(data)
|
||||||
try:
|
try:
|
||||||
self.writer.write(data)
|
self.writer.write(data)
|
||||||
except IOError as err:
|
except OSError as err:
|
||||||
log.error("error downloading blob from %s:%i: %s", self.peer_address, self.peer_port, err)
|
log.error("error downloading blob from %s:%i: %s", self.peer_address, self.peer_port, err)
|
||||||
if self._response_fut and not self._response_fut.done():
|
if self._response_fut and not self._response_fut.done():
|
||||||
self._response_fut.set_exception(err)
|
self._response_fut.set_exception(err)
|
||||||
@@ -97,7 +95,7 @@ class BlobExchangeClientProtocol(asyncio.Protocol):
|
|||||||
if self._response_fut and not self._response_fut.done():
|
if self._response_fut and not self._response_fut.done():
|
||||||
self._response_fut.set_exception(err)
|
self._response_fut.set_exception(err)
|
||||||
|
|
||||||
async def _download_blob(self) -> typing.Tuple[int, Optional['BlobExchangeClientProtocol']]:
|
async def _download_blob(self) -> typing.Tuple[int, Optional['BlobExchangeClientProtocol']]: # pylint: disable=too-many-return-statements
|
||||||
"""
|
"""
|
||||||
:return: download success (bool), connected protocol (BlobExchangeClientProtocol)
|
:return: download success (bool), connected protocol (BlobExchangeClientProtocol)
|
||||||
"""
|
"""
|
||||||
@@ -141,7 +139,7 @@ class BlobExchangeClientProtocol(asyncio.Protocol):
|
|||||||
log.warning("data rate rejected by %s:%i", self.peer_address, self.peer_port)
|
log.warning("data rate rejected by %s:%i", self.peer_address, self.peer_port)
|
||||||
return self._blob_bytes_received, self.close()
|
return self._blob_bytes_received, self.close()
|
||||||
if not blob_response or blob_response.error:
|
if not blob_response or blob_response.error:
|
||||||
log.warning("blob cant be downloaded from %s:%i", self.peer_address, self.peer_port)
|
log.warning("blob can't be downloaded from %s:%i", self.peer_address, self.peer_port)
|
||||||
return self._blob_bytes_received, self.close()
|
return self._blob_bytes_received, self.close()
|
||||||
if not blob_response.error and blob_response.blob_hash != self.blob.blob_hash:
|
if not blob_response.error and blob_response.blob_hash != self.blob.blob_hash:
|
||||||
log.warning("incoming blob hash mismatch from %s:%i", self.peer_address, self.peer_port)
|
log.warning("incoming blob hash mismatch from %s:%i", self.peer_address, self.peer_port)
|
||||||
@@ -154,6 +152,8 @@ class BlobExchangeClientProtocol(asyncio.Protocol):
|
|||||||
log.debug(msg)
|
log.debug(msg)
|
||||||
msg = f"downloaded {self.blob.blob_hash[:8]} from {self.peer_address}:{self.peer_port}"
|
msg = f"downloaded {self.blob.blob_hash[:8]} from {self.peer_address}:{self.peer_port}"
|
||||||
await asyncio.wait_for(self.writer.finished, self.peer_timeout, loop=self.loop)
|
await asyncio.wait_for(self.writer.finished, self.peer_timeout, loop=self.loop)
|
||||||
|
# wait for the io to finish
|
||||||
|
await self.blob.verified.wait()
|
||||||
log.info("%s at %fMB/s", msg,
|
log.info("%s at %fMB/s", msg,
|
||||||
round((float(self._blob_bytes_received) /
|
round((float(self._blob_bytes_received) /
|
||||||
float(time.perf_counter() - start_time)) / 1000000.0, 2))
|
float(time.perf_counter() - start_time)) / 1000000.0, 2))
|
||||||
@@ -215,11 +215,11 @@ class BlobExchangeClientProtocol(asyncio.Protocol):
|
|||||||
self.connection_manager.connection_made(f"{self.peer_address}:{self.peer_port}")
|
self.connection_manager.connection_made(f"{self.peer_address}:{self.peer_port}")
|
||||||
log.debug("connection made to %s:%i", self.peer_address, self.peer_port)
|
log.debug("connection made to %s:%i", self.peer_address, self.peer_port)
|
||||||
|
|
||||||
def connection_lost(self, reason):
|
def connection_lost(self, exc):
|
||||||
if self.connection_manager:
|
if self.connection_manager:
|
||||||
self.connection_manager.outgoing_connection_lost(f"{self.peer_address}:{self.peer_port}")
|
self.connection_manager.outgoing_connection_lost(f"{self.peer_address}:{self.peer_port}")
|
||||||
log.debug("connection lost to %s:%i (reason: %s, %s)", self.peer_address, self.peer_port, str(reason),
|
log.debug("connection lost to %s:%i (reason: %s, %s)", self.peer_address, self.peer_port, str(exc),
|
||||||
str(type(reason)))
|
str(type(exc)))
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ class BlobDownloader:
|
|||||||
self.ignored: typing.Dict['KademliaPeer', int] = {}
|
self.ignored: typing.Dict['KademliaPeer', int] = {}
|
||||||
self.scores: typing.Dict['KademliaPeer', int] = {}
|
self.scores: typing.Dict['KademliaPeer', int] = {}
|
||||||
self.failures: typing.Dict['KademliaPeer', int] = {}
|
self.failures: typing.Dict['KademliaPeer', int] = {}
|
||||||
self.connection_failures: typing.List['KademliaPeer'] = []
|
self.connection_failures: typing.Set['KademliaPeer'] = set()
|
||||||
self.connections: typing.Dict['KademliaPeer', 'BlobExchangeClientProtocol'] = {}
|
self.connections: typing.Dict['KademliaPeer', 'BlobExchangeClientProtocol'] = {}
|
||||||
self.is_running = asyncio.Event(loop=self.loop)
|
self.is_running = asyncio.Event(loop=self.loop)
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ class BlobDownloader:
|
|||||||
connection_id=connection_id, connection_manager=self.blob_manager.connection_manager
|
connection_id=connection_id, connection_manager=self.blob_manager.connection_manager
|
||||||
)
|
)
|
||||||
if not bytes_received and not protocol and peer not in self.connection_failures:
|
if not bytes_received and not protocol and peer not in self.connection_failures:
|
||||||
self.connection_failures.append(peer)
|
self.connection_failures.add(peer)
|
||||||
if not protocol and peer not in self.ignored:
|
if not protocol and peer not in self.ignored:
|
||||||
self.ignored[peer] = self.loop.time()
|
self.ignored[peer] = self.loop.time()
|
||||||
log.debug("drop peer %s:%i", peer.address, peer.tcp_port)
|
log.debug("drop peer %s:%i", peer.address, peer.tcp_port)
|
||||||
@@ -75,10 +75,10 @@ class BlobDownloader:
|
|||||||
|
|
||||||
def clearbanned(self):
|
def clearbanned(self):
|
||||||
now = self.loop.time()
|
now = self.loop.time()
|
||||||
self.ignored = dict((
|
self.ignored = {
|
||||||
(peer, when) for (peer, when) in self.ignored.items()
|
peer: when for (peer, when) in self.ignored.items()
|
||||||
if (now - when) < min(30.0, (self.failures.get(peer, 0) ** self.BAN_FACTOR))
|
if (now - when) < min(30.0, (self.failures.get(peer, 0) ** self.BAN_FACTOR))
|
||||||
))
|
}
|
||||||
|
|
||||||
@cache_concurrent
|
@cache_concurrent
|
||||||
async def download_blob(self, blob_hash: str, length: typing.Optional[int] = None,
|
async def download_blob(self, blob_hash: str, length: typing.Optional[int] = None,
|
||||||
@@ -87,32 +87,42 @@ class BlobDownloader:
|
|||||||
if blob.get_is_verified():
|
if blob.get_is_verified():
|
||||||
return blob
|
return blob
|
||||||
self.is_running.set()
|
self.is_running.set()
|
||||||
|
tried_for_this_blob: typing.Set['KademliaPeer'] = set()
|
||||||
try:
|
try:
|
||||||
while not blob.get_is_verified() and self.is_running.is_set():
|
while not blob.get_is_verified() and self.is_running.is_set():
|
||||||
batch: typing.Set['KademliaPeer'] = set()
|
batch: typing.Set['KademliaPeer'] = set(self.connections.keys())
|
||||||
while not self.peer_queue.empty():
|
while not self.peer_queue.empty():
|
||||||
batch.update(self.peer_queue.get_nowait())
|
batch.update(self.peer_queue.get_nowait())
|
||||||
if batch:
|
|
||||||
self.peer_queue.put_nowait(list(batch))
|
|
||||||
log.debug(
|
log.debug(
|
||||||
"running, %d peers, %d ignored, %d active, %s connections",
|
"%s running, %d peers, %d ignored, %d active, %s connections", blob_hash[:6],
|
||||||
len(batch), len(self.ignored), len(self.active_connections), len(self.connections)
|
len(batch), len(self.ignored), len(self.active_connections), len(self.connections)
|
||||||
)
|
)
|
||||||
|
re_add: typing.Set['KademliaPeer'] = set()
|
||||||
for peer in sorted(batch, key=lambda peer: self.scores.get(peer, 0), reverse=True):
|
for peer in sorted(batch, key=lambda peer: self.scores.get(peer, 0), reverse=True):
|
||||||
if peer in self.ignored or peer in self.active_connections:
|
if peer in self.ignored:
|
||||||
|
continue
|
||||||
|
if peer in tried_for_this_blob:
|
||||||
|
continue
|
||||||
|
if peer in self.active_connections:
|
||||||
|
if peer not in re_add:
|
||||||
|
re_add.add(peer)
|
||||||
continue
|
continue
|
||||||
if not self.should_race_continue(blob):
|
if not self.should_race_continue(blob):
|
||||||
break
|
break
|
||||||
log.debug("request %s from %s:%i", blob_hash[:8], peer.address, peer.tcp_port)
|
log.debug("request %s from %s:%i", blob_hash[:8], peer.address, peer.tcp_port)
|
||||||
just_probe = len(self.connections) == 0
|
t = self.loop.create_task(self.request_blob_from_peer(blob, peer, connection_id))
|
||||||
t = self.loop.create_task(self.request_blob_from_peer(blob, peer, connection_id, just_probe))
|
|
||||||
self.active_connections[peer] = t
|
self.active_connections[peer] = t
|
||||||
|
tried_for_this_blob.add(peer)
|
||||||
|
if not re_add:
|
||||||
|
self.peer_queue.put_nowait(list(batch))
|
||||||
await self.new_peer_or_finished()
|
await self.new_peer_or_finished()
|
||||||
self.cleanup_active()
|
self.cleanup_active()
|
||||||
log.debug("downloaded %s", blob_hash[:8])
|
log.debug("downloaded %s", blob_hash[:8])
|
||||||
return blob
|
return blob
|
||||||
finally:
|
finally:
|
||||||
blob.close()
|
blob.close()
|
||||||
|
if self.loop.is_running():
|
||||||
|
self.loop.call_soon(self.cleanup_active)
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
self.connection_failures.clear()
|
self.connection_failures.clear()
|
||||||
@@ -46,7 +46,7 @@ class BlobAvailabilityRequest(BlobMessage):
|
|||||||
|
|
||||||
def __init__(self, requested_blobs: typing.List[str], lbrycrd_address: typing.Optional[bool] = True,
|
def __init__(self, requested_blobs: typing.List[str], lbrycrd_address: typing.Optional[bool] = True,
|
||||||
**kwargs) -> None:
|
**kwargs) -> None:
|
||||||
assert len(requested_blobs)
|
assert len(requested_blobs) > 0
|
||||||
self.requested_blobs = requested_blobs
|
self.requested_blobs = requested_blobs
|
||||||
self.lbrycrd_address = lbrycrd_address
|
self.lbrycrd_address = lbrycrd_address
|
||||||
|
|
||||||
@@ -134,9 +134,9 @@ class BlobErrorResponse(BlobMessage):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
blob_request_types = typing.Union[BlobPriceRequest, BlobAvailabilityRequest, BlobDownloadRequest,
|
blob_request_types = typing.Union[BlobPriceRequest, BlobAvailabilityRequest, BlobDownloadRequest, # pylint: disable=invalid-name
|
||||||
BlobPaymentAddressRequest]
|
BlobPaymentAddressRequest]
|
||||||
blob_response_types = typing.Union[BlobPriceResponse, BlobAvailabilityResponse, BlobDownloadResponse,
|
blob_response_types = typing.Union[BlobPriceResponse, BlobAvailabilityResponse, BlobDownloadResponse, # pylint: disable=invalid-name
|
||||||
BlobErrorResponse, BlobPaymentAddressResponse]
|
BlobErrorResponse, BlobPaymentAddressResponse]
|
||||||
|
|
||||||
|
|
||||||
@@ -157,10 +157,10 @@ def _parse_blob_response(response_msg: bytes) -> typing.Tuple[typing.Optional[ty
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
continue
|
continue
|
||||||
possible_response_keys = {
|
possible_response_keys = {
|
||||||
BlobPaymentAddressResponse.key,
|
BlobPaymentAddressResponse.key,
|
||||||
BlobAvailabilityResponse.key,
|
BlobAvailabilityResponse.key,
|
||||||
BlobPriceResponse.key,
|
BlobPriceResponse.key,
|
||||||
BlobDownloadResponse.key
|
BlobDownloadResponse.key
|
||||||
}
|
}
|
||||||
if isinstance(response, dict) and response.keys():
|
if isinstance(response, dict) and response.keys():
|
||||||
if set(response.keys()).issubset(possible_response_keys):
|
if set(response.keys()).issubset(possible_response_keys):
|
||||||
@@ -179,7 +179,7 @@ class BlobRequest:
|
|||||||
return d
|
return d
|
||||||
|
|
||||||
def _get_request(self, request_type: blob_request_types):
|
def _get_request(self, request_type: blob_request_types):
|
||||||
request = tuple(filter(lambda r: type(r) == request_type, self.requests))
|
request = tuple(filter(lambda r: type(r) == request_type, self.requests)) # pylint: disable=unidiomatic-typecheck
|
||||||
if request:
|
if request:
|
||||||
return request[0]
|
return request[0]
|
||||||
|
|
||||||
@@ -235,7 +235,7 @@ class BlobResponse:
|
|||||||
return d
|
return d
|
||||||
|
|
||||||
def _get_response(self, response_type: blob_response_types):
|
def _get_response(self, response_type: blob_response_types):
|
||||||
response = tuple(filter(lambda r: type(r) == response_type, self.responses))
|
response = tuple(filter(lambda r: type(r) == response_type, self.responses)) # pylint: disable=unidiomatic-typecheck
|
||||||
if response:
|
if response:
|
||||||
return response[0]
|
return response[0]
|
||||||
|
|
||||||
@@ -280,4 +280,3 @@ class BlobResponse:
|
|||||||
if response_type.key in response
|
if response_type.key in response
|
||||||
])
|
])
|
||||||
return cls(requests, extra)
|
return cls(requests, extra)
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ MAX_REQUEST_SIZE = 1200
|
|||||||
|
|
||||||
class BlobServerProtocol(asyncio.Protocol):
|
class BlobServerProtocol(asyncio.Protocol):
|
||||||
def __init__(self, loop: asyncio.AbstractEventLoop, blob_manager: 'BlobManager', lbrycrd_address: str,
|
def __init__(self, loop: asyncio.AbstractEventLoop, blob_manager: 'BlobManager', lbrycrd_address: str,
|
||||||
idle_timeout: float = 30.0, transfer_timeout: float = 60.0):
|
idle_timeout: float = 30.0, transfer_timeout: float = 60.0, blob_callback=None):
|
||||||
self.loop = loop
|
self.loop = loop
|
||||||
self.blob_manager = blob_manager
|
self.blob_manager = blob_manager
|
||||||
self.idle_timeout = idle_timeout
|
self.idle_timeout = idle_timeout
|
||||||
@@ -32,6 +32,7 @@ class BlobServerProtocol(asyncio.Protocol):
|
|||||||
self.started_transfer = asyncio.Event(loop=self.loop)
|
self.started_transfer = asyncio.Event(loop=self.loop)
|
||||||
self.transfer_finished = asyncio.Event(loop=self.loop)
|
self.transfer_finished = asyncio.Event(loop=self.loop)
|
||||||
self.close_on_idle_task: typing.Optional[asyncio.Task] = None
|
self.close_on_idle_task: typing.Optional[asyncio.Task] = None
|
||||||
|
self.blob_handling_callback: typing.Optional[typing.Callable] = blob_callback
|
||||||
|
|
||||||
async def close_on_idle(self):
|
async def close_on_idle(self):
|
||||||
while self.transport:
|
while self.transport:
|
||||||
@@ -81,10 +82,10 @@ class BlobServerProtocol(asyncio.Protocol):
|
|||||||
responses.append(BlobPaymentAddressResponse(lbrycrd_address=self.lbrycrd_address))
|
responses.append(BlobPaymentAddressResponse(lbrycrd_address=self.lbrycrd_address))
|
||||||
availability_request = request.get_availability_request()
|
availability_request = request.get_availability_request()
|
||||||
if availability_request:
|
if availability_request:
|
||||||
responses.append(BlobAvailabilityResponse(available_blobs=list(set((
|
responses.append(BlobAvailabilityResponse(available_blobs=list(set(
|
||||||
filter(lambda blob_hash: blob_hash in self.blob_manager.completed_blob_hashes,
|
filter(lambda blob_hash: blob_hash in self.blob_manager.completed_blob_hashes,
|
||||||
availability_request.requested_blobs)
|
availability_request.requested_blobs)
|
||||||
)))))
|
))))
|
||||||
price_request = request.get_price_request()
|
price_request = request.get_price_request()
|
||||||
if price_request:
|
if price_request:
|
||||||
responses.append(BlobPriceResponse(blob_data_payment_rate='RATE_ACCEPTED'))
|
responses.append(BlobPriceResponse(blob_data_payment_rate='RATE_ACCEPTED'))
|
||||||
@@ -92,26 +93,37 @@ class BlobServerProtocol(asyncio.Protocol):
|
|||||||
|
|
||||||
if download_request:
|
if download_request:
|
||||||
blob = self.blob_manager.get_blob(download_request.requested_blob)
|
blob = self.blob_manager.get_blob(download_request.requested_blob)
|
||||||
|
if self.blob_handling_callback:
|
||||||
|
await self.blob_handling_callback(blob)
|
||||||
|
blob = self.blob_manager.get_blob(download_request.requested_blob)
|
||||||
if blob.get_is_verified():
|
if blob.get_is_verified():
|
||||||
incoming_blob = {'blob_hash': blob.blob_hash, 'length': blob.length}
|
incoming_blob = {'blob_hash': blob.blob_hash, 'length': blob.length}
|
||||||
responses.append(BlobDownloadResponse(incoming_blob=incoming_blob))
|
responses.append(BlobDownloadResponse(incoming_blob=incoming_blob))
|
||||||
self.send_response(responses)
|
self.send_response(responses)
|
||||||
bh = blob.blob_hash[:8]
|
blob_hash = blob.blob_hash[:8]
|
||||||
log.debug("send %s to %s:%i", bh, peer_address, peer_port)
|
log.debug("send %s to %s:%i", blob_hash, peer_address, peer_port)
|
||||||
self.started_transfer.set()
|
self.started_transfer.set()
|
||||||
try:
|
try:
|
||||||
sent = await asyncio.wait_for(blob.sendfile(self), self.transfer_timeout, loop=self.loop)
|
sent = await asyncio.wait_for(blob.sendfile(self), self.transfer_timeout, loop=self.loop)
|
||||||
self.blob_manager.connection_manager.sent_data(self.peer_address_and_port, sent)
|
if sent and sent > 0:
|
||||||
log.info("sent %s (%i bytes) to %s:%i", bh, sent, peer_address, peer_port)
|
self.blob_manager.connection_manager.sent_data(self.peer_address_and_port, sent)
|
||||||
except (ConnectionResetError, BrokenPipeError, RuntimeError, OSError, asyncio.TimeoutError) as err:
|
log.info("sent %s (%i bytes) to %s:%i", blob_hash, sent, peer_address, peer_port)
|
||||||
if isinstance(err, asyncio.TimeoutError):
|
|
||||||
log.debug("timed out sending blob %s to %s", bh, peer_address)
|
|
||||||
else:
|
else:
|
||||||
log.debug("stopped sending %s to %s:%i", bh, peer_address, peer_port)
|
self.close()
|
||||||
|
log.debug("stopped sending %s to %s:%i", blob_hash, peer_address, peer_port)
|
||||||
|
return
|
||||||
|
except (OSError, ValueError, asyncio.TimeoutError) as err:
|
||||||
|
if isinstance(err, asyncio.TimeoutError):
|
||||||
|
log.debug("timed out sending blob %s to %s", blob_hash, peer_address)
|
||||||
|
else:
|
||||||
|
log.warning("could not read blob %s to send %s:%i", blob_hash, peer_address, peer_port)
|
||||||
self.close()
|
self.close()
|
||||||
|
return
|
||||||
finally:
|
finally:
|
||||||
self.transfer_finished.set()
|
self.transfer_finished.set()
|
||||||
if responses:
|
else:
|
||||||
|
log.info("don't have %s to send %s:%i", blob.blob_hash[:8], peer_address, peer_port)
|
||||||
|
if responses and not self.transport.is_closing():
|
||||||
self.send_response(responses)
|
self.send_response(responses)
|
||||||
|
|
||||||
def data_received(self, data):
|
def data_received(self, data):
|
||||||
@@ -122,7 +134,7 @@ class BlobServerProtocol(asyncio.Protocol):
|
|||||||
return
|
return
|
||||||
if data:
|
if data:
|
||||||
self.blob_manager.connection_manager.received_data(self.peer_address_and_port, len(data))
|
self.blob_manager.connection_manager.received_data(self.peer_address_and_port, len(data))
|
||||||
message, separator, remainder = data.rpartition(b'}')
|
_, separator, remainder = data.rpartition(b'}')
|
||||||
if not separator:
|
if not separator:
|
||||||
self.buf += data
|
self.buf += data
|
||||||
return
|
return
|
||||||
@@ -144,7 +156,7 @@ class BlobServerProtocol(asyncio.Protocol):
|
|||||||
|
|
||||||
class BlobServer:
|
class BlobServer:
|
||||||
def __init__(self, loop: asyncio.AbstractEventLoop, blob_manager: 'BlobManager', lbrycrd_address: str,
|
def __init__(self, loop: asyncio.AbstractEventLoop, blob_manager: 'BlobManager', lbrycrd_address: str,
|
||||||
idle_timeout: float = 30.0, transfer_timeout: float = 60.0):
|
idle_timeout: float = 30.0, transfer_timeout: float = 60.0, blob_callback=None):
|
||||||
self.loop = loop
|
self.loop = loop
|
||||||
self.blob_manager = blob_manager
|
self.blob_manager = blob_manager
|
||||||
self.server_task: typing.Optional[asyncio.Task] = None
|
self.server_task: typing.Optional[asyncio.Task] = None
|
||||||
@@ -153,6 +165,7 @@ class BlobServer:
|
|||||||
self.idle_timeout = idle_timeout
|
self.idle_timeout = idle_timeout
|
||||||
self.transfer_timeout = transfer_timeout
|
self.transfer_timeout = transfer_timeout
|
||||||
self.server_protocol_class = BlobServerProtocol
|
self.server_protocol_class = BlobServerProtocol
|
||||||
|
self.blob_handling_callback: typing.Optional[typing.Callable] = blob_callback
|
||||||
|
|
||||||
def start_server(self, port: int, interface: typing.Optional[str] = '0.0.0.0'):
|
def start_server(self, port: int, interface: typing.Optional[str] = '0.0.0.0'):
|
||||||
if self.server_task is not None:
|
if self.server_task is not None:
|
||||||
@@ -161,7 +174,8 @@ class BlobServer:
|
|||||||
async def _start_server():
|
async def _start_server():
|
||||||
server = await self.loop.create_server(
|
server = await self.loop.create_server(
|
||||||
lambda: self.server_protocol_class(self.loop, self.blob_manager, self.lbrycrd_address,
|
lambda: self.server_protocol_class(self.loop, self.blob_manager, self.lbrycrd_address,
|
||||||
self.idle_timeout, self.transfer_timeout),
|
self.idle_timeout, self.transfer_timeout,
|
||||||
|
blob_callback=self.blob_handling_callback),
|
||||||
interface, port
|
interface, port
|
||||||
)
|
)
|
||||||
self.started_listening.set()
|
self.started_listening.set()
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
# don't touch this. CI server changes this during build/deployment
|
# don't touch this. CI server changes this during build/deployment
|
||||||
BUILD = "dev"
|
BUILD = "dev"
|
||||||
BUILD_COMMIT = "source installation"
|
COMMIT_HASH = "none"
|
||||||
|
DOCKER_TAG = "none"
|
||||||
@@ -1,21 +1,21 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import typing
|
|
||||||
import logging
|
import logging
|
||||||
import yaml
|
from typing import List, Dict, Tuple, Union, TypeVar, Generic, Optional
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from appdirs import user_data_dir, user_config_dir
|
from appdirs import user_data_dir, user_config_dir
|
||||||
|
import yaml
|
||||||
from lbry.error import InvalidCurrencyError
|
from lbry.error import InvalidCurrencyError
|
||||||
from lbry.dht import constants
|
from lbry.dht import constants
|
||||||
from torba.client.coinselection import STRATEGIES
|
from lbry.wallet.coinselection import STRATEGIES
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
NOT_SET = type(str('NOT_SET'), (object,), {})
|
NOT_SET = type('NOT_SET', (object,), {}) # pylint: disable=invalid-name
|
||||||
T = typing.TypeVar('T')
|
T = TypeVar('T')
|
||||||
|
|
||||||
CURRENCIES = {
|
CURRENCIES = {
|
||||||
'BTC': {'type': 'crypto'},
|
'BTC': {'type': 'crypto'},
|
||||||
@@ -24,18 +24,18 @@ CURRENCIES = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class Setting(typing.Generic[T]):
|
class Setting(Generic[T]):
|
||||||
|
|
||||||
def __init__(self, doc: str, default: typing.Optional[T] = None,
|
def __init__(self, doc: str, default: Optional[T] = None,
|
||||||
previous_names: typing.Optional[typing.List[str]] = None,
|
previous_names: Optional[List[str]] = None,
|
||||||
metavar: typing.Optional[str] = None):
|
metavar: Optional[str] = None):
|
||||||
self.doc = doc
|
self.doc = doc
|
||||||
self.default = default
|
self.default = default
|
||||||
self.previous_names = previous_names or []
|
self.previous_names = previous_names or []
|
||||||
self.metavar = metavar
|
self.metavar = metavar
|
||||||
|
|
||||||
def __set_name__(self, owner, name):
|
def __set_name__(self, owner, name):
|
||||||
self.name = name
|
self.name = name # pylint: disable=attribute-defined-outside-init
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def cli_name(self):
|
def cli_name(self):
|
||||||
@@ -45,7 +45,7 @@ class Setting(typing.Generic[T]):
|
|||||||
def no_cli_name(self):
|
def no_cli_name(self):
|
||||||
return f"--no-{self.name.replace('_', '-')}"
|
return f"--no-{self.name.replace('_', '-')}"
|
||||||
|
|
||||||
def __get__(self, obj: typing.Optional['BaseConfig'], owner) -> T:
|
def __get__(self, obj: Optional['BaseConfig'], owner) -> T:
|
||||||
if obj is None:
|
if obj is None:
|
||||||
return self
|
return self
|
||||||
for location in obj.search_order:
|
for location in obj.search_order:
|
||||||
@@ -53,7 +53,7 @@ class Setting(typing.Generic[T]):
|
|||||||
return location[self.name]
|
return location[self.name]
|
||||||
return self.default
|
return self.default
|
||||||
|
|
||||||
def __set__(self, obj: 'BaseConfig', val: typing.Union[T, NOT_SET]):
|
def __set__(self, obj: 'BaseConfig', val: Union[T, NOT_SET]):
|
||||||
if val == NOT_SET:
|
if val == NOT_SET:
|
||||||
for location in obj.modify_order:
|
for location in obj.modify_order:
|
||||||
if self.name in location:
|
if self.name in location:
|
||||||
@@ -63,13 +63,25 @@ class Setting(typing.Generic[T]):
|
|||||||
for location in obj.modify_order:
|
for location in obj.modify_order:
|
||||||
location[self.name] = val
|
location[self.name] = val
|
||||||
|
|
||||||
def validate(self, val):
|
def is_set(self, obj: 'BaseConfig') -> bool:
|
||||||
|
for location in obj.search_order:
|
||||||
|
if self.name in location:
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
def is_set_to_default(self, obj: 'BaseConfig') -> bool:
|
||||||
|
for location in obj.search_order:
|
||||||
|
if self.name in location:
|
||||||
|
return location[self.name] == self.default
|
||||||
|
return False
|
||||||
|
|
||||||
|
def validate(self, value):
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
def deserialize(self, value):
|
def deserialize(self, value): # pylint: disable=no-self-use
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def serialize(self, value):
|
def serialize(self, value): # pylint: disable=no-self-use
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def contribute_to_argparse(self, parser: ArgumentParser):
|
def contribute_to_argparse(self, parser: ArgumentParser):
|
||||||
@@ -82,14 +94,18 @@ class Setting(typing.Generic[T]):
|
|||||||
|
|
||||||
|
|
||||||
class String(Setting[str]):
|
class String(Setting[str]):
|
||||||
def validate(self, val):
|
def validate(self, value):
|
||||||
assert isinstance(val, str), \
|
assert isinstance(value, str), \
|
||||||
f"Setting '{self.name}' must be a string."
|
f"Setting '{self.name}' must be a string."
|
||||||
|
|
||||||
|
# TODO: removes this after pylint starts to understand generics
|
||||||
|
def __get__(self, obj: Optional['BaseConfig'], owner) -> str: # pylint: disable=useless-super-delegation
|
||||||
|
return super().__get__(obj, owner)
|
||||||
|
|
||||||
|
|
||||||
class Integer(Setting[int]):
|
class Integer(Setting[int]):
|
||||||
def validate(self, val):
|
def validate(self, value):
|
||||||
assert isinstance(val, int), \
|
assert isinstance(value, int), \
|
||||||
f"Setting '{self.name}' must be an integer."
|
f"Setting '{self.name}' must be an integer."
|
||||||
|
|
||||||
def deserialize(self, value):
|
def deserialize(self, value):
|
||||||
@@ -97,8 +113,8 @@ class Integer(Setting[int]):
|
|||||||
|
|
||||||
|
|
||||||
class Float(Setting[float]):
|
class Float(Setting[float]):
|
||||||
def validate(self, val):
|
def validate(self, value):
|
||||||
assert isinstance(val, float), \
|
assert isinstance(value, float), \
|
||||||
f"Setting '{self.name}' must be a decimal."
|
f"Setting '{self.name}' must be a decimal."
|
||||||
|
|
||||||
def deserialize(self, value):
|
def deserialize(self, value):
|
||||||
@@ -106,8 +122,8 @@ class Float(Setting[float]):
|
|||||||
|
|
||||||
|
|
||||||
class Toggle(Setting[bool]):
|
class Toggle(Setting[bool]):
|
||||||
def validate(self, val):
|
def validate(self, value):
|
||||||
assert isinstance(val, bool), \
|
assert isinstance(value, bool), \
|
||||||
f"Setting '{self.name}' must be a true/false value."
|
f"Setting '{self.name}' must be a true/false value."
|
||||||
|
|
||||||
def contribute_to_argparse(self, parser: ArgumentParser):
|
def contribute_to_argparse(self, parser: ArgumentParser):
|
||||||
@@ -127,10 +143,10 @@ class Toggle(Setting[bool]):
|
|||||||
|
|
||||||
|
|
||||||
class Path(String):
|
class Path(String):
|
||||||
def __init__(self, doc: str, default: str = '', *args, **kwargs):
|
def __init__(self, doc: str, *args, default: str = '', **kwargs):
|
||||||
super().__init__(doc, default, *args, **kwargs)
|
super().__init__(doc, default, *args, **kwargs)
|
||||||
|
|
||||||
def __get__(self, obj, owner):
|
def __get__(self, obj, owner) -> str:
|
||||||
value = super().__get__(obj, owner)
|
value = super().__get__(obj, owner)
|
||||||
if isinstance(value, str):
|
if isinstance(value, str):
|
||||||
return os.path.expanduser(os.path.expandvars(value))
|
return os.path.expanduser(os.path.expandvars(value))
|
||||||
@@ -148,7 +164,12 @@ class MaxKeyFee(Setting[dict]):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _parse_list(l):
|
def _parse_list(l):
|
||||||
assert len(l) == 2, 'Max key fee is made up of two values: "AMOUNT CURRENCY".'
|
if l == ['null']:
|
||||||
|
return None
|
||||||
|
assert len(l) == 2, (
|
||||||
|
'Max key fee is made up of either two values: '
|
||||||
|
'"AMOUNT CURRENCY", or "null" (to set no limit)'
|
||||||
|
)
|
||||||
try:
|
try:
|
||||||
amount = float(l[0])
|
amount = float(l[0])
|
||||||
except ValueError:
|
except ValueError:
|
||||||
@@ -176,13 +197,13 @@ class MaxKeyFee(Setting[dict]):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
self.cli_name,
|
self.cli_name,
|
||||||
help=self.doc,
|
help=self.doc,
|
||||||
nargs=2,
|
nargs='+',
|
||||||
metavar=('AMOUNT', 'CURRENCY'),
|
metavar=('AMOUNT', 'CURRENCY'),
|
||||||
default=NOT_SET
|
default=NOT_SET
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
self.no_cli_name,
|
self.no_cli_name,
|
||||||
help=f"Disable maximum key fee check.",
|
help="Disable maximum key fee check.",
|
||||||
dest=self.name,
|
dest=self.name,
|
||||||
const=None,
|
const=None,
|
||||||
action="store_const",
|
action="store_const",
|
||||||
@@ -191,7 +212,7 @@ class MaxKeyFee(Setting[dict]):
|
|||||||
|
|
||||||
|
|
||||||
class StringChoice(String):
|
class StringChoice(String):
|
||||||
def __init__(self, doc: str, valid_values: typing.List[str], default: str, *args, **kwargs):
|
def __init__(self, doc: str, valid_values: List[str], default: str, *args, **kwargs):
|
||||||
super().__init__(doc, default, *args, **kwargs)
|
super().__init__(doc, default, *args, **kwargs)
|
||||||
if not valid_values:
|
if not valid_values:
|
||||||
raise ValueError("No valid values provided")
|
raise ValueError("No valid values provided")
|
||||||
@@ -199,16 +220,16 @@ class StringChoice(String):
|
|||||||
raise ValueError(f"Default value must be one of: {', '.join(valid_values)}")
|
raise ValueError(f"Default value must be one of: {', '.join(valid_values)}")
|
||||||
self.valid_values = valid_values
|
self.valid_values = valid_values
|
||||||
|
|
||||||
def validate(self, val):
|
def validate(self, value):
|
||||||
super().validate(val)
|
super().validate(value)
|
||||||
if val not in self.valid_values:
|
if value not in self.valid_values:
|
||||||
raise ValueError(f"Setting '{self.name}' value must be one of: {', '.join(self.valid_values)}")
|
raise ValueError(f"Setting '{self.name}' value must be one of: {', '.join(self.valid_values)}")
|
||||||
|
|
||||||
|
|
||||||
class ListSetting(Setting[list]):
|
class ListSetting(Setting[list]):
|
||||||
|
|
||||||
def validate(self, val):
|
def validate(self, value):
|
||||||
assert isinstance(val, (tuple, list)), \
|
assert isinstance(value, (tuple, list)), \
|
||||||
f"Setting '{self.name}' must be a tuple or list."
|
f"Setting '{self.name}' must be a tuple or list."
|
||||||
|
|
||||||
def contribute_to_argparse(self, parser: ArgumentParser):
|
def contribute_to_argparse(self, parser: ArgumentParser):
|
||||||
@@ -221,10 +242,10 @@ class ListSetting(Setting[list]):
|
|||||||
|
|
||||||
class Servers(ListSetting):
|
class Servers(ListSetting):
|
||||||
|
|
||||||
def validate(self, val):
|
def validate(self, value):
|
||||||
assert isinstance(val, (tuple, list)), \
|
assert isinstance(value, (tuple, list)), \
|
||||||
f"Setting '{self.name}' must be a tuple or list of servers."
|
f"Setting '{self.name}' must be a tuple or list of servers."
|
||||||
for idx, server in enumerate(val):
|
for idx, server in enumerate(value):
|
||||||
assert isinstance(server, (tuple, list)) and len(server) == 2, \
|
assert isinstance(server, (tuple, list)) and len(server) == 2, \
|
||||||
f"Server defined '{server}' at index {idx} in setting " \
|
f"Server defined '{server}' at index {idx} in setting " \
|
||||||
f"'{self.name}' must be a tuple or list of two items."
|
f"'{self.name}' must be a tuple or list of two items."
|
||||||
@@ -255,26 +276,104 @@ class Servers(ListSetting):
|
|||||||
|
|
||||||
class Strings(ListSetting):
|
class Strings(ListSetting):
|
||||||
|
|
||||||
def validate(self, val):
|
def validate(self, value):
|
||||||
assert isinstance(val, (tuple, list)), \
|
assert isinstance(value, (tuple, list)), \
|
||||||
f"Setting '{self.name}' must be a tuple or list of strings."
|
f"Setting '{self.name}' must be a tuple or list of strings."
|
||||||
for idx, string in enumerate(val):
|
for idx, string in enumerate(value):
|
||||||
assert isinstance(string, str), \
|
assert isinstance(string, str), \
|
||||||
f"Value of '{string}' at index {idx} in setting " \
|
f"Value of '{string}' at index {idx} in setting " \
|
||||||
f"'{self.name}' must be a string."
|
f"'{self.name}' must be a string."
|
||||||
|
|
||||||
|
|
||||||
|
class KnownHubsList:
|
||||||
|
|
||||||
|
def __init__(self, config: 'Config' = None, file_name: str = 'known_hubs.yml'):
|
||||||
|
self.file_name = file_name
|
||||||
|
self.path = os.path.join(config.wallet_dir, self.file_name) if config else None
|
||||||
|
self.hubs: Dict[Tuple[str, int], Dict] = {}
|
||||||
|
if self.exists:
|
||||||
|
self.load()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def exists(self):
|
||||||
|
return self.path and os.path.exists(self.path)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def serialized(self) -> Dict[str, Dict]:
|
||||||
|
return {f"{host}:{port}": details for (host, port), details in self.hubs.items()}
|
||||||
|
|
||||||
|
def filter(self, match_none=False, **kwargs):
|
||||||
|
if not kwargs:
|
||||||
|
return self.hubs
|
||||||
|
result = {}
|
||||||
|
for hub, details in self.hubs.items():
|
||||||
|
for key, constraint in kwargs.items():
|
||||||
|
value = details.get(key)
|
||||||
|
if value == constraint or (match_none and value is None):
|
||||||
|
result[hub] = details
|
||||||
|
break
|
||||||
|
return result
|
||||||
|
|
||||||
|
def load(self):
|
||||||
|
if self.path:
|
||||||
|
with open(self.path, 'r') as known_hubs_file:
|
||||||
|
raw = known_hubs_file.read()
|
||||||
|
for hub, details in yaml.safe_load(raw).items():
|
||||||
|
self.set(hub, details)
|
||||||
|
|
||||||
|
def save(self):
|
||||||
|
if self.path:
|
||||||
|
with open(self.path, 'w') as known_hubs_file:
|
||||||
|
known_hubs_file.write(yaml.safe_dump(self.serialized, default_flow_style=False))
|
||||||
|
|
||||||
|
def set(self, hub: str, details: Dict):
|
||||||
|
if hub and hub.count(':') == 1:
|
||||||
|
host, port = hub.split(':')
|
||||||
|
hub_parts = (host, int(port))
|
||||||
|
if hub_parts not in self.hubs:
|
||||||
|
self.hubs[hub_parts] = details
|
||||||
|
return hub
|
||||||
|
|
||||||
|
def add_hubs(self, hubs: List[str]):
|
||||||
|
added = False
|
||||||
|
for hub in hubs:
|
||||||
|
if self.set(hub, {}) is not None:
|
||||||
|
added = True
|
||||||
|
return added
|
||||||
|
|
||||||
|
def items(self):
|
||||||
|
return self.hubs.items()
|
||||||
|
|
||||||
|
def __bool__(self):
|
||||||
|
return len(self) > 0
|
||||||
|
|
||||||
|
def __len__(self):
|
||||||
|
return self.hubs.__len__()
|
||||||
|
|
||||||
|
def __iter__(self):
|
||||||
|
return iter(self.hubs)
|
||||||
|
|
||||||
|
|
||||||
class EnvironmentAccess:
|
class EnvironmentAccess:
|
||||||
PREFIX = 'LBRY_'
|
PREFIX = 'LBRY_'
|
||||||
|
|
||||||
def __init__(self, environ: dict):
|
def __init__(self, config: 'BaseConfig', environ: dict):
|
||||||
self.environ = environ
|
self.configuration = config
|
||||||
|
self.data = {}
|
||||||
|
if environ:
|
||||||
|
self.load(environ)
|
||||||
|
|
||||||
|
def load(self, environ):
|
||||||
|
for setting in self.configuration.get_settings():
|
||||||
|
value = environ.get(f'{self.PREFIX}{setting.name.upper()}', NOT_SET)
|
||||||
|
if value != NOT_SET and not (isinstance(setting, ListSetting) and value is None):
|
||||||
|
self.data[setting.name] = setting.deserialize(value)
|
||||||
|
|
||||||
def __contains__(self, item: str):
|
def __contains__(self, item: str):
|
||||||
return f'{self.PREFIX}{item.upper()}' in self.environ
|
return item in self.data
|
||||||
|
|
||||||
def __getitem__(self, item: str):
|
def __getitem__(self, item: str):
|
||||||
return self.environ[f'{self.PREFIX}{item.upper()}']
|
return self.data[item]
|
||||||
|
|
||||||
|
|
||||||
class ArgumentAccess:
|
class ArgumentAccess:
|
||||||
@@ -315,7 +414,7 @@ class ConfigFileAccess:
|
|||||||
cls = type(self.configuration)
|
cls = type(self.configuration)
|
||||||
with open(self.path, 'r') as config_file:
|
with open(self.path, 'r') as config_file:
|
||||||
raw = config_file.read()
|
raw = config_file.read()
|
||||||
serialized = yaml.load(raw) or {}
|
serialized = yaml.safe_load(raw) or {}
|
||||||
for key, value in serialized.items():
|
for key, value in serialized.items():
|
||||||
attr = getattr(cls, key, None)
|
attr = getattr(cls, key, None)
|
||||||
if attr is None:
|
if attr is None:
|
||||||
@@ -359,7 +458,7 @@ class ConfigFileAccess:
|
|||||||
del self.data[key]
|
del self.data[key]
|
||||||
|
|
||||||
|
|
||||||
TBC = typing.TypeVar('TBC', bound='BaseConfig')
|
TBC = TypeVar('TBC', bound='BaseConfig')
|
||||||
|
|
||||||
|
|
||||||
class BaseConfig:
|
class BaseConfig:
|
||||||
@@ -377,12 +476,11 @@ class BaseConfig:
|
|||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def update_config(self):
|
def update_config(self):
|
||||||
if not isinstance(self.persisted, ConfigFileAccess):
|
|
||||||
raise TypeError("Config file cannot be updated.")
|
|
||||||
self._updating_config = True
|
self._updating_config = True
|
||||||
yield self
|
yield self
|
||||||
self._updating_config = False
|
self._updating_config = False
|
||||||
self.persisted.save()
|
if isinstance(self.persisted, ConfigFileAccess):
|
||||||
|
self.persisted.save()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def modify_order(self):
|
def modify_order(self):
|
||||||
@@ -434,7 +532,7 @@ class BaseConfig:
|
|||||||
self.arguments = ArgumentAccess(self, args)
|
self.arguments = ArgumentAccess(self, args)
|
||||||
|
|
||||||
def set_environment(self, environ=None):
|
def set_environment(self, environ=None):
|
||||||
self.environment = EnvironmentAccess(environ or os.environ)
|
self.environment = EnvironmentAccess(self, environ or os.environ)
|
||||||
|
|
||||||
def set_persisted(self, config_file_path=None):
|
def set_persisted(self, config_file_path=None):
|
||||||
if config_file_path is None:
|
if config_file_path is None:
|
||||||
@@ -453,7 +551,27 @@ class BaseConfig:
|
|||||||
self.persisted.save()
|
self.persisted.save()
|
||||||
|
|
||||||
|
|
||||||
class CLIConfig(BaseConfig):
|
class TranscodeConfig(BaseConfig):
|
||||||
|
|
||||||
|
ffmpeg_path = String('A list of places to check for ffmpeg and ffprobe. '
|
||||||
|
f'$data_dir/ffmpeg/bin and $PATH are checked afterward. Separator: {os.pathsep}',
|
||||||
|
'', previous_names=['ffmpeg_folder'])
|
||||||
|
video_encoder = String('FFmpeg codec and parameters for the video encoding. '
|
||||||
|
'Example: libaom-av1 -crf 25 -b:v 0 -strict experimental',
|
||||||
|
'libx264 -crf 24 -preset faster -pix_fmt yuv420p')
|
||||||
|
video_bitrate_maximum = Integer('Maximum bits per second allowed for video streams (0 to disable).', 5_000_000)
|
||||||
|
video_scaler = String('FFmpeg scaling parameters for reducing bitrate. '
|
||||||
|
'Example: -vf "scale=-2:720,fps=24" -maxrate 5M -bufsize 3M',
|
||||||
|
r'-vf "scale=if(gte(iw\,ih)\,min(1920\,iw)\,-2):if(lt(iw\,ih)\,min(1920\,ih)\,-2)" '
|
||||||
|
r'-maxrate 5500K -bufsize 5000K')
|
||||||
|
audio_encoder = String('FFmpeg codec and parameters for the audio encoding. '
|
||||||
|
'Example: libopus -b:a 128k',
|
||||||
|
'aac -b:a 160k')
|
||||||
|
volume_filter = String('FFmpeg filter for audio normalization. Exmple: -af loudnorm', '')
|
||||||
|
volume_analysis_time = Integer('Maximum seconds into the file that we examine audio volume (0 to disable).', 240)
|
||||||
|
|
||||||
|
|
||||||
|
class CLIConfig(TranscodeConfig):
|
||||||
|
|
||||||
api = String('Host name and port for lbrynet daemon API.', 'localhost:5279', metavar='HOST:PORT')
|
api = String('Host name and port for lbrynet daemon API.', 'localhost:5279', metavar='HOST:PORT')
|
||||||
|
|
||||||
@@ -471,6 +589,9 @@ class CLIConfig(BaseConfig):
|
|||||||
|
|
||||||
|
|
||||||
class Config(CLIConfig):
|
class Config(CLIConfig):
|
||||||
|
|
||||||
|
jurisdiction = String("Limit interactions to wallet server in this jurisdiction.")
|
||||||
|
|
||||||
# directories
|
# directories
|
||||||
data_dir = Path("Directory path to store blobs.", metavar='DIR')
|
data_dir = Path("Directory path to store blobs.", metavar='DIR')
|
||||||
download_dir = Path(
|
download_dir = Path(
|
||||||
@@ -481,6 +602,10 @@ class Config(CLIConfig):
|
|||||||
"Directory containing a 'wallets' subdirectory with 'default_wallet' file.",
|
"Directory containing a 'wallets' subdirectory with 'default_wallet' file.",
|
||||||
previous_names=['lbryum_wallet_dir'], metavar='DIR'
|
previous_names=['lbryum_wallet_dir'], metavar='DIR'
|
||||||
)
|
)
|
||||||
|
wallets = Strings(
|
||||||
|
"Wallet files in 'wallet_dir' to load at startup.",
|
||||||
|
['default_wallet']
|
||||||
|
)
|
||||||
|
|
||||||
# network
|
# network
|
||||||
use_upnp = Toggle(
|
use_upnp = Toggle(
|
||||||
@@ -489,6 +614,7 @@ class Config(CLIConfig):
|
|||||||
)
|
)
|
||||||
udp_port = Integer("UDP port for communicating on the LBRY DHT", 4444, previous_names=['dht_node_port'])
|
udp_port = Integer("UDP port for communicating on the LBRY DHT", 4444, previous_names=['dht_node_port'])
|
||||||
tcp_port = Integer("TCP port to listen for incoming blob requests", 3333, previous_names=['peer_port'])
|
tcp_port = Integer("TCP port to listen for incoming blob requests", 3333, previous_names=['peer_port'])
|
||||||
|
prometheus_port = Integer("Port to expose prometheus metrics (off by default)", 0)
|
||||||
network_interface = String("Interface to use for the DHT and blob exchange", '0.0.0.0')
|
network_interface = String("Interface to use for the DHT and blob exchange", '0.0.0.0')
|
||||||
|
|
||||||
# routing table
|
# routing table
|
||||||
@@ -502,11 +628,13 @@ class Config(CLIConfig):
|
|||||||
# protocol timeouts
|
# protocol timeouts
|
||||||
download_timeout = Float("Cumulative timeout for a stream to begin downloading before giving up", 30.0)
|
download_timeout = Float("Cumulative timeout for a stream to begin downloading before giving up", 30.0)
|
||||||
blob_download_timeout = Float("Timeout to download a blob from a peer", 30.0)
|
blob_download_timeout = Float("Timeout to download a blob from a peer", 30.0)
|
||||||
|
hub_timeout = Float("Timeout when making a hub request", 30.0)
|
||||||
peer_connect_timeout = Float("Timeout to establish a TCP connection to a peer", 3.0)
|
peer_connect_timeout = Float("Timeout to establish a TCP connection to a peer", 3.0)
|
||||||
node_rpc_timeout = Float("Timeout when making a DHT request", constants.rpc_timeout)
|
node_rpc_timeout = Float("Timeout when making a DHT request", constants.RPC_TIMEOUT)
|
||||||
|
|
||||||
# blob announcement and download
|
# blob announcement and download
|
||||||
save_blobs = Toggle("Save encrypted blob files for hosting, otherwise download blobs to memory only.", True)
|
save_blobs = Toggle("Save encrypted blob files for hosting, otherwise download blobs to memory only.", True)
|
||||||
|
blob_storage_limit = Integer("Disk space in MB to be allocated for blob storage. 0 = no limit", 0)
|
||||||
blob_lru_cache_size = Integer(
|
blob_lru_cache_size = Integer(
|
||||||
"LRU cache size for decrypted downloaded blobs used to minimize re-downloading the same blobs when "
|
"LRU cache size for decrypted downloaded blobs used to minimize re-downloading the same blobs when "
|
||||||
"replying to a range request. Set to 0 to disable.", 32
|
"replying to a range request. Set to 0 to disable.", 32
|
||||||
@@ -523,13 +651,16 @@ class Config(CLIConfig):
|
|||||||
"Maximum number of peers to connect to while downloading a blob", 4,
|
"Maximum number of peers to connect to while downloading a blob", 4,
|
||||||
previous_names=['max_connections_per_stream']
|
previous_names=['max_connections_per_stream']
|
||||||
)
|
)
|
||||||
|
concurrent_hub_requests = Integer("Maximum number of concurrent hub requests", 32)
|
||||||
fixed_peer_delay = Float(
|
fixed_peer_delay = Float(
|
||||||
"Amount of seconds before adding the reflector servers as potential peers to download from in case dht"
|
"Amount of seconds before adding the reflector servers as potential peers to download from in case dht"
|
||||||
"peers are not found or are slow", 2.0
|
"peers are not found or are slow", 2.0
|
||||||
)
|
)
|
||||||
max_key_fee = MaxKeyFee(
|
max_key_fee = MaxKeyFee(
|
||||||
"Don't download streams with fees exceeding this amount", {'currency': 'USD', 'amount': 50.0}
|
"Don't download streams with fees exceeding this amount. When set to "
|
||||||
|
"null, the amount is unbounded.", {'currency': 'USD', 'amount': 50.0}
|
||||||
)
|
)
|
||||||
|
max_wallet_server_fee = String("Maximum daily LBC amount allowed as payment for wallet servers.", "0.0")
|
||||||
|
|
||||||
# reflector settings
|
# reflector settings
|
||||||
reflect_streams = Toggle(
|
reflect_streams = Toggle(
|
||||||
@@ -541,42 +672,48 @@ class Config(CLIConfig):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# servers
|
# servers
|
||||||
reflector_servers = Servers("Reflector re-hosting servers", [
|
reflector_servers = Servers("Reflector re-hosting servers for mirroring publishes", [
|
||||||
('reflector.lbry.com', 5566)
|
('reflector.lbry.com', 5566)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
fixed_peers = Servers("Fixed peers to fall back to if none are found on P2P for a blob", [
|
||||||
|
('cdn.reflector.lbry.com', 5567)
|
||||||
|
])
|
||||||
|
|
||||||
lbryum_servers = Servers("SPV wallet servers", [
|
lbryum_servers = Servers("SPV wallet servers", [
|
||||||
('spv1.lbry.com', 50001),
|
('spv11.lbry.com', 50001),
|
||||||
('spv2.lbry.com', 50001),
|
('spv12.lbry.com', 50001),
|
||||||
('spv3.lbry.com', 50001),
|
('spv13.lbry.com', 50001),
|
||||||
('spv4.lbry.com', 50001),
|
('spv14.lbry.com', 50001),
|
||||||
('spv5.lbry.com', 50001),
|
('spv15.lbry.com', 50001),
|
||||||
('spv6.lbry.com', 50001),
|
('spv16.lbry.com', 50001),
|
||||||
('spv7.lbry.com', 50001),
|
('spv17.lbry.com', 50001),
|
||||||
('spv8.lbry.com', 50001),
|
('spv18.lbry.com', 50001),
|
||||||
('spv9.lbry.com', 50001),
|
('spv19.lbry.com', 50001),
|
||||||
])
|
])
|
||||||
known_dht_nodes = Servers("Known nodes for bootstrapping connection to the DHT", [
|
known_dht_nodes = Servers("Known nodes for bootstrapping connection to the DHT", [
|
||||||
|
('dht.lbry.grin.io', 4444), # Grin
|
||||||
|
('dht.lbry.madiator.com', 4444), # Madiator
|
||||||
('lbrynet1.lbry.com', 4444), # US EAST
|
('lbrynet1.lbry.com', 4444), # US EAST
|
||||||
('lbrynet2.lbry.com', 4444), # US WEST
|
('lbrynet2.lbry.com', 4444), # US WEST
|
||||||
('lbrynet3.lbry.com', 4444), # EU
|
('lbrynet3.lbry.com', 4444), # EU
|
||||||
('lbrynet4.lbry.com', 4444) # ASIA
|
('lbrynet4.lbry.com', 4444) # ASIA
|
||||||
])
|
])
|
||||||
|
|
||||||
comment_server = String("Comment server API URL", "https://comments.lbry.com/api")
|
|
||||||
|
|
||||||
# blockchain
|
# blockchain
|
||||||
blockchain_name = String("Blockchain name - lbrycrd_main, lbrycrd_regtest, or lbrycrd_testnet", 'lbrycrd_main')
|
blockchain_name = String("Blockchain name - lbrycrd_main, lbrycrd_regtest, or lbrycrd_testnet", 'lbrycrd_main')
|
||||||
s3_headers_depth = Integer("download headers from s3 when the local height is more than 10 chunks behind", 96 * 10)
|
|
||||||
cache_time = Integer("Time to cache resolved claims", 150) # TODO: use this
|
|
||||||
|
|
||||||
# daemon
|
# daemon
|
||||||
save_files = Toggle("Save downloaded files when calling `get` by default", True)
|
save_files = Toggle("Save downloaded files when calling `get` by default", False)
|
||||||
components_to_skip = Strings("components which will be skipped during start-up of daemon", [])
|
components_to_skip = Strings("components which will be skipped during start-up of daemon", [])
|
||||||
share_usage_data = Toggle(
|
share_usage_data = Toggle(
|
||||||
"Whether to share usage stats and diagnostic info with LBRY.", True,
|
"Whether to share usage stats and diagnostic info with LBRY.", False,
|
||||||
previous_names=['upload_log', 'upload_log', 'share_debug_info']
|
previous_names=['upload_log', 'upload_log', 'share_debug_info']
|
||||||
)
|
)
|
||||||
track_bandwidth = Toggle("Track bandwidth usage", True)
|
track_bandwidth = Toggle("Track bandwidth usage", True)
|
||||||
|
allowed_origin = String(
|
||||||
|
"Allowed `Origin` header value for API request (sent by browser), use * to allow "
|
||||||
|
"all hosts; default is to only allow API requests with no `Origin` value.", "")
|
||||||
|
|
||||||
# media server
|
# media server
|
||||||
streaming_server = String('Host name and port to serve streaming media over range requests',
|
streaming_server = String('Host name and port to serve streaming media over range requests',
|
||||||
@@ -588,6 +725,12 @@ class Config(CLIConfig):
|
|||||||
"Strategy to use when selecting UTXOs for a transaction",
|
"Strategy to use when selecting UTXOs for a transaction",
|
||||||
STRATEGIES, "standard")
|
STRATEGIES, "standard")
|
||||||
|
|
||||||
|
transaction_cache_size = Integer("Transaction cache size", 2 ** 17)
|
||||||
|
save_resolved_claims = Toggle(
|
||||||
|
"Save content claims to the database when they are resolved to keep file_list up to date, "
|
||||||
|
"only disable this if file_x commands are not needed", True
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def streaming_host(self):
|
def streaming_host(self):
|
||||||
return self.streaming_server.split(':')[0]
|
return self.streaming_server.split(':')[0]
|
||||||
@@ -599,6 +742,7 @@ class Config(CLIConfig):
|
|||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
super().__init__(**kwargs)
|
super().__init__(**kwargs)
|
||||||
self.set_default_paths()
|
self.set_default_paths()
|
||||||
|
self.known_hubs = KnownHubsList(self)
|
||||||
|
|
||||||
def set_default_paths(self):
|
def set_default_paths(self):
|
||||||
if 'darwin' in sys.platform.lower():
|
if 'darwin' in sys.platform.lower():
|
||||||
@@ -620,10 +764,14 @@ class Config(CLIConfig):
|
|||||||
return os.path.join(self.data_dir, 'lbrynet.log')
|
return os.path.join(self.data_dir, 'lbrynet.log')
|
||||||
|
|
||||||
|
|
||||||
def get_windows_directories() -> typing.Tuple[str, str, str]:
|
def get_windows_directories() -> Tuple[str, str, str]:
|
||||||
from lbry.winpaths import get_path, FOLDERID, UserHandle
|
from lbry.winpaths import get_path, FOLDERID, UserHandle, \
|
||||||
|
PathNotFoundException # pylint: disable=import-outside-toplevel
|
||||||
|
|
||||||
download_dir = get_path(FOLDERID.Downloads, UserHandle.current)
|
try:
|
||||||
|
download_dir = get_path(FOLDERID.Downloads, UserHandle.current)
|
||||||
|
except PathNotFoundException:
|
||||||
|
download_dir = os.getcwd()
|
||||||
|
|
||||||
# old
|
# old
|
||||||
appdata = get_path(FOLDERID.RoamingAppData, UserHandle.current)
|
appdata = get_path(FOLDERID.RoamingAppData, UserHandle.current)
|
||||||
@@ -635,24 +783,24 @@ def get_windows_directories() -> typing.Tuple[str, str, str]:
|
|||||||
# new
|
# new
|
||||||
data_dir = user_data_dir('lbrynet', 'lbry')
|
data_dir = user_data_dir('lbrynet', 'lbry')
|
||||||
lbryum_dir = user_data_dir('lbryum', 'lbry')
|
lbryum_dir = user_data_dir('lbryum', 'lbry')
|
||||||
download_dir = get_path(FOLDERID.Downloads, UserHandle.current)
|
|
||||||
return data_dir, lbryum_dir, download_dir
|
return data_dir, lbryum_dir, download_dir
|
||||||
|
|
||||||
|
|
||||||
def get_darwin_directories() -> typing.Tuple[str, str, str]:
|
def get_darwin_directories() -> Tuple[str, str, str]:
|
||||||
data_dir = user_data_dir('LBRY')
|
data_dir = user_data_dir('LBRY')
|
||||||
lbryum_dir = os.path.expanduser('~/.lbryum')
|
lbryum_dir = os.path.expanduser('~/.lbryum')
|
||||||
download_dir = os.path.expanduser('~/Downloads')
|
download_dir = os.path.expanduser('~/Downloads')
|
||||||
return data_dir, lbryum_dir, download_dir
|
return data_dir, lbryum_dir, download_dir
|
||||||
|
|
||||||
|
|
||||||
def get_linux_directories() -> typing.Tuple[str, str, str]:
|
def get_linux_directories() -> Tuple[str, str, str]:
|
||||||
try:
|
try:
|
||||||
with open(os.path.join(user_config_dir(), 'user-dirs.dirs'), 'r') as xdg:
|
with open(os.path.join(user_config_dir(), 'user-dirs.dirs'), 'r') as xdg:
|
||||||
down_dir = re.search(r'XDG_DOWNLOAD_DIR=(.+)', xdg.read()).group(1)
|
down_dir = re.search(r'XDG_DOWNLOAD_DIR=(.+)', xdg.read())
|
||||||
down_dir = re.sub('\$HOME', os.getenv('HOME') or os.path.expanduser("~/"), down_dir)
|
if down_dir:
|
||||||
download_dir = re.sub('\"', '', down_dir)
|
down_dir = re.sub(r'\$HOME', os.getenv('HOME') or os.path.expanduser("~/"), down_dir.group(1))
|
||||||
except EnvironmentError:
|
download_dir = re.sub('\"', '', down_dir)
|
||||||
|
except OSError:
|
||||||
download_dir = os.getenv('XDG_DOWNLOAD_DIR')
|
download_dir = os.getenv('XDG_DOWNLOAD_DIR')
|
||||||
if not download_dir:
|
if not download_dir:
|
||||||
download_dir = os.path.expanduser('~/Downloads')
|
download_dir = os.path.expanduser('~/Downloads')
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import time
|
||||||
import asyncio
|
import asyncio
|
||||||
import typing
|
import typing
|
||||||
import collections
|
import collections
|
||||||
@@ -18,9 +19,9 @@ class ConnectionManager:
|
|||||||
self.incoming: typing.DefaultDict[str, int] = collections.defaultdict(int)
|
self.incoming: typing.DefaultDict[str, int] = collections.defaultdict(int)
|
||||||
self.outgoing_connected: typing.Set[str] = set()
|
self.outgoing_connected: typing.Set[str] = set()
|
||||||
self.outgoing: typing.DefaultDict[str, int] = collections.defaultdict(int)
|
self.outgoing: typing.DefaultDict[str, int] = collections.defaultdict(int)
|
||||||
|
self._max_incoming_mbs = 0.0
|
||||||
|
self._max_outgoing_mbs = 0.0
|
||||||
self._status = {}
|
self._status = {}
|
||||||
self._total_sent = 0
|
|
||||||
self._total_received = 0
|
|
||||||
self._running = False
|
self._running = False
|
||||||
self._task: typing.Optional[asyncio.Task] = None
|
self._task: typing.Optional[asyncio.Task] = None
|
||||||
|
|
||||||
@@ -58,31 +59,34 @@ class ConnectionManager:
|
|||||||
'outgoing_bps': {},
|
'outgoing_bps': {},
|
||||||
'total_incoming_mbs': 0.0,
|
'total_incoming_mbs': 0.0,
|
||||||
'total_outgoing_mbs': 0.0,
|
'total_outgoing_mbs': 0.0,
|
||||||
'total_sent': self._total_sent,
|
'total_sent': 0,
|
||||||
'total_received': self._total_received,
|
'total_received': 0,
|
||||||
'time': self.loop.time()
|
'max_incoming_mbs': 0.0,
|
||||||
|
'max_outgoing_mbs': 0.0
|
||||||
}
|
}
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
last = self.loop.time()
|
last = time.perf_counter()
|
||||||
await asyncio.sleep(1, loop=self.loop)
|
await asyncio.sleep(0.1, loop=self.loop)
|
||||||
self._status['incoming_bps'].clear()
|
self._status['incoming_bps'].clear()
|
||||||
self._status['outgoing_bps'].clear()
|
self._status['outgoing_bps'].clear()
|
||||||
|
now = time.perf_counter()
|
||||||
while self.outgoing:
|
while self.outgoing:
|
||||||
k, v = self.outgoing.popitem()
|
k, sent = self.outgoing.popitem()
|
||||||
self._status['outgoing_bps'][k] = v
|
self._status['total_sent'] += sent
|
||||||
|
self._status['outgoing_bps'][k] = sent / (now - last)
|
||||||
while self.incoming:
|
while self.incoming:
|
||||||
k, v = self.incoming.popitem()
|
k, received = self.incoming.popitem()
|
||||||
self._status['incoming_bps'][k] = v
|
self._status['total_received'] += received
|
||||||
now = self.loop.time()
|
self._status['incoming_bps'][k] = received / (now - last)
|
||||||
self._status['total_outgoing_mbs'] = int(sum(list(self._status['outgoing_bps'].values())
|
self._status['total_outgoing_mbs'] = int(sum(list(self._status['outgoing_bps'].values())
|
||||||
) / (now - last)) / 1000000.0
|
)) / 1000000.0
|
||||||
self._status['total_incoming_mbs'] = int(sum(list(self._status['incoming_bps'].values())
|
self._status['total_incoming_mbs'] = int(sum(list(self._status['incoming_bps'].values())
|
||||||
) / (now - last)) / 1000000.0
|
)) / 1000000.0
|
||||||
self._total_sent += sum(list(self._status['outgoing_bps'].values()))
|
self._max_incoming_mbs = max(self._max_incoming_mbs, self._status['total_incoming_mbs'])
|
||||||
self._total_received += sum(list(self._status['incoming_bps'].values()))
|
self._max_outgoing_mbs = max(self._max_outgoing_mbs, self._status['total_outgoing_mbs'])
|
||||||
|
self._status['max_incoming_mbs'] = self._max_incoming_mbs
|
||||||
self._status['time'] = now
|
self._status['max_outgoing_mbs'] = self._max_outgoing_mbs
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
if self._task:
|
if self._task:
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CENT = 1000000
|
||||||
|
COIN = 100*CENT
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
from lbry.crypto.hash import double_sha256
|
||||||
|
from lbry.crypto.util import bytes_to_int, int_to_bytes
|
||||||
|
|
||||||
|
|
||||||
|
class Base58Error(Exception):
|
||||||
|
""" Exception used for Base58 errors. """
|
||||||
|
|
||||||
|
|
||||||
|
class Base58:
|
||||||
|
""" Class providing base 58 functionality. """
|
||||||
|
|
||||||
|
chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
|
||||||
|
assert len(chars) == 58
|
||||||
|
char_map = {c: n for n, c in enumerate(chars)}
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def char_value(cls, c):
|
||||||
|
val = cls.char_map.get(c)
|
||||||
|
if val is None:
|
||||||
|
raise Base58Error(f'invalid base 58 character "{c}"')
|
||||||
|
return val
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def decode(cls, txt):
|
||||||
|
""" Decodes txt into a big-endian bytearray. """
|
||||||
|
if isinstance(txt, memoryview):
|
||||||
|
txt = str(txt)
|
||||||
|
|
||||||
|
if isinstance(txt, bytes):
|
||||||
|
txt = txt.decode()
|
||||||
|
|
||||||
|
if not isinstance(txt, str):
|
||||||
|
raise TypeError('a string is required')
|
||||||
|
|
||||||
|
if not txt:
|
||||||
|
raise Base58Error('string cannot be empty')
|
||||||
|
|
||||||
|
value = 0
|
||||||
|
for c in txt:
|
||||||
|
value = value * 58 + cls.char_value(c)
|
||||||
|
|
||||||
|
result = int_to_bytes(value)
|
||||||
|
|
||||||
|
# Prepend leading zero bytes if necessary
|
||||||
|
count = 0
|
||||||
|
for c in txt:
|
||||||
|
if c != '1':
|
||||||
|
break
|
||||||
|
count += 1
|
||||||
|
if count:
|
||||||
|
result = bytes((0,)) * count + result
|
||||||
|
|
||||||
|
return result
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def encode(cls, be_bytes):
|
||||||
|
"""Converts a big-endian bytearray into a base58 string."""
|
||||||
|
value = bytes_to_int(be_bytes)
|
||||||
|
|
||||||
|
txt = ''
|
||||||
|
while value:
|
||||||
|
value, mod = divmod(value, 58)
|
||||||
|
txt += cls.chars[mod]
|
||||||
|
|
||||||
|
for byte in be_bytes:
|
||||||
|
if byte != 0:
|
||||||
|
break
|
||||||
|
txt += '1'
|
||||||
|
|
||||||
|
return txt[::-1]
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def decode_check(cls, txt, hash_fn=double_sha256):
|
||||||
|
""" Decodes a Base58Check-encoded string to a payload. The version prefixes it. """
|
||||||
|
be_bytes = cls.decode(txt)
|
||||||
|
result, check = be_bytes[:-4], be_bytes[-4:]
|
||||||
|
if check != hash_fn(result)[:4]:
|
||||||
|
raise Base58Error(f'invalid base 58 checksum for {txt}')
|
||||||
|
return result
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def encode_check(cls, payload, hash_fn=double_sha256):
|
||||||
|
""" Encodes a payload bytearray (which includes the version byte(s))
|
||||||
|
into a Base58Check string."""
|
||||||
|
be_bytes = payload + hash_fn(payload)[:4]
|
||||||
|
return cls.encode(be_bytes)
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
import os
|
||||||
|
import base64
|
||||||
|
import typing
|
||||||
|
from cryptography.hazmat.primitives.kdf.scrypt import Scrypt
|
||||||
|
from cryptography.hazmat.primitives.ciphers import Cipher, modes
|
||||||
|
from cryptography.hazmat.primitives.ciphers.algorithms import AES
|
||||||
|
from cryptography.hazmat.primitives.padding import PKCS7
|
||||||
|
from cryptography.hazmat.backends import default_backend
|
||||||
|
|
||||||
|
from lbry.error import InvalidPasswordError
|
||||||
|
from lbry.crypto.hash import double_sha256
|
||||||
|
|
||||||
|
|
||||||
|
def aes_encrypt(secret: str, value: str, init_vector: bytes = None) -> str:
|
||||||
|
if init_vector is not None:
|
||||||
|
assert len(init_vector) == 16
|
||||||
|
else:
|
||||||
|
init_vector = os.urandom(16)
|
||||||
|
key = double_sha256(secret.encode())
|
||||||
|
encryptor = Cipher(AES(key), modes.CBC(init_vector), default_backend()).encryptor()
|
||||||
|
padder = PKCS7(AES.block_size).padder()
|
||||||
|
padded_data = padder.update(value.encode()) + padder.finalize()
|
||||||
|
encrypted_data = encryptor.update(padded_data) + encryptor.finalize()
|
||||||
|
return base64.b64encode(init_vector + encrypted_data).decode()
|
||||||
|
|
||||||
|
|
||||||
|
def aes_decrypt(secret: str, value: str) -> typing.Tuple[str, bytes]:
|
||||||
|
try:
|
||||||
|
data = base64.b64decode(value.encode())
|
||||||
|
key = double_sha256(secret.encode())
|
||||||
|
init_vector, data = data[:16], data[16:]
|
||||||
|
decryptor = Cipher(AES(key), modes.CBC(init_vector), default_backend()).decryptor()
|
||||||
|
unpadder = PKCS7(AES.block_size).unpadder()
|
||||||
|
result = unpadder.update(decryptor.update(data)) + unpadder.finalize()
|
||||||
|
return result.decode(), init_vector
|
||||||
|
except UnicodeDecodeError:
|
||||||
|
raise InvalidPasswordError()
|
||||||
|
except ValueError as e:
|
||||||
|
if e.args[0] == 'Invalid padding bytes.':
|
||||||
|
raise InvalidPasswordError()
|
||||||
|
raise
|
||||||
|
|
||||||
|
|
||||||
|
def better_aes_encrypt(secret: str, value: bytes) -> bytes:
|
||||||
|
init_vector = os.urandom(16)
|
||||||
|
key = scrypt(secret.encode(), salt=init_vector)
|
||||||
|
encryptor = Cipher(AES(key), modes.CBC(init_vector), default_backend()).encryptor()
|
||||||
|
padder = PKCS7(AES.block_size).padder()
|
||||||
|
padded_data = padder.update(value) + padder.finalize()
|
||||||
|
encrypted_data = encryptor.update(padded_data) + encryptor.finalize()
|
||||||
|
return base64.b64encode(b's:8192:16:1:' + init_vector + encrypted_data)
|
||||||
|
|
||||||
|
|
||||||
|
def better_aes_decrypt(secret: str, value: bytes) -> bytes:
|
||||||
|
try:
|
||||||
|
data = base64.b64decode(value)
|
||||||
|
_, scryp_n, scrypt_r, scrypt_p, data = data.split(b':', maxsplit=4)
|
||||||
|
init_vector, data = data[:16], data[16:]
|
||||||
|
key = scrypt(secret.encode(), init_vector, int(scryp_n), int(scrypt_r), int(scrypt_p))
|
||||||
|
decryptor = Cipher(AES(key), modes.CBC(init_vector), default_backend()).decryptor()
|
||||||
|
unpadder = PKCS7(AES.block_size).unpadder()
|
||||||
|
return unpadder.update(decryptor.update(data)) + unpadder.finalize()
|
||||||
|
except ValueError as e:
|
||||||
|
if e.args[0] == 'Invalid padding bytes.':
|
||||||
|
raise InvalidPasswordError()
|
||||||
|
raise
|
||||||
|
|
||||||
|
|
||||||
|
def scrypt(passphrase, salt, scrypt_n=1<<13, scrypt_r=16, scrypt_p=1):
|
||||||
|
kdf = Scrypt(salt, length=32, n=scrypt_n, r=scrypt_r, p=scrypt_p, backend=default_backend())
|
||||||
|
return kdf.derive(passphrase)
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
import hashlib
|
||||||
|
import hmac
|
||||||
|
from binascii import hexlify, unhexlify
|
||||||
|
|
||||||
|
|
||||||
|
def sha256(x):
|
||||||
|
""" Simple wrapper of hashlib sha256. """
|
||||||
|
return hashlib.sha256(x).digest()
|
||||||
|
|
||||||
|
|
||||||
|
def sha512(x):
|
||||||
|
""" Simple wrapper of hashlib sha512. """
|
||||||
|
return hashlib.sha512(x).digest()
|
||||||
|
|
||||||
|
|
||||||
|
def ripemd160(x):
|
||||||
|
""" Simple wrapper of hashlib ripemd160. """
|
||||||
|
h = hashlib.new('ripemd160')
|
||||||
|
h.update(x)
|
||||||
|
return h.digest()
|
||||||
|
|
||||||
|
|
||||||
|
def double_sha256(x):
|
||||||
|
""" SHA-256 of SHA-256, as used extensively in bitcoin. """
|
||||||
|
return sha256(sha256(x))
|
||||||
|
|
||||||
|
|
||||||
|
def hmac_sha512(key, msg):
|
||||||
|
""" Use SHA-512 to provide an HMAC. """
|
||||||
|
return hmac.new(key, msg, hashlib.sha512).digest()
|
||||||
|
|
||||||
|
|
||||||
|
def hash160(x):
|
||||||
|
""" RIPEMD-160 of SHA-256.
|
||||||
|
Used to make bitcoin addresses from pubkeys. """
|
||||||
|
return ripemd160(sha256(x))
|
||||||
|
|
||||||
|
|
||||||
|
def hash_to_hex_str(x):
|
||||||
|
""" Convert a big-endian binary hash to displayed hex string.
|
||||||
|
Display form of a binary hash is reversed and converted to hex. """
|
||||||
|
return hexlify(reversed(x))
|
||||||
|
|
||||||
|
|
||||||
|
def hex_str_to_hash(x):
|
||||||
|
""" Convert a displayed hex string to a binary hash. """
|
||||||
|
return reversed(unhexlify(x))
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
from binascii import unhexlify, hexlify
|
||||||
|
|
||||||
|
|
||||||
|
def bytes_to_int(be_bytes):
|
||||||
|
""" Interprets a big-endian sequence of bytes as an integer. """
|
||||||
|
return int(hexlify(be_bytes), 16)
|
||||||
|
|
||||||
|
|
||||||
|
def int_to_bytes(value):
|
||||||
|
""" Converts an integer to a big-endian sequence of bytes. """
|
||||||
|
length = (value.bit_length() + 7) // 8
|
||||||
|
s = '%x' % value
|
||||||
|
return unhexlify(('0' * (len(s) % 2) + s).zfill(length * 2))
|
||||||
@@ -24,7 +24,7 @@ class BlobAnnouncer:
|
|||||||
else:
|
else:
|
||||||
log.debug("failed to announce %s, could only find %d peers, retrying soon.", blob_hash[:8], peers)
|
log.debug("failed to announce %s, could only find %d peers, retrying soon.", blob_hash[:8], peers)
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
if isinstance(err, asyncio.CancelledError):
|
if isinstance(err, asyncio.CancelledError): # TODO: remove when updated to 3.8
|
||||||
raise err
|
raise err
|
||||||
log.warning("error announcing %s: %s", blob_hash[:8], str(err))
|
log.warning("error announcing %s: %s", blob_hash[:8], str(err))
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ class BlobAnnouncer:
|
|||||||
continue
|
continue
|
||||||
self.announce_queue.extend(await self.storage.get_blobs_to_announce())
|
self.announce_queue.extend(await self.storage.get_blobs_to_announce())
|
||||||
log.debug("announcer task wake up, %d blobs to announce", len(self.announce_queue))
|
log.debug("announcer task wake up, %d blobs to announce", len(self.announce_queue))
|
||||||
while len(self.announce_queue):
|
while len(self.announce_queue) > 0:
|
||||||
log.info("%i blobs to announce", len(self.announce_queue))
|
log.info("%i blobs to announce", len(self.announce_queue))
|
||||||
announced = await asyncio.gather(*[
|
announced = await asyncio.gather(*[
|
||||||
self._submit_announcement(
|
self._submit_announcement(
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
import hashlib
|
||||||
|
import os
|
||||||
|
|
||||||
|
HASH_CLASS = hashlib.sha384 # pylint: disable=invalid-name
|
||||||
|
HASH_LENGTH = HASH_CLASS().digest_size
|
||||||
|
HASH_BITS = HASH_LENGTH * 8
|
||||||
|
ALPHA = 5
|
||||||
|
K = 8
|
||||||
|
SPLIT_BUCKETS_UNDER_INDEX = 1
|
||||||
|
REPLACEMENT_CACHE_SIZE = 8
|
||||||
|
RPC_TIMEOUT = 5.0
|
||||||
|
RPC_ATTEMPTS = 5
|
||||||
|
RPC_ATTEMPTS_PRUNING_WINDOW = 600
|
||||||
|
ITERATIVE_LOOKUP_DELAY = RPC_TIMEOUT / 2.0 # TODO: use config val / 2 if rpc timeout is provided
|
||||||
|
REFRESH_INTERVAL = 3600 # 1 hour
|
||||||
|
REPLICATE_INTERVAL = REFRESH_INTERVAL
|
||||||
|
DATA_EXPIRATION = 86400 # 24 hours
|
||||||
|
TOKEN_SECRET_REFRESH_INTERVAL = 300 # 5 minutes
|
||||||
|
MAYBE_PING_DELAY = 300 # 5 minutes
|
||||||
|
CHECK_REFRESH_INTERVAL = REFRESH_INTERVAL / 5
|
||||||
|
RPC_ID_LENGTH = 20
|
||||||
|
PROTOCOL_VERSION = 1
|
||||||
|
BOTTOM_OUT_LIMIT = 3
|
||||||
|
MSG_SIZE_LIMIT = 1400
|
||||||
|
|
||||||
|
|
||||||
|
def digest(data: bytes) -> bytes:
|
||||||
|
h = HASH_CLASS()
|
||||||
|
h.update(data)
|
||||||
|
return h.digest()
|
||||||
|
|
||||||
|
|
||||||
|
def generate_id(num=None) -> bytes:
|
||||||
|
if num is not None:
|
||||||
|
return digest(str(num).encode())
|
||||||
|
else:
|
||||||
|
return digest(os.urandom(32))
|
||||||
|
|
||||||
|
|
||||||
|
def generate_rpc_id(num=None) -> bytes:
|
||||||
|
return generate_id(num)[:RPC_ID_LENGTH]
|
||||||
@@ -1,24 +1,26 @@
|
|||||||
import logging
|
import logging
|
||||||
import asyncio
|
import asyncio
|
||||||
import typing
|
import typing
|
||||||
import binascii
|
import socket
|
||||||
from lbry.utils import resolve_host
|
from lbry.utils import resolve_host
|
||||||
from lbry.dht import constants
|
from lbry.dht import constants
|
||||||
|
from lbry.dht.peer import make_kademlia_peer
|
||||||
from lbry.dht.protocol.distance import Distance
|
from lbry.dht.protocol.distance import Distance
|
||||||
from lbry.dht.protocol.iterative_find import IterativeNodeFinder, IterativeValueFinder
|
from lbry.dht.protocol.iterative_find import IterativeNodeFinder, IterativeValueFinder
|
||||||
from lbry.dht.protocol.protocol import KademliaProtocol
|
from lbry.dht.protocol.protocol import KademliaProtocol
|
||||||
from lbry.dht.peer import KademliaPeer
|
|
||||||
|
|
||||||
if typing.TYPE_CHECKING:
|
if typing.TYPE_CHECKING:
|
||||||
from lbry.dht.peer import PeerManager
|
from lbry.dht.peer import PeerManager
|
||||||
|
from lbry.dht.peer import KademliaPeer
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class Node:
|
class Node:
|
||||||
def __init__(self, loop: asyncio.AbstractEventLoop, peer_manager: 'PeerManager', node_id: bytes, udp_port: int,
|
def __init__(self, loop: asyncio.AbstractEventLoop, peer_manager: 'PeerManager', node_id: bytes, udp_port: int,
|
||||||
internal_udp_port: int, peer_port: int, external_ip: str, rpc_timeout: float = constants.rpc_timeout,
|
internal_udp_port: int, peer_port: int, external_ip: str, rpc_timeout: float = constants.RPC_TIMEOUT,
|
||||||
split_buckets_under_index: int = constants.split_buckets_under_index):
|
split_buckets_under_index: int = constants.SPLIT_BUCKETS_UNDER_INDEX,
|
||||||
|
storage: typing.Optional['SQLiteStorage'] = None):
|
||||||
self.loop = loop
|
self.loop = loop
|
||||||
self.internal_udp_port = internal_udp_port
|
self.internal_udp_port = internal_udp_port
|
||||||
self.protocol = KademliaProtocol(loop, peer_manager, node_id, external_ip, udp_port, peer_port, rpc_timeout,
|
self.protocol = KademliaProtocol(loop, peer_manager, node_id, external_ip, udp_port, peer_port, rpc_timeout,
|
||||||
@@ -27,6 +29,7 @@ class Node:
|
|||||||
self.joined = asyncio.Event(loop=self.loop)
|
self.joined = asyncio.Event(loop=self.loop)
|
||||||
self._join_task: asyncio.Task = None
|
self._join_task: asyncio.Task = None
|
||||||
self._refresh_task: asyncio.Task = None
|
self._refresh_task: asyncio.Task = None
|
||||||
|
self._storage = storage
|
||||||
|
|
||||||
async def refresh_node(self, force_once=False):
|
async def refresh_node(self, force_once=False):
|
||||||
while True:
|
while True:
|
||||||
@@ -36,7 +39,7 @@ class Node:
|
|||||||
total_peers: typing.List['KademliaPeer'] = []
|
total_peers: typing.List['KademliaPeer'] = []
|
||||||
# add all peers in the routing table
|
# add all peers in the routing table
|
||||||
total_peers.extend(self.protocol.routing_table.get_peers())
|
total_peers.extend(self.protocol.routing_table.get_peers())
|
||||||
# add all the peers who have announed blobs to us
|
# add all the peers who have announced blobs to us
|
||||||
total_peers.extend(self.protocol.data_store.get_storing_contacts())
|
total_peers.extend(self.protocol.data_store.get_storing_contacts())
|
||||||
|
|
||||||
# get ids falling in the midpoint of each bucket that hasn't been recently updated
|
# get ids falling in the midpoint of each bucket that hasn't been recently updated
|
||||||
@@ -58,7 +61,7 @@ class Node:
|
|||||||
if force_once:
|
if force_once:
|
||||||
break
|
break
|
||||||
fut = asyncio.Future(loop=self.loop)
|
fut = asyncio.Future(loop=self.loop)
|
||||||
self.loop.call_later(constants.refresh_interval // 4, fut.set_result, None)
|
self.loop.call_later(constants.REFRESH_INTERVAL // 4, fut.set_result, None)
|
||||||
await fut
|
await fut
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@@ -66,16 +69,18 @@ class Node:
|
|||||||
to_ping = [peer for peer in set(total_peers) if self.protocol.peer_manager.peer_is_good(peer) is not True]
|
to_ping = [peer for peer in set(total_peers) if self.protocol.peer_manager.peer_is_good(peer) is not True]
|
||||||
if to_ping:
|
if to_ping:
|
||||||
self.protocol.ping_queue.enqueue_maybe_ping(*to_ping, delay=0)
|
self.protocol.ping_queue.enqueue_maybe_ping(*to_ping, delay=0)
|
||||||
|
if self._storage:
|
||||||
|
await self._storage.save_kademlia_peers(self.protocol.routing_table.get_peers())
|
||||||
if force_once:
|
if force_once:
|
||||||
break
|
break
|
||||||
|
|
||||||
fut = asyncio.Future(loop=self.loop)
|
fut = asyncio.Future(loop=self.loop)
|
||||||
self.loop.call_later(constants.refresh_interval, fut.set_result, None)
|
self.loop.call_later(constants.REFRESH_INTERVAL, fut.set_result, None)
|
||||||
await fut
|
await fut
|
||||||
|
|
||||||
async def announce_blob(self, blob_hash: str) -> typing.List[bytes]:
|
async def announce_blob(self, blob_hash: str) -> typing.List[bytes]:
|
||||||
hash_value = binascii.unhexlify(blob_hash.encode())
|
hash_value = bytes.fromhex(blob_hash)
|
||||||
assert len(hash_value) == constants.hash_length
|
assert len(hash_value) == constants.HASH_LENGTH
|
||||||
peers = await self.peer_search(hash_value)
|
peers = await self.peer_search(hash_value)
|
||||||
|
|
||||||
if not self.protocol.external_ip:
|
if not self.protocol.external_ip:
|
||||||
@@ -88,8 +93,10 @@ class Node:
|
|||||||
)
|
)
|
||||||
stored_to = [node_id for node_id, contacted in stored_to_tup if contacted]
|
stored_to = [node_id for node_id, contacted in stored_to_tup if contacted]
|
||||||
if stored_to:
|
if stored_to:
|
||||||
log.debug("Stored %s to %i of %i attempted peers", binascii.hexlify(hash_value).decode()[:8],
|
log.debug(
|
||||||
len(stored_to), len(peers))
|
"Stored %s to %i of %i attempted peers", hash_value.hex()[:8],
|
||||||
|
len(stored_to), len(peers)
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
log.debug("Failed announcing %s, stored to 0 peers", blob_hash[:8])
|
log.debug("Failed announcing %s, stored to 0 peers", blob_hash[:8])
|
||||||
return stored_to
|
return stored_to
|
||||||
@@ -110,7 +117,7 @@ class Node:
|
|||||||
self.listening_port = None
|
self.listening_port = None
|
||||||
log.info("Stopped DHT node")
|
log.info("Stopped DHT node")
|
||||||
|
|
||||||
async def start_listening(self, interface: str = '') -> None:
|
async def start_listening(self, interface: str = '0.0.0.0') -> None:
|
||||||
if not self.listening_port:
|
if not self.listening_port:
|
||||||
self.listening_port, _ = await self.loop.create_datagram_endpoint(
|
self.listening_port, _ = await self.loop.create_datagram_endpoint(
|
||||||
lambda: self.protocol, (interface, self.internal_udp_port)
|
lambda: self.protocol, (interface, self.internal_udp_port)
|
||||||
@@ -120,60 +127,57 @@ class Node:
|
|||||||
else:
|
else:
|
||||||
log.warning("Already bound to port %s", self.listening_port)
|
log.warning("Already bound to port %s", self.listening_port)
|
||||||
|
|
||||||
async def join_network(self, interface: typing.Optional[str] = '',
|
async def join_network(self, interface: str = '0.0.0.0',
|
||||||
known_node_urls: typing.Optional[typing.List[typing.Tuple[str, int]]] = None):
|
known_node_urls: typing.Optional[typing.List[typing.Tuple[str, int]]] = None):
|
||||||
|
def peers_from_urls(urls: typing.Optional[typing.List[typing.Tuple[bytes, str, int, int]]]):
|
||||||
|
peer_addresses = []
|
||||||
|
for node_id, address, udp_port, tcp_port in urls:
|
||||||
|
if (node_id, address, udp_port, tcp_port) not in peer_addresses and \
|
||||||
|
(address, udp_port) != (self.protocol.external_ip, self.protocol.udp_port):
|
||||||
|
peer_addresses.append((node_id, address, udp_port, tcp_port))
|
||||||
|
return [make_kademlia_peer(*peer_address) for peer_address in peer_addresses]
|
||||||
|
|
||||||
if not self.listening_port:
|
if not self.listening_port:
|
||||||
await self.start_listening(interface)
|
await self.start_listening(interface)
|
||||||
self.protocol.ping_queue.start()
|
self.protocol.ping_queue.start()
|
||||||
self._refresh_task = self.loop.create_task(self.refresh_node())
|
self._refresh_task = self.loop.create_task(self.refresh_node())
|
||||||
|
|
||||||
# resolve the known node urls
|
while True:
|
||||||
known_node_addresses = []
|
if self.protocol.routing_table.get_peers():
|
||||||
url_to_addr = {}
|
if not self.joined.is_set():
|
||||||
|
self.joined.set()
|
||||||
if known_node_urls:
|
log.info(
|
||||||
for host, port in known_node_urls:
|
"joined dht, %i peers known in %i buckets", len(self.protocol.routing_table.get_peers()),
|
||||||
address = await resolve_host(host, port, proto='udp')
|
self.protocol.routing_table.buckets_with_contacts()
|
||||||
if (address, port) not in known_node_addresses and\
|
)
|
||||||
(address, port) != (self.protocol.external_ip, self.protocol.udp_port):
|
else:
|
||||||
known_node_addresses.append((address, port))
|
if self.joined.is_set():
|
||||||
url_to_addr[address] = host
|
self.joined.clear()
|
||||||
|
seed_peers = peers_from_urls(
|
||||||
if known_node_addresses:
|
await self._storage.get_persisted_kademlia_peers()
|
||||||
peers = [
|
) if self._storage else []
|
||||||
KademliaPeer(self.loop, address, udp_port=port)
|
if not seed_peers:
|
||||||
for (address, port) in known_node_addresses
|
try:
|
||||||
]
|
seed_peers.extend(peers_from_urls([
|
||||||
while True:
|
(None, await resolve_host(address, udp_port, 'udp'), udp_port, None)
|
||||||
if not self.protocol.routing_table.get_peers():
|
for address, udp_port in known_node_urls or []
|
||||||
if self.joined.is_set():
|
]))
|
||||||
self.joined.clear()
|
except socket.gaierror:
|
||||||
self.protocol.peer_manager.reset()
|
await asyncio.sleep(30, loop=self.loop)
|
||||||
self.protocol.ping_queue.enqueue_maybe_ping(*peers, delay=0.0)
|
|
||||||
peers.extend(await self.peer_search(self.protocol.node_id, shortlist=peers, count=32))
|
|
||||||
if self.protocol.routing_table.get_peers():
|
|
||||||
self.joined.set()
|
|
||||||
log.info(
|
|
||||||
"Joined DHT, %i peers known in %i buckets", len(self.protocol.routing_table.get_peers()),
|
|
||||||
self.protocol.routing_table.buckets_with_contacts())
|
|
||||||
else:
|
|
||||||
continue
|
continue
|
||||||
await asyncio.sleep(1, loop=self.loop)
|
|
||||||
|
|
||||||
log.info("Joined DHT, %i peers known in %i buckets", len(self.protocol.routing_table.get_peers()),
|
self.protocol.peer_manager.reset()
|
||||||
self.protocol.routing_table.buckets_with_contacts())
|
self.protocol.ping_queue.enqueue_maybe_ping(*seed_peers, delay=0.0)
|
||||||
self.joined.set()
|
await self.peer_search(self.protocol.node_id, shortlist=seed_peers, count=32)
|
||||||
|
|
||||||
def start(self, interface: str, known_node_urls: typing.List[typing.Tuple[str, int]]):
|
await asyncio.sleep(1, loop=self.loop)
|
||||||
self._join_task = self.loop.create_task(
|
|
||||||
self.join_network(
|
def start(self, interface: str, known_node_urls: typing.Optional[typing.List[typing.Tuple[str, int]]] = None):
|
||||||
interface=interface, known_node_urls=known_node_urls
|
self._join_task = self.loop.create_task(self.join_network(interface, known_node_urls))
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
def get_iterative_node_finder(self, key: bytes, shortlist: typing.Optional[typing.List['KademliaPeer']] = None,
|
def get_iterative_node_finder(self, key: bytes, shortlist: typing.Optional[typing.List['KademliaPeer']] = None,
|
||||||
bottom_out_limit: int = constants.bottom_out_limit,
|
bottom_out_limit: int = constants.BOTTOM_OUT_LIMIT,
|
||||||
max_results: int = constants.k) -> IterativeNodeFinder:
|
max_results: int = constants.K) -> IterativeNodeFinder:
|
||||||
|
|
||||||
return IterativeNodeFinder(self.loop, self.protocol.peer_manager, self.protocol.routing_table, self.protocol,
|
return IterativeNodeFinder(self.loop, self.protocol.peer_manager, self.protocol.routing_table, self.protocol,
|
||||||
key, bottom_out_limit, max_results, None, shortlist)
|
key, bottom_out_limit, max_results, None, shortlist)
|
||||||
@@ -185,7 +189,7 @@ class Node:
|
|||||||
return IterativeValueFinder(self.loop, self.protocol.peer_manager, self.protocol.routing_table, self.protocol,
|
return IterativeValueFinder(self.loop, self.protocol.peer_manager, self.protocol.routing_table, self.protocol,
|
||||||
key, bottom_out_limit, max_results, None, shortlist)
|
key, bottom_out_limit, max_results, None, shortlist)
|
||||||
|
|
||||||
async def peer_search(self, node_id: bytes, count=constants.k, max_results=constants.k*2,
|
async def peer_search(self, node_id: bytes, count=constants.K, max_results=constants.K * 2,
|
||||||
bottom_out_limit=20, shortlist: typing.Optional[typing.List['KademliaPeer']] = None
|
bottom_out_limit=20, shortlist: typing.Optional[typing.List['KademliaPeer']] = None
|
||||||
) -> typing.List['KademliaPeer']:
|
) -> typing.List['KademliaPeer']:
|
||||||
peers = []
|
peers = []
|
||||||
@@ -196,51 +200,60 @@ class Node:
|
|||||||
peers.sort(key=lambda peer: distance(peer.node_id))
|
peers.sort(key=lambda peer: distance(peer.node_id))
|
||||||
return peers[:count]
|
return peers[:count]
|
||||||
|
|
||||||
async def _accumulate_search_junction(self, search_queue: asyncio.Queue,
|
async def _accumulate_peers_for_value(self, search_queue: asyncio.Queue, result_queue: asyncio.Queue):
|
||||||
result_queue: asyncio.Queue):
|
|
||||||
tasks = []
|
tasks = []
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
blob_hash = await search_queue.get()
|
blob_hash = await search_queue.get()
|
||||||
tasks.append(self.loop.create_task(self._value_producer(blob_hash, result_queue)))
|
tasks.append(self.loop.create_task(self._peers_for_value_producer(blob_hash, result_queue)))
|
||||||
finally:
|
finally:
|
||||||
for task in tasks:
|
for task in tasks:
|
||||||
task.cancel()
|
task.cancel()
|
||||||
|
|
||||||
async def _value_producer(self, blob_hash: str, result_queue: asyncio.Queue):
|
async def _peers_for_value_producer(self, blob_hash: str, result_queue: asyncio.Queue):
|
||||||
async def ping(_peer):
|
async def put_into_result_queue_after_pong(_peer):
|
||||||
try:
|
try:
|
||||||
await self.protocol.get_rpc_peer(_peer).ping()
|
await self.protocol.get_rpc_peer(_peer).ping()
|
||||||
result_queue.put_nowait([_peer])
|
result_queue.put_nowait([_peer])
|
||||||
|
log.debug("pong from %s:%i for %s", _peer.address, _peer.udp_port, blob_hash)
|
||||||
except asyncio.TimeoutError:
|
except asyncio.TimeoutError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
async for results in self.get_iterative_value_finder(binascii.unhexlify(blob_hash.encode())):
|
# prioritize peers who reply to a dht ping first
|
||||||
|
# this minimizes attempting to make tcp connections that won't work later to dead or unreachable peers
|
||||||
|
|
||||||
|
async for results in self.get_iterative_value_finder(bytes.fromhex(blob_hash)):
|
||||||
to_put = []
|
to_put = []
|
||||||
for peer in results:
|
for peer in results:
|
||||||
if peer.address == self.protocol.external_ip and self.protocol.peer_port == peer.tcp_port:
|
if peer.address == self.protocol.external_ip and self.protocol.peer_port == peer.tcp_port:
|
||||||
continue
|
continue
|
||||||
is_good = self.protocol.peer_manager.peer_is_good(peer)
|
is_good = self.protocol.peer_manager.peer_is_good(peer)
|
||||||
if is_good:
|
if is_good:
|
||||||
|
# the peer has replied recently over UDP, it can probably be reached on the TCP port
|
||||||
to_put.append(peer)
|
to_put.append(peer)
|
||||||
elif is_good is None:
|
elif is_good is None:
|
||||||
udp_port_to_try = 4444
|
|
||||||
if 3400 > peer.tcp_port > 3332:
|
|
||||||
if not peer.udp_port:
|
|
||||||
udp_port_to_try = (peer.tcp_port - 3333) + 4444
|
|
||||||
elif 4500 > peer.tcp_port > 4443:
|
|
||||||
if not peer.udp_port:
|
|
||||||
udp_port_to_try = peer.tcp_port
|
|
||||||
if not peer.udp_port:
|
if not peer.udp_port:
|
||||||
peer.update_udp_port(udp_port_to_try)
|
# TODO: use the same port for TCP and UDP
|
||||||
self.loop.create_task(ping(peer))
|
# the udp port must be guessed
|
||||||
|
# default to the ports being the same. if the TCP port appears to be <=0.48.0 default,
|
||||||
|
# including on a network with several nodes, then assume the udp port is proportionately
|
||||||
|
# based on a starting port of 4444
|
||||||
|
udp_port_to_try = peer.tcp_port
|
||||||
|
if 3400 > peer.tcp_port > 3332:
|
||||||
|
udp_port_to_try = (peer.tcp_port - 3333) + 4444
|
||||||
|
self.loop.create_task(put_into_result_queue_after_pong(
|
||||||
|
make_kademlia_peer(peer.node_id, peer.address, udp_port_to_try, peer.tcp_port)
|
||||||
|
))
|
||||||
|
else:
|
||||||
|
self.loop.create_task(put_into_result_queue_after_pong(peer))
|
||||||
else:
|
else:
|
||||||
|
# the peer is known to be bad/unreachable, skip trying to connect to it over TCP
|
||||||
log.debug("skip bad peer %s:%i for %s", peer.address, peer.tcp_port, blob_hash)
|
log.debug("skip bad peer %s:%i for %s", peer.address, peer.tcp_port, blob_hash)
|
||||||
if to_put:
|
if to_put:
|
||||||
result_queue.put_nowait(to_put)
|
result_queue.put_nowait(to_put)
|
||||||
|
|
||||||
def accumulate_peers(self, search_queue: asyncio.Queue,
|
def accumulate_peers(self, search_queue: asyncio.Queue,
|
||||||
peer_queue: typing.Optional[asyncio.Queue] = None) -> typing.Tuple[
|
peer_queue: typing.Optional[asyncio.Queue] = None
|
||||||
asyncio.Queue, asyncio.Task]:
|
) -> typing.Tuple[asyncio.Queue, asyncio.Task]:
|
||||||
q = peer_queue or asyncio.Queue(loop=self.loop)
|
queue = peer_queue or asyncio.Queue(loop=self.loop)
|
||||||
return q, self.loop.create_task(self._accumulate_search_junction(search_queue, q))
|
return queue, self.loop.create_task(self._accumulate_peers_for_value(search_queue, queue))
|
||||||
@@ -1,22 +1,27 @@
|
|||||||
import typing
|
import typing
|
||||||
import asyncio
|
import asyncio
|
||||||
import logging
|
import logging
|
||||||
import ipaddress
|
from dataclasses import dataclass, field
|
||||||
from binascii import hexlify
|
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
|
from lbry.utils import is_valid_public_ipv4 as _is_valid_public_ipv4, LRUCache
|
||||||
from lbry.dht import constants
|
from lbry.dht import constants
|
||||||
from lbry.dht.serialization.datagram import make_compact_address, make_compact_ip, decode_compact_address
|
from lbry.dht.serialization.datagram import make_compact_address, make_compact_ip, decode_compact_address
|
||||||
|
|
||||||
|
ALLOW_LOCALHOST = False
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def is_valid_ipv4(address):
|
@lru_cache(1024)
|
||||||
try:
|
def make_kademlia_peer(node_id: typing.Optional[bytes], address: typing.Optional[str],
|
||||||
ip = ipaddress.ip_address(address)
|
udp_port: typing.Optional[int] = None,
|
||||||
return ip.version == 4
|
tcp_port: typing.Optional[int] = None,
|
||||||
except ipaddress.AddressValueError:
|
allow_localhost: bool = False) -> 'KademliaPeer':
|
||||||
return False
|
return KademliaPeer(address, node_id, udp_port, tcp_port=tcp_port, allow_localhost=allow_localhost)
|
||||||
|
|
||||||
|
|
||||||
|
def is_valid_public_ipv4(address, allow_localhost: bool = False):
|
||||||
|
allow_localhost = bool(allow_localhost or ALLOW_LOCALHOST)
|
||||||
|
return _is_valid_public_ipv4(address, allow_localhost)
|
||||||
|
|
||||||
|
|
||||||
class PeerManager:
|
class PeerManager:
|
||||||
@@ -25,12 +30,12 @@ class PeerManager:
|
|||||||
self._rpc_failures: typing.Dict[
|
self._rpc_failures: typing.Dict[
|
||||||
typing.Tuple[str, int], typing.Tuple[typing.Optional[float], typing.Optional[float]]
|
typing.Tuple[str, int], typing.Tuple[typing.Optional[float], typing.Optional[float]]
|
||||||
] = {}
|
] = {}
|
||||||
self._last_replied: typing.Dict[typing.Tuple[str, int], float] = {}
|
self._last_replied: typing.Dict[typing.Tuple[str, int], float] = LRUCache(2048)
|
||||||
self._last_sent: typing.Dict[typing.Tuple[str, int], float] = {}
|
self._last_sent: typing.Dict[typing.Tuple[str, int], float] = LRUCache(2048)
|
||||||
self._last_requested: typing.Dict[typing.Tuple[str, int], float] = {}
|
self._last_requested: typing.Dict[typing.Tuple[str, int], float] = LRUCache(2048)
|
||||||
self._node_id_mapping: typing.Dict[typing.Tuple[str, int], bytes] = {}
|
self._node_id_mapping: typing.Dict[typing.Tuple[str, int], bytes] = LRUCache(2048)
|
||||||
self._node_id_reverse_mapping: typing.Dict[bytes, typing.Tuple[str, int]] = {}
|
self._node_id_reverse_mapping: typing.Dict[bytes, typing.Tuple[str, int]] = LRUCache(2048)
|
||||||
self._node_tokens: typing.Dict[bytes, (float, bytes)] = {}
|
self._node_tokens: typing.Dict[bytes, (float, bytes)] = LRUCache(2048)
|
||||||
|
|
||||||
def reset(self):
|
def reset(self):
|
||||||
for statistic in (self._rpc_failures, self._last_replied, self._last_sent, self._last_requested):
|
for statistic in (self._rpc_failures, self._last_replied, self._last_sent, self._last_requested):
|
||||||
@@ -62,7 +67,7 @@ class PeerManager:
|
|||||||
|
|
||||||
def get_node_token(self, node_id: bytes) -> typing.Optional[bytes]:
|
def get_node_token(self, node_id: bytes) -> typing.Optional[bytes]:
|
||||||
ts, token = self._node_tokens.get(node_id, (0, None))
|
ts, token = self._node_tokens.get(node_id, (0, None))
|
||||||
if ts and ts > self._loop.time() - constants.token_secret_refresh_interval:
|
if ts and ts > self._loop.time() - constants.TOKEN_SECRET_REFRESH_INTERVAL:
|
||||||
return token
|
return token
|
||||||
|
|
||||||
def get_last_replied(self, address: str, udp_port: int) -> typing.Optional[float]:
|
def get_last_replied(self, address: str, udp_port: int) -> typing.Optional[float]:
|
||||||
@@ -81,41 +86,39 @@ class PeerManager:
|
|||||||
self._node_id_mapping[(address, udp_port)] = node_id
|
self._node_id_mapping[(address, udp_port)] = node_id
|
||||||
self._node_id_reverse_mapping[node_id] = (address, udp_port)
|
self._node_id_reverse_mapping[node_id] = (address, udp_port)
|
||||||
|
|
||||||
@lru_cache(maxsize=400)
|
|
||||||
def get_kademlia_peer(self, node_id: bytes, address: str, udp_port: int) -> 'KademliaPeer':
|
|
||||||
return KademliaPeer(self._loop, address, node_id, udp_port)
|
|
||||||
|
|
||||||
def prune(self): # TODO: periodically call this
|
def prune(self): # TODO: periodically call this
|
||||||
now = self._loop.time()
|
now = self._loop.time()
|
||||||
to_pop = []
|
to_pop = []
|
||||||
for (address, udp_port), (_, last_failure) in self._rpc_failures.items():
|
for (address, udp_port), (_, last_failure) in self._rpc_failures.items():
|
||||||
if last_failure and last_failure < now - constants.rpc_attempts_pruning_window:
|
if last_failure and last_failure < now - constants.RPC_ATTEMPTS_PRUNING_WINDOW:
|
||||||
to_pop.append((address, udp_port))
|
to_pop.append((address, udp_port))
|
||||||
while to_pop:
|
while to_pop:
|
||||||
del self._rpc_failures[to_pop.pop()]
|
del self._rpc_failures[to_pop.pop()]
|
||||||
to_pop = []
|
to_pop = []
|
||||||
for node_id, (age, token) in self._node_tokens.items():
|
for node_id, (age, token) in self._node_tokens.items(): # pylint: disable=unused-variable
|
||||||
if age < now - constants.token_secret_refresh_interval:
|
if age < now - constants.TOKEN_SECRET_REFRESH_INTERVAL:
|
||||||
to_pop.append(node_id)
|
to_pop.append(node_id)
|
||||||
while to_pop:
|
while to_pop:
|
||||||
del self._node_tokens[to_pop.pop()]
|
del self._node_tokens[to_pop.pop()]
|
||||||
|
|
||||||
def contact_triple_is_good(self, node_id: bytes, address: str, udp_port: int):
|
def contact_triple_is_good(self, node_id: bytes, address: str, udp_port: int): # pylint: disable=too-many-return-statements
|
||||||
"""
|
"""
|
||||||
:return: False if peer is bad, None if peer is unknown, or True if peer is good
|
:return: False if peer is bad, None if peer is unknown, or True if peer is good
|
||||||
"""
|
"""
|
||||||
|
|
||||||
delay = self._loop.time() - constants.check_refresh_interval
|
delay = self._loop.time() - constants.CHECK_REFRESH_INTERVAL
|
||||||
|
|
||||||
# fixme: find a way to re-enable that without breaking other parts
|
# fixme: find a way to re-enable that without breaking other parts
|
||||||
#if node_id not in self._node_id_reverse_mapping or (address, udp_port) not in self._node_id_mapping:
|
# if node_id not in self._node_id_reverse_mapping or (address, udp_port) not in self._node_id_mapping:
|
||||||
# return
|
# return
|
||||||
#addr_tup = (address, udp_port)
|
# addr_tup = (address, udp_port)
|
||||||
#if self._node_id_reverse_mapping[node_id] != addr_tup or self._node_id_mapping[addr_tup] != node_id:
|
# if self._node_id_reverse_mapping[node_id] != addr_tup or self._node_id_mapping[addr_tup] != node_id:
|
||||||
# return
|
# return
|
||||||
previous_failure, most_recent_failure = self._rpc_failures.get((address, udp_port), (None, None))
|
previous_failure, most_recent_failure = self._rpc_failures.get((address, udp_port), (None, None))
|
||||||
last_requested = self._last_requested.get((address, udp_port))
|
last_requested = self._last_requested.get((address, udp_port))
|
||||||
last_replied = self._last_replied.get((address, udp_port))
|
last_replied = self._last_replied.get((address, udp_port))
|
||||||
|
if node_id is None:
|
||||||
|
return None
|
||||||
if most_recent_failure and last_replied:
|
if most_recent_failure and last_replied:
|
||||||
if delay < last_replied > most_recent_failure:
|
if delay < last_replied > most_recent_failure:
|
||||||
return True
|
return True
|
||||||
@@ -133,49 +136,34 @@ class PeerManager:
|
|||||||
def peer_is_good(self, peer: 'KademliaPeer'):
|
def peer_is_good(self, peer: 'KademliaPeer'):
|
||||||
return self.contact_triple_is_good(peer.node_id, peer.address, peer.udp_port)
|
return self.contact_triple_is_good(peer.node_id, peer.address, peer.udp_port)
|
||||||
|
|
||||||
def decode_tcp_peer_from_compact_address(self, compact_address: bytes) -> 'KademliaPeer':
|
def decode_tcp_peer_from_compact_address(self, compact_address: bytes) -> 'KademliaPeer': # pylint: disable=no-self-use
|
||||||
node_id, address, tcp_port = decode_compact_address(compact_address)
|
node_id, address, tcp_port = decode_compact_address(compact_address)
|
||||||
return KademliaPeer(self._loop, address, node_id, tcp_port=tcp_port)
|
return make_kademlia_peer(node_id, address, udp_port=None, tcp_port=tcp_port)
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(unsafe_hash=True)
|
||||||
class KademliaPeer:
|
class KademliaPeer:
|
||||||
__slots__ = [
|
address: str = field(hash=True)
|
||||||
'loop',
|
_node_id: typing.Optional[bytes] = field(hash=True)
|
||||||
'_node_id',
|
udp_port: typing.Optional[int] = field(hash=True)
|
||||||
'address',
|
tcp_port: typing.Optional[int] = field(compare=False, hash=False)
|
||||||
'udp_port',
|
protocol_version: typing.Optional[int] = field(default=1, compare=False, hash=False)
|
||||||
'tcp_port',
|
allow_localhost: bool = field(default=False, compare=False, hash=False)
|
||||||
'protocol_version',
|
|
||||||
]
|
|
||||||
|
|
||||||
def __init__(self, loop: asyncio.AbstractEventLoop, address: str, node_id: typing.Optional[bytes] = None,
|
def __post_init__(self):
|
||||||
udp_port: typing.Optional[int] = None, tcp_port: typing.Optional[int] = None):
|
if self._node_id is not None:
|
||||||
if node_id is not None:
|
if not len(self._node_id) == constants.HASH_LENGTH:
|
||||||
if not len(node_id) == constants.hash_length:
|
raise ValueError("invalid node_id: {}".format(self._node_id.hex()))
|
||||||
raise ValueError("invalid node_id: {}".format(hexlify(node_id).decode()))
|
if self.udp_port is not None and not 1024 <= self.udp_port <= 65535:
|
||||||
if udp_port is not None and not 0 <= udp_port <= 65536:
|
raise ValueError(f"invalid udp port: {self.address}:{self.udp_port}")
|
||||||
raise ValueError("invalid udp port")
|
if self.tcp_port is not None and not 1024 <= self.tcp_port <= 65535:
|
||||||
if tcp_port and not 0 <= tcp_port <= 65536:
|
raise ValueError(f"invalid tcp port: {self.address}:{self.tcp_port}")
|
||||||
raise ValueError("invalid tcp port")
|
if not is_valid_public_ipv4(self.address, self.allow_localhost):
|
||||||
if not is_valid_ipv4(address):
|
raise ValueError(f"invalid ip address: '{self.address}'")
|
||||||
raise ValueError("invalid ip address")
|
|
||||||
self.loop = loop
|
|
||||||
self._node_id = node_id
|
|
||||||
self.address = address
|
|
||||||
self.udp_port = udp_port
|
|
||||||
self.tcp_port = tcp_port
|
|
||||||
self.protocol_version = 1
|
|
||||||
|
|
||||||
def update_tcp_port(self, tcp_port: int):
|
def update_tcp_port(self, tcp_port: int):
|
||||||
self.tcp_port = tcp_port
|
self.tcp_port = tcp_port
|
||||||
|
|
||||||
def update_udp_port(self, udp_port: int):
|
|
||||||
self.udp_port = udp_port
|
|
||||||
|
|
||||||
def set_id(self, node_id):
|
|
||||||
if not self._node_id:
|
|
||||||
self._node_id = node_id
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def node_id(self) -> bytes:
|
def node_id(self) -> bytes:
|
||||||
return self._node_id
|
return self._node_id
|
||||||
@@ -188,11 +176,3 @@ class KademliaPeer:
|
|||||||
|
|
||||||
def compact_ip(self):
|
def compact_ip(self):
|
||||||
return make_compact_ip(self.address)
|
return make_compact_ip(self.address)
|
||||||
|
|
||||||
def __eq__(self, other):
|
|
||||||
if not isinstance(other, KademliaPeer):
|
|
||||||
raise TypeError("invalid type to compare with Peer: %s" % str(type(other)))
|
|
||||||
return (self.node_id, self.address, self.udp_port) == (other.node_id, other.address, other.udp_port)
|
|
||||||
|
|
||||||
def __hash__(self):
|
|
||||||
return hash((self.node_id, self.address, self.udp_port))
|
|
||||||
@@ -16,13 +16,16 @@ class DictDataStore:
|
|||||||
self._peer_manager = peer_manager
|
self._peer_manager = peer_manager
|
||||||
self.completed_blobs: typing.Set[str] = set()
|
self.completed_blobs: typing.Set[str] = set()
|
||||||
|
|
||||||
|
def __len__(self):
|
||||||
|
return self._data_store.__len__()
|
||||||
|
|
||||||
def removed_expired_peers(self):
|
def removed_expired_peers(self):
|
||||||
now = self.loop.time()
|
now = self.loop.time()
|
||||||
keys = list(self._data_store.keys())
|
keys = list(self._data_store.keys())
|
||||||
for key in keys:
|
for key in keys:
|
||||||
to_remove = []
|
to_remove = []
|
||||||
for (peer, ts) in self._data_store[key]:
|
for (peer, ts) in self._data_store[key]:
|
||||||
if ts + constants.data_expiration < now or self._peer_manager.peer_is_good(peer) is False:
|
if ts + constants.DATA_EXPIRATION < now or self._peer_manager.peer_is_good(peer) is False:
|
||||||
to_remove.append((peer, ts))
|
to_remove.append((peer, ts))
|
||||||
for item in to_remove:
|
for item in to_remove:
|
||||||
self._data_store[key].remove(item)
|
self._data_store[key].remove(item)
|
||||||
@@ -43,7 +46,7 @@ class DictDataStore:
|
|||||||
"""
|
"""
|
||||||
now = self.loop.time()
|
now = self.loop.time()
|
||||||
for (peer, ts) in self._data_store.get(key, []):
|
for (peer, ts) in self._data_store.get(key, []):
|
||||||
if ts + constants.data_expiration > now:
|
if ts + constants.DATA_EXPIRATION > now:
|
||||||
yield peer
|
yield peer
|
||||||
|
|
||||||
def has_peers_for_blob(self, key: bytes) -> bool:
|
def has_peers_for_blob(self, key: bytes) -> bool:
|
||||||
@@ -53,7 +56,7 @@ class DictDataStore:
|
|||||||
now = self.loop.time()
|
now = self.loop.time()
|
||||||
if key in self._data_store:
|
if key in self._data_store:
|
||||||
current = list(filter(lambda x: x[0] == contact, self._data_store[key]))
|
current = list(filter(lambda x: x[0] == contact, self._data_store[key]))
|
||||||
if len(current):
|
if len(current) > 0:
|
||||||
self._data_store[key][self._data_store[key].index(current[0])] = contact, now
|
self._data_store[key][self._data_store[key].index(current[0])] = contact, now
|
||||||
else:
|
else:
|
||||||
self._data_store[key].append((contact, now))
|
self._data_store[key].append((contact, now))
|
||||||
@@ -65,6 +68,6 @@ class DictDataStore:
|
|||||||
|
|
||||||
def get_storing_contacts(self) -> typing.List['KademliaPeer']:
|
def get_storing_contacts(self) -> typing.List['KademliaPeer']:
|
||||||
peers = set()
|
peers = set()
|
||||||
for key, stored in self._data_store.items():
|
for _, stored in self._data_store.items():
|
||||||
peers.update(set(map(lambda tup: tup[0], stored)))
|
peers.update(set(map(lambda tup: tup[0], stored)))
|
||||||
return list(peers)
|
return list(peers)
|
||||||
@@ -9,17 +9,17 @@ class Distance:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, key: bytes):
|
def __init__(self, key: bytes):
|
||||||
if len(key) != constants.hash_length:
|
if len(key) != constants.HASH_LENGTH:
|
||||||
raise ValueError(f"invalid key length: {len(key)}")
|
raise ValueError(f"invalid key length: {len(key)}")
|
||||||
self.key = key
|
self.key = key
|
||||||
self.val_key_one = int.from_bytes(key, 'big')
|
self.val_key_one = int.from_bytes(key, 'big')
|
||||||
|
|
||||||
def __call__(self, key_two: bytes) -> int:
|
def __call__(self, key_two: bytes) -> int:
|
||||||
if len(key_two) != constants.hash_length:
|
if len(key_two) != constants.HASH_LENGTH:
|
||||||
raise ValueError(f"invalid length of key to compare: {len(key_two)}")
|
raise ValueError(f"invalid length of key to compare: {len(key_two)}")
|
||||||
val_key_two = int.from_bytes(key_two, 'big')
|
val_key_two = int.from_bytes(key_two, 'big')
|
||||||
return self.val_key_one ^ val_key_two
|
return self.val_key_one ^ val_key_two
|
||||||
|
|
||||||
def is_closer(self, a: bytes, b: bytes) -> bool:
|
def is_closer(self, key_a: bytes, key_b: bytes) -> bool:
|
||||||
"""Returns true is `a` is closer to `key` than `b` is"""
|
"""Returns true is `key_a` is closer to `key` than `key_b` is"""
|
||||||
return self(a) < self(b)
|
return self(key_a) < self(key_b)
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
from binascii import hexlify
|
|
||||||
from itertools import chain
|
from itertools import chain
|
||||||
|
from collections import defaultdict
|
||||||
import typing
|
import typing
|
||||||
import logging
|
import logging
|
||||||
|
from typing import TYPE_CHECKING
|
||||||
from lbry.dht import constants
|
from lbry.dht import constants
|
||||||
from lbry.dht.error import RemoteException, TransportNotConnected
|
from lbry.dht.error import RemoteException, TransportNotConnected
|
||||||
from lbry.dht.protocol.distance import Distance
|
from lbry.dht.protocol.distance import Distance
|
||||||
|
from lbry.dht.peer import make_kademlia_peer
|
||||||
|
from lbry.dht.serialization.datagram import PAGE_KEY
|
||||||
|
|
||||||
from typing import TYPE_CHECKING
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from lbry.dht.protocol.routing_table import TreeRoutingTable
|
from lbry.dht.protocol.routing_table import TreeRoutingTable
|
||||||
from lbry.dht.protocol.protocol import KademliaProtocol
|
from lbry.dht.protocol.protocol import KademliaProtocol
|
||||||
@@ -45,6 +46,7 @@ class FindValueResponse(FindResponse):
|
|||||||
self.token = result_dict[b'token']
|
self.token = result_dict[b'token']
|
||||||
self.close_triples: typing.List[typing.Tuple[bytes, bytes, int]] = result_dict.get(b'contacts', [])
|
self.close_triples: typing.List[typing.Tuple[bytes, bytes, int]] = result_dict.get(b'contacts', [])
|
||||||
self.found_compact_addresses = result_dict.get(key, [])
|
self.found_compact_addresses = result_dict.get(key, [])
|
||||||
|
self.pages = int(result_dict.get(PAGE_KEY, 0))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def found(self) -> bool:
|
def found(self) -> bool:
|
||||||
@@ -64,7 +66,7 @@ def get_shortlist(routing_table: 'TreeRoutingTable', key: bytes,
|
|||||||
:param shortlist: optional manually provided shortlist, this is done during bootstrapping when there are no
|
:param shortlist: optional manually provided shortlist, this is done during bootstrapping when there are no
|
||||||
peers in the routing table. During bootstrap the shortlist is set to be the seed nodes.
|
peers in the routing table. During bootstrap the shortlist is set to be the seed nodes.
|
||||||
"""
|
"""
|
||||||
if len(key) != constants.hash_length:
|
if len(key) != constants.HASH_LENGTH:
|
||||||
raise ValueError("invalid key length: %i" % len(key))
|
raise ValueError("invalid key length: %i" % len(key))
|
||||||
return shortlist or routing_table.find_close_peers(key)
|
return shortlist or routing_table.find_close_peers(key)
|
||||||
|
|
||||||
@@ -72,10 +74,10 @@ def get_shortlist(routing_table: 'TreeRoutingTable', key: bytes,
|
|||||||
class IterativeFinder:
|
class IterativeFinder:
|
||||||
def __init__(self, loop: asyncio.AbstractEventLoop, peer_manager: 'PeerManager',
|
def __init__(self, loop: asyncio.AbstractEventLoop, peer_manager: 'PeerManager',
|
||||||
routing_table: 'TreeRoutingTable', protocol: 'KademliaProtocol', key: bytes,
|
routing_table: 'TreeRoutingTable', protocol: 'KademliaProtocol', key: bytes,
|
||||||
bottom_out_limit: typing.Optional[int] = 2, max_results: typing.Optional[int] = constants.k,
|
bottom_out_limit: typing.Optional[int] = 2, max_results: typing.Optional[int] = constants.K,
|
||||||
exclude: typing.Optional[typing.List[typing.Tuple[str, int]]] = None,
|
exclude: typing.Optional[typing.List[typing.Tuple[str, int]]] = None,
|
||||||
shortlist: typing.Optional[typing.List['KademliaPeer']] = None):
|
shortlist: typing.Optional[typing.List['KademliaPeer']] = None):
|
||||||
if len(key) != constants.hash_length:
|
if len(key) != constants.HASH_LENGTH:
|
||||||
raise ValueError("invalid key length: %i" % len(key))
|
raise ValueError("invalid key length: %i" % len(key))
|
||||||
self.loop = loop
|
self.loop = loop
|
||||||
self.peer_manager = peer_manager
|
self.peer_manager = peer_manager
|
||||||
@@ -129,7 +131,7 @@ class IterativeFinder:
|
|||||||
"""
|
"""
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
def get_initial_result(self) -> typing.List['KademliaPeer']:
|
def get_initial_result(self) -> typing.List['KademliaPeer']: #pylint: disable=no-self-use
|
||||||
"""
|
"""
|
||||||
Get an initial or cached result to be put into the Queue. Used for findValue requests where the blob
|
Get an initial or cached result to be put into the Queue. Used for findValue requests where the blob
|
||||||
has peers in the local data store of blobs announced to us
|
has peers in the local data store of blobs announced to us
|
||||||
@@ -150,7 +152,11 @@ class IterativeFinder:
|
|||||||
self._add_active(peer)
|
self._add_active(peer)
|
||||||
for contact_triple in response.get_close_triples():
|
for contact_triple in response.get_close_triples():
|
||||||
node_id, address, udp_port = contact_triple
|
node_id, address, udp_port = contact_triple
|
||||||
self._add_active(self.peer_manager.get_kademlia_peer(node_id, address, udp_port))
|
try:
|
||||||
|
self._add_active(make_kademlia_peer(node_id, address, udp_port))
|
||||||
|
except ValueError:
|
||||||
|
log.warning("misbehaving peer %s:%i returned peer with reserved ip %s:%i", peer.address,
|
||||||
|
peer.udp_port, address, udp_port)
|
||||||
self.check_result_ready(response)
|
self.check_result_ready(response)
|
||||||
|
|
||||||
async def _send_probe(self, peer: 'KademliaPeer'):
|
async def _send_probe(self, peer: 'KademliaPeer'):
|
||||||
@@ -178,7 +184,7 @@ class IterativeFinder:
|
|||||||
to_probe = list(self.active - self.contacted)
|
to_probe = list(self.active - self.contacted)
|
||||||
to_probe.sort(key=lambda peer: self.distance(self.key))
|
to_probe.sort(key=lambda peer: self.distance(self.key))
|
||||||
for peer in to_probe:
|
for peer in to_probe:
|
||||||
if added >= constants.alpha:
|
if added >= constants.ALPHA:
|
||||||
break
|
break
|
||||||
origin_address = (peer.address, peer.udp_port)
|
origin_address = (peer.address, peer.udp_port)
|
||||||
if origin_address in self.exclude:
|
if origin_address in self.exclude:
|
||||||
@@ -191,7 +197,7 @@ class IterativeFinder:
|
|||||||
added += 1
|
added += 1
|
||||||
log.debug("running %d probes", len(self.running_probes))
|
log.debug("running %d probes", len(self.running_probes))
|
||||||
if not added and not self.running_probes:
|
if not added and not self.running_probes:
|
||||||
log.debug("search for %s exhausted", hexlify(self.key)[:8])
|
log.debug("search for %s exhausted", self.key.hex()[:8])
|
||||||
self.search_exhausted()
|
self.search_exhausted()
|
||||||
|
|
||||||
def _schedule_probe(self, peer: 'KademliaPeer'):
|
def _schedule_probe(self, peer: 'KademliaPeer'):
|
||||||
@@ -209,7 +215,7 @@ class IterativeFinder:
|
|||||||
t.add_done_callback(callback)
|
t.add_done_callback(callback)
|
||||||
self.running_probes.add(t)
|
self.running_probes.add(t)
|
||||||
|
|
||||||
async def _search_task(self, delay: typing.Optional[float] = constants.iterative_lookup_delay):
|
async def _search_task(self, delay: typing.Optional[float] = constants.ITERATIVE_LOOKUP_DELAY):
|
||||||
try:
|
try:
|
||||||
if self.running:
|
if self.running:
|
||||||
await self._search_round()
|
await self._search_round()
|
||||||
@@ -256,7 +262,7 @@ class IterativeFinder:
|
|||||||
class IterativeNodeFinder(IterativeFinder):
|
class IterativeNodeFinder(IterativeFinder):
|
||||||
def __init__(self, loop: asyncio.AbstractEventLoop, peer_manager: 'PeerManager',
|
def __init__(self, loop: asyncio.AbstractEventLoop, peer_manager: 'PeerManager',
|
||||||
routing_table: 'TreeRoutingTable', protocol: 'KademliaProtocol', key: bytes,
|
routing_table: 'TreeRoutingTable', protocol: 'KademliaProtocol', key: bytes,
|
||||||
bottom_out_limit: typing.Optional[int] = 2, max_results: typing.Optional[int] = constants.k,
|
bottom_out_limit: typing.Optional[int] = 2, max_results: typing.Optional[int] = constants.K,
|
||||||
exclude: typing.Optional[typing.List[typing.Tuple[str, int]]] = None,
|
exclude: typing.Optional[typing.List[typing.Tuple[str, int]]] = None,
|
||||||
shortlist: typing.Optional[typing.List['KademliaPeer']] = None):
|
shortlist: typing.Optional[typing.List['KademliaPeer']] = None):
|
||||||
super().__init__(loop, peer_manager, routing_table, protocol, key, bottom_out_limit, max_results, exclude,
|
super().__init__(loop, peer_manager, routing_table, protocol, key, bottom_out_limit, max_results, exclude,
|
||||||
@@ -264,7 +270,7 @@ class IterativeNodeFinder(IterativeFinder):
|
|||||||
self.yielded_peers: typing.Set['KademliaPeer'] = set()
|
self.yielded_peers: typing.Set['KademliaPeer'] = set()
|
||||||
|
|
||||||
async def send_probe(self, peer: 'KademliaPeer') -> FindNodeResponse:
|
async def send_probe(self, peer: 'KademliaPeer') -> FindNodeResponse:
|
||||||
log.debug("probing %s:%d %s", peer.address, peer.udp_port, hexlify(peer.node_id)[:8] if peer.node_id else '')
|
log.debug("probing %s:%d %s", peer.address, peer.udp_port, peer.node_id.hex()[:8] if peer.node_id else '')
|
||||||
response = await self.protocol.get_rpc_peer(peer).find_node(self.key)
|
response = await self.protocol.get_rpc_peer(peer).find_node(self.key)
|
||||||
return FindNodeResponse(self.key, response)
|
return FindNodeResponse(self.key, response)
|
||||||
|
|
||||||
@@ -275,11 +281,11 @@ class IterativeNodeFinder(IterativeFinder):
|
|||||||
not_yet_yielded = [
|
not_yet_yielded = [
|
||||||
peer for peer in from_iter
|
peer for peer in from_iter
|
||||||
if peer not in self.yielded_peers
|
if peer not in self.yielded_peers
|
||||||
and peer.node_id != self.protocol.node_id
|
and peer.node_id != self.protocol.node_id
|
||||||
and self.peer_manager.peer_is_good(peer) is not False
|
and self.peer_manager.peer_is_good(peer) is not False
|
||||||
]
|
]
|
||||||
not_yet_yielded.sort(key=lambda peer: self.distance(peer.node_id))
|
not_yet_yielded.sort(key=lambda peer: self.distance(peer.node_id))
|
||||||
to_yield = not_yet_yielded[:min(constants.k, len(not_yet_yielded))]
|
to_yield = not_yet_yielded[:min(constants.K, len(not_yet_yielded))]
|
||||||
if to_yield:
|
if to_yield:
|
||||||
self.yielded_peers.update(to_yield)
|
self.yielded_peers.update(to_yield)
|
||||||
self.iteration_queue.put_nowait(to_yield)
|
self.iteration_queue.put_nowait(to_yield)
|
||||||
@@ -307,16 +313,47 @@ class IterativeNodeFinder(IterativeFinder):
|
|||||||
class IterativeValueFinder(IterativeFinder):
|
class IterativeValueFinder(IterativeFinder):
|
||||||
def __init__(self, loop: asyncio.AbstractEventLoop, peer_manager: 'PeerManager',
|
def __init__(self, loop: asyncio.AbstractEventLoop, peer_manager: 'PeerManager',
|
||||||
routing_table: 'TreeRoutingTable', protocol: 'KademliaProtocol', key: bytes,
|
routing_table: 'TreeRoutingTable', protocol: 'KademliaProtocol', key: bytes,
|
||||||
bottom_out_limit: typing.Optional[int] = 2, max_results: typing.Optional[int] = constants.k,
|
bottom_out_limit: typing.Optional[int] = 2, max_results: typing.Optional[int] = constants.K,
|
||||||
exclude: typing.Optional[typing.List[typing.Tuple[str, int]]] = None,
|
exclude: typing.Optional[typing.List[typing.Tuple[str, int]]] = None,
|
||||||
shortlist: typing.Optional[typing.List['KademliaPeer']] = None):
|
shortlist: typing.Optional[typing.List['KademliaPeer']] = None):
|
||||||
super().__init__(loop, peer_manager, routing_table, protocol, key, bottom_out_limit, max_results, exclude,
|
super().__init__(loop, peer_manager, routing_table, protocol, key, bottom_out_limit, max_results, exclude,
|
||||||
shortlist)
|
shortlist)
|
||||||
self.blob_peers: typing.Set['KademliaPeer'] = set()
|
self.blob_peers: typing.Set['KademliaPeer'] = set()
|
||||||
|
# this tracks the index of the most recent page we requested from each peer
|
||||||
|
self.peer_pages: typing.DefaultDict['KademliaPeer', int] = defaultdict(int)
|
||||||
|
# this tracks the set of blob peers returned by each peer
|
||||||
|
self.discovered_peers: typing.Dict['KademliaPeer', typing.Set['KademliaPeer']] = defaultdict(set)
|
||||||
|
|
||||||
async def send_probe(self, peer: 'KademliaPeer') -> FindValueResponse:
|
async def send_probe(self, peer: 'KademliaPeer') -> FindValueResponse:
|
||||||
response = await self.protocol.get_rpc_peer(peer).find_value(self.key)
|
page = self.peer_pages[peer]
|
||||||
return FindValueResponse(self.key, response)
|
response = await self.protocol.get_rpc_peer(peer).find_value(self.key, page=page)
|
||||||
|
parsed = FindValueResponse(self.key, response)
|
||||||
|
if not parsed.found:
|
||||||
|
return parsed
|
||||||
|
already_known = len(self.discovered_peers[peer])
|
||||||
|
decoded_peers = set()
|
||||||
|
for compact_addr in parsed.found_compact_addresses:
|
||||||
|
try:
|
||||||
|
decoded_peers.add(self.peer_manager.decode_tcp_peer_from_compact_address(compact_addr))
|
||||||
|
except ValueError:
|
||||||
|
log.warning("misbehaving peer %s:%i returned invalid peer for blob",
|
||||||
|
peer.address, peer.udp_port)
|
||||||
|
self.peer_manager.report_failure(peer.address, peer.udp_port)
|
||||||
|
parsed.found_compact_addresses.clear()
|
||||||
|
return parsed
|
||||||
|
self.discovered_peers[peer].update(decoded_peers)
|
||||||
|
log.debug("probed %s:%i page %i, %i known", peer.address, peer.udp_port, page,
|
||||||
|
already_known + len(parsed.found_compact_addresses))
|
||||||
|
if len(self.discovered_peers[peer]) != already_known + len(parsed.found_compact_addresses):
|
||||||
|
log.warning("misbehaving peer %s:%i returned duplicate peers for blob", peer.address, peer.udp_port)
|
||||||
|
parsed.found_compact_addresses.clear()
|
||||||
|
elif len(parsed.found_compact_addresses) >= constants.K and self.peer_pages[peer] < parsed.pages:
|
||||||
|
# the peer returned a full page and indicates it has more
|
||||||
|
self.peer_pages[peer] += 1
|
||||||
|
if peer in self.contacted:
|
||||||
|
# the peer must be removed from self.contacted so that it will be probed for the next page
|
||||||
|
self.contacted.remove(peer)
|
||||||
|
return parsed
|
||||||
|
|
||||||
def check_result_ready(self, response: FindValueResponse):
|
def check_result_ready(self, response: FindValueResponse):
|
||||||
if response.found:
|
if response.found:
|
||||||
@@ -4,17 +4,18 @@ import functools
|
|||||||
import hashlib
|
import hashlib
|
||||||
import asyncio
|
import asyncio
|
||||||
import typing
|
import typing
|
||||||
import binascii
|
|
||||||
import random
|
import random
|
||||||
from asyncio.protocols import DatagramProtocol
|
from asyncio.protocols import DatagramProtocol
|
||||||
from asyncio.transports import DatagramTransport
|
from asyncio.transports import DatagramTransport
|
||||||
|
|
||||||
from lbry.dht import constants
|
from lbry.dht import constants
|
||||||
|
from lbry.dht.serialization.bencoding import DecodeError
|
||||||
from lbry.dht.serialization.datagram import decode_datagram, ErrorDatagram, ResponseDatagram, RequestDatagram
|
from lbry.dht.serialization.datagram import decode_datagram, ErrorDatagram, ResponseDatagram, RequestDatagram
|
||||||
from lbry.dht.serialization.datagram import RESPONSE_TYPE, ERROR_TYPE, PAGE_KEY
|
from lbry.dht.serialization.datagram import RESPONSE_TYPE, ERROR_TYPE, PAGE_KEY
|
||||||
from lbry.dht.error import RemoteException, TransportNotConnected
|
from lbry.dht.error import RemoteException, TransportNotConnected
|
||||||
from lbry.dht.protocol.routing_table import TreeRoutingTable
|
from lbry.dht.protocol.routing_table import TreeRoutingTable
|
||||||
from lbry.dht.protocol.data_store import DictDataStore
|
from lbry.dht.protocol.data_store import DictDataStore
|
||||||
|
from lbry.dht.peer import make_kademlia_peer
|
||||||
|
|
||||||
if typing.TYPE_CHECKING:
|
if typing.TYPE_CHECKING:
|
||||||
from lbry.dht.peer import PeerManager, KademliaPeer
|
from lbry.dht.peer import PeerManager, KademliaPeer
|
||||||
@@ -22,7 +23,7 @@ if typing.TYPE_CHECKING:
|
|||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
old_protocol_errors = {
|
OLD_PROTOCOL_ERRORS = {
|
||||||
"findNode() takes exactly 2 arguments (5 given)": "0.19.1",
|
"findNode() takes exactly 2 arguments (5 given)": "0.19.1",
|
||||||
"findValue() takes exactly 2 arguments (5 given)": "0.19.1"
|
"findValue() takes exactly 2 arguments (5 given)": "0.19.1"
|
||||||
}
|
}
|
||||||
@@ -47,13 +48,13 @@ class KademliaRPC:
|
|||||||
return b'pong'
|
return b'pong'
|
||||||
|
|
||||||
def store(self, rpc_contact: 'KademliaPeer', blob_hash: bytes, token: bytes, port: int) -> bytes:
|
def store(self, rpc_contact: 'KademliaPeer', blob_hash: bytes, token: bytes, port: int) -> bytes:
|
||||||
if len(blob_hash) != constants.hash_bits // 8:
|
if len(blob_hash) != constants.HASH_BITS // 8:
|
||||||
raise ValueError(f"invalid length of blob hash: {len(blob_hash)}")
|
raise ValueError(f"invalid length of blob hash: {len(blob_hash)}")
|
||||||
if not 0 < port < 65535:
|
if not 0 < port < 65535:
|
||||||
raise ValueError(f"invalid tcp port: {port}")
|
raise ValueError(f"invalid tcp port: {port}")
|
||||||
rpc_contact.update_tcp_port(port)
|
rpc_contact.update_tcp_port(port)
|
||||||
if not self.verify_token(token, rpc_contact.compact_ip()):
|
if not self.verify_token(token, rpc_contact.compact_ip()):
|
||||||
if self.loop.time() - self.protocol.started_listening_time < constants.token_secret_refresh_interval:
|
if self.loop.time() - self.protocol.started_listening_time < constants.TOKEN_SECRET_REFRESH_INTERVAL:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
raise ValueError("Invalid token")
|
raise ValueError("Invalid token")
|
||||||
@@ -63,19 +64,19 @@ class KademliaRPC:
|
|||||||
return b'OK'
|
return b'OK'
|
||||||
|
|
||||||
def find_node(self, rpc_contact: 'KademliaPeer', key: bytes) -> typing.List[typing.Tuple[bytes, str, int]]:
|
def find_node(self, rpc_contact: 'KademliaPeer', key: bytes) -> typing.List[typing.Tuple[bytes, str, int]]:
|
||||||
if len(key) != constants.hash_length:
|
if len(key) != constants.HASH_LENGTH:
|
||||||
raise ValueError("invalid contact node_id length: %i" % len(key))
|
raise ValueError("invalid contact node_id length: %i" % len(key))
|
||||||
|
|
||||||
contacts = self.protocol.routing_table.find_close_peers(key, sender_node_id=rpc_contact.node_id)
|
contacts = self.protocol.routing_table.find_close_peers(key, sender_node_id=rpc_contact.node_id)
|
||||||
contact_triples = []
|
contact_triples = []
|
||||||
for contact in contacts[:constants.k * 2]:
|
for contact in contacts[:constants.K * 2]:
|
||||||
contact_triples.append((contact.node_id, contact.address, contact.udp_port))
|
contact_triples.append((contact.node_id, contact.address, contact.udp_port))
|
||||||
return contact_triples
|
return contact_triples
|
||||||
|
|
||||||
def find_value(self, rpc_contact: 'KademliaPeer', key: bytes, page: int = 0):
|
def find_value(self, rpc_contact: 'KademliaPeer', key: bytes, page: int = 0):
|
||||||
page = page if page > 0 else 0
|
page = page if page > 0 else 0
|
||||||
|
|
||||||
if len(key) != constants.hash_length:
|
if len(key) != constants.HASH_LENGTH:
|
||||||
raise ValueError("invalid blob_exchange hash length: %i" % len(key))
|
raise ValueError("invalid blob_exchange hash length: %i" % len(key))
|
||||||
|
|
||||||
response = {
|
response = {
|
||||||
@@ -83,7 +84,7 @@ class KademliaRPC:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if not page:
|
if not page:
|
||||||
response[b'contacts'] = self.find_node(rpc_contact, key)[:constants.k]
|
response[b'contacts'] = self.find_node(rpc_contact, key)[:constants.K]
|
||||||
|
|
||||||
if self.protocol.protocol_version:
|
if self.protocol.protocol_version:
|
||||||
response[b'protocolVersion'] = self.protocol.protocol_version
|
response[b'protocolVersion'] = self.protocol.protocol_version
|
||||||
@@ -95,16 +96,15 @@ class KademliaRPC:
|
|||||||
if not rpc_contact.tcp_port or peer.compact_address_tcp() != rpc_contact.compact_address_tcp()
|
if not rpc_contact.tcp_port or peer.compact_address_tcp() != rpc_contact.compact_address_tcp()
|
||||||
]
|
]
|
||||||
# if we don't have k storing peers to return and we have this hash locally, include our contact information
|
# if we don't have k storing peers to return and we have this hash locally, include our contact information
|
||||||
if len(peers) < constants.k and binascii.hexlify(key).decode() in self.protocol.data_store.completed_blobs:
|
peers.append(self.compact_address())
|
||||||
peers.append(self.compact_address())
|
|
||||||
if not peers:
|
if not peers:
|
||||||
response[PAGE_KEY] = 0
|
response[PAGE_KEY] = 0
|
||||||
else:
|
else:
|
||||||
response[PAGE_KEY] = (len(peers) // (constants.k + 1)) + 1 # how many pages of peers we have for the blob
|
response[PAGE_KEY] = (len(peers) // (constants.K + 1)) + 1 # how many pages of peers we have for the blob
|
||||||
if len(peers) > constants.k:
|
if len(peers) > constants.K:
|
||||||
random.Random(self.protocol.node_id).shuffle(peers)
|
random.Random(self.protocol.node_id).shuffle(peers)
|
||||||
if page * constants.k < len(peers):
|
if page * constants.K < len(peers):
|
||||||
response[key] = peers[page * constants.k:page * constants.k + constants.k]
|
response[key] = peers[page * constants.K:page * constants.K + constants.K]
|
||||||
return response
|
return response
|
||||||
|
|
||||||
def refresh_token(self): # TODO: this needs to be called periodically
|
def refresh_token(self): # TODO: this needs to be called periodically
|
||||||
@@ -153,7 +153,7 @@ class RemoteKademliaRPC:
|
|||||||
:param blob_hash: blob hash as bytes
|
:param blob_hash: blob hash as bytes
|
||||||
:return: b'OK'
|
:return: b'OK'
|
||||||
"""
|
"""
|
||||||
if len(blob_hash) != constants.hash_bits // 8:
|
if len(blob_hash) != constants.HASH_BITS // 8:
|
||||||
raise ValueError(f"invalid length of blob hash: {len(blob_hash)}")
|
raise ValueError(f"invalid length of blob hash: {len(blob_hash)}")
|
||||||
if not self.protocol.peer_port or not 0 < self.protocol.peer_port < 65535:
|
if not self.protocol.peer_port or not 0 < self.protocol.peer_port < 65535:
|
||||||
raise ValueError(f"invalid tcp port: {self.protocol.peer_port}")
|
raise ValueError(f"invalid tcp port: {self.protocol.peer_port}")
|
||||||
@@ -170,7 +170,7 @@ class RemoteKademliaRPC:
|
|||||||
"""
|
"""
|
||||||
:return: [(node_id, address, udp_port), ...]
|
:return: [(node_id, address, udp_port), ...]
|
||||||
"""
|
"""
|
||||||
if len(key) != constants.hash_bits // 8:
|
if len(key) != constants.HASH_BITS // 8:
|
||||||
raise ValueError(f"invalid length of find node key: {len(key)}")
|
raise ValueError(f"invalid length of find node key: {len(key)}")
|
||||||
response = await self.protocol.send_request(
|
response = await self.protocol.send_request(
|
||||||
self.peer, RequestDatagram.make_find_node(self.protocol.node_id, key)
|
self.peer, RequestDatagram.make_find_node(self.protocol.node_id, key)
|
||||||
@@ -185,7 +185,7 @@ class RemoteKademliaRPC:
|
|||||||
<key bytes>: [<blob_peer_compact_address, ...]
|
<key bytes>: [<blob_peer_compact_address, ...]
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
if len(key) != constants.hash_bits // 8:
|
if len(key) != constants.HASH_BITS // 8:
|
||||||
raise ValueError(f"invalid length of find value key: {len(key)}")
|
raise ValueError(f"invalid length of find value key: {len(key)}")
|
||||||
response = await self.protocol.send_request(
|
response = await self.protocol.send_request(
|
||||||
self.peer, RequestDatagram.make_find_value(self.protocol.node_id, key, page=page)
|
self.peer, RequestDatagram.make_find_value(self.protocol.node_id, key, page=page)
|
||||||
@@ -202,7 +202,7 @@ class PingQueue:
|
|||||||
self._process_task: asyncio.Task = None
|
self._process_task: asyncio.Task = None
|
||||||
self._running = False
|
self._running = False
|
||||||
self._running_pings: typing.Set[asyncio.Task] = set()
|
self._running_pings: typing.Set[asyncio.Task] = set()
|
||||||
self._default_delay = constants.maybe_ping_delay
|
self._default_delay = constants.MAYBE_PING_DELAY
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def running(self):
|
def running(self):
|
||||||
@@ -223,7 +223,7 @@ class PingQueue:
|
|||||||
self._protocol.add_peer(peer)
|
self._protocol.add_peer(peer)
|
||||||
return
|
return
|
||||||
await self._protocol.get_rpc_peer(peer).ping()
|
await self._protocol.get_rpc_peer(peer).ping()
|
||||||
except asyncio.TimeoutError:
|
except (asyncio.TimeoutError, RemoteException):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
task = self._loop.create_task(ping_task())
|
task = self._loop.create_task(ping_task())
|
||||||
@@ -259,8 +259,8 @@ class PingQueue:
|
|||||||
|
|
||||||
class KademliaProtocol(DatagramProtocol):
|
class KademliaProtocol(DatagramProtocol):
|
||||||
def __init__(self, loop: asyncio.AbstractEventLoop, peer_manager: 'PeerManager', node_id: bytes, external_ip: str,
|
def __init__(self, loop: asyncio.AbstractEventLoop, peer_manager: 'PeerManager', node_id: bytes, external_ip: str,
|
||||||
udp_port: int, peer_port: int, rpc_timeout: float = constants.rpc_timeout,
|
udp_port: int, peer_port: int, rpc_timeout: float = constants.RPC_TIMEOUT,
|
||||||
split_buckets_under_index: int = constants.split_buckets_under_index):
|
split_buckets_under_index: int = constants.SPLIT_BUCKETS_UNDER_INDEX):
|
||||||
self.peer_manager = peer_manager
|
self.peer_manager = peer_manager
|
||||||
self.loop = loop
|
self.loop = loop
|
||||||
self.node_id = node_id
|
self.node_id = node_id
|
||||||
@@ -270,7 +270,7 @@ class KademliaProtocol(DatagramProtocol):
|
|||||||
self.is_seed_node = False
|
self.is_seed_node = False
|
||||||
self.partial_messages: typing.Dict[bytes, typing.Dict[bytes, bytes]] = {}
|
self.partial_messages: typing.Dict[bytes, typing.Dict[bytes, bytes]] = {}
|
||||||
self.sent_messages: typing.Dict[bytes, typing.Tuple['KademliaPeer', asyncio.Future, RequestDatagram]] = {}
|
self.sent_messages: typing.Dict[bytes, typing.Tuple['KademliaPeer', asyncio.Future, RequestDatagram]] = {}
|
||||||
self.protocol_version = constants.protocol_version
|
self.protocol_version = constants.PROTOCOL_VERSION
|
||||||
self.started_listening_time = 0
|
self.started_listening_time = 0
|
||||||
self.transport: DatagramTransport = None
|
self.transport: DatagramTransport = None
|
||||||
self.old_token_secret = constants.generate_id()
|
self.old_token_secret = constants.generate_id()
|
||||||
@@ -322,9 +322,12 @@ class KademliaProtocol(DatagramProtocol):
|
|||||||
return args, {}
|
return args, {}
|
||||||
|
|
||||||
async def _add_peer(self, peer: 'KademliaPeer'):
|
async def _add_peer(self, peer: 'KademliaPeer'):
|
||||||
for p in self.routing_table.get_peers():
|
if not peer.node_id:
|
||||||
if (p.address, p.udp_port) == (peer.address, peer.udp_port) and p.node_id != peer.node_id:
|
log.warning("Tried adding a peer with no node id!")
|
||||||
self.routing_table.remove_peer(p)
|
return False
|
||||||
|
for my_peer in self.routing_table.get_peers():
|
||||||
|
if (my_peer.address, my_peer.udp_port) == (peer.address, peer.udp_port) and my_peer.node_id != peer.node_id:
|
||||||
|
self.routing_table.remove_peer(my_peer)
|
||||||
self.routing_table.join_buckets()
|
self.routing_table.join_buckets()
|
||||||
bucket_index = self.routing_table.kbucket_index(peer.node_id)
|
bucket_index = self.routing_table.kbucket_index(peer.node_id)
|
||||||
if self.routing_table.buckets[bucket_index].add_peer(peer):
|
if self.routing_table.buckets[bucket_index].add_peer(peer):
|
||||||
@@ -363,10 +366,10 @@ class KademliaProtocol(DatagramProtocol):
|
|||||||
|
|
||||||
not_good_contacts = self.routing_table.buckets[bucket_index].get_bad_or_unknown_peers()
|
not_good_contacts = self.routing_table.buckets[bucket_index].get_bad_or_unknown_peers()
|
||||||
not_recently_replied = []
|
not_recently_replied = []
|
||||||
for p in not_good_contacts:
|
for my_peer in not_good_contacts:
|
||||||
last_replied = self.peer_manager.get_last_replied(p.address, p.udp_port)
|
last_replied = self.peer_manager.get_last_replied(my_peer.address, my_peer.udp_port)
|
||||||
if not last_replied or last_replied + 60 < self.loop.time():
|
if not last_replied or last_replied + 60 < self.loop.time():
|
||||||
not_recently_replied.append(p)
|
not_recently_replied.append(my_peer)
|
||||||
if not_recently_replied:
|
if not_recently_replied:
|
||||||
to_replace = not_recently_replied[0]
|
to_replace = not_recently_replied[0]
|
||||||
else:
|
else:
|
||||||
@@ -410,27 +413,27 @@ class KademliaProtocol(DatagramProtocol):
|
|||||||
self._wakeup_routing_task.clear()
|
self._wakeup_routing_task.clear()
|
||||||
|
|
||||||
def _handle_rpc(self, sender_contact: 'KademliaPeer', message: RequestDatagram):
|
def _handle_rpc(self, sender_contact: 'KademliaPeer', message: RequestDatagram):
|
||||||
assert sender_contact.node_id != self.node_id, (binascii.hexlify(sender_contact.node_id)[:8].decode(),
|
assert sender_contact.node_id != self.node_id, (sender_contact.node_id.hex()[:8],
|
||||||
binascii.hexlify(self.node_id)[:8].decode())
|
self.node_id.hex()[:8])
|
||||||
method = message.method
|
method = message.method
|
||||||
if method not in [b'ping', b'store', b'findNode', b'findValue']:
|
if method not in [b'ping', b'store', b'findNode', b'findValue']:
|
||||||
raise AttributeError('Invalid method: %s' % message.method.decode())
|
raise AttributeError('Invalid method: %s' % message.method.decode())
|
||||||
if message.args and isinstance(message.args[-1], dict) and b'protocolVersion' in message.args[-1]:
|
if message.args and isinstance(message.args[-1], dict) and b'protocolVersion' in message.args[-1]:
|
||||||
# args don't need reformatting
|
# args don't need reformatting
|
||||||
args, kw = tuple(message.args[:-1]), message.args[-1]
|
args, kwargs = tuple(message.args[:-1]), message.args[-1]
|
||||||
else:
|
else:
|
||||||
args, kw = self._migrate_incoming_rpc_args(sender_contact, message.method, *message.args)
|
args, kwargs = self._migrate_incoming_rpc_args(sender_contact, message.method, *message.args)
|
||||||
log.debug("%s:%i RECV CALL %s %s:%i", self.external_ip, self.udp_port, message.method.decode(),
|
log.debug("%s:%i RECV CALL %s %s:%i", self.external_ip, self.udp_port, message.method.decode(),
|
||||||
sender_contact.address, sender_contact.udp_port)
|
sender_contact.address, sender_contact.udp_port)
|
||||||
|
|
||||||
if method == b'ping':
|
if method == b'ping':
|
||||||
result = self.node_rpc.ping()
|
result = self.node_rpc.ping()
|
||||||
elif method == b'store':
|
elif method == b'store':
|
||||||
blob_hash, token, port, original_publisher_id, age = args[:5]
|
blob_hash, token, port, original_publisher_id, age = args[:5] # pylint: disable=unused-variable
|
||||||
result = self.node_rpc.store(sender_contact, blob_hash, token, port)
|
result = self.node_rpc.store(sender_contact, blob_hash, token, port)
|
||||||
else:
|
else:
|
||||||
key = args[0]
|
key = args[0]
|
||||||
page = kw.get(PAGE_KEY, 0)
|
page = kwargs.get(PAGE_KEY, 0)
|
||||||
if method == b'findNode':
|
if method == b'findNode':
|
||||||
result = self.node_rpc.find_node(sender_contact, key)
|
result = self.node_rpc.find_node(sender_contact, key)
|
||||||
else:
|
else:
|
||||||
@@ -447,7 +450,11 @@ class KademliaProtocol(DatagramProtocol):
|
|||||||
try:
|
try:
|
||||||
peer = self.routing_table.get_peer(request_datagram.node_id)
|
peer = self.routing_table.get_peer(request_datagram.node_id)
|
||||||
except IndexError:
|
except IndexError:
|
||||||
peer = self.peer_manager.get_kademlia_peer(request_datagram.node_id, address[0], address[1])
|
try:
|
||||||
|
peer = make_kademlia_peer(request_datagram.node_id, address[0], address[1])
|
||||||
|
except ValueError as err:
|
||||||
|
log.warning("error replying to %s: %s", address[0], str(err))
|
||||||
|
return
|
||||||
try:
|
try:
|
||||||
self._handle_rpc(peer, request_datagram)
|
self._handle_rpc(peer, request_datagram)
|
||||||
# if the contact is not known to be bad (yet) and we haven't yet queried it, send it a ping so that it
|
# if the contact is not known to be bad (yet) and we haven't yet queried it, send it a ping so that it
|
||||||
@@ -480,26 +487,25 @@ class KademliaProtocol(DatagramProtocol):
|
|||||||
def handle_response_datagram(self, address: typing.Tuple[str, int], response_datagram: ResponseDatagram):
|
def handle_response_datagram(self, address: typing.Tuple[str, int], response_datagram: ResponseDatagram):
|
||||||
# Find the message that triggered this response
|
# Find the message that triggered this response
|
||||||
if response_datagram.rpc_id in self.sent_messages:
|
if response_datagram.rpc_id in self.sent_messages:
|
||||||
peer, df, request = self.sent_messages[response_datagram.rpc_id]
|
peer, future, _ = self.sent_messages[response_datagram.rpc_id]
|
||||||
if peer.address != address[0]:
|
if peer.address != address[0]:
|
||||||
df.set_exception(RemoteException(
|
future.set_exception(
|
||||||
f"response from {address[0]}, expected {peer.address}")
|
RemoteException(f"response from {address[0]}, expected {peer.address}")
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
# We got a result from the RPC
|
# We got a result from the RPC
|
||||||
if peer.node_id == self.node_id:
|
if peer.node_id == self.node_id:
|
||||||
df.set_exception(RemoteException("node has our node id"))
|
future.set_exception(RemoteException("node has our node id"))
|
||||||
return
|
return
|
||||||
elif response_datagram.node_id == self.node_id:
|
elif response_datagram.node_id == self.node_id:
|
||||||
df.set_exception(RemoteException("incoming message is from our node id"))
|
future.set_exception(RemoteException("incoming message is from our node id"))
|
||||||
return
|
return
|
||||||
peer.set_id(response_datagram.node_id)
|
peer = make_kademlia_peer(response_datagram.node_id, address[0], address[1])
|
||||||
peer.update_udp_port(address[1])
|
|
||||||
self.peer_manager.report_last_replied(address[0], address[1])
|
self.peer_manager.report_last_replied(address[0], address[1])
|
||||||
self.peer_manager.update_contact_triple(peer.node_id, address[0], address[1])
|
self.peer_manager.update_contact_triple(peer.node_id, address[0], address[1])
|
||||||
if not df.cancelled():
|
if not future.cancelled():
|
||||||
df.set_result(response_datagram)
|
future.set_result(response_datagram)
|
||||||
self.add_peer(peer)
|
self.add_peer(peer)
|
||||||
else:
|
else:
|
||||||
log.warning("%s:%i replied, but after we cancelled the request attempt",
|
log.warning("%s:%i replied, but after we cancelled the request attempt",
|
||||||
@@ -513,11 +519,13 @@ class KademliaProtocol(DatagramProtocol):
|
|||||||
# The RPC request raised a remote exception; raise it locally
|
# The RPC request raised a remote exception; raise it locally
|
||||||
remote_exception = RemoteException(f"{error_datagram.exception_type}({error_datagram.response})")
|
remote_exception = RemoteException(f"{error_datagram.exception_type}({error_datagram.response})")
|
||||||
if error_datagram.rpc_id in self.sent_messages:
|
if error_datagram.rpc_id in self.sent_messages:
|
||||||
peer, df, request = self.sent_messages.pop(error_datagram.rpc_id)
|
peer, future, request = self.sent_messages.pop(error_datagram.rpc_id)
|
||||||
if (peer.address, peer.udp_port) != address:
|
if (peer.address, peer.udp_port) != address:
|
||||||
df.set_exception(RemoteException(
|
future.set_exception(
|
||||||
f"response from {address[0]}:{address[1]}, "
|
RemoteException(
|
||||||
f"expected {peer.address}:{peer.udp_port}")
|
f"response from {address[0]}:{address[1]}, "
|
||||||
|
f"expected {peer.address}:{peer.udp_port}"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
error_msg = f"" \
|
error_msg = f"" \
|
||||||
@@ -526,28 +534,32 @@ class KademliaProtocol(DatagramProtocol):
|
|||||||
f"Raised: {str(remote_exception)}"
|
f"Raised: {str(remote_exception)}"
|
||||||
if 'Invalid token' in error_msg:
|
if 'Invalid token' in error_msg:
|
||||||
log.debug(error_msg)
|
log.debug(error_msg)
|
||||||
elif error_datagram.response not in old_protocol_errors:
|
elif error_datagram.response not in OLD_PROTOCOL_ERRORS:
|
||||||
log.warning(error_msg)
|
log.warning(error_msg)
|
||||||
else:
|
else:
|
||||||
log.warning("known dht protocol backwards compatibility error with %s:%i (lbrynet v%s)",
|
log.debug(
|
||||||
peer.address, peer.udp_port, old_protocol_errors[error_datagram.response])
|
"known dht protocol backwards compatibility error with %s:%i (lbrynet v%s)",
|
||||||
df.set_exception(remote_exception)
|
peer.address, peer.udp_port, OLD_PROTOCOL_ERRORS[error_datagram.response]
|
||||||
|
)
|
||||||
|
future.set_exception(remote_exception)
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
if error_datagram.response not in old_protocol_errors:
|
if error_datagram.response not in OLD_PROTOCOL_ERRORS:
|
||||||
msg = f"Received error from {address[0]}:{address[1]}, but it isn't in response to a " \
|
msg = f"Received error from {address[0]}:{address[1]}, but it isn't in response to a " \
|
||||||
f"pending request: {str(remote_exception)}"
|
f"pending request: {str(remote_exception)}"
|
||||||
log.warning(msg)
|
log.warning(msg)
|
||||||
else:
|
else:
|
||||||
log.warning("known dht protocol backwards compatibility error with %s:%i (lbrynet v%s)",
|
log.debug(
|
||||||
address[0], address[1], old_protocol_errors[error_datagram.response])
|
"known dht protocol backwards compatibility error with %s:%i (lbrynet v%s)",
|
||||||
|
address[0], address[1], OLD_PROTOCOL_ERRORS[error_datagram.response]
|
||||||
|
)
|
||||||
|
|
||||||
def datagram_received(self, datagram: bytes, address: typing.Tuple[str, int]) -> None:
|
def datagram_received(self, datagram: bytes, address: typing.Tuple[str, int]) -> None: # pylint: disable=arguments-renamed
|
||||||
try:
|
try:
|
||||||
message = decode_datagram(datagram)
|
message = decode_datagram(datagram)
|
||||||
except (ValueError, TypeError):
|
except (ValueError, TypeError, DecodeError):
|
||||||
self.peer_manager.report_failure(address[0], address[1])
|
self.peer_manager.report_failure(address[0], address[1])
|
||||||
log.warning("Couldn't decode dht datagram from %s: %s", address, binascii.hexlify(datagram).decode())
|
log.warning("Couldn't decode dht datagram from %s: %s", address, datagram.hex())
|
||||||
return
|
return
|
||||||
|
|
||||||
if isinstance(message, RequestDatagram):
|
if isinstance(message, RequestDatagram):
|
||||||
@@ -586,12 +598,12 @@ class KademliaProtocol(DatagramProtocol):
|
|||||||
raise TransportNotConnected()
|
raise TransportNotConnected()
|
||||||
|
|
||||||
data = message.bencode()
|
data = message.bencode()
|
||||||
if len(data) > constants.msg_size_limit:
|
if len(data) > constants.MSG_SIZE_LIMIT:
|
||||||
log.warning("cannot send datagram larger than %i bytes (packet is %i bytes)",
|
log.warning("cannot send datagram larger than %i bytes (packet is %i bytes)",
|
||||||
constants.msg_size_limit, len(data))
|
constants.MSG_SIZE_LIMIT, len(data))
|
||||||
log.debug("Packet is too large to send: %s", binascii.hexlify(data[:3500]).decode())
|
log.debug("Packet is too large to send: %s", data[:3500].hex())
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"cannot send datagram larger than {constants.msg_size_limit} bytes (packet is {len(data)} bytes)"
|
f"cannot send datagram larger than {constants.MSG_SIZE_LIMIT} bytes (packet is {len(data)} bytes)"
|
||||||
)
|
)
|
||||||
if isinstance(message, (RequestDatagram, ResponseDatagram)):
|
if isinstance(message, (RequestDatagram, ResponseDatagram)):
|
||||||
assert message.node_id == self.node_id, message
|
assert message.node_id == self.node_id, message
|
||||||
@@ -634,55 +646,40 @@ class KademliaProtocol(DatagramProtocol):
|
|||||||
return constants.digest(self.token_secret + compact_ip)
|
return constants.digest(self.token_secret + compact_ip)
|
||||||
|
|
||||||
def verify_token(self, token, compact_ip):
|
def verify_token(self, token, compact_ip):
|
||||||
h = constants.hash_class()
|
h = constants.HASH_CLASS()
|
||||||
h.update(self.token_secret + compact_ip)
|
h.update(self.token_secret + compact_ip)
|
||||||
if self.old_token_secret and not token == h.digest(): # TODO: why should we be accepting the previous token?
|
if self.old_token_secret and not token == h.digest(): # TODO: why should we be accepting the previous token?
|
||||||
h = constants.hash_class()
|
h = constants.HASH_CLASS()
|
||||||
h.update(self.old_token_secret + compact_ip)
|
h.update(self.old_token_secret + compact_ip)
|
||||||
if not token == h.digest():
|
if not token == h.digest():
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
async def store_to_peer(self, hash_value: bytes, peer: 'KademliaPeer') -> typing.Tuple[bytes, bool]:
|
async def store_to_peer(self, hash_value: bytes, peer: 'KademliaPeer', # pylint: disable=too-many-return-statements
|
||||||
|
retry: bool = True) -> typing.Tuple[bytes, bool]:
|
||||||
async def __store():
|
async def __store():
|
||||||
res = await self.get_rpc_peer(peer).store(hash_value)
|
res = await self.get_rpc_peer(peer).store(hash_value)
|
||||||
if res != b"OK":
|
if res != b"OK":
|
||||||
raise ValueError(res)
|
raise ValueError(res)
|
||||||
log.debug("Stored %s to %s", binascii.hexlify(hash_value).decode()[:8], peer)
|
log.debug("Stored %s to %s", hash_value.hex()[:8], peer)
|
||||||
return peer.node_id, True
|
return peer.node_id, True
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return await __store()
|
return await __store()
|
||||||
except asyncio.TimeoutError:
|
except asyncio.TimeoutError:
|
||||||
log.debug("Timeout while storing blob_hash %s at %s", binascii.hexlify(hash_value).decode()[:8], peer)
|
log.debug("Timeout while storing blob_hash %s at %s", hash_value.hex()[:8], peer)
|
||||||
|
return peer.node_id, False
|
||||||
except ValueError as err:
|
except ValueError as err:
|
||||||
log.error("Unexpected response: %s" % err)
|
log.error("Unexpected response: %s", err)
|
||||||
|
return peer.node_id, False
|
||||||
except RemoteException as err:
|
except RemoteException as err:
|
||||||
if 'Invalid token' in str(err):
|
if 'findValue() takes exactly 2 arguments (5 given)' in str(err):
|
||||||
self.peer_manager.clear_token(peer.node_id)
|
log.debug("peer %s:%i is running an incompatible version of lbrynet", peer.address, peer.udp_port)
|
||||||
try:
|
return peer.node_id, False
|
||||||
return await __store()
|
if 'Invalid token' not in str(err):
|
||||||
except (ValueError, asyncio.TimeoutError, RemoteException):
|
log.warning("Unexpected error while storing blob_hash: %s", err)
|
||||||
return peer.node_id, False
|
return peer.node_id, False
|
||||||
else:
|
self.peer_manager.clear_token(peer.node_id)
|
||||||
log.exception("Unexpected error while storing blob_hash")
|
if not retry:
|
||||||
return peer.node_id, False
|
return peer.node_id, False
|
||||||
|
return await self.store_to_peer(hash_value, peer, retry=False)
|
||||||
def _write(self, data: bytes, address: typing.Tuple[str, int]):
|
|
||||||
if self.transport:
|
|
||||||
try:
|
|
||||||
self.transport.sendto(data, address)
|
|
||||||
except OSError as err:
|
|
||||||
if err.errno == socket.EWOULDBLOCK:
|
|
||||||
# i'm scared this may swallow important errors, but i get a million of these
|
|
||||||
# on Linux and it doesn't seem to affect anything -grin
|
|
||||||
log.warning("Can't send data to dht: EWOULDBLOCK")
|
|
||||||
# elif err.errno == socket.ENETUNREACH:
|
|
||||||
# # this should probably try to retransmit when the network connection is back
|
|
||||||
# log.error("Network is unreachable")
|
|
||||||
else:
|
|
||||||
log.error("DHT socket error sending %i bytes to %s:%i - %s (code %i)",
|
|
||||||
len(data), address[0], address[1], str(err), err.errno)
|
|
||||||
raise err
|
|
||||||
else:
|
|
||||||
raise TransportNotConnected()
|
|
||||||
@@ -50,13 +50,13 @@ class KBucket:
|
|||||||
self.peers.append(peer)
|
self.peers.append(peer)
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
for i in range(len(self.peers)):
|
for i, _ in enumerate(self.peers):
|
||||||
p = self.peers[i]
|
local_peer = self.peers[i]
|
||||||
if p.node_id == peer.node_id:
|
if local_peer.node_id == peer.node_id:
|
||||||
self.peers.remove(p)
|
self.peers.remove(local_peer)
|
||||||
self.peers.append(peer)
|
self.peers.append(peer)
|
||||||
return True
|
return True
|
||||||
if len(self.peers) < constants.k:
|
if len(self.peers) < constants.K:
|
||||||
self.peers.append(peer)
|
self.peers.append(peer)
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
@@ -101,8 +101,8 @@ class KBucket:
|
|||||||
current_len = len(peers)
|
current_len = len(peers)
|
||||||
|
|
||||||
# If count greater than k - return only k contacts
|
# If count greater than k - return only k contacts
|
||||||
if count > constants.k:
|
if count > constants.K:
|
||||||
count = constants.k
|
count = constants.K
|
||||||
|
|
||||||
if not current_len:
|
if not current_len:
|
||||||
return peers
|
return peers
|
||||||
@@ -164,14 +164,14 @@ class TreeRoutingTable:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, loop: asyncio.AbstractEventLoop, peer_manager: 'PeerManager', parent_node_id: bytes,
|
def __init__(self, loop: asyncio.AbstractEventLoop, peer_manager: 'PeerManager', parent_node_id: bytes,
|
||||||
split_buckets_under_index: int = constants.split_buckets_under_index):
|
split_buckets_under_index: int = constants.SPLIT_BUCKETS_UNDER_INDEX):
|
||||||
self._loop = loop
|
self._loop = loop
|
||||||
self._peer_manager = peer_manager
|
self._peer_manager = peer_manager
|
||||||
self._parent_node_id = parent_node_id
|
self._parent_node_id = parent_node_id
|
||||||
self._split_buckets_under_index = split_buckets_under_index
|
self._split_buckets_under_index = split_buckets_under_index
|
||||||
self.buckets: typing.List[KBucket] = [
|
self.buckets: typing.List[KBucket] = [
|
||||||
KBucket(
|
KBucket(
|
||||||
self._peer_manager, range_min=0, range_max=2 ** constants.hash_bits, node_id=self._parent_node_id
|
self._peer_manager, range_min=0, range_max=2 ** constants.HASH_BITS, node_id=self._parent_node_id
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -185,7 +185,7 @@ class TreeRoutingTable:
|
|||||||
contacts = self.get_peers()
|
contacts = self.get_peers()
|
||||||
distance = Distance(self._parent_node_id)
|
distance = Distance(self._parent_node_id)
|
||||||
contacts.sort(key=lambda c: distance(c.node_id))
|
contacts.sort(key=lambda c: distance(c.node_id))
|
||||||
kth_contact = contacts[-1] if len(contacts) < constants.k else contacts[constants.k - 1]
|
kth_contact = contacts[-1] if len(contacts) < constants.K else contacts[constants.K - 1]
|
||||||
return distance(to_add) < distance(kth_contact.node_id)
|
return distance(to_add) < distance(kth_contact.node_id)
|
||||||
|
|
||||||
def find_close_peers(self, key: bytes, count: typing.Optional[int] = None,
|
def find_close_peers(self, key: bytes, count: typing.Optional[int] = None,
|
||||||
@@ -193,7 +193,7 @@ class TreeRoutingTable:
|
|||||||
exclude = [self._parent_node_id]
|
exclude = [self._parent_node_id]
|
||||||
if sender_node_id:
|
if sender_node_id:
|
||||||
exclude.append(sender_node_id)
|
exclude.append(sender_node_id)
|
||||||
count = count or constants.k
|
count = count or constants.K
|
||||||
distance = Distance(key)
|
distance = Distance(key)
|
||||||
contacts = self.get_peers()
|
contacts = self.get_peers()
|
||||||
contacts = [c for c in contacts if c.node_id not in exclude]
|
contacts = [c for c in contacts if c.node_id not in exclude]
|
||||||
@@ -214,7 +214,7 @@ class TreeRoutingTable:
|
|||||||
refresh_ids = []
|
refresh_ids = []
|
||||||
now = int(self._loop.time())
|
now = int(self._loop.time())
|
||||||
for bucket in self.buckets[start_index:]:
|
for bucket in self.buckets[start_index:]:
|
||||||
if force or now - bucket.last_accessed >= constants.refresh_interval:
|
if force or now - bucket.last_accessed >= constants.REFRESH_INTERVAL:
|
||||||
to_search = self.midpoint_id_in_bucket_range(bucket_index)
|
to_search = self.midpoint_id_in_bucket_range(bucket_index)
|
||||||
refresh_ids.append(to_search)
|
refresh_ids.append(to_search)
|
||||||
bucket_index += 1
|
bucket_index += 1
|
||||||
@@ -248,13 +248,13 @@ class TreeRoutingTable:
|
|||||||
random_id = int(random.randrange(self.buckets[bucket_index].range_min, self.buckets[bucket_index].range_max))
|
random_id = int(random.randrange(self.buckets[bucket_index].range_min, self.buckets[bucket_index].range_max))
|
||||||
return Distance(
|
return Distance(
|
||||||
self._parent_node_id
|
self._parent_node_id
|
||||||
)(random_id.to_bytes(constants.hash_length, 'big')).to_bytes(constants.hash_length, 'big')
|
)(random_id.to_bytes(constants.HASH_LENGTH, 'big')).to_bytes(constants.HASH_LENGTH, 'big')
|
||||||
|
|
||||||
def midpoint_id_in_bucket_range(self, bucket_index: int) -> bytes:
|
def midpoint_id_in_bucket_range(self, bucket_index: int) -> bytes:
|
||||||
half = int((self.buckets[bucket_index].range_max - self.buckets[bucket_index].range_min) // 2)
|
half = int((self.buckets[bucket_index].range_max - self.buckets[bucket_index].range_min) // 2)
|
||||||
return Distance(self._parent_node_id)(
|
return Distance(self._parent_node_id)(
|
||||||
int(self.buckets[bucket_index].range_min + half).to_bytes(constants.hash_length, 'big')
|
int(self.buckets[bucket_index].range_min + half).to_bytes(constants.HASH_LENGTH, 'big')
|
||||||
).to_bytes(constants.hash_length, 'big')
|
).to_bytes(constants.HASH_LENGTH, 'big')
|
||||||
|
|
||||||
def split_bucket(self, old_bucket_index: int) -> None:
|
def split_bucket(self, old_bucket_index: int) -> None:
|
||||||
""" Splits the specified k-bucket into two new buckets which together
|
""" Splits the specified k-bucket into two new buckets which together
|
||||||
@@ -283,7 +283,7 @@ class TreeRoutingTable:
|
|||||||
def join_buckets(self):
|
def join_buckets(self):
|
||||||
if len(self.buckets) == 1:
|
if len(self.buckets) == 1:
|
||||||
return
|
return
|
||||||
to_pop = [i for i, bucket in enumerate(self.buckets) if not len(bucket)]
|
to_pop = [i for i, bucket in enumerate(self.buckets) if len(bucket) == 0]
|
||||||
if not to_pop:
|
if not to_pop:
|
||||||
return
|
return
|
||||||
log.info("join buckets %i", len(to_pop))
|
log.info("join buckets %i", len(to_pop))
|
||||||
@@ -314,6 +314,6 @@ class TreeRoutingTable:
|
|||||||
def buckets_with_contacts(self) -> int:
|
def buckets_with_contacts(self) -> int:
|
||||||
count = 0
|
count = 0
|
||||||
for bucket in self.buckets:
|
for bucket in self.buckets:
|
||||||
if len(bucket):
|
if len(bucket) > 0:
|
||||||
count += 1
|
count += 1
|
||||||
return count
|
return count
|
||||||
@@ -52,8 +52,7 @@ def _bdecode(data: bytes, start_index: int = 0) -> typing.Tuple[typing.Union[int
|
|||||||
raise DecodeError(err)
|
raise DecodeError(err)
|
||||||
start_index = split_pos + 1
|
start_index = split_pos + 1
|
||||||
end_pos = start_index + length
|
end_pos = start_index + length
|
||||||
b = data[start_index:end_pos]
|
return data[start_index:end_pos], end_pos
|
||||||
return b, end_pos
|
|
||||||
|
|
||||||
|
|
||||||
def bencode(data: typing.Dict) -> bytes:
|
def bencode(data: typing.Dict) -> bytes:
|
||||||
@@ -7,9 +7,13 @@ REQUEST_TYPE = 0
|
|||||||
RESPONSE_TYPE = 1
|
RESPONSE_TYPE = 1
|
||||||
ERROR_TYPE = 2
|
ERROR_TYPE = 2
|
||||||
|
|
||||||
|
OPTIONAL_ARG_OFFSET = 100
|
||||||
|
|
||||||
# bencode representation of argument keys
|
# bencode representation of argument keys
|
||||||
PAGE_KEY = b'p'
|
PAGE_KEY = b'p'
|
||||||
|
|
||||||
|
OPTIONAL_FIELDS = ()
|
||||||
|
|
||||||
|
|
||||||
class KademliaDatagramBase:
|
class KademliaDatagramBase:
|
||||||
"""
|
"""
|
||||||
@@ -18,7 +22,7 @@ class KademliaDatagramBase:
|
|||||||
these correspond to the packet_type, rpc_id, and node_id args
|
these correspond to the packet_type, rpc_id, and node_id args
|
||||||
"""
|
"""
|
||||||
|
|
||||||
fields = [
|
required_fields = [
|
||||||
'packet_type',
|
'packet_type',
|
||||||
'rpc_id',
|
'rpc_id',
|
||||||
'node_id'
|
'node_id'
|
||||||
@@ -30,21 +34,26 @@ class KademliaDatagramBase:
|
|||||||
self.packet_type = packet_type
|
self.packet_type = packet_type
|
||||||
if self.expected_packet_type != packet_type:
|
if self.expected_packet_type != packet_type:
|
||||||
raise ValueError(f"invalid packet type: {packet_type}, expected {self.expected_packet_type}")
|
raise ValueError(f"invalid packet type: {packet_type}, expected {self.expected_packet_type}")
|
||||||
if len(rpc_id) != constants.rpc_id_length:
|
if len(rpc_id) != constants.RPC_ID_LENGTH:
|
||||||
raise ValueError(f"invalid rpc node_id: {len(rpc_id)} bytes (expected 20)")
|
raise ValueError(f"invalid rpc node_id: {len(rpc_id)} bytes (expected 20)")
|
||||||
if not len(node_id) == constants.hash_length:
|
if not len(node_id) == constants.HASH_LENGTH:
|
||||||
raise ValueError(f"invalid node node_id: {len(node_id)} bytes (expected 48)")
|
raise ValueError(f"invalid node node_id: {len(node_id)} bytes (expected 48)")
|
||||||
self.rpc_id = rpc_id
|
self.rpc_id = rpc_id
|
||||||
self.node_id = node_id
|
self.node_id = node_id
|
||||||
|
|
||||||
def bencode(self) -> bytes:
|
def bencode(self) -> bytes:
|
||||||
return bencode({
|
datagram = {
|
||||||
i: getattr(self, k) for i, k in enumerate(self.fields)
|
i: getattr(self, k) for i, k in enumerate(self.required_fields)
|
||||||
})
|
}
|
||||||
|
for i, k in enumerate(OPTIONAL_FIELDS):
|
||||||
|
value = getattr(self, k, None)
|
||||||
|
if value is not None:
|
||||||
|
datagram[i + OPTIONAL_ARG_OFFSET] = value
|
||||||
|
return bencode(datagram)
|
||||||
|
|
||||||
|
|
||||||
class RequestDatagram(KademliaDatagramBase):
|
class RequestDatagram(KademliaDatagramBase):
|
||||||
fields = [
|
required_fields = [
|
||||||
'packet_type',
|
'packet_type',
|
||||||
'rpc_id',
|
'rpc_id',
|
||||||
'node_id',
|
'node_id',
|
||||||
@@ -68,18 +77,18 @@ class RequestDatagram(KademliaDatagramBase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def make_ping(cls, from_node_id: bytes, rpc_id: typing.Optional[bytes] = None) -> 'RequestDatagram':
|
def make_ping(cls, from_node_id: bytes, rpc_id: typing.Optional[bytes] = None) -> 'RequestDatagram':
|
||||||
rpc_id = rpc_id or constants.generate_id()[:constants.rpc_id_length]
|
rpc_id = rpc_id or constants.generate_id()[:constants.RPC_ID_LENGTH]
|
||||||
return cls(REQUEST_TYPE, rpc_id, from_node_id, b'ping')
|
return cls(REQUEST_TYPE, rpc_id, from_node_id, b'ping')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def make_store(cls, from_node_id: bytes, blob_hash: bytes, token: bytes, port: int,
|
def make_store(cls, from_node_id: bytes, blob_hash: bytes, token: bytes, port: int,
|
||||||
rpc_id: typing.Optional[bytes] = None) -> 'RequestDatagram':
|
rpc_id: typing.Optional[bytes] = None) -> 'RequestDatagram':
|
||||||
rpc_id = rpc_id or constants.generate_id()[:constants.rpc_id_length]
|
rpc_id = rpc_id or constants.generate_id()[:constants.RPC_ID_LENGTH]
|
||||||
if len(blob_hash) != constants.hash_bits // 8:
|
if len(blob_hash) != constants.HASH_BITS // 8:
|
||||||
raise ValueError(f"invalid blob hash length: {len(blob_hash)}")
|
raise ValueError(f"invalid blob hash length: {len(blob_hash)}")
|
||||||
if not 0 < port < 65536:
|
if not 0 < port < 65536:
|
||||||
raise ValueError(f"invalid port: {port}")
|
raise ValueError(f"invalid port: {port}")
|
||||||
if len(token) != constants.hash_bits // 8:
|
if len(token) != constants.HASH_BITS // 8:
|
||||||
raise ValueError(f"invalid token length: {len(token)}")
|
raise ValueError(f"invalid token length: {len(token)}")
|
||||||
store_args = [blob_hash, token, port, from_node_id, 0]
|
store_args = [blob_hash, token, port, from_node_id, 0]
|
||||||
return cls(REQUEST_TYPE, rpc_id, from_node_id, b'store', store_args)
|
return cls(REQUEST_TYPE, rpc_id, from_node_id, b'store', store_args)
|
||||||
@@ -87,16 +96,16 @@ class RequestDatagram(KademliaDatagramBase):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def make_find_node(cls, from_node_id: bytes, key: bytes,
|
def make_find_node(cls, from_node_id: bytes, key: bytes,
|
||||||
rpc_id: typing.Optional[bytes] = None) -> 'RequestDatagram':
|
rpc_id: typing.Optional[bytes] = None) -> 'RequestDatagram':
|
||||||
rpc_id = rpc_id or constants.generate_id()[:constants.rpc_id_length]
|
rpc_id = rpc_id or constants.generate_id()[:constants.RPC_ID_LENGTH]
|
||||||
if len(key) != constants.hash_bits // 8:
|
if len(key) != constants.HASH_BITS // 8:
|
||||||
raise ValueError(f"invalid key length: {len(key)}")
|
raise ValueError(f"invalid key length: {len(key)}")
|
||||||
return cls(REQUEST_TYPE, rpc_id, from_node_id, b'findNode', [key])
|
return cls(REQUEST_TYPE, rpc_id, from_node_id, b'findNode', [key])
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def make_find_value(cls, from_node_id: bytes, key: bytes,
|
def make_find_value(cls, from_node_id: bytes, key: bytes,
|
||||||
rpc_id: typing.Optional[bytes] = None, page: int = 0) -> 'RequestDatagram':
|
rpc_id: typing.Optional[bytes] = None, page: int = 0) -> 'RequestDatagram':
|
||||||
rpc_id = rpc_id or constants.generate_id()[:constants.rpc_id_length]
|
rpc_id = rpc_id or constants.generate_id()[:constants.RPC_ID_LENGTH]
|
||||||
if len(key) != constants.hash_bits // 8:
|
if len(key) != constants.HASH_BITS // 8:
|
||||||
raise ValueError(f"invalid key length: {len(key)}")
|
raise ValueError(f"invalid key length: {len(key)}")
|
||||||
if page < 0:
|
if page < 0:
|
||||||
raise ValueError(f"cannot request a negative page ({page})")
|
raise ValueError(f"cannot request a negative page ({page})")
|
||||||
@@ -104,7 +113,7 @@ class RequestDatagram(KademliaDatagramBase):
|
|||||||
|
|
||||||
|
|
||||||
class ResponseDatagram(KademliaDatagramBase):
|
class ResponseDatagram(KademliaDatagramBase):
|
||||||
fields = [
|
required_fields = [
|
||||||
'packet_type',
|
'packet_type',
|
||||||
'rpc_id',
|
'rpc_id',
|
||||||
'node_id',
|
'node_id',
|
||||||
@@ -119,7 +128,7 @@ class ResponseDatagram(KademliaDatagramBase):
|
|||||||
|
|
||||||
|
|
||||||
class ErrorDatagram(KademliaDatagramBase):
|
class ErrorDatagram(KademliaDatagramBase):
|
||||||
fields = [
|
required_fields = [
|
||||||
'packet_type',
|
'packet_type',
|
||||||
'rpc_id',
|
'rpc_id',
|
||||||
'node_id',
|
'node_id',
|
||||||
@@ -135,7 +144,7 @@ class ErrorDatagram(KademliaDatagramBase):
|
|||||||
self.response = response.decode()
|
self.response = response.decode()
|
||||||
|
|
||||||
|
|
||||||
def decode_datagram(datagram: bytes) -> typing.Union[RequestDatagram, ResponseDatagram, ErrorDatagram]:
|
def _decode_datagram(datagram: bytes):
|
||||||
msg_types = {
|
msg_types = {
|
||||||
REQUEST_TYPE: RequestDatagram,
|
REQUEST_TYPE: RequestDatagram,
|
||||||
RESPONSE_TYPE: ResponseDatagram,
|
RESPONSE_TYPE: ResponseDatagram,
|
||||||
@@ -143,23 +152,36 @@ def decode_datagram(datagram: bytes) -> typing.Union[RequestDatagram, ResponseDa
|
|||||||
}
|
}
|
||||||
|
|
||||||
primitive: typing.Dict = bdecode(datagram)
|
primitive: typing.Dict = bdecode(datagram)
|
||||||
if primitive[0] in [REQUEST_TYPE, ERROR_TYPE, RESPONSE_TYPE]: # pylint: disable=unsubscriptable-object
|
|
||||||
datagram_type = primitive[0] # pylint: disable=unsubscriptable-object
|
converted = {
|
||||||
|
str(k).encode() if not isinstance(k, bytes) else k: v for k, v in primitive.items()
|
||||||
|
}
|
||||||
|
|
||||||
|
if converted[b'0'] in [REQUEST_TYPE, ERROR_TYPE, RESPONSE_TYPE]: # pylint: disable=unsubscriptable-object
|
||||||
|
datagram_type = converted[b'0'] # pylint: disable=unsubscriptable-object
|
||||||
else:
|
else:
|
||||||
raise ValueError("invalid datagram type")
|
raise ValueError("invalid datagram type")
|
||||||
datagram_class = msg_types[datagram_type]
|
datagram_class = msg_types[datagram_type]
|
||||||
return datagram_class(**{
|
decoded = {
|
||||||
k: primitive[i] # pylint: disable=unsubscriptable-object
|
k: converted[str(i).encode()] # pylint: disable=unsubscriptable-object
|
||||||
for i, k in enumerate(datagram_class.fields)
|
for i, k in enumerate(datagram_class.required_fields)
|
||||||
if i in primitive # pylint: disable=unsupported-membership-test
|
if str(i).encode() in converted # pylint: disable=unsupported-membership-test
|
||||||
}
|
}
|
||||||
)
|
for i, _ in enumerate(OPTIONAL_FIELDS):
|
||||||
|
if str(i + OPTIONAL_ARG_OFFSET).encode() in converted:
|
||||||
|
decoded[i + OPTIONAL_ARG_OFFSET] = converted[str(i + OPTIONAL_ARG_OFFSET).encode()]
|
||||||
|
return decoded, datagram_class
|
||||||
|
|
||||||
|
|
||||||
|
def decode_datagram(datagram: bytes) -> typing.Union[RequestDatagram, ResponseDatagram, ErrorDatagram]:
|
||||||
|
decoded, datagram_class = _decode_datagram(datagram)
|
||||||
|
return datagram_class(**decoded)
|
||||||
|
|
||||||
|
|
||||||
def make_compact_ip(address: str) -> bytearray:
|
def make_compact_ip(address: str) -> bytearray:
|
||||||
compact_ip = reduce(lambda buff, x: buff + bytearray([int(x)]), address.split('.'), bytearray())
|
compact_ip = reduce(lambda buff, x: buff + bytearray([int(x)]), address.split('.'), bytearray())
|
||||||
if len(compact_ip) != 4:
|
if len(compact_ip) != 4:
|
||||||
raise ValueError(f"invalid IPv4 length")
|
raise ValueError("invalid IPv4 length")
|
||||||
return compact_ip
|
return compact_ip
|
||||||
|
|
||||||
|
|
||||||
@@ -167,8 +189,8 @@ def make_compact_address(node_id: bytes, address: str, port: int) -> bytearray:
|
|||||||
compact_ip = make_compact_ip(address)
|
compact_ip = make_compact_ip(address)
|
||||||
if not 0 < port < 65536:
|
if not 0 < port < 65536:
|
||||||
raise ValueError(f'Invalid port: {port}')
|
raise ValueError(f'Invalid port: {port}')
|
||||||
if len(node_id) != constants.hash_bits // 8:
|
if len(node_id) != constants.HASH_BITS // 8:
|
||||||
raise ValueError(f"invalid node node_id length")
|
raise ValueError("invalid node node_id length")
|
||||||
return compact_ip + port.to_bytes(2, 'big') + node_id
|
return compact_ip + port.to_bytes(2, 'big') + node_id
|
||||||
|
|
||||||
|
|
||||||
@@ -178,6 +200,6 @@ def decode_compact_address(compact_address: bytes) -> typing.Tuple[bytes, str, i
|
|||||||
node_id = compact_address[6:]
|
node_id = compact_address[6:]
|
||||||
if not 0 < port < 65536:
|
if not 0 < port < 65536:
|
||||||
raise ValueError(f'Invalid port: {port}')
|
raise ValueError(f'Invalid port: {port}')
|
||||||
if len(node_id) != constants.hash_bits // 8:
|
if len(node_id) != constants.HASH_BITS // 8:
|
||||||
raise ValueError(f"invalid node node_id length")
|
raise ValueError("invalid node node_id length")
|
||||||
return node_id, address, port
|
return node_id, address, port
|
||||||
@@ -1,307 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en" class="no-js">
|
|
||||||
<head>
|
|
||||||
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
||||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<meta name="lang:clipboard.copy" content="Copy to clipboard">
|
|
||||||
|
|
||||||
<meta name="lang:clipboard.copied" content="Copied to clipboard">
|
|
||||||
|
|
||||||
<meta name="lang:search.language" content="en">
|
|
||||||
|
|
||||||
<meta name="lang:search.pipeline.stopwords" content="True">
|
|
||||||
|
|
||||||
<meta name="lang:search.pipeline.trimmer" content="True">
|
|
||||||
|
|
||||||
<meta name="lang:search.result.none" content="No matching documents">
|
|
||||||
|
|
||||||
<meta name="lang:search.result.one" content="1 matching document">
|
|
||||||
|
|
||||||
<meta name="lang:search.result.other" content="# matching documents">
|
|
||||||
|
|
||||||
<meta name="lang:search.tokenizer" content="[\s\-]+">
|
|
||||||
|
|
||||||
<link rel="shortcut icon" href="/assets/images/favicon.png">
|
|
||||||
<meta name="generator" content="mkdocs-0.17.3, mkdocs-material-2.7.0">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<title>LBRY</title>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="/assets/stylesheets/application.78aab2dc.css">
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="/assets/stylesheets/application-palette.6079476c.css">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script src="/assets/javascripts/modernizr.1aa3b519.js"></script>
|
|
||||||
|
|
||||||
|
|
||||||
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700|Roboto+Mono">
|
|
||||||
<style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<body dir="ltr" data-md-color-primary="teal" data-md-color-accent="green">
|
|
||||||
|
|
||||||
<svg class="md-svg">
|
|
||||||
<defs>
|
|
||||||
|
|
||||||
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448"
|
|
||||||
viewBox="0 0 416 448" id="github">
|
|
||||||
<path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19-18.125
|
|
||||||
8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19 18.125-8.5
|
|
||||||
18.125 8.5 10.75 19 3.125 20.5zM320 304q0 10-3.125 20.5t-10.75
|
|
||||||
19-18.125 8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19
|
|
||||||
18.125-8.5 18.125 8.5 10.75 19 3.125 20.5zM360
|
|
||||||
304q0-30-17.25-51t-46.75-21q-10.25 0-48.75 5.25-17.75 2.75-39.25
|
|
||||||
2.75t-39.25-2.75q-38-5.25-48.75-5.25-29.5 0-46.75 21t-17.25 51q0 22 8
|
|
||||||
38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0
|
|
||||||
37.25-1.75t35-7.375 30.5-15 20.25-25.75 8-38.375zM416 260q0 51.75-15.25
|
|
||||||
82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5-41.75
|
|
||||||
1.125q-19.5 0-35.5-0.75t-36.875-3.125-38.125-7.5-34.25-12.875-30.25-20.25-21.5-28.75q-15.5-30.75-15.5-82.75
|
|
||||||
0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25
|
|
||||||
30.875q36.75-8.75 77.25-8.75 37 0 70 8 26.25-20.5
|
|
||||||
46.75-30.25t47.25-9.75q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34
|
|
||||||
99.5z" />
|
|
||||||
</svg>
|
|
||||||
|
|
||||||
</defs>
|
|
||||||
</svg>
|
|
||||||
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="drawer">
|
|
||||||
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="search">
|
|
||||||
<label class="md-overlay" data-md-component="overlay" for="drawer"></label>
|
|
||||||
|
|
||||||
|
|
||||||
<header class="md-header" data-md-component="header">
|
|
||||||
<nav class="md-header-nav md-grid">
|
|
||||||
<div class="md-flex">
|
|
||||||
<div class="md-flex__cell md-flex__cell--shrink">
|
|
||||||
<a href="/" title="LBRY" class="md-header-nav__button md-logo">
|
|
||||||
|
|
||||||
<img src="https://s3.amazonaws.com/files.lbry.io/logo-square-white-bookonly.png" alt="LBRY logo" width="24" height="24">
|
|
||||||
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="md-flex__cell md-flex__cell--shrink">
|
|
||||||
<label class="md-icon md-icon--menu md-header-nav__button" for="drawer"></label>
|
|
||||||
</div>
|
|
||||||
<div class="md-flex__cell md-flex__cell--stretch">
|
|
||||||
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
|
|
||||||
|
|
||||||
|
|
||||||
<span class="md-header-nav__topic">
|
|
||||||
LBRY
|
|
||||||
</span>
|
|
||||||
<span class="md-header-nav__topic">
|
|
||||||
|
|
||||||
</span>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="md-flex__cell md-flex__cell--shrink">
|
|
||||||
|
|
||||||
|
|
||||||
<label class="md-icon md-icon--search md-header-nav__button" for="search"></label>
|
|
||||||
|
|
||||||
<div class="md-search" data-md-component="search" role="dialog">
|
|
||||||
<label class="md-search__overlay" for="search"></label>
|
|
||||||
<div class="md-search__inner" role="search">
|
|
||||||
<form class="md-search__form" name="search">
|
|
||||||
<input type="text" class="md-search__input" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
|
|
||||||
<label class="md-icon md-search__icon" for="search"></label>
|
|
||||||
<button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
|
|
||||||

|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
<div class="md-search__output">
|
|
||||||
<div class="md-search__scrollwrap" data-md-scrollfix>
|
|
||||||
<div class="md-search-result" data-md-component="result">
|
|
||||||
<div class="md-search-result__meta">
|
|
||||||
Type to start searching
|
|
||||||
</div>
|
|
||||||
<ol class="md-search-result__list"></ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="md-flex__cell md-flex__cell--shrink">
|
|
||||||
<div class="md-header-nav__source">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="https://github.com/lbryio/lbry/" title="Go to repository" class="md-source" data-md-source="github">
|
|
||||||
|
|
||||||
<div class="md-source__icon">
|
|
||||||
<svg viewBox="0 0 24 24" width="24" height="24">
|
|
||||||
<use xlink:href="#github" width="24" height="24"></use>
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="md-source__repository">
|
|
||||||
GitHub
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div class="md-container">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<main class="md-main">
|
|
||||||
<div class="md-main__inner md-grid" data-md-component="container">
|
|
||||||
|
|
||||||
|
|
||||||
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
|
|
||||||
<div class="md-sidebar__scrollwrap">
|
|
||||||
<div class="md-sidebar__inner">
|
|
||||||
<nav class="md-nav md-nav--primary" data-md-level="0">
|
|
||||||
<label class="md-nav__title md-nav__title--site" for="drawer">
|
|
||||||
<span class="md-nav__button md-logo">
|
|
||||||
|
|
||||||
<img src="https://s3.amazonaws.com/files.lbry.io/logo-square-white-bookonly.png" alt="LBRY logo" width="48" height="48">
|
|
||||||
|
|
||||||
</span>
|
|
||||||
LBRY
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<div class="md-nav__source">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="https://github.com/lbryio/lbry/" title="Go to repository" class="md-source" data-md-source="github">
|
|
||||||
|
|
||||||
<div class="md-source__icon">
|
|
||||||
<svg viewBox="0 0 24 24" width="24" height="24">
|
|
||||||
<use xlink:href="#github" width="24" height="24"></use>
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="md-source__repository">
|
|
||||||
GitHub
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<ul class="md-nav__list" data-md-scrollfix>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<li class="md-nav__item">
|
|
||||||
<a href="/" title="API" class="md-nav__link">
|
|
||||||
API
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<li class="md-nav__item">
|
|
||||||
<a href="/cli/" title="CLI" class="md-nav__link">
|
|
||||||
CLI
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="md-content">
|
|
||||||
<article class="md-content__inner md-typeset">
|
|
||||||
|
|
||||||
<h1>404 - Not found</h1>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</article>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
|
|
||||||
<footer class="md-footer">
|
|
||||||
|
|
||||||
<div class="md-footer-meta md-typeset">
|
|
||||||
<div class="md-footer-meta__inner md-grid">
|
|
||||||
<div class="md-footer-copyright">
|
|
||||||
|
|
||||||
powered by
|
|
||||||
<a href="http://www.mkdocs.org">MkDocs</a>
|
|
||||||
and
|
|
||||||
<a href="https://squidfunk.github.io/mkdocs-material/">
|
|
||||||
Material for MkDocs</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="/assets/javascripts/application.8eb9be28.js"></script>
|
|
||||||
|
|
||||||
<script>app.initialize({version:"0.17.3",url:{base:""}})</script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>!function(e,a,t,n,o,c,i){e.GoogleAnalyticsObject=o,e.ga=e.ga||function(){(e.ga.q=e.ga.q||[]).push(arguments)},e.ga.l=1*new Date,c=a.createElement(t),i=a.getElementsByTagName(t)[0],c.async=1,c.src="https://www.google-analytics.com/analytics.js",i.parentNode.insertBefore(c,i)}(window,document,"script",0,"ga"),ga("create","UA-60403362-1","auto"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(e){e.host!=document.location.host&&e.addEventListener("click",function(){var a=e.getAttribute("data-md-action")||"follow";ga("send","event","outbound",a,e.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
Before Width: | Height: | Size: 521 B |
@@ -1,20 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="352" height="448"
|
|
||||||
viewBox="0 0 352 448" id="bitbucket">
|
|
||||||
<path fill="currentColor" d="M203.75 214.75q2 15.75-12.625 25.25t-27.875
|
|
||||||
1.5q-9.75-4.25-13.375-14.5t-0.125-20.5 13-14.5q9-4.5 18.125-3t16 8.875
|
|
||||||
6.875 16.875zM231.5 209.5q-3.5-26.75-28.25-41t-49.25-3.25q-15.75
|
|
||||||
7-25.125 22.125t-8.625 32.375q1 22.75 19.375 38.75t41.375 14q22.75-2
|
|
||||||
38-21t12.5-42zM291.25
|
|
||||||
74q-5-6.75-14-11.125t-14.5-5.5-17.75-3.125q-72.75-11.75-141.5 0.5-10.75
|
|
||||||
1.75-16.5 3t-13.75 5.5-12.5 10.75q7.5 7 19 11.375t18.375 5.5 21.875
|
|
||||||
2.875q57 7.25 112 0.25 15.75-2 22.375-3t18.125-5.375 18.75-11.625zM305.5
|
|
||||||
332.75q-2 6.5-3.875 19.125t-3.5 21-7.125 17.5-14.5 14.125q-21.5
|
|
||||||
12-47.375 17.875t-50.5 5.5-50.375-4.625q-11.5-2-20.375-4.5t-19.125-6.75-18.25-10.875-13-15.375q-6.25-24-14.25-73l1.5-4
|
|
||||||
4.5-2.25q55.75 37 126.625 37t126.875-37q5.25 1.5 6 5.75t-1.25 11.25-2
|
|
||||||
9.25zM350.75 92.5q-6.5 41.75-27.75 163.75-1.25 7.5-6.75 14t-10.875
|
|
||||||
10-13.625 7.75q-63 31.5-152.5
|
|
||||||
22-62-6.75-98.5-34.75-3.75-3-6.375-6.625t-4.25-8.75-2.25-8.5-1.5-9.875-1.375-8.75q-2.25-12.5-6.625-37.5t-7-40.375-5.875-36.875-5.5-39.5q0.75-6.5
|
|
||||||
4.375-12.125t7.875-9.375 11.25-7.5 11.5-5.625 12-4.625q31.25-11.5
|
|
||||||
78.25-16 94.75-9.25 169 12.5 38.75 11.5 53.75 30.5 4 5 4.125
|
|
||||||
12.75t-1.375 13.5z" />
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.4 KiB |
@@ -1,18 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448"
|
|
||||||
viewBox="0 0 416 448" id="github">
|
|
||||||
<path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19-18.125
|
|
||||||
8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19 18.125-8.5
|
|
||||||
18.125 8.5 10.75 19 3.125 20.5zM320 304q0 10-3.125 20.5t-10.75
|
|
||||||
19-18.125 8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19
|
|
||||||
18.125-8.5 18.125 8.5 10.75 19 3.125 20.5zM360
|
|
||||||
304q0-30-17.25-51t-46.75-21q-10.25 0-48.75 5.25-17.75 2.75-39.25
|
|
||||||
2.75t-39.25-2.75q-38-5.25-48.75-5.25-29.5 0-46.75 21t-17.25 51q0 22 8
|
|
||||||
38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0
|
|
||||||
37.25-1.75t35-7.375 30.5-15 20.25-25.75 8-38.375zM416 260q0 51.75-15.25
|
|
||||||
82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5-41.75
|
|
||||||
1.125q-19.5 0-35.5-0.75t-36.875-3.125-38.125-7.5-34.25-12.875-30.25-20.25-21.5-28.75q-15.5-30.75-15.5-82.75
|
|
||||||
0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25
|
|
||||||
30.875q36.75-8.75 77.25-8.75 37 0 70 8 26.25-20.5
|
|
||||||
46.75-30.25t47.25-9.75q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34
|
|
||||||
99.5z" />
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.2 KiB |
@@ -1,38 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500"
|
|
||||||
viewBox="0 0 500 500" id="gitlab">
|
|
||||||
<g transform="translate(156.197863, 1.160267)">
|
|
||||||
<path fill="currentColor"
|
|
||||||
d="M93.667,473.347L93.667,473.347l90.684-279.097H2.983L93.667,
|
|
||||||
473.347L93.667,473.347z" />
|
|
||||||
</g>
|
|
||||||
<g transform="translate(28.531199, 1.160800)" opacity="0.7">
|
|
||||||
<path fill="currentColor"
|
|
||||||
d="M221.333,473.345L130.649,194.25H3.557L221.333,473.345L221.333,
|
|
||||||
473.345z" />
|
|
||||||
</g>
|
|
||||||
<g transform="translate(0.088533, 0.255867)" opacity="0.5">
|
|
||||||
<path fill="currentColor"
|
|
||||||
d="M32,195.155L32,195.155L4.441,279.97c-2.513,7.735,0.24,16.21,6.821,
|
|
||||||
20.99l238.514,173.29 L32,195.155L32,195.155z" />
|
|
||||||
</g>
|
|
||||||
<g transform="translate(29.421866, 280.255593)">
|
|
||||||
<path fill="currentColor"
|
|
||||||
d="M2.667-84.844h127.092L75.14-252.942c-2.811-8.649-15.047-8.649-17.856,
|
|
||||||
0L2.667-84.844 L2.667-84.844z" />
|
|
||||||
</g>
|
|
||||||
<g transform="translate(247.197860, 1.160800)" opacity="0.7">
|
|
||||||
<path fill="currentColor"
|
|
||||||
d="M2.667,473.345L93.351,194.25h127.092L2.667,473.345L2.667,
|
|
||||||
473.345z" />
|
|
||||||
</g>
|
|
||||||
<g transform="translate(246.307061, 0.255867)" opacity="0.5">
|
|
||||||
<path fill="currentColor"
|
|
||||||
d="M221.334,195.155L221.334,195.155l27.559,84.815c2.514,7.735-0.24,
|
|
||||||
16.21-6.821,20.99 L3.557,474.25L221.334,195.155L221.334,195.155z" />
|
|
||||||
</g>
|
|
||||||
<g transform="translate(336.973725, 280.255593)">
|
|
||||||
<path fill="currentColor"
|
|
||||||
d="M130.667-84.844H3.575l54.618-168.098c2.811-8.649,15.047-8.649,
|
|
||||||
17.856,0L130.667-84.844 L130.667-84.844z" />
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.6 KiB |
@@ -1 +0,0 @@
|
|||||||
!function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=6)}([function(e,t,n){"use strict";t.__esModule=!0,t.default={createElement:function(e,t){var n=document.createElement(e);t&&Array.prototype.forEach.call(Object.keys(t),function(e){n.setAttribute(e,t[e])});for(var r=arguments.length,i=Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return function e(t){Array.prototype.forEach.call(t,function(t){"string"==typeof t||"number"==typeof t?n.textContent+=t:Array.isArray(t)?e(t):void 0!==t.__html?n.innerHTML+=t.__html:t instanceof Node&&n.appendChild(t)})}(i),n}},e.exports=t.default},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof fetch?fetch.bind():function(e,t){return t=t||{},new Promise(function(n,r){function i(){var e,t=[],n=[],r={};return o.getAllResponseHeaders().replace(/^(.*?):\s*([\s\S]*?)$/gm,function(i,o,a){t.push(o=o.toLowerCase()),n.push([o,a]),e=r[o],r[o]=e?e+","+a:a}),{ok:1==(o.status/200|0),status:o.status,statusText:o.statusText,url:o.responseURL,clone:i,text:function(){return Promise.resolve(o.responseText)},json:function(){return Promise.resolve(o.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([o.response]))},headers:{keys:function(){return t},entries:function(){return n},get:function(e){return r[e.toLowerCase()]},has:function(e){return e.toLowerCase()in r}}}}var o=new XMLHttpRequest;o.open(t.method||"get",e);for(var a in t.headers)o.setRequestHeader(a,t.headers[a]);o.withCredentials="include"==t.credentials,o.onload=function(){n(i())},o.onerror=r,o.send(t.body)})};t.default=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=function(){function e(t,n,i){var o=this;r(this,e),this.els_=Array.prototype.slice.call("string"==typeof t?document.querySelectorAll(t):[].concat(t)),this.handler_="function"==typeof i?{update:i}:i,this.events_=[].concat(n),this.update_=function(e){return o.handler_.update(e)}}return e.prototype.listen=function(){var e=this;this.els_.forEach(function(t){e.events_.forEach(function(n){t.addEventListener(n,e.update_,!1)})}),"function"==typeof this.handler_.setup&&this.handler_.setup()},e.prototype.unlisten=function(){var e=this;this.els_.forEach(function(t){e.events_.forEach(function(n){t.removeEventListener(n,e.update_)})}),"function"==typeof this.handler_.reset&&this.handler_.reset()},e}();t.default=i},,,function(e,t,n){"use strict";(function(e){function r(e){return e&&e.__esModule?e:{default:e}}function i(t){new f.default.Event.Listener(document,"DOMContentLoaded",function(){if(!(document.body instanceof HTMLElement))throw new ReferenceError;l.default.attach(document.body),Modernizr.addTest("ios",function(){return!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)});var t=document.querySelectorAll("table:not([class])");if(Array.prototype.forEach.call(t,function(t){var n=e.createElement("div",{class:"md-typeset__scrollwrap"},e.createElement("div",{class:"md-typeset__table"}));t.nextSibling?t.parentNode.insertBefore(n,t.nextSibling):t.parentNode.appendChild(n),n.children[0].appendChild(t)}),c.default.isSupported()){var n=document.querySelectorAll(".codehilite > pre, pre > code");Array.prototype.forEach.call(n,function(t,n){var r="__code_"+n,i=e.createElement("button",{class:"md-clipboard",title:h("clipboard.copy"),"data-clipboard-target":"#"+r+" pre, #"+r+" code"},e.createElement("span",{class:"md-clipboard__message"})),o=t.parentNode;o.id=r,o.insertBefore(i,t)});new c.default(".md-clipboard").on("success",function(e){var t=e.trigger.querySelector(".md-clipboard__message");if(!(t instanceof HTMLElement))throw new ReferenceError;e.clearSelection(),t.dataset.mdTimer&&clearTimeout(parseInt(t.dataset.mdTimer,10)),t.classList.add("md-clipboard__message--active"),t.innerHTML=h("clipboard.copied"),t.dataset.mdTimer=setTimeout(function(){t.classList.remove("md-clipboard__message--active"),t.dataset.mdTimer=""},2e3).toString()})}if(!Modernizr.details){var r=document.querySelectorAll("details > summary");Array.prototype.forEach.call(r,function(e){e.addEventListener("click",function(e){var t=e.target.parentNode;t.hasAttribute("open")?t.removeAttribute("open"):t.setAttribute("open","")})})}var i=function(){if(document.location.hash){var e=document.getElementById(document.location.hash.substring(1));if(!Line truncated
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,i,n;e.da=function(){this.pipeline.reset(),this.pipeline.add(e.da.trimmer,e.da.stopWordFilter,e.da.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.da.stemmer))},e.da.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.da.trimmer=e.trimmerSupport.generateTrimmer(e.da.wordCharacters),e.Pipeline.registerFunction(e.da.trimmer,"trimmer-da"),e.da.stemmer=(r=e.stemmerSupport.Among,i=e.stemmerSupport.SnowballProgram,n=new function(){var e,n,t,s=[new r("hed",-1,1),new r("ethed",0,1),new r("ered",-1,1),new r("e",-1,1),new r("erede",3,1),new r("ende",3,1),new r("erende",5,1),new r("ene",3,1),new r("erne",3,1),new r("ere",3,1),new r("en",-1,1),new r("heden",10,1),new r("eren",10,1),new r("er",-1,1),new r("heder",13,1),new r("erer",13,1),new r("s",-1,2),new r("heds",16,1),new r("es",16,1),new r("endes",18,1),new r("erendes",19,1),new r("enes",18,1),new r("ernes",18,1),new r("eres",18,1),new r("ens",16,1),new r("hedens",24,1),new r("erens",24,1),new r("ers",16,1),new r("ets",16,1),new r("erets",28,1),new r("et",-1,1),new r("eret",30,1)],o=[new r("gd",-1,-1),new r("dt",-1,-1),new r("gt",-1,-1),new r("kt",-1,-1)],a=[new r("ig",-1,1),new r("lig",0,1),new r("elig",1,1),new r("els",-1,1),new r("løst",-1,2)],d=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],u=[239,254,42,3,0,0,0,0,0,0,0,0,0,0,0,0,16],c=new i;function l(){var e,r=c.limit-c.cursor;c.cursor>=n&&(e=c.limit_backward,c.limit_backward=n,c.ket=c.cursor,c.find_among_b(o,4)?(c.bra=c.cursor,c.limit_backward=e,c.cursor=c.limit-r,c.cursor>c.limit_backward&&(c.cursor--,c.bra=c.cursor,c.slice_del())):c.limit_backward=e)}this.setCurrent=function(e){c.setCurrent(e)},this.getCurrent=function(){return c.getCurrent()},this.stem=function(){var r,i=c.cursor;return function(){var r,i=c.cursor+3;if(n=c.limit,0<=i&&i<=c.limit){for(e=i;;){if(r=c.cursor,c.in_grouping(d,97,248)){c.cursor=r;break}if(c.cursor=r,r>=c.limit)return;c.cursor++}for(;!c.out_grouping(d,97,248);){if(c.cursor>=c.limit)return;c.cursor++}(n=c.cursor)<e&&(n=e)}}(),c.limit_backward=i,c.cursor=c.limit,function(){var e,r;if(c.cursor>=n&&(r=c.limit_backward,c.limit_backward=n,c.ket=c.cursor,e=c.find_among_b(s,32),c.limit_backward=r,e))switch(c.bra=c.cursor,e){case 1:c.slice_del();break;case 2:c.in_grouping_b(u,97,229)&&c.slice_del()}}(),c.cursor=c.limit,l(),c.cursor=c.limit,function(){var e,r,i,t=c.limit-c.cursor;if(c.ket=c.cursor,c.eq_s_b(2,"st")&&(c.bra=c.cursor,c.eq_s_b(2,"ig")&&c.slice_del()),c.cursor=c.limit-t,c.cursor>=n&&(r=c.limit_backward,c.limit_backward=n,c.ket=c.cursor,e=c.find_among_b(a,5),c.limit_backward=r,e))switch(c.bra=c.cursor,e){case 1:c.slice_del(),i=c.limit-c.cursor,l(),c.cursor=c.limit-i;break;case 2:c.slice_from("løs")}}(),c.cursor=c.limit,c.cursor>=n&&(r=c.limit_backward,c.limit_backward=n,c.ket=c.cursor,c.out_grouping_b(d,97,248)?(c.bra=c.cursor,t=c.slice_to(t),c.limit_backward=r,c.eq_v_b(t)&&c.slice_del()):c.limit_backward=r),!0}},function(e){return"function"==typeof e.update?e.update(function(e){return n.setCurrent(e),n.stem(),n.getCurrent()}):(n.setCurrent(e),n.stem(),n.getCurrent())}),e.Pipeline.registerFunction(e.da.stemmer,"stemmer-da"),e.da.stopWordFilter=e.generateStopWordFilter("ad af alle alt anden at blev blive bliver da de dem den denne der deres det dette dig din disse dog du efter eller en end er et for fra ham han hans har havde have hende hendes her hos hun hvad hvis hvor i ikke ind jeg jer jo kunne man mange med meget men mig min mine mit mod ned noget nogle nu når og også om op os over på selv sig sin sine sit skal skulle som sådan thi til ud under var vi vil ville vor være været".split(" ")),e.Pipeline.registerFunction(e.da.stopWordFilter,"stopWordFilter-da")}});
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,n,i;e.de=function(){this.pipeline.reset(),this.pipeline.add(e.de.trimmer,e.de.stopWordFilter,e.de.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.de.stemmer))},e.de.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.de.trimmer=e.trimmerSupport.generateTrimmer(e.de.wordCharacters),e.Pipeline.registerFunction(e.de.trimmer,"trimmer-de"),e.de.stemmer=(r=e.stemmerSupport.Among,n=e.stemmerSupport.SnowballProgram,i=new function(){var e,i,s,t=[new r("",-1,6),new r("U",0,2),new r("Y",0,1),new r("ä",0,3),new r("ö",0,4),new r("ü",0,5)],o=[new r("e",-1,2),new r("em",-1,1),new r("en",-1,2),new r("ern",-1,1),new r("er",-1,1),new r("s",-1,3),new r("es",5,2)],c=[new r("en",-1,1),new r("er",-1,1),new r("st",-1,2),new r("est",2,1)],u=[new r("ig",-1,1),new r("lich",-1,1)],a=[new r("end",-1,1),new r("ig",-1,2),new r("ung",-1,1),new r("lich",-1,3),new r("isch",-1,2),new r("ik",-1,2),new r("heit",-1,3),new r("keit",-1,4)],d=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,8,0,32,8],l=[117,30,5],m=[117,30,4],h=new n;function w(e,r,n){return!(!h.eq_s(1,e)||(h.ket=h.cursor,!h.in_grouping(d,97,252)))&&(h.slice_from(r),h.cursor=n,!0)}function f(){for(;!h.in_grouping(d,97,252);){if(h.cursor>=h.limit)return!0;h.cursor++}for(;!h.out_grouping(d,97,252);){if(h.cursor>=h.limit)return!0;h.cursor++}return!1}function b(){return s<=h.cursor}function _(){return i<=h.cursor}this.setCurrent=function(e){h.setCurrent(e)},this.getCurrent=function(){return h.getCurrent()},this.stem=function(){var r=h.cursor;return function(){for(var e,r,n,i,s=h.cursor;;)if(e=h.cursor,h.bra=e,h.eq_s(1,"ß"))h.ket=h.cursor,h.slice_from("ss");else{if(e>=h.limit)break;h.cursor=e+1}for(h.cursor=s;;)for(r=h.cursor;;){if(n=h.cursor,h.in_grouping(d,97,252)){if(i=h.cursor,h.bra=i,w("u","U",n))break;if(h.cursor=i,w("y","Y",n))break}if(n>=h.limit)return void(h.cursor=r);h.cursor=n+1}}(),h.cursor=r,function(){s=h.limit,i=s;var r=h.cursor+3;0<=r&&r<=h.limit&&(e=r,f()||((s=h.cursor)<e&&(s=e),f()||(i=h.cursor)))}(),h.limit_backward=r,h.cursor=h.limit,function(){var e,r,n,i,s=h.limit-h.cursor;if(h.ket=h.cursor,(e=h.find_among_b(o,7))&&(h.bra=h.cursor,b()))switch(e){case 1:h.slice_del();break;case 2:h.slice_del(),h.ket=h.cursor,h.eq_s_b(1,"s")&&(h.bra=h.cursor,h.eq_s_b(3,"nis")&&h.slice_del());break;case 3:h.in_grouping_b(l,98,116)&&h.slice_del()}if(h.cursor=h.limit-s,h.ket=h.cursor,(e=h.find_among_b(c,4))&&(h.bra=h.cursor,b()))switch(e){case 1:h.slice_del();break;case 2:if(h.in_grouping_b(m,98,116)){var t=h.cursor-3;h.limit_backward<=t&&t<=h.limit&&(h.cursor=t,h.slice_del())}}if(h.cursor=h.limit-s,h.ket=h.cursor,(e=h.find_among_b(a,8))&&(h.bra=h.cursor,_()))switch(e){case 1:h.slice_del(),h.ket=h.cursor,h.eq_s_b(2,"ig")&&(h.bra=h.cursor,r=h.limit-h.cursor,h.eq_s_b(1,"e")||(h.cursor=h.limit-r,_()&&h.slice_del()));break;case 2:n=h.limit-h.cursor,h.eq_s_b(1,"e")||(h.cursor=h.limit-n,h.slice_del());break;case 3:if(h.slice_del(),h.ket=h.cursor,i=h.limit-h.cursor,!h.eq_s_b(2,"er")&&(h.cursor=h.limit-i,!h.eq_s_b(2,"en")))break;h.bra=h.cursor,b()&&h.slice_del();break;case 4:h.slice_del(),h.ket=h.cursor,(e=h.find_among_b(u,2))&&(h.bra=h.cursor,_()&&1==e&&h.slice_del())}}(),h.cursor=h.limit_backward,function(){for(var e,r;;){if(r=h.cursor,h.bra=r,!(e=h.find_among(t,6)))return;switch(h.ket=h.cursor,e){case 1:h.slice_from("y");break;case 2:case 5:h.slice_from("u");break;case 3:h.slice_from("a");break;case 4:h.slice_from("o");break;case 6:if(h.cursor>=h.limit)return;h.cursor++}}}(),!0}},function(e){return"function"==typeof e.update?e.update(function(e){return i.setCurrent(e),i.stem(),i.getCurrent()}):(i.setCurrent(e),i.stem(),i.getCurrent())}),e.Pipeline.registerFunction(e.de.stemmer,"stemmer-de"),e.de.stopWordFilter=e.generateStopWordFilter("aber alle allem allen aller alles als also am an ander andere anderem anderen anderer anderes anderm andern anderr anders auch auf aus bei bin bis bist da damit dann das dasselbe dazu daß dein deine deinem deinen deiner deines dem demselben den denn denselben der derer derselbe derselben des desselben dessen dich die dies diese dieselbe dieselben diesem diesen dieser dieses dir doch dort du durch ein eine einem einen einer eines einig einige einigem einigen einiger einiges einmal er es etwas euch euer eure eurem euren eurer eures für gegen gewesen hab habe haben hat hatte hatten hier hin hinter ich ihm ihn ihnen ihr ihre ihrem ihren ihrer ihres im in indem ins ist jede jedem jedenLine truncated
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(r,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():e()(r.lunr)}(this,function(){return function(r){if(void 0===r)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===r.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var e,i,n;r.du=function(){this.pipeline.reset(),this.pipeline.add(r.du.trimmer,r.du.stopWordFilter,r.du.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(r.du.stemmer))},r.du.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",r.du.trimmer=r.trimmerSupport.generateTrimmer(r.du.wordCharacters),r.Pipeline.registerFunction(r.du.trimmer,"trimmer-du"),r.du.stemmer=(e=r.stemmerSupport.Among,i=r.stemmerSupport.SnowballProgram,n=new function(){var r,n,o,t=[new e("",-1,6),new e("á",0,1),new e("ä",0,1),new e("é",0,2),new e("ë",0,2),new e("í",0,3),new e("ï",0,3),new e("ó",0,4),new e("ö",0,4),new e("ú",0,5),new e("ü",0,5)],s=[new e("",-1,3),new e("I",0,2),new e("Y",0,1)],u=[new e("dd",-1,-1),new e("kk",-1,-1),new e("tt",-1,-1)],c=[new e("ene",-1,2),new e("se",-1,3),new e("en",-1,2),new e("heden",2,1),new e("s",-1,3)],a=[new e("end",-1,1),new e("ig",-1,2),new e("ing",-1,1),new e("lijk",-1,3),new e("baar",-1,4),new e("bar",-1,5)],l=[new e("aa",-1,-1),new e("ee",-1,-1),new e("oo",-1,-1),new e("uu",-1,-1)],m=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,128],d=[1,0,0,17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,128],f=[17,67,16,1,0,0,0,0,0,0,0,0,0,0,0,0,128],_=new i;function w(r){return _.cursor=r,r>=_.limit||(_.cursor++,!1)}function b(){for(;!_.in_grouping(m,97,232);){if(_.cursor>=_.limit)return!0;_.cursor++}for(;!_.out_grouping(m,97,232);){if(_.cursor>=_.limit)return!0;_.cursor++}return!1}function p(){return n<=_.cursor}function g(){return r<=_.cursor}function h(){var r=_.limit-_.cursor;_.find_among_b(u,3)&&(_.cursor=_.limit-r,_.ket=_.cursor,_.cursor>_.limit_backward&&(_.cursor--,_.bra=_.cursor,_.slice_del()))}function k(){var r;o=!1,_.ket=_.cursor,_.eq_s_b(1,"e")&&(_.bra=_.cursor,p()&&(r=_.limit-_.cursor,_.out_grouping_b(m,97,232)&&(_.cursor=_.limit-r,_.slice_del(),o=!0,h())))}function v(){var r;p()&&(r=_.limit-_.cursor,_.out_grouping_b(m,97,232)&&(_.cursor=_.limit-r,_.eq_s_b(3,"gem")||(_.cursor=_.limit-r,_.slice_del(),h())))}this.setCurrent=function(r){_.setCurrent(r)},this.getCurrent=function(){return _.getCurrent()},this.stem=function(){var e=_.cursor;return function(){for(var r,e,i,n=_.cursor;;){if(_.bra=_.cursor,r=_.find_among(t,11))switch(_.ket=_.cursor,r){case 1:_.slice_from("a");continue;case 2:_.slice_from("e");continue;case 3:_.slice_from("i");continue;case 4:_.slice_from("o");continue;case 5:_.slice_from("u");continue;case 6:if(_.cursor>=_.limit)break;_.cursor++;continue}break}for(_.cursor=n,_.bra=n,_.eq_s(1,"y")?(_.ket=_.cursor,_.slice_from("Y")):_.cursor=n;;)if(e=_.cursor,_.in_grouping(m,97,232)){if(i=_.cursor,_.bra=i,_.eq_s(1,"i"))_.ket=_.cursor,_.in_grouping(m,97,232)&&(_.slice_from("I"),_.cursor=e);else if(_.cursor=i,_.eq_s(1,"y"))_.ket=_.cursor,_.slice_from("Y"),_.cursor=e;else if(w(e))break}else if(w(e))break}(),_.cursor=e,n=_.limit,r=n,b()||((n=_.cursor)<3&&(n=3),b()||(r=_.cursor)),_.limit_backward=e,_.cursor=_.limit,function(){var r,e,i,n,t,s,u=_.limit-_.cursor;if(_.ket=_.cursor,r=_.find_among_b(c,5))switch(_.bra=_.cursor,r){case 1:p()&&_.slice_from("heid");break;case 2:v();break;case 3:p()&&_.out_grouping_b(f,97,232)&&_.slice_del()}if(_.cursor=_.limit-u,k(),_.cursor=_.limit-u,_.ket=_.cursor,_.eq_s_b(4,"heid")&&(_.bra=_.cursor,g()&&(e=_.limit-_.cursor,_.eq_s_b(1,"c")||(_.cursor=_.limit-e,_.slice_del(),_.ket=_.cursor,_.eq_s_b(2,"en")&&(_.bra=_.cursor,v())))),_.cursor=_.limit-u,_.ket=_.cursor,r=_.find_among_b(a,6))switch(_.bra=_.cursor,r){case 1:if(g()){if(_.slice_del(),i=_.limit-_.cursor,_.ket=_.cursor,_.eq_s_b(2,"ig")&&(_.bra=_.cursor,g()&&(n=_.limit-_.cursor,!_.eq_s_b(1,"e")))){_.cursor=_.limit-n,_.slice_del();break}_.cursor=_.limit-i,h()}break;case 2:g()&&(t=_.limit-_.cursor,_.eq_s_b(1,"e")||(_.cursor=_.limit-t,_.slice_del()));break;case 3:g()&&(_.slice_del(),k());break;case 4:g()&&_.slice_del();break;case 5:g()&&o&&_.slice_del()}_.cursor=_.limit-u,_.out_grouping_b(d,73,232)&&(s=_.limit-_.cursor,_.find_among_b(l,4)&&_.out_grouping_b(m,97,232)&&(_.cursor=_.limit-s,_.ket=_.cursor,_.cursor>_.limit_backward&&(_.cursor--,_.bra=_.cursor,_.slice_del())))}(),_.cursor=_.limit_backward,function(){for(var r;;)if(_.bra=_.cursor,r=_.find_among(s,3))switch(_.ket=_.cursor,r){case 1:_.slice_from("y");break;case 2:_.slice_from("i");break;case 3:if(_.cursor>=_.limit)return;_.cursor++}}(),!0}},function(r){return"function"==typeof r.update?r.update(function(r){return n.setCurrent(r),n.stem(),n.getCurrent()}):(n.setCurrent(r),n.stem(),n.getCurrent())}),r.PLine truncated
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e,s){"function"==typeof define&&define.amd?define(s):"object"==typeof exports?module.exports=s():s()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var s,r,n;e.es=function(){this.pipeline.reset(),this.pipeline.add(e.es.trimmer,e.es.stopWordFilter,e.es.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.es.stemmer))},e.es.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.es.trimmer=e.trimmerSupport.generateTrimmer(e.es.wordCharacters),e.Pipeline.registerFunction(e.es.trimmer,"trimmer-es"),e.es.stemmer=(s=e.stemmerSupport.Among,r=e.stemmerSupport.SnowballProgram,n=new function(){var e,n,i,a=[new s("",-1,6),new s("á",0,1),new s("é",0,2),new s("í",0,3),new s("ó",0,4),new s("ú",0,5)],t=[new s("la",-1,-1),new s("sela",0,-1),new s("le",-1,-1),new s("me",-1,-1),new s("se",-1,-1),new s("lo",-1,-1),new s("selo",5,-1),new s("las",-1,-1),new s("selas",7,-1),new s("les",-1,-1),new s("los",-1,-1),new s("selos",10,-1),new s("nos",-1,-1)],o=[new s("ando",-1,6),new s("iendo",-1,6),new s("yendo",-1,7),new s("ándo",-1,2),new s("iéndo",-1,1),new s("ar",-1,6),new s("er",-1,6),new s("ir",-1,6),new s("ár",-1,3),new s("ér",-1,4),new s("ír",-1,5)],u=[new s("ic",-1,-1),new s("ad",-1,-1),new s("os",-1,-1),new s("iv",-1,1)],w=[new s("able",-1,1),new s("ible",-1,1),new s("ante",-1,1)],c=[new s("ic",-1,1),new s("abil",-1,1),new s("iv",-1,1)],m=[new s("ica",-1,1),new s("ancia",-1,2),new s("encia",-1,5),new s("adora",-1,2),new s("osa",-1,1),new s("ista",-1,1),new s("iva",-1,9),new s("anza",-1,1),new s("logía",-1,3),new s("idad",-1,8),new s("able",-1,1),new s("ible",-1,1),new s("ante",-1,2),new s("mente",-1,7),new s("amente",13,6),new s("ación",-1,2),new s("ución",-1,4),new s("ico",-1,1),new s("ismo",-1,1),new s("oso",-1,1),new s("amiento",-1,1),new s("imiento",-1,1),new s("ivo",-1,9),new s("ador",-1,2),new s("icas",-1,1),new s("ancias",-1,2),new s("encias",-1,5),new s("adoras",-1,2),new s("osas",-1,1),new s("istas",-1,1),new s("ivas",-1,9),new s("anzas",-1,1),new s("logías",-1,3),new s("idades",-1,8),new s("ables",-1,1),new s("ibles",-1,1),new s("aciones",-1,2),new s("uciones",-1,4),new s("adores",-1,2),new s("antes",-1,2),new s("icos",-1,1),new s("ismos",-1,1),new s("osos",-1,1),new s("amientos",-1,1),new s("imientos",-1,1),new s("ivos",-1,9)],l=[new s("ya",-1,1),new s("ye",-1,1),new s("yan",-1,1),new s("yen",-1,1),new s("yeron",-1,1),new s("yendo",-1,1),new s("yo",-1,1),new s("yas",-1,1),new s("yes",-1,1),new s("yais",-1,1),new s("yamos",-1,1),new s("yó",-1,1)],d=[new s("aba",-1,2),new s("ada",-1,2),new s("ida",-1,2),new s("ara",-1,2),new s("iera",-1,2),new s("ía",-1,2),new s("aría",5,2),new s("ería",5,2),new s("iría",5,2),new s("ad",-1,2),new s("ed",-1,2),new s("id",-1,2),new s("ase",-1,2),new s("iese",-1,2),new s("aste",-1,2),new s("iste",-1,2),new s("an",-1,2),new s("aban",16,2),new s("aran",16,2),new s("ieran",16,2),new s("ían",16,2),new s("arían",20,2),new s("erían",20,2),new s("irían",20,2),new s("en",-1,1),new s("asen",24,2),new s("iesen",24,2),new s("aron",-1,2),new s("ieron",-1,2),new s("arán",-1,2),new s("erán",-1,2),new s("irán",-1,2),new s("ado",-1,2),new s("ido",-1,2),new s("ando",-1,2),new s("iendo",-1,2),new s("ar",-1,2),new s("er",-1,2),new s("ir",-1,2),new s("as",-1,2),new s("abas",39,2),new s("adas",39,2),new s("idas",39,2),new s("aras",39,2),new s("ieras",39,2),new s("ías",39,2),new s("arías",45,2),new s("erías",45,2),new s("irías",45,2),new s("es",-1,1),new s("ases",49,2),new s("ieses",49,2),new s("abais",-1,2),new s("arais",-1,2),new s("ierais",-1,2),new s("íais",-1,2),new s("aríais",55,2),new s("eríais",55,2),new s("iríais",55,2),new s("aseis",-1,2),new s("ieseis",-1,2),new s("asteis",-1,2),new s("isteis",-1,2),new s("áis",-1,2),new s("éis",-1,1),new s("aréis",64,2),new s("eréis",64,2),new s("iréis",64,2),new s("ados",-1,2),new s("idos",-1,2),new s("amos",-1,2),new s("ábamos",70,2),new s("áramos",70,2),new s("iéramos",70,2),new s("íamos",70,2),new s("aríamos",74,2),new s("eríamos",74,2),new s("iríamos",74,2),new s("emos",-1,1),new s("aremos",78,2),new s("eremos",78,2),new s("iremos",78,2),new s("ásemos",78,2),new s("iésemos",78,2),new s("imos",-1,2),new s("arás",-1,2),new s("erás",-1,2),new s("irás",-1,2),new s("ís",-1,2),new s("ará",-1,2),new s("erá",-1,2),new s("irá",-1,2),new s("aré",-1,2),new s("eré",-1,2),new s("iré",-1,2),new s("ió",-1,2)],b=[new s("a",-1,1),new s("e",-1,2),new s("o",-1,1),new s("os",-1,1),new s("á",-1,1),new s("é",-1,2),new s("í",-1,1),new s("ó",-1,1)],f=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,0,1,17,4,1Line truncated
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(i,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():e()(i.lunr)}(this,function(){return function(i){if(void 0===i)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===i.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var e,r,n;i.fi=function(){this.pipeline.reset(),this.pipeline.add(i.fi.trimmer,i.fi.stopWordFilter,i.fi.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(i.fi.stemmer))},i.fi.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",i.fi.trimmer=i.trimmerSupport.generateTrimmer(i.fi.wordCharacters),i.Pipeline.registerFunction(i.fi.trimmer,"trimmer-fi"),i.fi.stemmer=(e=i.stemmerSupport.Among,r=i.stemmerSupport.SnowballProgram,n=new function(){var i,n,t,s,l=[new e("pa",-1,1),new e("sti",-1,2),new e("kaan",-1,1),new e("han",-1,1),new e("kin",-1,1),new e("hän",-1,1),new e("kään",-1,1),new e("ko",-1,1),new e("pä",-1,1),new e("kö",-1,1)],o=[new e("lla",-1,-1),new e("na",-1,-1),new e("ssa",-1,-1),new e("ta",-1,-1),new e("lta",3,-1),new e("sta",3,-1)],a=[new e("llä",-1,-1),new e("nä",-1,-1),new e("ssä",-1,-1),new e("tä",-1,-1),new e("ltä",3,-1),new e("stä",3,-1)],u=[new e("lle",-1,-1),new e("ine",-1,-1)],c=[new e("nsa",-1,3),new e("mme",-1,3),new e("nne",-1,3),new e("ni",-1,2),new e("si",-1,1),new e("an",-1,4),new e("en",-1,6),new e("än",-1,5),new e("nsä",-1,3)],m=[new e("aa",-1,-1),new e("ee",-1,-1),new e("ii",-1,-1),new e("oo",-1,-1),new e("uu",-1,-1),new e("ää",-1,-1),new e("öö",-1,-1)],w=[new e("a",-1,8),new e("lla",0,-1),new e("na",0,-1),new e("ssa",0,-1),new e("ta",0,-1),new e("lta",4,-1),new e("sta",4,-1),new e("tta",4,9),new e("lle",-1,-1),new e("ine",-1,-1),new e("ksi",-1,-1),new e("n",-1,7),new e("han",11,1),new e("den",11,-1,C),new e("seen",11,-1,v),new e("hen",11,2),new e("tten",11,-1,C),new e("hin",11,3),new e("siin",11,-1,C),new e("hon",11,4),new e("hän",11,5),new e("hön",11,6),new e("ä",-1,8),new e("llä",22,-1),new e("nä",22,-1),new e("ssä",22,-1),new e("tä",22,-1),new e("ltä",26,-1),new e("stä",26,-1),new e("ttä",26,9)],_=[new e("eja",-1,-1),new e("mma",-1,1),new e("imma",1,-1),new e("mpa",-1,1),new e("impa",3,-1),new e("mmi",-1,1),new e("immi",5,-1),new e("mpi",-1,1),new e("impi",7,-1),new e("ejä",-1,-1),new e("mmä",-1,1),new e("immä",10,-1),new e("mpä",-1,1),new e("impä",12,-1)],k=[new e("i",-1,-1),new e("j",-1,-1)],b=[new e("mma",-1,1),new e("imma",0,-1)],d=[17,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8],f=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,8,0,32],h=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,32],p=[17,97,24,1,0,0,0,0,0,0,0,0,0,0,0,0,8,0,32],g=new r;function j(){for(var i;i=g.cursor,!g.in_grouping(f,97,246);){if(g.cursor=i,i>=g.limit)return!0;g.cursor++}for(g.cursor=i;!g.out_grouping(f,97,246);){if(g.cursor>=g.limit)return!0;g.cursor++}return!1}function q(){var i,e;if(g.cursor>=s)if(e=g.limit_backward,g.limit_backward=s,g.ket=g.cursor,i=g.find_among_b(l,10)){switch(g.bra=g.cursor,g.limit_backward=e,i){case 1:if(!g.in_grouping_b(p,97,246))return;break;case 2:if(!(t<=g.cursor))return}g.slice_del()}else g.limit_backward=e}function v(){return g.find_among_b(m,7)}function C(){return g.eq_s_b(1,"i")&&g.in_grouping_b(h,97,246)}this.setCurrent=function(i){g.setCurrent(i)},this.getCurrent=function(){return g.getCurrent()},this.stem=function(){var e,r=g.cursor;return s=g.limit,t=s,j()||(s=g.cursor,j()||(t=g.cursor)),i=!1,g.limit_backward=r,g.cursor=g.limit,q(),g.cursor=g.limit,function(){var i,e,r;if(g.cursor>=s)if(e=g.limit_backward,g.limit_backward=s,g.ket=g.cursor,i=g.find_among_b(c,9))switch(g.bra=g.cursor,g.limit_backward=e,i){case 1:r=g.limit-g.cursor,g.eq_s_b(1,"k")||(g.cursor=g.limit-r,g.slice_del());break;case 2:g.slice_del(),g.ket=g.cursor,g.eq_s_b(3,"kse")&&(g.bra=g.cursor,g.slice_from("ksi"));break;case 3:g.slice_del();break;case 4:g.find_among_b(o,6)&&g.slice_del();break;case 5:g.find_among_b(a,6)&&g.slice_del();break;case 6:g.find_among_b(u,2)&&g.slice_del()}else g.limit_backward=e}(),g.cursor=g.limit,function(){var e,r,n;if(g.cursor>=s)if(r=g.limit_backward,g.limit_backward=s,g.ket=g.cursor,e=g.find_among_b(w,30)){switch(g.bra=g.cursor,g.limit_backward=r,e){case 1:if(!g.eq_s_b(1,"a"))return;break;case 2:case 9:if(!g.eq_s_b(1,"e"))return;break;case 3:if(!g.eq_s_b(1,"i"))return;break;case 4:if(!g.eq_s_b(1,"o"))return;break;case 5:if(!g.eq_s_b(1,"ä"))return;break;case 6:if(!g.eq_s_b(1,"ö"))return;break;case 7:if(n=g.limit-g.cursor,!v()&&(g.cursor=g.limit-n,!g.eq_s_b(2,"ie"))){g.cursor=g.limit-n;break}if(g.cursor=g.limit-n,g.cursor<=g.limit_backward){g.cursor=g.limit-n;break}g.cursor--,g.bra=g.cursor;break;case 8:if(!g.in_grouping_b(f,97,246)||!g.out_grouping_b(f,97,246))return}g.slice_del(),i=!0}else g.limiLine truncated
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,s,i;e.fr=function(){this.pipeline.reset(),this.pipeline.add(e.fr.trimmer,e.fr.stopWordFilter,e.fr.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.fr.stemmer))},e.fr.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.fr.trimmer=e.trimmerSupport.generateTrimmer(e.fr.wordCharacters),e.Pipeline.registerFunction(e.fr.trimmer,"trimmer-fr"),e.fr.stemmer=(r=e.stemmerSupport.Among,s=e.stemmerSupport.SnowballProgram,i=new function(){var e,i,n,t=[new r("col",-1,-1),new r("par",-1,-1),new r("tap",-1,-1)],u=[new r("",-1,4),new r("I",0,1),new r("U",0,2),new r("Y",0,3)],o=[new r("iqU",-1,3),new r("abl",-1,3),new r("Ièr",-1,4),new r("ièr",-1,4),new r("eus",-1,2),new r("iv",-1,1)],c=[new r("ic",-1,2),new r("abil",-1,1),new r("iv",-1,3)],a=[new r("iqUe",-1,1),new r("atrice",-1,2),new r("ance",-1,1),new r("ence",-1,5),new r("logie",-1,3),new r("able",-1,1),new r("isme",-1,1),new r("euse",-1,11),new r("iste",-1,1),new r("ive",-1,8),new r("if",-1,8),new r("usion",-1,4),new r("ation",-1,2),new r("ution",-1,4),new r("ateur",-1,2),new r("iqUes",-1,1),new r("atrices",-1,2),new r("ances",-1,1),new r("ences",-1,5),new r("logies",-1,3),new r("ables",-1,1),new r("ismes",-1,1),new r("euses",-1,11),new r("istes",-1,1),new r("ives",-1,8),new r("ifs",-1,8),new r("usions",-1,4),new r("ations",-1,2),new r("utions",-1,4),new r("ateurs",-1,2),new r("ments",-1,15),new r("ements",30,6),new r("issements",31,12),new r("ités",-1,7),new r("ment",-1,15),new r("ement",34,6),new r("issement",35,12),new r("amment",34,13),new r("emment",34,14),new r("aux",-1,10),new r("eaux",39,9),new r("eux",-1,1),new r("ité",-1,7)],l=[new r("ira",-1,1),new r("ie",-1,1),new r("isse",-1,1),new r("issante",-1,1),new r("i",-1,1),new r("irai",4,1),new r("ir",-1,1),new r("iras",-1,1),new r("ies",-1,1),new r("îmes",-1,1),new r("isses",-1,1),new r("issantes",-1,1),new r("îtes",-1,1),new r("is",-1,1),new r("irais",13,1),new r("issais",13,1),new r("irions",-1,1),new r("issions",-1,1),new r("irons",-1,1),new r("issons",-1,1),new r("issants",-1,1),new r("it",-1,1),new r("irait",21,1),new r("issait",21,1),new r("issant",-1,1),new r("iraIent",-1,1),new r("issaIent",-1,1),new r("irent",-1,1),new r("issent",-1,1),new r("iront",-1,1),new r("ît",-1,1),new r("iriez",-1,1),new r("issiez",-1,1),new r("irez",-1,1),new r("issez",-1,1)],w=[new r("a",-1,3),new r("era",0,2),new r("asse",-1,3),new r("ante",-1,3),new r("ée",-1,2),new r("ai",-1,3),new r("erai",5,2),new r("er",-1,2),new r("as",-1,3),new r("eras",8,2),new r("âmes",-1,3),new r("asses",-1,3),new r("antes",-1,3),new r("âtes",-1,3),new r("ées",-1,2),new r("ais",-1,3),new r("erais",15,2),new r("ions",-1,1),new r("erions",17,2),new r("assions",17,3),new r("erons",-1,2),new r("ants",-1,3),new r("és",-1,2),new r("ait",-1,3),new r("erait",23,2),new r("ant",-1,3),new r("aIent",-1,3),new r("eraIent",26,2),new r("èrent",-1,2),new r("assent",-1,3),new r("eront",-1,2),new r("ât",-1,3),new r("ez",-1,2),new r("iez",32,2),new r("eriez",33,2),new r("assiez",33,3),new r("erez",32,2),new r("é",-1,2)],f=[new r("e",-1,3),new r("Ière",0,2),new r("ière",0,2),new r("ion",-1,1),new r("Ier",-1,2),new r("ier",-1,2),new r("ë",-1,4)],m=[new r("ell",-1,-1),new r("eill",-1,-1),new r("enn",-1,-1),new r("onn",-1,-1),new r("ett",-1,-1)],_=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,128,130,103,8,5],b=[1,65,20,0,0,0,0,0,0,0,0,0,0,0,0,0,128],d=new s;function k(e,r,s){return!(!d.eq_s(1,e)||(d.ket=d.cursor,!d.in_grouping(_,97,251)))&&(d.slice_from(r),d.cursor=s,!0)}function p(e,r,s){return!!d.eq_s(1,e)&&(d.ket=d.cursor,d.slice_from(r),d.cursor=s,!0)}function g(){for(;!d.in_grouping(_,97,251);){if(d.cursor>=d.limit)return!0;d.cursor++}for(;!d.out_grouping(_,97,251);){if(d.cursor>=d.limit)return!0;d.cursor++}return!1}function q(){return n<=d.cursor}function v(){return i<=d.cursor}function h(){return e<=d.cursor}function z(){if(!function(){var e,r;if(d.ket=d.cursor,e=d.find_among_b(a,43)){switch(d.bra=d.cursor,e){case 1:if(!h())return!1;d.slice_del();break;case 2:if(!h())return!1;d.slice_del(),d.ket=d.cursor,d.eq_s_b(2,"ic")&&(d.bra=d.cursor,h()?d.slice_del():d.slice_from("iqU"));break;case 3:if(!h())return!1;d.slice_from("log");break;case 4:if(!h())return!1;d.slice_from("u");break;case 5:if(!h())return!1;d.slice_from("ent");break;case 6:if(!q())return!1;if(d.slice_del(),d.ket=d.cursor,e=d.find_among_b(o,6))switch(d.bra=d.cursor,e){case 1:h()&&(d.slice_del(),d.ket=d.cursor,d.eq_s_Line truncated
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e,n){"function"==typeof define&&define.amd?define(n):"object"==typeof exports?module.exports=n():n()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var n,r,i;e.hu=function(){this.pipeline.reset(),this.pipeline.add(e.hu.trimmer,e.hu.stopWordFilter,e.hu.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.hu.stemmer))},e.hu.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.hu.trimmer=e.trimmerSupport.generateTrimmer(e.hu.wordCharacters),e.Pipeline.registerFunction(e.hu.trimmer,"trimmer-hu"),e.hu.stemmer=(n=e.stemmerSupport.Among,r=e.stemmerSupport.SnowballProgram,i=new function(){var e,i=[new n("cs",-1,-1),new n("dzs",-1,-1),new n("gy",-1,-1),new n("ly",-1,-1),new n("ny",-1,-1),new n("sz",-1,-1),new n("ty",-1,-1),new n("zs",-1,-1)],a=[new n("á",-1,1),new n("é",-1,2)],t=[new n("bb",-1,-1),new n("cc",-1,-1),new n("dd",-1,-1),new n("ff",-1,-1),new n("gg",-1,-1),new n("jj",-1,-1),new n("kk",-1,-1),new n("ll",-1,-1),new n("mm",-1,-1),new n("nn",-1,-1),new n("pp",-1,-1),new n("rr",-1,-1),new n("ccs",-1,-1),new n("ss",-1,-1),new n("zzs",-1,-1),new n("tt",-1,-1),new n("vv",-1,-1),new n("ggy",-1,-1),new n("lly",-1,-1),new n("nny",-1,-1),new n("tty",-1,-1),new n("ssz",-1,-1),new n("zz",-1,-1)],s=[new n("al",-1,1),new n("el",-1,2)],c=[new n("ba",-1,-1),new n("ra",-1,-1),new n("be",-1,-1),new n("re",-1,-1),new n("ig",-1,-1),new n("nak",-1,-1),new n("nek",-1,-1),new n("val",-1,-1),new n("vel",-1,-1),new n("ul",-1,-1),new n("nál",-1,-1),new n("nél",-1,-1),new n("ból",-1,-1),new n("ról",-1,-1),new n("tól",-1,-1),new n("bõl",-1,-1),new n("rõl",-1,-1),new n("tõl",-1,-1),new n("ül",-1,-1),new n("n",-1,-1),new n("an",19,-1),new n("ban",20,-1),new n("en",19,-1),new n("ben",22,-1),new n("képpen",22,-1),new n("on",19,-1),new n("ön",19,-1),new n("képp",-1,-1),new n("kor",-1,-1),new n("t",-1,-1),new n("at",29,-1),new n("et",29,-1),new n("ként",29,-1),new n("anként",32,-1),new n("enként",32,-1),new n("onként",32,-1),new n("ot",29,-1),new n("ért",29,-1),new n("öt",29,-1),new n("hez",-1,-1),new n("hoz",-1,-1),new n("höz",-1,-1),new n("vá",-1,-1),new n("vé",-1,-1)],w=[new n("án",-1,2),new n("én",-1,1),new n("ánként",-1,3)],o=[new n("stul",-1,2),new n("astul",0,1),new n("ástul",0,3),new n("stül",-1,2),new n("estül",3,1),new n("éstül",3,4)],l=[new n("á",-1,1),new n("é",-1,2)],u=[new n("k",-1,7),new n("ak",0,4),new n("ek",0,6),new n("ok",0,5),new n("ák",0,1),new n("ék",0,2),new n("ök",0,3)],m=[new n("éi",-1,7),new n("áéi",0,6),new n("ééi",0,5),new n("é",-1,9),new n("ké",3,4),new n("aké",4,1),new n("eké",4,1),new n("oké",4,1),new n("áké",4,3),new n("éké",4,2),new n("öké",4,1),new n("éé",3,8)],k=[new n("a",-1,18),new n("ja",0,17),new n("d",-1,16),new n("ad",2,13),new n("ed",2,13),new n("od",2,13),new n("ád",2,14),new n("éd",2,15),new n("öd",2,13),new n("e",-1,18),new n("je",9,17),new n("nk",-1,4),new n("unk",11,1),new n("ánk",11,2),new n("énk",11,3),new n("ünk",11,1),new n("uk",-1,8),new n("juk",16,7),new n("ájuk",17,5),new n("ük",-1,8),new n("jük",19,7),new n("éjük",20,6),new n("m",-1,12),new n("am",22,9),new n("em",22,9),new n("om",22,9),new n("ám",22,10),new n("ém",22,11),new n("o",-1,18),new n("á",-1,19),new n("é",-1,20)],f=[new n("id",-1,10),new n("aid",0,9),new n("jaid",1,6),new n("eid",0,9),new n("jeid",3,6),new n("áid",0,7),new n("éid",0,8),new n("i",-1,15),new n("ai",7,14),new n("jai",8,11),new n("ei",7,14),new n("jei",10,11),new n("ái",7,12),new n("éi",7,13),new n("itek",-1,24),new n("eitek",14,21),new n("jeitek",15,20),new n("éitek",14,23),new n("ik",-1,29),new n("aik",18,26),new n("jaik",19,25),new n("eik",18,26),new n("jeik",21,25),new n("áik",18,27),new n("éik",18,28),new n("ink",-1,20),new n("aink",25,17),new n("jaink",26,16),new n("eink",25,17),new n("jeink",28,16),new n("áink",25,18),new n("éink",25,19),new n("aitok",-1,21),new n("jaitok",32,20),new n("áitok",-1,22),new n("im",-1,5),new n("aim",35,4),new n("jaim",36,1),new n("eim",35,4),new n("jeim",38,1),new n("áim",35,2),new n("éim",35,3)],b=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,0,1,17,52,14],d=new r;function g(){return e<=d.cursor}function h(){var e=d.limit-d.cursor;return!!d.find_among_b(t,23)&&(d.cursor=d.limit-e,!0)}function p(){if(d.cursor>d.limit_backward){d.cursor--,d.ket=d.cursor;var e=d.cursor-1;d.limit_backward<=e&&e<=d.limit&&(d.cursor=e,d.bra=e,d.slice_del())}}function _(){d.ket=d.cursor,d.find_among_b(c,44)&&(d.bra=d.cursor,g()&&(d.slice_del(),function(){var e;if(d.ket=d.cursor,(e=d.find_among_b(a,2))&&(d.bra=d.cursor,g()))switch(e){case 1:d.slice_from(Line truncated
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,i,n;e.it=function(){this.pipeline.reset(),this.pipeline.add(e.it.trimmer,e.it.stopWordFilter,e.it.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.it.stemmer))},e.it.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.it.trimmer=e.trimmerSupport.generateTrimmer(e.it.wordCharacters),e.Pipeline.registerFunction(e.it.trimmer,"trimmer-it"),e.it.stemmer=(r=e.stemmerSupport.Among,i=e.stemmerSupport.SnowballProgram,n=new function(){var e,n,o,t=[new r("",-1,7),new r("qu",0,6),new r("á",0,1),new r("é",0,2),new r("í",0,3),new r("ó",0,4),new r("ú",0,5)],s=[new r("",-1,3),new r("I",0,1),new r("U",0,2)],a=[new r("la",-1,-1),new r("cela",0,-1),new r("gliela",0,-1),new r("mela",0,-1),new r("tela",0,-1),new r("vela",0,-1),new r("le",-1,-1),new r("cele",6,-1),new r("gliele",6,-1),new r("mele",6,-1),new r("tele",6,-1),new r("vele",6,-1),new r("ne",-1,-1),new r("cene",12,-1),new r("gliene",12,-1),new r("mene",12,-1),new r("sene",12,-1),new r("tene",12,-1),new r("vene",12,-1),new r("ci",-1,-1),new r("li",-1,-1),new r("celi",20,-1),new r("glieli",20,-1),new r("meli",20,-1),new r("teli",20,-1),new r("veli",20,-1),new r("gli",20,-1),new r("mi",-1,-1),new r("si",-1,-1),new r("ti",-1,-1),new r("vi",-1,-1),new r("lo",-1,-1),new r("celo",31,-1),new r("glielo",31,-1),new r("melo",31,-1),new r("telo",31,-1),new r("velo",31,-1)],u=[new r("ando",-1,1),new r("endo",-1,1),new r("ar",-1,2),new r("er",-1,2),new r("ir",-1,2)],c=[new r("ic",-1,-1),new r("abil",-1,-1),new r("os",-1,-1),new r("iv",-1,1)],w=[new r("ic",-1,1),new r("abil",-1,1),new r("iv",-1,1)],l=[new r("ica",-1,1),new r("logia",-1,3),new r("osa",-1,1),new r("ista",-1,1),new r("iva",-1,9),new r("anza",-1,1),new r("enza",-1,5),new r("ice",-1,1),new r("atrice",7,1),new r("iche",-1,1),new r("logie",-1,3),new r("abile",-1,1),new r("ibile",-1,1),new r("usione",-1,4),new r("azione",-1,2),new r("uzione",-1,4),new r("atore",-1,2),new r("ose",-1,1),new r("ante",-1,1),new r("mente",-1,1),new r("amente",19,7),new r("iste",-1,1),new r("ive",-1,9),new r("anze",-1,1),new r("enze",-1,5),new r("ici",-1,1),new r("atrici",25,1),new r("ichi",-1,1),new r("abili",-1,1),new r("ibili",-1,1),new r("ismi",-1,1),new r("usioni",-1,4),new r("azioni",-1,2),new r("uzioni",-1,4),new r("atori",-1,2),new r("osi",-1,1),new r("anti",-1,1),new r("amenti",-1,6),new r("imenti",-1,6),new r("isti",-1,1),new r("ivi",-1,9),new r("ico",-1,1),new r("ismo",-1,1),new r("oso",-1,1),new r("amento",-1,6),new r("imento",-1,6),new r("ivo",-1,9),new r("ità",-1,8),new r("istà",-1,1),new r("istè",-1,1),new r("istì",-1,1)],m=[new r("isca",-1,1),new r("enda",-1,1),new r("ata",-1,1),new r("ita",-1,1),new r("uta",-1,1),new r("ava",-1,1),new r("eva",-1,1),new r("iva",-1,1),new r("erebbe",-1,1),new r("irebbe",-1,1),new r("isce",-1,1),new r("ende",-1,1),new r("are",-1,1),new r("ere",-1,1),new r("ire",-1,1),new r("asse",-1,1),new r("ate",-1,1),new r("avate",16,1),new r("evate",16,1),new r("ivate",16,1),new r("ete",-1,1),new r("erete",20,1),new r("irete",20,1),new r("ite",-1,1),new r("ereste",-1,1),new r("ireste",-1,1),new r("ute",-1,1),new r("erai",-1,1),new r("irai",-1,1),new r("isci",-1,1),new r("endi",-1,1),new r("erei",-1,1),new r("irei",-1,1),new r("assi",-1,1),new r("ati",-1,1),new r("iti",-1,1),new r("eresti",-1,1),new r("iresti",-1,1),new r("uti",-1,1),new r("avi",-1,1),new r("evi",-1,1),new r("ivi",-1,1),new r("isco",-1,1),new r("ando",-1,1),new r("endo",-1,1),new r("Yamo",-1,1),new r("iamo",-1,1),new r("avamo",-1,1),new r("evamo",-1,1),new r("ivamo",-1,1),new r("eremo",-1,1),new r("iremo",-1,1),new r("assimo",-1,1),new r("ammo",-1,1),new r("emmo",-1,1),new r("eremmo",54,1),new r("iremmo",54,1),new r("immo",-1,1),new r("ano",-1,1),new r("iscano",58,1),new r("avano",58,1),new r("evano",58,1),new r("ivano",58,1),new r("eranno",-1,1),new r("iranno",-1,1),new r("ono",-1,1),new r("iscono",65,1),new r("arono",65,1),new r("erono",65,1),new r("irono",65,1),new r("erebbero",-1,1),new r("irebbero",-1,1),new r("assero",-1,1),new r("essero",-1,1),new r("issero",-1,1),new r("ato",-1,1),new r("ito",-1,1),new r("uto",-1,1),new r("avo",-1,1),new r("evo",-1,1),new r("ivo",-1,1),new r("ar",-1,1),new r("ir",-1,1),new r("erà",-1,1),new r("irà",-1,1),new r("erò",-1,1),new r("irò",-1,1)],f=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,128,128,8,2,1],v=[17,65,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,8,2],b=[17],d=new i;function _(e,r,i){return!(!d.eq_s(1,e)||(d.ket=d.cursor,!dLine truncated
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r="2"==e.version[0];e.jp=function(){this.pipeline.reset(),this.pipeline.add(e.jp.stopWordFilter,e.jp.stemmer),r?this.tokenizer=e.jp.tokenizer:(e.tokenizer&&(e.tokenizer=e.jp.tokenizer),this.tokenizerFn&&(this.tokenizerFn=e.jp.tokenizer))};var t=new e.TinySegmenter;e.jp.tokenizer=function(n){if(!arguments.length||null==n||null==n)return[];if(Array.isArray(n))return n.map(function(t){return r?new e.Token(t.toLowerCase()):t.toLowerCase()});for(var i=n.toString().toLowerCase().replace(/^\s+/,""),o=i.length-1;o>=0;o--)if(/\S/.test(i.charAt(o))){i=i.substring(0,o+1);break}return t.segment(i).filter(function(e){return!!e}).map(function(t){return r?new e.Token(t):t})},e.jp.stemmer=function(e){return e},e.Pipeline.registerFunction(e.jp.stemmer,"stemmer-jp"),e.jp.wordCharacters="一二三四五六七八九十百千万億兆一-龠々〆ヵヶぁ-んァ-ヴーア-ン゙a-zA-Za-zA-Z0-90-9",e.jp.stopWordFilter=function(t){if(-1===e.jp.stopWordFilter.stopWords.indexOf(r?t.toString():t))return t},e.jp.stopWordFilter=e.generateStopWordFilter("これ それ あれ この その あの ここ そこ あそこ こちら どこ だれ なに なん 何 私 貴方 貴方方 我々 私達 あの人 あのかた 彼女 彼 です あります おります います は が の に を で え から まで より も どの と し それで しかし".split(" ")),e.Pipeline.registerFunction(e.jp.stopWordFilter,"stopWordFilter-jp")}});
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e,i){"function"==typeof define&&define.amd?define(i):"object"==typeof exports?module.exports=i():i()(e.lunr)}(this,function(){return function(e){e.multiLanguage=function(){for(var i=Array.prototype.slice.call(arguments),t=i.join("-"),r="",n=[],s=[],p=0;p<i.length;++p)"en"==i[p]?(r+="\\w",n.unshift(e.stopWordFilter),n.push(e.stemmer),s.push(e.stemmer)):(r+=e[i[p]].wordCharacters,n.unshift(e[i[p]].stopWordFilter),n.push(e[i[p]].stemmer),s.push(e[i[p]].stemmer));var o=e.trimmerSupport.generateTrimmer(r);return e.Pipeline.registerFunction(o,"lunr-multi-trimmer-"+t),n.unshift(o),function(){this.pipeline.reset(),this.pipeline.add.apply(this.pipeline,n),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add.apply(this.searchPipeline,s))}}}});
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,n,i;e.no=function(){this.pipeline.reset(),this.pipeline.add(e.no.trimmer,e.no.stopWordFilter,e.no.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.no.stemmer))},e.no.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.no.trimmer=e.trimmerSupport.generateTrimmer(e.no.wordCharacters),e.Pipeline.registerFunction(e.no.trimmer,"trimmer-no"),e.no.stemmer=(r=e.stemmerSupport.Among,n=e.stemmerSupport.SnowballProgram,i=new function(){var e,i,t=[new r("a",-1,1),new r("e",-1,1),new r("ede",1,1),new r("ande",1,1),new r("ende",1,1),new r("ane",1,1),new r("ene",1,1),new r("hetene",6,1),new r("erte",1,3),new r("en",-1,1),new r("heten",9,1),new r("ar",-1,1),new r("er",-1,1),new r("heter",12,1),new r("s",-1,2),new r("as",14,1),new r("es",14,1),new r("edes",16,1),new r("endes",16,1),new r("enes",16,1),new r("hetenes",19,1),new r("ens",14,1),new r("hetens",21,1),new r("ers",14,1),new r("ets",14,1),new r("et",-1,1),new r("het",25,1),new r("ert",-1,3),new r("ast",-1,1)],o=[new r("dt",-1,-1),new r("vt",-1,-1)],s=[new r("leg",-1,1),new r("eleg",0,1),new r("ig",-1,1),new r("eig",2,1),new r("lig",2,1),new r("elig",4,1),new r("els",-1,1),new r("lov",-1,1),new r("elov",7,1),new r("slov",7,1),new r("hetslov",9,1)],a=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],m=[119,125,149,1],l=new n;this.setCurrent=function(e){l.setCurrent(e)},this.getCurrent=function(){return l.getCurrent()},this.stem=function(){var r,n,u,d,c=l.cursor;return function(){var r,n=l.cursor+3;if(i=l.limit,0<=n||n<=l.limit){for(e=n;;){if(r=l.cursor,l.in_grouping(a,97,248)){l.cursor=r;break}if(r>=l.limit)return;l.cursor=r+1}for(;!l.out_grouping(a,97,248);){if(l.cursor>=l.limit)return;l.cursor++}(i=l.cursor)<e&&(i=e)}}(),l.limit_backward=c,l.cursor=l.limit,function(){var e,r,n;if(l.cursor>=i&&(r=l.limit_backward,l.limit_backward=i,l.ket=l.cursor,e=l.find_among_b(t,29),l.limit_backward=r,e))switch(l.bra=l.cursor,e){case 1:l.slice_del();break;case 2:n=l.limit-l.cursor,l.in_grouping_b(m,98,122)?l.slice_del():(l.cursor=l.limit-n,l.eq_s_b(1,"k")&&l.out_grouping_b(a,97,248)&&l.slice_del());break;case 3:l.slice_from("er")}}(),l.cursor=l.limit,n=l.limit-l.cursor,l.cursor>=i&&(r=l.limit_backward,l.limit_backward=i,l.ket=l.cursor,l.find_among_b(o,2)?(l.bra=l.cursor,l.limit_backward=r,l.cursor=l.limit-n,l.cursor>l.limit_backward&&(l.cursor--,l.bra=l.cursor,l.slice_del())):l.limit_backward=r),l.cursor=l.limit,l.cursor>=i&&(d=l.limit_backward,l.limit_backward=i,l.ket=l.cursor,(u=l.find_among_b(s,11))?(l.bra=l.cursor,l.limit_backward=d,1==u&&l.slice_del()):l.limit_backward=d),!0}},function(e){return"function"==typeof e.update?e.update(function(e){return i.setCurrent(e),i.stem(),i.getCurrent()}):(i.setCurrent(e),i.stem(),i.getCurrent())}),e.Pipeline.registerFunction(e.no.stemmer,"stemmer-no"),e.no.stopWordFilter=e.generateStopWordFilter("alle at av bare begge ble blei bli blir blitt både båe da de deg dei deim deira deires dem den denne der dere deres det dette di din disse ditt du dykk dykkar då eg ein eit eitt eller elles en enn er et ett etter for fordi fra før ha hadde han hans har hennar henne hennes her hjå ho hoe honom hoss hossen hun hva hvem hver hvilke hvilken hvis hvor hvordan hvorfor i ikke ikkje ikkje ingen ingi inkje inn inni ja jeg kan kom korleis korso kun kunne kva kvar kvarhelst kven kvi kvifor man mange me med medan meg meget mellom men mi min mine mitt mot mykje ned no noe noen noka noko nokon nokor nokre nå når og også om opp oss over på samme seg selv si si sia sidan siden sin sine sitt sjøl skal skulle slik so som som somme somt så sånn til um upp ut uten var vart varte ved vere verte vi vil ville vore vors vort vår være være vært å".split(" ")),e.Pipeline.registerFunction(e.no.stopWordFilter,"stopWordFilter-no")}});
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,s,n;e.pt=function(){this.pipeline.reset(),this.pipeline.add(e.pt.trimmer,e.pt.stopWordFilter,e.pt.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.pt.stemmer))},e.pt.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.pt.trimmer=e.trimmerSupport.generateTrimmer(e.pt.wordCharacters),e.Pipeline.registerFunction(e.pt.trimmer,"trimmer-pt"),e.pt.stemmer=(r=e.stemmerSupport.Among,s=e.stemmerSupport.SnowballProgram,n=new function(){var e,n,i,o=[new r("",-1,3),new r("ã",0,1),new r("õ",0,2)],a=[new r("",-1,3),new r("a~",0,1),new r("o~",0,2)],t=[new r("ic",-1,-1),new r("ad",-1,-1),new r("os",-1,-1),new r("iv",-1,1)],u=[new r("ante",-1,1),new r("avel",-1,1),new r("ível",-1,1)],w=[new r("ic",-1,1),new r("abil",-1,1),new r("iv",-1,1)],m=[new r("ica",-1,1),new r("ância",-1,1),new r("ência",-1,4),new r("ira",-1,9),new r("adora",-1,1),new r("osa",-1,1),new r("ista",-1,1),new r("iva",-1,8),new r("eza",-1,1),new r("logía",-1,2),new r("idade",-1,7),new r("ante",-1,1),new r("mente",-1,6),new r("amente",12,5),new r("ável",-1,1),new r("ível",-1,1),new r("ución",-1,3),new r("ico",-1,1),new r("ismo",-1,1),new r("oso",-1,1),new r("amento",-1,1),new r("imento",-1,1),new r("ivo",-1,8),new r("aça~o",-1,1),new r("ador",-1,1),new r("icas",-1,1),new r("ências",-1,4),new r("iras",-1,9),new r("adoras",-1,1),new r("osas",-1,1),new r("istas",-1,1),new r("ivas",-1,8),new r("ezas",-1,1),new r("logías",-1,2),new r("idades",-1,7),new r("uciones",-1,3),new r("adores",-1,1),new r("antes",-1,1),new r("aço~es",-1,1),new r("icos",-1,1),new r("ismos",-1,1),new r("osos",-1,1),new r("amentos",-1,1),new r("imentos",-1,1),new r("ivos",-1,8)],c=[new r("ada",-1,1),new r("ida",-1,1),new r("ia",-1,1),new r("aria",2,1),new r("eria",2,1),new r("iria",2,1),new r("ara",-1,1),new r("era",-1,1),new r("ira",-1,1),new r("ava",-1,1),new r("asse",-1,1),new r("esse",-1,1),new r("isse",-1,1),new r("aste",-1,1),new r("este",-1,1),new r("iste",-1,1),new r("ei",-1,1),new r("arei",16,1),new r("erei",16,1),new r("irei",16,1),new r("am",-1,1),new r("iam",20,1),new r("ariam",21,1),new r("eriam",21,1),new r("iriam",21,1),new r("aram",20,1),new r("eram",20,1),new r("iram",20,1),new r("avam",20,1),new r("em",-1,1),new r("arem",29,1),new r("erem",29,1),new r("irem",29,1),new r("assem",29,1),new r("essem",29,1),new r("issem",29,1),new r("ado",-1,1),new r("ido",-1,1),new r("ando",-1,1),new r("endo",-1,1),new r("indo",-1,1),new r("ara~o",-1,1),new r("era~o",-1,1),new r("ira~o",-1,1),new r("ar",-1,1),new r("er",-1,1),new r("ir",-1,1),new r("as",-1,1),new r("adas",47,1),new r("idas",47,1),new r("ias",47,1),new r("arias",50,1),new r("erias",50,1),new r("irias",50,1),new r("aras",47,1),new r("eras",47,1),new r("iras",47,1),new r("avas",47,1),new r("es",-1,1),new r("ardes",58,1),new r("erdes",58,1),new r("irdes",58,1),new r("ares",58,1),new r("eres",58,1),new r("ires",58,1),new r("asses",58,1),new r("esses",58,1),new r("isses",58,1),new r("astes",58,1),new r("estes",58,1),new r("istes",58,1),new r("is",-1,1),new r("ais",71,1),new r("eis",71,1),new r("areis",73,1),new r("ereis",73,1),new r("ireis",73,1),new r("áreis",73,1),new r("éreis",73,1),new r("íreis",73,1),new r("ásseis",73,1),new r("ésseis",73,1),new r("ísseis",73,1),new r("áveis",73,1),new r("íeis",73,1),new r("aríeis",84,1),new r("eríeis",84,1),new r("iríeis",84,1),new r("ados",-1,1),new r("idos",-1,1),new r("amos",-1,1),new r("áramos",90,1),new r("éramos",90,1),new r("íramos",90,1),new r("ávamos",90,1),new r("íamos",90,1),new r("aríamos",95,1),new r("eríamos",95,1),new r("iríamos",95,1),new r("emos",-1,1),new r("aremos",99,1),new r("eremos",99,1),new r("iremos",99,1),new r("ássemos",99,1),new r("êssemos",99,1),new r("íssemos",99,1),new r("imos",-1,1),new r("armos",-1,1),new r("ermos",-1,1),new r("irmos",-1,1),new r("ámos",-1,1),new r("arás",-1,1),new r("erás",-1,1),new r("irás",-1,1),new r("eu",-1,1),new r("iu",-1,1),new r("ou",-1,1),new r("ará",-1,1),new r("erá",-1,1),new r("irá",-1,1)],l=[new r("a",-1,1),new r("i",-1,1),new r("o",-1,1),new r("os",-1,1),new r("á",-1,1),new r("í",-1,1),new r("ó",-1,1)],f=[new r("e",-1,1),new r("ç",-1,2),new r("é",-1,1),new r("ê",-1,1)],d=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,0,3,19,12,2],v=new s;function p(){if(v.out_grouping(d,97,250)){for(;!v.in_grouping(d,97,250);){if(v.cursor>=v.limit)return!0;v.cursor++}return!1}return!0}function _(){var e,r,s=v.cursor;if(v.in_groupLine truncated
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e,i){"function"==typeof define&&define.amd?define(i):"object"==typeof exports?module.exports=i():i()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var i,r,n;e.ro=function(){this.pipeline.reset(),this.pipeline.add(e.ro.trimmer,e.ro.stopWordFilter,e.ro.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.ro.stemmer))},e.ro.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.ro.trimmer=e.trimmerSupport.generateTrimmer(e.ro.wordCharacters),e.Pipeline.registerFunction(e.ro.trimmer,"trimmer-ro"),e.ro.stemmer=(i=e.stemmerSupport.Among,r=e.stemmerSupport.SnowballProgram,n=new function(){var e,n,t,a,o=[new i("",-1,3),new i("I",0,1),new i("U",0,2)],s=[new i("ea",-1,3),new i("aţia",-1,7),new i("aua",-1,2),new i("iua",-1,4),new i("aţie",-1,7),new i("ele",-1,3),new i("ile",-1,5),new i("iile",6,4),new i("iei",-1,4),new i("atei",-1,6),new i("ii",-1,4),new i("ului",-1,1),new i("ul",-1,1),new i("elor",-1,3),new i("ilor",-1,4),new i("iilor",14,4)],c=[new i("icala",-1,4),new i("iciva",-1,4),new i("ativa",-1,5),new i("itiva",-1,6),new i("icale",-1,4),new i("aţiune",-1,5),new i("iţiune",-1,6),new i("atoare",-1,5),new i("itoare",-1,6),new i("ătoare",-1,5),new i("icitate",-1,4),new i("abilitate",-1,1),new i("ibilitate",-1,2),new i("ivitate",-1,3),new i("icive",-1,4),new i("ative",-1,5),new i("itive",-1,6),new i("icali",-1,4),new i("atori",-1,5),new i("icatori",18,4),new i("itori",-1,6),new i("ători",-1,5),new i("icitati",-1,4),new i("abilitati",-1,1),new i("ivitati",-1,3),new i("icivi",-1,4),new i("ativi",-1,5),new i("itivi",-1,6),new i("icităi",-1,4),new i("abilităi",-1,1),new i("ivităi",-1,3),new i("icităţi",-1,4),new i("abilităţi",-1,1),new i("ivităţi",-1,3),new i("ical",-1,4),new i("ator",-1,5),new i("icator",35,4),new i("itor",-1,6),new i("ător",-1,5),new i("iciv",-1,4),new i("ativ",-1,5),new i("itiv",-1,6),new i("icală",-1,4),new i("icivă",-1,4),new i("ativă",-1,5),new i("itivă",-1,6)],u=[new i("ica",-1,1),new i("abila",-1,1),new i("ibila",-1,1),new i("oasa",-1,1),new i("ata",-1,1),new i("ita",-1,1),new i("anta",-1,1),new i("ista",-1,3),new i("uta",-1,1),new i("iva",-1,1),new i("ic",-1,1),new i("ice",-1,1),new i("abile",-1,1),new i("ibile",-1,1),new i("isme",-1,3),new i("iune",-1,2),new i("oase",-1,1),new i("ate",-1,1),new i("itate",17,1),new i("ite",-1,1),new i("ante",-1,1),new i("iste",-1,3),new i("ute",-1,1),new i("ive",-1,1),new i("ici",-1,1),new i("abili",-1,1),new i("ibili",-1,1),new i("iuni",-1,2),new i("atori",-1,1),new i("osi",-1,1),new i("ati",-1,1),new i("itati",30,1),new i("iti",-1,1),new i("anti",-1,1),new i("isti",-1,3),new i("uti",-1,1),new i("işti",-1,3),new i("ivi",-1,1),new i("ităi",-1,1),new i("oşi",-1,1),new i("ităţi",-1,1),new i("abil",-1,1),new i("ibil",-1,1),new i("ism",-1,3),new i("ator",-1,1),new i("os",-1,1),new i("at",-1,1),new i("it",-1,1),new i("ant",-1,1),new i("ist",-1,3),new i("ut",-1,1),new i("iv",-1,1),new i("ică",-1,1),new i("abilă",-1,1),new i("ibilă",-1,1),new i("oasă",-1,1),new i("ată",-1,1),new i("ită",-1,1),new i("antă",-1,1),new i("istă",-1,3),new i("ută",-1,1),new i("ivă",-1,1)],w=[new i("ea",-1,1),new i("ia",-1,1),new i("esc",-1,1),new i("ăsc",-1,1),new i("ind",-1,1),new i("ând",-1,1),new i("are",-1,1),new i("ere",-1,1),new i("ire",-1,1),new i("âre",-1,1),new i("se",-1,2),new i("ase",10,1),new i("sese",10,2),new i("ise",10,1),new i("use",10,1),new i("âse",10,1),new i("eşte",-1,1),new i("ăşte",-1,1),new i("eze",-1,1),new i("ai",-1,1),new i("eai",19,1),new i("iai",19,1),new i("sei",-1,2),new i("eşti",-1,1),new i("ăşti",-1,1),new i("ui",-1,1),new i("ezi",-1,1),new i("âi",-1,1),new i("aşi",-1,1),new i("seşi",-1,2),new i("aseşi",29,1),new i("seseşi",29,2),new i("iseşi",29,1),new i("useşi",29,1),new i("âseşi",29,1),new i("işi",-1,1),new i("uşi",-1,1),new i("âşi",-1,1),new i("aţi",-1,2),new i("eaţi",38,1),new i("iaţi",38,1),new i("eţi",-1,2),new i("iţi",-1,2),new i("âţi",-1,2),new i("arăţi",-1,1),new i("serăţi",-1,2),new i("aserăţi",45,1),new i("seserăţi",45,2),new i("iserăţi",45,1),new i("userăţi",45,1),new i("âserăţi",45,1),new i("irăţi",-1,1),new i("urăţi",-1,1),new i("ârăţi",-1,1),new i("am",-1,1),new i("eam",54,1),new i("iam",54,1),new i("em",-1,2),new i("asem",57,1),new i("sesem",57,2),new i("isem",57,1),new i("usem",57,1),new i("âsem",57,1),new i("im",-1,2),new i("âm",-1,2),new i("ăm",-1,2),new i("arăm",65,1),new i("serăm",65,2),new i("aserăm",67,1),new i("seserăm",67,2),new i("iserăm",67,1),new i("userăm",67,1),new i("âserăm",67,1),new i("irăm",65,1),newLine truncated
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e,n){"function"==typeof define&&define.amd?define(n):"object"==typeof exports?module.exports=n():n()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var n,r,t;e.ru=function(){this.pipeline.reset(),this.pipeline.add(e.ru.trimmer,e.ru.stopWordFilter,e.ru.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.ru.stemmer))},e.ru.wordCharacters="Ѐ-҄҇-ԯᴫᵸⷠ-ⷿꙀ-ꚟ︮︯",e.ru.trimmer=e.trimmerSupport.generateTrimmer(e.ru.wordCharacters),e.Pipeline.registerFunction(e.ru.trimmer,"trimmer-ru"),e.ru.stemmer=(n=e.stemmerSupport.Among,r=e.stemmerSupport.SnowballProgram,t=new function(){var e,t,w=[new n("в",-1,1),new n("ив",0,2),new n("ыв",0,2),new n("вши",-1,1),new n("ивши",3,2),new n("ывши",3,2),new n("вшись",-1,1),new n("ившись",6,2),new n("ывшись",6,2)],i=[new n("ее",-1,1),new n("ие",-1,1),new n("ое",-1,1),new n("ые",-1,1),new n("ими",-1,1),new n("ыми",-1,1),new n("ей",-1,1),new n("ий",-1,1),new n("ой",-1,1),new n("ый",-1,1),new n("ем",-1,1),new n("им",-1,1),new n("ом",-1,1),new n("ым",-1,1),new n("его",-1,1),new n("ого",-1,1),new n("ему",-1,1),new n("ому",-1,1),new n("их",-1,1),new n("ых",-1,1),new n("ею",-1,1),new n("ою",-1,1),new n("ую",-1,1),new n("юю",-1,1),new n("ая",-1,1),new n("яя",-1,1)],u=[new n("ем",-1,1),new n("нн",-1,1),new n("вш",-1,1),new n("ивш",2,2),new n("ывш",2,2),new n("щ",-1,1),new n("ющ",5,1),new n("ующ",6,2)],s=[new n("сь",-1,1),new n("ся",-1,1)],o=[new n("ла",-1,1),new n("ила",0,2),new n("ыла",0,2),new n("на",-1,1),new n("ена",3,2),new n("ете",-1,1),new n("ите",-1,2),new n("йте",-1,1),new n("ейте",7,2),new n("уйте",7,2),new n("ли",-1,1),new n("или",10,2),new n("ыли",10,2),new n("й",-1,1),new n("ей",13,2),new n("уй",13,2),new n("л",-1,1),new n("ил",16,2),new n("ыл",16,2),new n("ем",-1,1),new n("им",-1,2),new n("ым",-1,2),new n("н",-1,1),new n("ен",22,2),new n("ло",-1,1),new n("ило",24,2),new n("ыло",24,2),new n("но",-1,1),new n("ено",27,2),new n("нно",27,1),new n("ет",-1,1),new n("ует",30,2),new n("ит",-1,2),new n("ыт",-1,2),new n("ют",-1,1),new n("уют",34,2),new n("ят",-1,2),new n("ны",-1,1),new n("ены",37,2),new n("ть",-1,1),new n("ить",39,2),new n("ыть",39,2),new n("ешь",-1,1),new n("ишь",-1,2),new n("ю",-1,2),new n("ую",44,2)],c=[new n("а",-1,1),new n("ев",-1,1),new n("ов",-1,1),new n("е",-1,1),new n("ие",3,1),new n("ье",3,1),new n("и",-1,1),new n("еи",6,1),new n("ии",6,1),new n("ами",6,1),new n("ями",6,1),new n("иями",10,1),new n("й",-1,1),new n("ей",12,1),new n("ией",13,1),new n("ий",12,1),new n("ой",12,1),new n("ам",-1,1),new n("ем",-1,1),new n("ием",18,1),new n("ом",-1,1),new n("ям",-1,1),new n("иям",21,1),new n("о",-1,1),new n("у",-1,1),new n("ах",-1,1),new n("ях",-1,1),new n("иях",26,1),new n("ы",-1,1),new n("ь",-1,1),new n("ю",-1,1),new n("ию",30,1),new n("ью",30,1),new n("я",-1,1),new n("ия",33,1),new n("ья",33,1)],m=[new n("ост",-1,1),new n("ость",-1,1)],l=[new n("ейше",-1,1),new n("н",-1,2),new n("ейш",-1,1),new n("ь",-1,3)],f=[33,65,8,232],a=new r;function p(){for(;!a.in_grouping(f,1072,1103);){if(a.cursor>=a.limit)return!1;a.cursor++}return!0}function d(){for(;!a.out_grouping(f,1072,1103);){if(a.cursor>=a.limit)return!1;a.cursor++}return!0}function _(e,n){var r,t;if(a.ket=a.cursor,r=a.find_among_b(e,n)){switch(a.bra=a.cursor,r){case 1:if(t=a.limit-a.cursor,!a.eq_s_b(1,"а")&&(a.cursor=a.limit-t,!a.eq_s_b(1,"я")))return!1;case 2:a.slice_del()}return!0}return!1}function b(e,n){var r;return a.ket=a.cursor,!!(r=a.find_among_b(e,n))&&(a.bra=a.cursor,1==r&&a.slice_del(),!0)}function h(){return!!b(i,26)&&(_(u,8),!0)}function g(){var n;a.ket=a.cursor,(n=a.find_among_b(m,2))&&(a.bra=a.cursor,e<=a.cursor&&1==n&&a.slice_del())}this.setCurrent=function(e){a.setCurrent(e)},this.getCurrent=function(){return a.getCurrent()},this.stem=function(){return t=a.limit,e=t,p()&&(t=a.cursor,d()&&p()&&d()&&(e=a.cursor)),a.cursor=a.limit,!(a.cursor<t)&&(a.limit_backward=t,_(w,9)||(a.cursor=a.limit,b(s,2)||(a.cursor=a.limit),h()||(a.cursor=a.limit,_(o,46)||(a.cursor=a.limit,b(c,36)))),a.cursor=a.limit,a.ket=a.cursor,a.eq_s_b(1,"и")?(a.bra=a.cursor,a.slice_del()):a.cursor=a.limit,g(),a.cursor=a.limit,function(){var e;if(a.ket=a.cursor,e=a.find_among_b(l,4))switch(a.bra=a.cursor,e){case 1:if(a.slice_del(),a.ket=a.cursor,!a.eq_s_b(1,"н"))break;a.bra=a.cursor;case 2:if(!a.eq_s_b(1,"н"))break;case 3:a.slice_del()}}(),!0)}},function(e){return"function"==typeof e.update?e.update(function(e){return t.setCLine truncated
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(r,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():t()(r.lunr)}(this,function(){return function(r){r.stemmerSupport={Among:function(r,t,i,s){if(this.toCharArray=function(r){for(var t=r.length,i=new Array(t),s=0;s<t;s++)i[s]=r.charCodeAt(s);return i},!r&&""!=r||!t&&0!=t||!i)throw"Bad Among initialisation: s:"+r+", substring_i: "+t+", result: "+i;this.s_size=r.length,this.s=this.toCharArray(r),this.substring_i=t,this.result=i,this.method=s},SnowballProgram:function(){var r;return{bra:0,ket:0,limit:0,cursor:0,limit_backward:0,setCurrent:function(t){r=t,this.cursor=0,this.limit=t.length,this.limit_backward=0,this.bra=this.cursor,this.ket=this.limit},getCurrent:function(){var t=r;return r=null,t},in_grouping:function(t,i,s){if(this.cursor<this.limit){var e=r.charCodeAt(this.cursor);if(e<=s&&e>=i&&t[(e-=i)>>3]&1<<(7&e))return this.cursor++,!0}return!1},in_grouping_b:function(t,i,s){if(this.cursor>this.limit_backward){var e=r.charCodeAt(this.cursor-1);if(e<=s&&e>=i&&t[(e-=i)>>3]&1<<(7&e))return this.cursor--,!0}return!1},out_grouping:function(t,i,s){if(this.cursor<this.limit){var e=r.charCodeAt(this.cursor);if(e>s||e<i)return this.cursor++,!0;if(!(t[(e-=i)>>3]&1<<(7&e)))return this.cursor++,!0}return!1},out_grouping_b:function(t,i,s){if(this.cursor>this.limit_backward){var e=r.charCodeAt(this.cursor-1);if(e>s||e<i)return this.cursor--,!0;if(!(t[(e-=i)>>3]&1<<(7&e)))return this.cursor--,!0}return!1},eq_s:function(t,i){if(this.limit-this.cursor<t)return!1;for(var s=0;s<t;s++)if(r.charCodeAt(this.cursor+s)!=i.charCodeAt(s))return!1;return this.cursor+=t,!0},eq_s_b:function(t,i){if(this.cursor-this.limit_backward<t)return!1;for(var s=0;s<t;s++)if(r.charCodeAt(this.cursor-t+s)!=i.charCodeAt(s))return!1;return this.cursor-=t,!0},find_among:function(t,i){for(var s=0,e=i,n=this.cursor,u=this.limit,o=0,h=0,c=!1;;){for(var a=s+(e-s>>1),f=0,l=o<h?o:h,_=t[a],m=l;m<_.s_size;m++){if(n+l==u){f=-1;break}if(f=r.charCodeAt(n+l)-_.s[m])break;l++}if(f<0?(e=a,h=l):(s=a,o=l),e-s<=1){if(s>0||e==s||c)break;c=!0}}for(;;){if(o>=(_=t[s]).s_size){if(this.cursor=n+_.s_size,!_.method)return _.result;var b=_.method();if(this.cursor=n+_.s_size,b)return _.result}if((s=_.substring_i)<0)return 0}},find_among_b:function(t,i){for(var s=0,e=i,n=this.cursor,u=this.limit_backward,o=0,h=0,c=!1;;){for(var a=s+(e-s>>1),f=0,l=o<h?o:h,_=(m=t[a]).s_size-1-l;_>=0;_--){if(n-l==u){f=-1;break}if(f=r.charCodeAt(n-1-l)-m.s[_])break;l++}if(f<0?(e=a,h=l):(s=a,o=l),e-s<=1){if(s>0||e==s||c)break;c=!0}}for(;;){var m;if(o>=(m=t[s]).s_size){if(this.cursor=n-m.s_size,!m.method)return m.result;var b=m.method();if(this.cursor=n-m.s_size,b)return m.result}if((s=m.substring_i)<0)return 0}},replace_s:function(t,i,s){var e=s.length-(i-t),n=r.substring(0,t),u=r.substring(i);return r=n+s+u,this.limit+=e,this.cursor>=i?this.cursor+=e:this.cursor>t&&(this.cursor=t),e},slice_check:function(){if(this.bra<0||this.bra>this.ket||this.ket>this.limit||this.limit>r.length)throw"faulty slice operation"},slice_from:function(r){this.slice_check(),this.replace_s(this.bra,this.ket,r)},slice_del:function(){this.slice_from("")},insert:function(r,t,i){var s=this.replace_s(r,t,i);r<=this.bra&&(this.bra+=s),r<=this.ket&&(this.ket+=s)},slice_to:function(){return this.slice_check(),r.substring(this.bra,this.ket)},eq_v_b:function(r){return this.eq_s_b(r.length,r)}}}},r.trimmerSupport={generateTrimmer:function(r){var t=new RegExp("^[^"+r+"]+"),i=new RegExp("[^"+r+"]+$");return function(r){return"function"==typeof r.update?r.update(function(r){return r.replace(t,"").replace(i,"")}):r.replace(t,"").replace(i,"")}}}}});
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,n,t;e.sv=function(){this.pipeline.reset(),this.pipeline.add(e.sv.trimmer,e.sv.stopWordFilter,e.sv.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.sv.stemmer))},e.sv.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.sv.trimmer=e.trimmerSupport.generateTrimmer(e.sv.wordCharacters),e.Pipeline.registerFunction(e.sv.trimmer,"trimmer-sv"),e.sv.stemmer=(r=e.stemmerSupport.Among,n=e.stemmerSupport.SnowballProgram,t=new function(){var e,t,i=[new r("a",-1,1),new r("arna",0,1),new r("erna",0,1),new r("heterna",2,1),new r("orna",0,1),new r("ad",-1,1),new r("e",-1,1),new r("ade",6,1),new r("ande",6,1),new r("arne",6,1),new r("are",6,1),new r("aste",6,1),new r("en",-1,1),new r("anden",12,1),new r("aren",12,1),new r("heten",12,1),new r("ern",-1,1),new r("ar",-1,1),new r("er",-1,1),new r("heter",18,1),new r("or",-1,1),new r("s",-1,2),new r("as",21,1),new r("arnas",22,1),new r("ernas",22,1),new r("ornas",22,1),new r("es",21,1),new r("ades",26,1),new r("andes",26,1),new r("ens",21,1),new r("arens",29,1),new r("hetens",29,1),new r("erns",21,1),new r("at",-1,1),new r("andet",-1,1),new r("het",-1,1),new r("ast",-1,1)],s=[new r("dd",-1,-1),new r("gd",-1,-1),new r("nn",-1,-1),new r("dt",-1,-1),new r("gt",-1,-1),new r("kt",-1,-1),new r("tt",-1,-1)],a=[new r("ig",-1,1),new r("lig",0,1),new r("els",-1,1),new r("fullt",-1,3),new r("löst",-1,2)],o=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,24,0,32],u=[119,127,149],m=new n;this.setCurrent=function(e){m.setCurrent(e)},this.getCurrent=function(){return m.getCurrent()},this.stem=function(){var r,n=m.cursor;return function(){var r,n=m.cursor+3;if(t=m.limit,0<=n||n<=m.limit){for(e=n;;){if(r=m.cursor,m.in_grouping(o,97,246)){m.cursor=r;break}if(m.cursor=r,m.cursor>=m.limit)return;m.cursor++}for(;!m.out_grouping(o,97,246);){if(m.cursor>=m.limit)return;m.cursor++}(t=m.cursor)<e&&(t=e)}}(),m.limit_backward=n,m.cursor=m.limit,function(){var e,r=m.limit_backward;if(m.cursor>=t&&(m.limit_backward=t,m.cursor=m.limit,m.ket=m.cursor,e=m.find_among_b(i,37),m.limit_backward=r,e))switch(m.bra=m.cursor,e){case 1:m.slice_del();break;case 2:m.in_grouping_b(u,98,121)&&m.slice_del()}}(),m.cursor=m.limit,r=m.limit_backward,m.cursor>=t&&(m.limit_backward=t,m.cursor=m.limit,m.find_among_b(s,7)&&(m.cursor=m.limit,m.ket=m.cursor,m.cursor>m.limit_backward&&(m.bra=--m.cursor,m.slice_del())),m.limit_backward=r),m.cursor=m.limit,function(){var e,r;if(m.cursor>=t){if(r=m.limit_backward,m.limit_backward=t,m.cursor=m.limit,m.ket=m.cursor,e=m.find_among_b(a,5))switch(m.bra=m.cursor,e){case 1:m.slice_del();break;case 2:m.slice_from("lös");break;case 3:m.slice_from("full")}m.limit_backward=r}}(),!0}},function(e){return"function"==typeof e.update?e.update(function(e){return t.setCurrent(e),t.stem(),t.getCurrent()}):(t.setCurrent(e),t.stem(),t.getCurrent())}),e.Pipeline.registerFunction(e.sv.stemmer,"stemmer-sv"),e.sv.stopWordFilter=e.generateStopWordFilter("alla allt att av blev bli blir blivit de dem den denna deras dess dessa det detta dig din dina ditt du där då efter ej eller en er era ert ett från för ha hade han hans har henne hennes hon honom hur här i icke ingen inom inte jag ju kan kunde man med mellan men mig min mina mitt mot mycket ni nu när någon något några och om oss på samma sedan sig sin sina sitta själv skulle som så sådan sådana sådant till under upp ut utan vad var vara varför varit varje vars vart vem vi vid vilka vilkas vilken vilket vår våra vårt än är åt över".split(" ")),e.Pipeline.registerFunction(e.sv.stopWordFilter,"stopWordFilter-sv")}});
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
!function(r,i){"function"==typeof define&&define.amd?define(i):"object"==typeof exports?module.exports=i():i()(r.lunr)}(this,function(){return function(r){if(void 0===r)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===r.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var i,e,n;r.tr=function(){this.pipeline.reset(),this.pipeline.add(r.tr.trimmer,r.tr.stopWordFilter,r.tr.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(r.tr.stemmer))},r.tr.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",r.tr.trimmer=r.trimmerSupport.generateTrimmer(r.tr.wordCharacters),r.Pipeline.registerFunction(r.tr.trimmer,"trimmer-tr"),r.tr.stemmer=(i=r.stemmerSupport.Among,e=r.stemmerSupport.SnowballProgram,n=new function(){var r,n=[new i("m",-1,-1),new i("n",-1,-1),new i("miz",-1,-1),new i("niz",-1,-1),new i("muz",-1,-1),new i("nuz",-1,-1),new i("müz",-1,-1),new i("nüz",-1,-1),new i("mız",-1,-1),new i("nız",-1,-1)],t=[new i("leri",-1,-1),new i("ları",-1,-1)],u=[new i("ni",-1,-1),new i("nu",-1,-1),new i("nü",-1,-1),new i("nı",-1,-1)],o=[new i("in",-1,-1),new i("un",-1,-1),new i("ün",-1,-1),new i("ın",-1,-1)],s=[new i("a",-1,-1),new i("e",-1,-1)],c=[new i("na",-1,-1),new i("ne",-1,-1)],l=[new i("da",-1,-1),new i("ta",-1,-1),new i("de",-1,-1),new i("te",-1,-1)],a=[new i("nda",-1,-1),new i("nde",-1,-1)],m=[new i("dan",-1,-1),new i("tan",-1,-1),new i("den",-1,-1),new i("ten",-1,-1)],d=[new i("ndan",-1,-1),new i("nden",-1,-1)],f=[new i("la",-1,-1),new i("le",-1,-1)],b=[new i("ca",-1,-1),new i("ce",-1,-1)],w=[new i("im",-1,-1),new i("um",-1,-1),new i("üm",-1,-1),new i("ım",-1,-1)],_=[new i("sin",-1,-1),new i("sun",-1,-1),new i("sün",-1,-1),new i("sın",-1,-1)],k=[new i("iz",-1,-1),new i("uz",-1,-1),new i("üz",-1,-1),new i("ız",-1,-1)],p=[new i("siniz",-1,-1),new i("sunuz",-1,-1),new i("sünüz",-1,-1),new i("sınız",-1,-1)],g=[new i("lar",-1,-1),new i("ler",-1,-1)],y=[new i("niz",-1,-1),new i("nuz",-1,-1),new i("nüz",-1,-1),new i("nız",-1,-1)],z=[new i("dir",-1,-1),new i("tir",-1,-1),new i("dur",-1,-1),new i("tur",-1,-1),new i("dür",-1,-1),new i("tür",-1,-1),new i("dır",-1,-1),new i("tır",-1,-1)],h=[new i("casına",-1,-1),new i("cesine",-1,-1)],v=[new i("di",-1,-1),new i("ti",-1,-1),new i("dik",-1,-1),new i("tik",-1,-1),new i("duk",-1,-1),new i("tuk",-1,-1),new i("dük",-1,-1),new i("tük",-1,-1),new i("dık",-1,-1),new i("tık",-1,-1),new i("dim",-1,-1),new i("tim",-1,-1),new i("dum",-1,-1),new i("tum",-1,-1),new i("düm",-1,-1),new i("tüm",-1,-1),new i("dım",-1,-1),new i("tım",-1,-1),new i("din",-1,-1),new i("tin",-1,-1),new i("dun",-1,-1),new i("tun",-1,-1),new i("dün",-1,-1),new i("tün",-1,-1),new i("dın",-1,-1),new i("tın",-1,-1),new i("du",-1,-1),new i("tu",-1,-1),new i("dü",-1,-1),new i("tü",-1,-1),new i("dı",-1,-1),new i("tı",-1,-1)],q=[new i("sa",-1,-1),new i("se",-1,-1),new i("sak",-1,-1),new i("sek",-1,-1),new i("sam",-1,-1),new i("sem",-1,-1),new i("san",-1,-1),new i("sen",-1,-1)],C=[new i("miş",-1,-1),new i("muş",-1,-1),new i("müş",-1,-1),new i("mış",-1,-1)],P=[new i("b",-1,1),new i("c",-1,2),new i("d",-1,3),new i("ğ",-1,4)],F=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,8,0,0,0,0,0,0,1],S=[1,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,1],W=[65],L=[65],x=[["a",[1,64,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],97,305],["e",[17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130],101,252],["ı",[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],97,305],["i",[17],101,105],["o",W,111,117],["ö",L,246,252],["u",W,111,117]],A=new e;function E(r,i,e){for(;;){var n=A.limit-A.cursor;if(A.in_grouping_b(r,i,e)){A.cursor=A.limit-n;break}if(A.cursor=A.limit-n,A.cursor<=A.limit_backward)return!1;A.cursor--}return!0}function j(){var r,i;r=A.limit-A.cursor,E(F,97,305);for(var e=0;e<x.length;e++){i=A.limit-A.cursor;var n=x[e];if(A.eq_s_b(1,n[0])&&E(n[1],n[2],n[3]))return A.cursor=A.limit-r,!0;A.cursor=A.limit-i}return A.cursor=A.limit-i,!(!A.eq_s_b(1,"ü")||!E(L,246,252))&&(A.cursor=A.limit-r,!0)}function T(r,i){var e,n=A.limit-A.cursor;return r()&&(A.cursor=A.limit-n,A.cursor>A.limit_backward&&(A.cursor--,e=A.limit-A.cursor,i()))?(A.cursor=A.limit-e,!0):(A.cursor=A.limit-n,r()?(A.cursor=A.limit-n,!1):(A.cursor=A.limit-n,!(A.cursor<=A.limit_backward)&&(A.cursor--,!!i()&&(A.cursor=A.limit-n,!0))))}function Z(r){return T(r,function(){return A.in_grouping_b(F,97,305)})}function B(){return Z(function(){return A.eq_s_b(1,"n")})}function D(){return Z(function(){return A.eq_s_b(1,"y")})}function G(){return A.find_among_b(n,10)&&T(function(){return A.in_grouping_b(S,105,305)},function(){return A.out_grouping_b(F,97,305)})}function H(){return j()&&A.in_grouping_b(S,105,305)&&Z(function(){return A.eq_sLine truncated
|
|
||||||