Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a65386b491 | ||
|
|
37b857a0b2 | ||
|
|
5cfe8f315f | ||
|
|
a567a745b2 | ||
|
|
51fc965beb | ||
|
|
ec6b786fbf | ||
|
|
3c366160bb | ||
|
|
be3462eb76 | ||
|
|
6862015929 | ||
|
|
e5de237990 | ||
|
|
3621d8675f | ||
|
|
f9641d70af | ||
|
|
d2dca7b217 | ||
|
|
0ce666aaa0 | ||
|
|
f3db3da153 | ||
|
|
94bfd5cf66 | ||
|
|
c5bd019a7c | ||
|
|
c8edd5bd52 | ||
|
|
3bb6efe0db | ||
|
|
e05b9ce039 | ||
|
|
94e3088f56 | ||
|
|
b311c26e21 | ||
|
|
0521d793db | ||
|
|
ab2cea6b46 | ||
|
|
b708fbcd20 | ||
|
|
33134e617f | ||
|
|
43c0344fb2 | ||
|
|
7a0f88cc7c | ||
|
|
3b3b0725ed | ||
|
|
c217ccf540 | ||
|
|
56df886b55 | ||
|
|
7fd4c9617d | ||
|
|
ad0f44f0c5 | ||
|
|
cb2518716c | ||
|
|
a1098f6dc2 | ||
|
|
407c6cf120 | ||
|
|
9e76a788e2 | ||
|
|
02c0fb7b65 | ||
|
|
a5bddbcdc6 | ||
|
|
9f54c4d002 | ||
|
|
4289ce10e4 | ||
|
|
263de5b0c1 | ||
|
|
ecc1f4b8f1 | ||
|
|
ea32b415f0 | ||
|
|
229cfafa8d | ||
|
|
53e1f75c2c | ||
|
|
9a01964f5f | ||
|
|
f2a6c9458c | ||
|
|
9a117fa39a | ||
|
|
212f5ddb4f | ||
|
|
3b5f367822 | ||
|
|
eecb0831a8 | ||
|
|
8d5be1c012 | ||
|
|
6fdf76b5d2 | ||
|
|
9df19ae436 | ||
|
|
171a0461b2 | ||
|
|
73208b8081 | ||
|
|
d6d2c2fc39 | ||
|
|
b8f3d936c4 | ||
|
|
da31b61ba1 | ||
|
|
a3c9f5ed79 | ||
|
|
8d4876d1ee | ||
|
|
8bd848c8d7 | ||
|
|
f51d8323c0 | ||
|
|
9b68174231 | ||
|
|
9117b89b83 | ||
|
|
d2d8c06f52 | ||
|
|
c65142782f | ||
|
|
266b3750c9 | ||
|
|
3233755282 | ||
|
|
b1d9fd3b70 | ||
|
|
e23768fa58 | ||
|
|
533e76ff2e | ||
|
|
a30493446e | ||
|
|
33b53c4a0d | ||
|
|
ac5cbe5a82 | ||
|
|
40485eb88a | ||
|
|
37a345b39d | ||
|
|
6cc9eecc85 | ||
|
|
817c155287 | ||
|
|
6e44de1e10 | ||
|
|
a6460be37b | ||
|
|
6b7b488e00 | ||
|
|
e7123d1a8e | ||
|
|
50aba9a8e6 | ||
|
|
1b18236f91 | ||
|
|
e17ae2eaf4 | ||
|
|
6d567b36e3 | ||
|
|
7b7ab016db | ||
|
|
0c9c94bad1 | ||
|
|
a3c5fadcc0 | ||
|
|
ca444bb71d | ||
|
|
5f1ae545e3 | ||
|
|
99d0d5019b | ||
|
|
be09474615 | ||
|
|
a67f97e8a2 | ||
|
|
9453734434 | ||
|
|
2fde9e63cd | ||
|
|
51b4458d32 | ||
|
|
9872ca7f12 | ||
|
|
2871ed74d0 | ||
|
|
07e68aa064 | ||
|
|
1b264d5a53 | ||
|
|
03cb555d1d | ||
|
|
e097578e85 | ||
|
|
b3ab3ce170 | ||
|
|
84e6ba5dff | ||
|
|
b7ba08476c | ||
|
|
aad8aa0893 | ||
|
|
30013c1f06 | ||
|
|
6901e998e6 | ||
|
|
8939d5982f | ||
|
|
a20916f9af | ||
|
|
107f80274c | ||
|
|
4ec8fbf1ff | ||
|
|
5b38419c5f | ||
|
|
dafd1f77fa | ||
|
|
ce6e328d52 | ||
|
|
2bc4b35f51 | ||
|
|
031b06be77 | ||
|
|
b9474cf0a2 | ||
|
|
074a4cc3e4 | ||
|
|
790ba155b8 | ||
|
|
0ca95a5ea0 | ||
|
|
7e43bfc109 | ||
|
|
6cfee12f31 | ||
|
|
6ac3d529ef | ||
|
|
e4cb68e05d | ||
|
|
0626330d44 | ||
|
|
60cf2a71cf | ||
|
|
87babdf3e7 | ||
|
|
ac3bea489b | ||
|
|
ca57546ef5 | ||
|
|
7bd9af7856 | ||
|
|
5b0a0baa9a | ||
|
|
a9a523d8c0 | ||
|
|
c6277922ac | ||
|
|
a82ac00d9a | ||
|
|
d6aa17e21f | ||
|
|
ba816a1c13 | ||
|
|
ceb11bfe77 | ||
|
|
c99f8a17ac | ||
|
|
1e03fac105 | ||
|
|
0b105dad97 | ||
|
|
832e204ec4 | ||
|
|
bfbd01ab15 | ||
|
|
58f63ca8a2 | ||
|
|
012efed117 | ||
|
|
1f1e341c36 | ||
|
|
80c9c26560 | ||
|
|
011ea43496 | ||
|
|
3a8ac6dffa | ||
|
|
d1480c36c0 | ||
|
|
5c9a10617b | ||
|
|
a93d7499d9 | ||
|
|
e24b454a1f | ||
|
|
4936b4ea44 | ||
|
|
c4069824f7 | ||
|
|
7efaa708a6 | ||
|
|
93656e65f8 | ||
|
|
3a7c364562 | ||
|
|
c0bb554d8d | ||
|
|
073b7b4ff5 | ||
|
|
393d8541e2 | ||
|
|
1ef780d96f | ||
|
|
a8cb027c08 | ||
|
|
a95b77a940 | ||
|
|
edd3486d2c | ||
|
|
f9db71ee12 | ||
|
|
62a85e60a7 | ||
|
|
6ce9f232dc | ||
|
|
20d1a5db70 | ||
|
|
d46ee7c89b | ||
|
|
d2abc409f9 | ||
|
|
5f9e7c4ff4 | ||
|
|
3f9849a63b | ||
|
|
09cd258780 | ||
|
|
7d65a2664d | ||
|
|
d29e3afc28 | ||
|
|
ff949d84ad | ||
|
|
6b0868089b | ||
|
|
2474c0b633 | ||
|
|
eabb9639a3 | ||
|
|
cfb6aca9a4 | ||
|
|
c37271422b | ||
|
|
975090256d | ||
|
|
cbf308a01d | ||
|
|
e05fdf8923 | ||
|
|
2343778559 | ||
|
|
1ffc3ed3a6 | ||
|
|
ba3c96f8c6 | ||
|
|
b7912cbe0b | ||
|
|
dafdb7689c | ||
|
|
46ba2b6b4f | ||
|
|
b4c1e340ea | ||
|
|
a438e6fa73 | ||
|
|
b21d3ded2f | ||
|
|
09a5c2e025 | ||
|
|
3f9f9eb667 | ||
|
|
29cdee761b | ||
|
|
67bedc4ace | ||
|
|
55ae9e8414 | ||
|
|
4768c425d1 | ||
|
|
b4bdb89f65 | ||
|
|
ea9130256c | ||
|
|
cde687bbe1 | ||
|
|
9725d72a80 | ||
|
|
fbd3c90b80 | ||
|
|
52c7fa2427 | ||
|
|
02fa0df81c | ||
|
|
027017d0d2 | ||
|
|
26c9120d22 | ||
|
|
71329f6c41 | ||
|
|
73f16f08e3 | ||
|
|
330cfc33ee | ||
|
|
cf20b0b2b8 | ||
|
|
001ecbb561 | ||
|
|
a597b072b8 | ||
|
|
f25efecb74 | ||
|
|
6d52d8552b | ||
|
|
c9a2ff4007 | ||
|
|
b961e1aab5 | ||
|
|
36868a8749 | ||
|
|
4ef8543128 | ||
|
|
93e4656a27 | ||
|
|
c4f46171ae | ||
|
|
e2a1ca7caa | ||
|
|
19e808fffb | ||
|
|
d21c44e266 | ||
|
|
01215b7d2c | ||
|
|
da9b0c6735 | ||
|
|
4d2f3375e8 | ||
|
|
27efbc3485 | ||
|
|
d4074e45cf | ||
|
|
f39942283b | ||
|
|
468b90a4a4 | ||
|
|
092e12d1be | ||
|
|
320b36495d | ||
|
|
e4f47de6ef | ||
|
|
410ecb4bbc | ||
|
|
d019853687 | ||
|
|
4d51980cb5 | ||
|
|
5b5e6b9e44 | ||
|
|
58a084049d | ||
|
|
9538fc9723 | ||
|
|
227188e908 | ||
|
|
61791b90ea | ||
|
|
797147097c | ||
|
|
f8b132890c | ||
|
|
134aee4582 | ||
|
|
77d75b7739 | ||
|
|
26c3752f48 | ||
|
|
4bcde2f0ff | ||
|
|
160bb0b050 | ||
|
|
05aa860459 | ||
|
|
a4c2a20851 | ||
|
|
4df9179d34 | ||
|
|
8943de27e4 | ||
|
|
fc728d9e11 | ||
|
|
f6131ce3b5 | ||
|
|
9110e6f632 | ||
|
|
331702cd95 | ||
|
|
743ce5a40f | ||
|
|
abec7dd3bc | ||
|
|
f6de16e95a | ||
|
|
a9ee263682 | ||
|
|
8d955d5f30 | ||
|
|
4d8be81a8f | ||
|
|
e3c7b8d006 | ||
|
|
3b1d86b750 | ||
|
|
cf0faf58dc | ||
|
|
af113f867d | ||
|
|
ca230bba09 | ||
|
|
a26a2160ae | ||
|
|
aafdf3d093 | ||
|
|
12dc3baff9 | ||
|
|
d5b4d93575 | ||
|
|
ab55a6fbbe | ||
|
|
0c884734a3 | ||
|
|
58dd814765 | ||
|
|
bd4927b494 | ||
|
|
8454abcf45 | ||
|
|
407bf4961c | ||
|
|
46937a1b9f | ||
|
|
210485d800 | ||
|
|
135796d4fa | ||
|
|
78949d6c05 | ||
|
|
83f65a673b | ||
|
|
407c2ed114 | ||
|
|
37141779ac | ||
|
|
b522901845 | ||
|
|
e362d47903 | ||
|
|
b1781c33ce | ||
|
|
2a1505b364 | ||
|
|
8b548ac02f | ||
|
|
5c77c25747 | ||
|
|
6c0374cd3c | ||
|
|
51753a1e25 | ||
|
|
dc744a8dd9 | ||
|
|
d1a63e4173 | ||
|
|
90d57f0243 | ||
|
|
3a81411d28 | ||
|
|
b12bb32ece | ||
|
|
0992e56fee | ||
|
|
5fe1726484 | ||
|
|
189b27f36e | ||
|
|
a0d6daa180 | ||
|
|
699d2c7b24 | ||
|
|
0262f1cd6e | ||
|
|
bdac11ade7 | ||
|
|
25e89d3a7a | ||
|
|
c6ac582c99 | ||
|
|
9ea229ed5a | ||
|
|
f88c514be9 | ||
|
|
3e70b8420e | ||
|
|
2c583b03ff | ||
|
|
dd78e75dd6 | ||
|
|
c6101aa02f | ||
|
|
46ee3a0c46 | ||
|
|
763659b8a3 | ||
|
|
74f645a098 | ||
|
|
53a48df77e | ||
|
|
597b72e286 | ||
|
|
ec2bfb99bb | ||
|
|
8ea5162ad9 | ||
|
|
9c119bfdad | ||
|
|
a1d5b2a293 | ||
|
|
450d0687da | ||
|
|
b83a9b902a | ||
|
|
b26906963b | ||
|
|
b0c043cc2f | ||
|
|
d0503d409f | ||
|
|
b9bd061bdd | ||
|
|
b868769ec8 | ||
|
|
89138bab4d | ||
|
|
60ea33b1c7 | ||
|
|
08e297a217 | ||
|
|
19732d3bd7 | ||
|
|
e3c9430e7e | ||
|
|
a189906b9b | ||
|
|
205f54d80d | ||
|
|
d9d54a918f | ||
|
|
81a2f2f06d | ||
|
|
3e41844e6c | ||
|
|
2620eab45e | ||
|
|
5b7bf6ca9f | ||
|
|
77dd022243 | ||
|
|
17cb5117f4 | ||
|
|
7a9824f00e | ||
|
|
32fc03886d | ||
|
|
73182cff3a | ||
|
|
ef0771ee48 | ||
|
|
943c40a233 | ||
|
|
9adaa9b967 | ||
|
|
2894567165 | ||
|
|
e196a81e99 | ||
|
|
eaac4b6de4 | ||
|
|
a3c806a7a8 | ||
|
|
495f08473d | ||
|
|
40d5c6f0dc | ||
|
|
6056858bf8 | ||
|
|
3be0c068b9 | ||
|
|
cd95b40d61 | ||
|
|
60b3ae2ac2 | ||
|
|
e94e26f529 | ||
|
|
6958b6fc2b | ||
|
|
34df787be6 | ||
|
|
b3eb9edc34 | ||
|
|
2767cdba9c | ||
|
|
8cb9c6e21f | ||
|
|
2d4f5958e2 | ||
|
|
735f6fec1a | ||
|
|
e0a9cae386 | ||
|
|
e7a7d4c75a | ||
|
|
758b54f36d | ||
|
|
6455b0edcc | ||
|
|
6fbaba1323 | ||
|
|
d9fd1d9a46 | ||
|
|
5a5a6f9cd2 | ||
|
|
14c26567b2 | ||
|
|
8efc8051d1 | ||
|
|
bcfe7a76e8 | ||
|
|
7d17ee5960 | ||
|
|
dc6bd2b015 | ||
|
|
724dfc6a4d | ||
|
|
47b82bdaea | ||
|
|
0fc1239445 | ||
|
|
18834de7d0 | ||
|
|
6607019788 | ||
|
|
1f339f623e | ||
|
|
95d294db63 | ||
|
|
a94a48f70b | ||
|
|
3bfaf5af16 | ||
|
|
3123400759 | ||
|
|
e1deed3b1a | ||
|
|
9369c54f54 | ||
|
|
67c732a100 | ||
|
|
3f7b15b598 | ||
|
|
f7884c4f45 | ||
|
|
a60ccbf106 | ||
|
|
97e4921a4a | ||
|
|
8182ffcf9f | ||
|
|
9ba7f372cd | ||
|
|
b7fe165b8f | ||
|
|
d2e9d21031 | ||
|
|
32a855b984 | ||
|
|
9a993d25d0 | ||
|
|
b1c06ece85 | ||
|
|
32ce12acfc | ||
|
|
726d9b86ea | ||
|
|
852ac4c178 | ||
|
|
d9100981ad | ||
|
|
e508055dc1 | ||
|
|
ba171954b4 | ||
|
|
1d8a9c75d4 | ||
|
|
c2d4dcae19 | ||
|
|
116ed01197 | ||
|
|
7b8d1cc54c | ||
|
|
7a55e8e892 | ||
|
|
3ab8ec57f1 | ||
|
|
0e17b6c066 | ||
|
|
44e092c07c | ||
|
|
c8a187e779 | ||
|
|
76d009e409 | ||
|
|
080aa3356a | ||
|
|
3b2e8c439a | ||
|
|
70589e4406 | ||
|
|
261238e157 | ||
|
|
11d738eee0 | ||
|
|
3943c3ae6f | ||
|
|
463f55ba13 | ||
|
|
e493d9e2e3 | ||
|
|
19f52b4541 | ||
|
|
9606dce425 | ||
|
|
98ff1c4d20 | ||
|
|
e5d73f2923 | ||
|
|
03806f7063 | ||
|
|
63c8b8edd1 | ||
|
|
a0795165af | ||
|
|
c23cff45f6 | ||
|
|
02cef1353e | ||
|
|
008120747e | ||
|
|
9964f80bb7 | ||
|
|
afe54ab5f3 | ||
|
|
6cd6732225 | ||
|
|
429b9a1bc5 | ||
|
|
d063a32def | ||
|
|
1ebd908fe3 | ||
|
|
e1a08b1c89 | ||
|
|
dd998037cf | ||
|
|
6d8a6c480f | ||
|
|
b1b558ed07 | ||
|
|
593c7e78b1 | ||
|
|
9a3c8a2134 | ||
|
|
c54ecd2802 | ||
|
|
d5e22e0fee | ||
|
|
1a3a4d23c0 | ||
|
|
0eb2152012 | ||
|
|
57f1cd71ad | ||
|
|
fa64cacfa7 | ||
|
|
9dbeb3028d | ||
|
|
8e168cb657 | ||
|
|
5616dfb1bc | ||
|
|
ddef708178 | ||
|
|
67bdc266af | ||
|
|
f352c18290 | ||
|
|
d1e15e61d0 | ||
|
|
9fcc27edd5 | ||
|
|
e47cbae885 | ||
|
|
1a6c9b9c0e | ||
|
|
f1b4d2b1b3 | ||
|
|
1bd7f5b7ec | ||
|
|
8319323329 | ||
|
|
20544b6b7b | ||
|
|
1242e4a292 | ||
|
|
42a233c083 | ||
|
|
047f7e5015 | ||
|
|
d1e1f8bdce | ||
|
|
6e61431759 | ||
|
|
16743a25c2 | ||
|
|
3a3edbbb16 | ||
|
|
8957213c56 | ||
|
|
f9433811c7 | ||
|
|
a5ee1c69fe | ||
|
|
61e1297cc7 | ||
|
|
bb74308ac9 | ||
|
|
8eeecb431b | ||
|
|
df2a852e6c | ||
|
|
e40c7b7a86 | ||
|
|
177033d0f2 | ||
|
|
cab724841a | ||
|
|
2241f02621 | ||
|
|
c6b28b4d8b | ||
|
|
c92d73384b | ||
|
|
5abba9ca9f | ||
|
|
35291983a1 | ||
|
|
a19dbb8c91 | ||
|
|
6a3bb184b7 | ||
|
|
1acb6b4328 | ||
|
|
6e5ccc87cf | ||
|
|
4853762763 | ||
|
|
8533ae0032 | ||
|
|
90ff1d3ccf | ||
|
|
23c6597836 | ||
|
|
b4302df892 | ||
|
|
1723793c35 | ||
|
|
be774f55ce | ||
|
|
e158b1d1e4 | ||
|
|
28e94bf9db | ||
|
|
6184e8a943 | ||
|
|
fb4ef413f4 | ||
|
|
b0687ecb09 | ||
|
|
46688e501b | ||
|
|
e62aaa3d3d | ||
|
|
c776811ea9 | ||
|
|
c8042540d5 | ||
|
|
bfcfb199a0 | ||
|
|
8b01725129 | ||
|
|
cb39dd8ed0 | ||
|
|
734a03cf82 | ||
|
|
aed6e8d0be | ||
|
|
ec0f7795d3 | ||
|
|
c95940acac | ||
|
|
3215eba0eb | ||
|
|
4e98f0abdc | ||
|
|
0ba88ac53a | ||
|
|
2c10dc6c57 | ||
|
|
778483166f | ||
|
|
a40aa9f90b | ||
|
|
c4a7de9d37 | ||
|
|
9e76aba3d1 | ||
|
|
1993efe201 | ||
|
|
e74f70346e | ||
|
|
530011fd09 | ||
|
|
1cdb414bf8 | ||
|
|
a572787013 | ||
|
|
3f92940a19 | ||
|
|
177aa3cffd | ||
|
|
6e44755b55 | ||
|
|
7e6c3a330a | ||
|
|
89db4235ce | ||
|
|
001fc7dd53 | ||
|
|
46ae2556c7 | ||
|
|
9b69b10fea | ||
|
|
a460ab84fa | ||
|
|
bac783774d | ||
|
|
4221461ede | ||
|
|
a324b3fce0 | ||
|
|
bd2176c398 | ||
|
|
441bcdc4af | ||
|
|
26ae8bb3a7 | ||
|
|
f8ac98bf46 | ||
|
|
5e6aceeb0e | ||
|
|
cbb147de23 | ||
|
|
f60692c7ef | ||
|
|
97c2cdb8d6 | ||
|
|
43f7fd5e10 | ||
|
|
a4e2fce9ca | ||
|
|
bff3af81d5 | ||
|
|
1d2f84322d | ||
|
|
368d72ebfe | ||
|
|
8d9f3719ce | ||
|
|
af0d9b650d | ||
|
|
2a1094fc17 | ||
|
|
cadbd00ac4 | ||
|
|
f70ec02a6c | ||
|
|
16973bc2e8 | ||
|
|
38e01cba83 | ||
|
|
9af82f2d68 | ||
|
|
b87142ec8e | ||
|
|
41be8fc9e5 | ||
|
|
ec14259b5a | ||
|
|
172bbed962 | ||
|
|
faece90316 | ||
|
|
2e1d463933 | ||
|
|
5f8c44125b | ||
|
|
5b9104f68e | ||
|
|
2931be5fc5 | ||
|
|
50ce475701 | ||
|
|
77de45f684 | ||
|
|
9b80ea4cf1 | ||
|
|
c104cb446b | ||
|
|
207746f8c4 | ||
|
|
fc10281d96 | ||
|
|
a335cb3767 | ||
|
|
367112fd4b | ||
|
|
54695c6f8c | ||
|
|
f004d036dc | ||
|
|
f8a89cafd8 | ||
|
|
d6dd86b419 | ||
|
|
6fd9d5f28b | ||
|
|
28e720fef2 | ||
|
|
d7fbd8b67d | ||
|
|
809289f5ef | ||
|
|
c2fa54ca9c | ||
|
|
edcb28737c | ||
|
|
a8a9818043 | ||
|
|
95e8b59367 | ||
|
|
1b1879342c | ||
|
|
b3432b512e | ||
|
|
7c84e22c3e | ||
|
|
89d61ca238 | ||
|
|
2f8a2fc907 | ||
|
|
4192e40a9a | ||
|
|
0fd5dbee11 | ||
|
|
8756df2447 | ||
|
|
84b6734063 | ||
|
|
2bafdf7271 | ||
|
|
dc8de20b9a | ||
|
|
c3c46e9097 | ||
|
|
d7690aa719 | ||
|
|
a0ddb10deb | ||
|
|
bb244f2e0b | ||
|
|
7c015840a6 | ||
|
|
89d7a72a4b | ||
|
|
98c99b4fea | ||
|
|
cd66afb05c | ||
|
|
c3faadf749 | ||
|
|
d9e711eac5 | ||
|
|
83c8e981b4 | ||
|
|
44405bd1a0 | ||
|
|
dbcb662f9c | ||
|
|
53a9dd5da4 | ||
|
|
0e7e665e6d | ||
|
|
8e0314b3a3 | ||
|
|
7759f13a13 | ||
|
|
fa7a5789aa | ||
|
|
7694f895c2 | ||
|
|
92190c7e0b | ||
|
|
f57d4b4126 | ||
|
|
21148c90db | ||
|
|
381638abea | ||
|
|
31666b9617 | ||
|
|
7e933f7045 | ||
|
|
67864334a3 | ||
|
|
574b5c03dc | ||
|
|
e68c8cb1ee | ||
|
|
b3816bc2dc | ||
|
|
9a07c2fd38 | ||
|
|
44ed3dc46b | ||
|
|
6064d2f2f1 | ||
|
|
2c8357beb0 | ||
|
|
08cec487cf | ||
|
|
6b9aeca71d | ||
|
|
153470c3d2 | ||
|
|
f77dc42ef0 | ||
|
|
490f70f071 | ||
|
|
0c1e29390a | ||
|
|
bf9d0bca40 | ||
|
|
8e45d27a06 | ||
|
|
e996c27619 | ||
|
|
ac2194b0eb | ||
|
|
7b4c657e90 | ||
|
|
b9bfcc4b69 | ||
|
|
fe56995244 | ||
|
|
714d7a146e | ||
|
|
c7e4217693 | ||
|
|
7863a269ad | ||
|
|
e70cefaa28 | ||
|
|
a80bc34d59 | ||
|
|
89ac8b09b5 | ||
|
|
2437a4182d | ||
|
|
ee7b6f2470 | ||
|
|
926858aeec | ||
|
|
3c65595406 | ||
|
|
38f7cbc6c7 | ||
|
|
b4a129068a | ||
|
|
ccf24b9952 | ||
|
|
3508a5b664 | ||
|
|
f79d34be5c | ||
|
|
79e141e71d | ||
|
|
605953565b | ||
|
|
34e3dc2b37 | ||
|
|
595b51ecdd | ||
|
|
eb2bbfebe3 | ||
|
|
6df17bceb1 | ||
|
|
45dc9697bf | ||
|
|
3a1fc8e7da | ||
|
|
438d5ce78e | ||
|
|
90827afa47 | ||
|
|
ef03314c6d | ||
|
|
4fc78bf720 | ||
|
|
1d6db306ec | ||
|
|
b681078b06 | ||
|
|
aab42dd96f | ||
|
|
888b2040de | ||
|
|
e786a0507e | ||
|
|
cd08788792 | ||
|
|
143b6d7a37 | ||
|
|
aae9bf3f46 | ||
|
|
4d9b852875 | ||
|
|
3e10f2e250 | ||
|
|
67dc7523d5 | ||
|
|
caaff9b7af | ||
|
|
fe602ab3bb | ||
|
|
20a7193b06 | ||
|
|
65befc281e | ||
|
|
b4a3eb55e1 | ||
|
|
027c1b5ab8 | ||
|
|
b0b016b58c | ||
|
|
0444435589 | ||
|
|
0a04302fb2 | ||
|
|
8612d1e824 | ||
|
|
1ce7c250d7 | ||
|
|
2c5f4386ba | ||
|
|
92c12f9bde | ||
|
|
3b25934649 | ||
|
|
aef741ae19 | ||
|
|
16c60914eb | ||
|
|
5db02ca059 | ||
|
|
d8a5812f76 | ||
|
|
daf0b57528 | ||
|
|
b7c6143cef | ||
|
|
d1d8845ab2 | ||
|
|
6907797783 | ||
|
|
612befc962 | ||
|
|
aa09b799b3 | ||
|
|
f751291f1a | ||
|
|
b7f771b258 | ||
|
|
93e1c80569 | ||
|
|
dfc039276d | ||
|
|
8b9e9fede4 | ||
|
|
186c4990dd | ||
|
|
e4044151f0 | ||
|
|
b089cc4fc3 | ||
|
|
a63bc10d26 | ||
|
|
b093d8a6e4 | ||
|
|
567d0546ec | ||
|
|
a75d67a42c | ||
|
|
4f5fa3be3c | ||
|
|
0216697b98 | ||
|
|
768ecbc397 | ||
|
|
785a54692b | ||
|
|
41b8b6d416 | ||
|
|
aef4cc829b | ||
|
|
f7b90cb5c1 | ||
|
|
db34b828e4 | ||
|
|
ff12fd3a61 | ||
|
|
52cb19cc5c | ||
|
|
3a3a4fc413 | ||
|
|
e922791012 | ||
|
|
992cc3ffbf | ||
|
|
9e2129338a | ||
|
|
0b7793a927 | ||
|
|
c69d1db1eb | ||
|
|
179458efe9 | ||
|
|
42135ec7cc | ||
|
|
dc1f482a7d | ||
|
|
91804d5746 | ||
|
|
b4e9bc50f8 | ||
|
|
0853b99fca | ||
|
|
a6ddd167c6 | ||
|
|
386910589d | ||
|
|
212400b635 | ||
|
|
56acfe30af | ||
|
|
c9bf20ec56 | ||
|
|
6379d5129f | ||
|
|
baa1ec098d | ||
|
|
3c2d854a9e | ||
|
|
fea430a553 | ||
|
|
4659b9207c | ||
|
|
31efe8a690 | ||
|
|
7ef1b62b41 | ||
|
|
727bb84592 | ||
|
|
30fccaa0bd | ||
|
|
95b128b7bc | ||
|
|
dbee23c895 | ||
|
|
591f8f561a | ||
|
|
5831a6ba4a | ||
|
|
41db98d49f | ||
|
|
b280e29409 | ||
|
|
570edcbbb9 | ||
|
|
6a02237f6f | ||
|
|
074eac16cc | ||
|
|
91da70fb7d | ||
|
|
7a38cd9286 | ||
|
|
4c607d92f9 | ||
|
|
daaa725e3b | ||
|
|
a85e9953c9 | ||
|
|
3118bd1039 | ||
|
|
ed05eaf1d1 | ||
|
|
52e93371bd | ||
|
|
41dfd010b3 | ||
|
|
b0f57d74e5 | ||
|
|
d113813b33 | ||
|
|
1da59fa2fe | ||
|
|
1cf556c3a2 | ||
|
|
003eae81ce | ||
|
|
f518e34131 | ||
|
|
82ac0a24a0 | ||
|
|
3846170302 | ||
|
|
a875e9ba73 | ||
|
|
43bbde1e6b | ||
|
|
14754f1b18 | ||
|
|
08207912a5 | ||
|
|
e6902304d5 | ||
|
|
c298d8ca3e | ||
|
|
b4719c9daf | ||
|
|
f44ba40450 | ||
|
|
8385f1d2a1 | ||
|
|
37c9c397d3 | ||
|
|
c3e12a69cc | ||
|
|
d1a68df21a | ||
|
|
0789a2927a | ||
|
|
3e450b8818 | ||
|
|
14bfd00c0e | ||
|
|
7b7a5b0b21 | ||
|
|
8e52bf30c1 | ||
|
|
165735d01a | ||
|
|
8f2d6ac042 | ||
|
|
714635c75c | ||
|
|
b0293fe0e5 | ||
|
|
2293ecd8e8 | ||
|
|
7db4ddaae7 | ||
|
|
3708a7ac30 | ||
|
|
17b7dcef6f | ||
|
|
982a3774f1 | ||
|
|
22d75f4843 | ||
|
|
4630216c38 | ||
|
|
07dcb074f8 | ||
|
|
a63f5c8bf2 | ||
|
|
c19ee58f46 | ||
|
|
525c584fcf | ||
|
|
a8bd8d13a9 | ||
|
|
ac51b8eabc | ||
|
|
77a19774cf | ||
|
|
aa8ac05d6b | ||
|
|
c7e7f89026 | ||
|
|
0e8abc1973 | ||
|
|
f33c02e56b | ||
|
|
737ee90e69 | ||
|
|
b42171dc04 | ||
|
|
c664f9e30c | ||
|
|
a9826dce27 | ||
|
|
1cecf3c9cb | ||
|
|
b9015f8f29 | ||
|
|
8bcd917c12 | ||
|
|
55dbbf5f0c | ||
|
|
1ba427f638 | ||
|
|
667836fbe5 | ||
|
|
88df721dcc | ||
|
|
502f2ba2ef | ||
|
|
2d79b34a1d | ||
|
|
d6e309aa01 | ||
|
|
e2ba650a8c | ||
|
|
b094e0913d | ||
|
|
5366821144 | ||
|
|
81b1dd12f8 | ||
|
|
15667db6a9 | ||
|
|
7c484cae13 | ||
|
|
bdd1c36802 | ||
|
|
1dbfa9caf6 | ||
|
|
de79bf57e5 | ||
|
|
7739051725 | ||
|
|
928ac2191b | ||
|
|
548865e8dd | ||
|
|
0eacb9b9c8 | ||
|
|
87fc8db5a9 | ||
|
|
2495c52b05 | ||
|
|
b3966ab4eb | ||
|
|
0c0fd00788 | ||
|
|
95965615a4 | ||
|
|
1105c24e8c | ||
|
|
b509f1f098 | ||
|
|
cbf69f6ded | ||
|
|
ee62dac67b | ||
|
|
add699d238 | ||
|
|
16f8a35e76 | ||
|
|
263a85c2a6 | ||
|
|
d29509b233 | ||
|
|
d61612e05b | ||
|
|
5a23c2bb90 | ||
|
|
5993257eb1 | ||
|
|
e1a056db46 | ||
|
|
95d4483593 | ||
|
|
a9bf24695d | ||
|
|
ccf8844689 | ||
|
|
d1759a4335 | ||
|
|
927ef041f8 | ||
|
|
01ea39adad | ||
|
|
371e90a40a | ||
|
|
80624845c4 | ||
|
|
151cd76f75 | ||
|
|
1858c0e290 | ||
|
|
a7ab55dc00 | ||
|
|
68269b23fb | ||
|
|
b096887b16 | ||
|
|
b3e73e4dad | ||
|
|
6c3acb8e21 | ||
|
|
2a4ad207a5 | ||
|
|
36cb7d9451 | ||
|
|
de1c041900 | ||
|
|
b7cda68c1c | ||
|
|
342134f853 | ||
|
|
abb0ea01a7 | ||
|
|
57337c1ae0 | ||
|
|
c7aac60c6f | ||
|
|
b026c70f79 | ||
|
|
1ac87279d7 | ||
|
|
3506b9e8f2 | ||
|
|
4510fa7dcb | ||
|
|
c05eb1251b | ||
|
|
e74c374783 | ||
|
|
12875a9664 | ||
|
|
ece154d73b | ||
|
|
69204eea04 | ||
|
|
0030e208a0 | ||
|
|
5579001366 | ||
|
|
2dde022a00 | ||
|
|
862a2ce695 | ||
|
|
94f7205943 | ||
|
|
5bdc1862d9 | ||
|
|
62769e3b11 | ||
|
|
fcc3103123 | ||
|
|
0beb48f11d | ||
|
|
28bf9688f1 | ||
|
|
da86f445c8 | ||
|
|
2d1494314e | ||
|
|
8c586d7f7c | ||
|
|
5ca128e8bb | ||
|
|
c143fa922e | ||
|
|
192fb159d2 | ||
|
|
47d9a69802 | ||
|
|
3350bd422f | ||
|
|
d494778435 | ||
|
|
88f5bcdb63 | ||
|
|
f0143e351d | ||
|
|
113ea6dc4b | ||
|
|
1e6cc6f836 | ||
|
|
e467b130c2 | ||
|
|
7ff5844aa2 | ||
|
|
518b6f1d41 | ||
|
|
d7076778e2 | ||
|
|
473a192b85 | ||
|
|
15d90c24ed | ||
|
|
52746911d8 | ||
|
|
ea242b5bad | ||
|
|
c37241c733 | ||
|
|
263ae6f99f | ||
|
|
11ff756b2e | ||
|
|
10615b53ad | ||
|
|
2e5b492edd | ||
|
|
90e60f7a98 | ||
|
|
0d7654d2c9 | ||
|
|
92402e9f23 | ||
|
|
adcb8f3b15 | ||
|
|
56c35ff1e9 | ||
|
|
e397a079c1 | ||
|
|
4bcf159381 | ||
|
|
b50b1e9ac4 | ||
|
|
c5f81d35f5 | ||
|
|
6812c293b1 | ||
|
|
34dc70ca2a | ||
|
|
81a5521845 | ||
|
|
f7cfb74a3f | ||
|
|
f34631facc | ||
|
|
35c8c5885b | ||
|
|
8c9321ce7b | ||
|
|
2e2b9009fc | ||
|
|
eaff65c00f | ||
|
|
931cf9342e | ||
|
|
e23c3b3e77 | ||
|
|
230f81661c | ||
|
|
d95fcd55bf | ||
|
|
3983dadf3a | ||
|
|
f312ba376c | ||
|
|
13e9d7c71c | ||
|
|
8c326d7bad | ||
|
|
04b358f340 | ||
|
|
23cd561f2e | ||
|
|
3733fa9cc2 | ||
|
|
a94ab050bf | ||
|
|
1527ed46bc | ||
|
|
43d48f37b6 | ||
|
|
2c9edb1d1a | ||
|
|
a1aed960a9 | ||
|
|
22461f30e9 | ||
|
|
7b1a82a3cc | ||
|
|
0d06527507 | ||
|
|
2b5bcfdb7f | ||
|
|
9133f819e0 | ||
|
|
73c161a295 | ||
|
|
b46b26f1ae | ||
|
|
18eadd338e | ||
|
|
21b1059ba5 | ||
|
|
c25ed49f0d | ||
|
|
2ecf8914a1 | ||
|
|
f9ea2e834c | ||
|
|
85a4f8325f | ||
|
|
60b612247d | ||
|
|
d92c6a2097 | ||
|
|
45166e760b | ||
|
|
e90e71456b | ||
|
|
ce58b119bf | ||
|
|
2d8c9bba99 | ||
|
|
c8720fef02 | ||
|
|
73a644f320 | ||
|
|
3960f719db | ||
|
|
2484fbc1f7 | ||
|
|
5f6166435c | ||
|
|
af9a71ac7c | ||
|
|
ee44312c00 | ||
|
|
4214ab12ef | ||
|
|
3bb5d4eb8f | ||
|
|
dcff06bd91 | ||
|
|
3235dbfaee | ||
|
|
9911ab1000 | ||
|
|
4bf8cb455b | ||
|
|
cbb7c191e6 | ||
|
|
b2714e19d5 | ||
|
|
498644acab | ||
|
|
e8a6ea1dc8 | ||
|
|
07c636bf86 | ||
|
|
a52352b13a | ||
|
|
14dcc477f1 | ||
|
|
bfda864c1b | ||
|
|
bf41240ee1 | ||
|
|
b914e95f34 | ||
|
|
d6562bccfc | ||
|
|
46a93bb78a | ||
|
|
0b8a211e70 | ||
|
|
130fc6fce1 | ||
|
|
65e3540d03 | ||
|
|
feb9d3c557 | ||
|
|
234030218c | ||
|
|
6da26dcefc | ||
|
|
c24d4e11d5 | ||
|
|
eb0a62e9e9 | ||
|
|
742c85bf81 | ||
|
|
79f348a01c | ||
|
|
a9403b42f0 | ||
|
|
1a59b73adc | ||
|
|
26a5832f92 | ||
|
|
380e16d465 | ||
|
|
b83b5405c6 | ||
|
|
57c984cea1 | ||
|
|
563fa1e31a | ||
|
|
cb3c53664d | ||
|
|
3c994d94aa | ||
|
|
32d94d4e85 | ||
|
|
49346f5679 | ||
|
|
1323d8fb20 | ||
|
|
6f22cffb6b | ||
|
|
e1e5af8661 | ||
|
|
18f39be3ba | ||
|
|
bfd69f5381 | ||
|
|
5e27023ba7 | ||
|
|
5a321f970e | ||
|
|
f7e288589b | ||
|
|
66bfadd7f0 | ||
|
|
cfc10e9b52 | ||
|
|
be2ecf6236 | ||
|
|
57bf5c2143 | ||
|
|
9dca65634d | ||
|
|
2744bb4e5a | ||
|
|
2fec0c2440 | ||
|
|
faf8a47684 | ||
|
|
c9124bd1a9 | ||
|
|
db6b7b91d8 | ||
|
|
eefdcb0454 | ||
|
|
94c5076710 | ||
|
|
66e8418125 | ||
|
|
677afbcb91 | ||
|
|
7f6c942b81 | ||
|
|
e09cdc45a7 | ||
|
|
9ee80fd1db | ||
|
|
77166f88ac | ||
|
|
e0777fed15 | ||
|
|
075bb3b314 | ||
|
|
a768dd84fa | ||
|
|
4a1655b225 | ||
|
|
40449f1ccb | ||
|
|
020cc5e64f | ||
|
|
52b76c9d5c | ||
|
|
5939623f26 | ||
|
|
9e707e18e1 | ||
|
|
783fa6b7c0 | ||
|
|
fa7e52dbda | ||
|
|
1ce5c3bf9c | ||
|
|
8d51c5a971 | ||
|
|
d06f38757d | ||
|
|
b885d69aaa | ||
|
|
8426a62d15 | ||
|
|
555c402ba3 | ||
|
|
0c809d3a5f | ||
|
|
ca697c9aa2 | ||
|
|
73b2b5f384 | ||
|
|
0340189baa | ||
|
|
823bd54484 | ||
|
|
756e5ac0b8 | ||
|
|
7c99169fb4 | ||
|
|
2380d252e1 | ||
|
|
f2f6c209ea | ||
|
|
ff734ed080 | ||
|
|
c4ca3660de | ||
|
|
b584f44661 | ||
|
|
f63d1b114a | ||
|
|
e5fb4a6c04 | ||
|
|
1d50dadc18 | ||
|
|
1f7d584517 | ||
|
|
7d70ef79af | ||
|
|
08e046066d | ||
|
|
bb040abb2c | ||
|
|
00c3432e5a | ||
|
|
4b6fa79ea2 | ||
|
|
b3c951c924 | ||
|
|
299b106f38 | ||
|
|
1b5a2dd79a | ||
|
|
107777fdac | ||
|
|
d37ae957e0 | ||
|
|
92056423c3 | ||
|
|
8442bac5b2 | ||
|
|
029ba39fd9 | ||
|
|
0daee83735 | ||
|
|
c17a0c4fed | ||
|
|
28e3c8bd3f | ||
|
|
00fb675452 | ||
|
|
83a4d7dc1c | ||
|
|
8433aae1af | ||
|
|
9549087ba9 | ||
|
|
b17fcfc4d1 | ||
|
|
3144da86f3 | ||
|
|
90427bc3af | ||
|
|
8fae68a5ae | ||
|
|
3b2c3a3f6b | ||
|
|
d9c6a32b8e | ||
|
|
00e32d1ede | ||
|
|
7d6eb250ea | ||
|
|
22c0884f5f | ||
|
|
e00cb29804 | ||
|
|
973476930e | ||
|
|
4e19d8d562 | ||
|
|
595695a459 | ||
|
|
7f41d30ce8 | ||
|
|
786d3e79eb | ||
|
|
18652bc388 | ||
|
|
4f2722e7cf | ||
|
|
fd33b96e08 | ||
|
|
4417be81ad | ||
|
|
ec78d3d7b1 | ||
|
|
0caabf1328 | ||
|
|
a24b2436b0 | ||
|
|
7a3193a75b | ||
|
|
d039764a34 | ||
|
|
d8c90b91be | ||
|
|
c119ab6ed9 | ||
|
|
0c036b1157 | ||
|
|
cea26348c4 | ||
|
|
0dd83c6755 | ||
|
|
9b7a7713a7 | ||
|
|
5073c7e6cf | ||
|
|
57d87ef24b | ||
|
|
4273fb067c | ||
|
|
ef6620ad8e | ||
|
|
ee20d30480 | ||
|
|
2fd12daf9f | ||
|
|
351f615ce6 | ||
|
|
5e8b2c7860 | ||
|
|
8be8f043bd | ||
|
|
8d6bff36f2 | ||
|
|
c8b0f11841 | ||
|
|
ee59479e25 | ||
|
|
11394aa4aa | ||
|
|
8ccee51887 | ||
|
|
5c823e9b42 | ||
|
|
ca76822fde | ||
|
|
fe74311209 | ||
|
|
742321dd08 | ||
|
|
cf94aed32e | ||
|
|
69f0bdd486 | ||
|
|
6ffcf611a6 | ||
|
|
256d12773b | ||
|
|
5be5f255d1 | ||
|
|
b812d3ec26 | ||
|
|
640407aae7 | ||
|
|
d3742048f9 | ||
|
|
a61ba7b09c | ||
|
|
b1fb707a3a | ||
|
|
e09a25ca68 | ||
|
|
a968784908 | ||
|
|
0202192fc0 | ||
|
|
dbe4891a39 | ||
|
|
5a3b4ab34c | ||
|
|
acf6b07794 | ||
|
|
b397955f24 | ||
|
|
4a90c0f13b | ||
|
|
21244704fc | ||
|
|
80aedcd276 | ||
|
|
07f40b9488 | ||
|
|
a1a23d8be5 | ||
|
|
ef94509eac | ||
|
|
3b617f4528 | ||
|
|
25052fe48f | ||
|
|
389f71251c | ||
|
|
5867e34ec9 | ||
|
|
f8afb699cd | ||
|
|
6969202a03 | ||
|
|
54c6a3a454 | ||
|
|
b75ff37448 | ||
|
|
c8900aac42 | ||
|
|
4cf5c8f656 | ||
|
|
c65d72fbca | ||
|
|
fff1c0ae57 | ||
|
|
de4a847078 | ||
|
|
66e793531d | ||
|
|
297c9e2f7a | ||
|
|
0740274b7c | ||
|
|
950ded454d | ||
|
|
9d0cc2c9d7 | ||
|
|
0bc7456b7f | ||
|
|
193cb91340 | ||
|
|
b8bb673b75 | ||
|
|
2e7ba05173 | ||
|
|
f9595b58ee | ||
|
|
e49c77e29c | ||
|
|
2e98f8b5d2 | ||
|
|
8a54273f8b | ||
|
|
db86630fb3 | ||
|
|
01c786c141 | ||
|
|
7a9a4bac1e | ||
|
|
c0b07286aa | ||
|
|
f4fa4c8cce | ||
|
|
9afb63d2e4 | ||
|
|
c31e5596e8 | ||
|
|
29b2d27f00 | ||
|
|
d45b4a7a1f | ||
|
|
dfac7c5f29 | ||
|
|
a5bcf8b5b2 | ||
|
|
ab71bc0e78 | ||
|
|
26da526379 | ||
|
|
e163d556fb | ||
|
|
c57c20c6e4 | ||
|
|
05a3710288 | ||
|
|
ae63a4b33b | ||
|
|
ce82f2827b | ||
|
|
e7d73cbe56 | ||
|
|
9bd312881d | ||
|
|
ca1cd741c3 | ||
|
|
50b217817e | ||
|
|
6ba42e3e6b | ||
|
|
ac8937245c | ||
|
|
e68c59f984 | ||
|
|
64d2b7a122 | ||
|
|
41bce7925a | ||
|
|
d6783736dc | ||
|
|
3829d6bd9a | ||
|
|
123a976f62 | ||
|
|
7ee46ad4e0 | ||
|
|
adb62a3fff | ||
|
|
9e34cce1f2 | ||
|
|
283793f943 | ||
|
|
395451b3e9 | ||
|
|
c9999f7ca2 | ||
|
|
e52c639f02 | ||
|
|
0519cd371e | ||
|
|
acc4888b13 | ||
|
|
83114546c6 | ||
|
|
68bde33977 | ||
|
|
947c86bd77 | ||
|
|
6610965f87 | ||
|
|
da0920584c | ||
|
|
57d70e58f3 | ||
|
|
dbdbb6f0dd | ||
|
|
d5b7e81b09 | ||
|
|
101d152540 | ||
|
|
21528c0a95 | ||
|
|
31c929e7b7 | ||
|
|
3875746f80 | ||
|
|
22f183e8ef | ||
|
|
e9f3a2f486 | ||
|
|
5f3b21269d | ||
|
|
10e00b1ba9 | ||
|
|
c164a9fbdc | ||
|
|
a4f65bed41 | ||
|
|
af1dd7d2ed | ||
|
|
2d123aab47 |
+41
-65
@@ -44,13 +44,13 @@ commands:
|
|||||||
- restore_cache:
|
- restore_cache:
|
||||||
name: Restore parameters cache
|
name: Restore parameters cache
|
||||||
keys:
|
keys:
|
||||||
- 'v25-2k-lotus-params'
|
- 'v26-2k-lotus-params'
|
||||||
paths:
|
paths:
|
||||||
- /var/tmp/filecoin-proof-parameters/
|
- /var/tmp/filecoin-proof-parameters/
|
||||||
- run: ./lotus fetch-params 2048
|
- run: ./lotus fetch-params 2048
|
||||||
- save_cache:
|
- save_cache:
|
||||||
name: Save parameters cache
|
name: Save parameters cache
|
||||||
key: 'v25-2k-lotus-params'
|
key: 'v26-2k-lotus-params'
|
||||||
paths:
|
paths:
|
||||||
- /var/tmp/filecoin-proof-parameters/
|
- /var/tmp/filecoin-proof-parameters/
|
||||||
install_ipfs:
|
install_ipfs:
|
||||||
@@ -92,6 +92,9 @@ jobs:
|
|||||||
- run: sudo apt-get install npm
|
- run: sudo apt-get install npm
|
||||||
- run:
|
- run:
|
||||||
command: make buildall
|
command: make buildall
|
||||||
|
- run:
|
||||||
|
name: check tag and version output match
|
||||||
|
command: ./scripts/version-check.sh ./lotus
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: lotus
|
path: lotus
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
@@ -282,21 +285,6 @@ jobs:
|
|||||||
root: "."
|
root: "."
|
||||||
paths:
|
paths:
|
||||||
- linux-butterflynet
|
- linux-butterflynet
|
||||||
build-ntwk-nerpa:
|
|
||||||
description: |
|
|
||||||
Compile lotus binaries for the nerpa network
|
|
||||||
parameters:
|
|
||||||
<<: *test-params
|
|
||||||
executor: << parameters.executor >>
|
|
||||||
steps:
|
|
||||||
- install-deps
|
|
||||||
- prepare
|
|
||||||
- run: make nerpanet
|
|
||||||
- run: mkdir linux-nerpanet && mv lotus lotus-miner lotus-worker linux-nerpanet
|
|
||||||
- persist_to_workspace:
|
|
||||||
root: "."
|
|
||||||
paths:
|
|
||||||
- linux-nerpanet
|
|
||||||
build-lotus-soup:
|
build-lotus-soup:
|
||||||
description: |
|
description: |
|
||||||
Compile `lotus-soup` Testground test plan
|
Compile `lotus-soup` Testground test plan
|
||||||
@@ -330,7 +318,7 @@ jobs:
|
|||||||
command: pushd testplans/lotus-soup && mkdir -p $HOME/testground && cp env-ci.toml $HOME/testground/.env.toml && echo 'endpoint="https://ci.testground.ipfs.team"' >> $HOME/testground/.env.toml && echo 'user="circleci"' >> $HOME/testground/.env.toml
|
command: pushd testplans/lotus-soup && mkdir -p $HOME/testground && cp env-ci.toml $HOME/testground/.env.toml && echo 'endpoint="https://ci.testground.ipfs.team"' >> $HOME/testground/.env.toml && echo 'user="circleci"' >> $HOME/testground/.env.toml
|
||||||
- run:
|
- run:
|
||||||
name: "prepare testground home dir and link test plans"
|
name: "prepare testground home dir and link test plans"
|
||||||
command: mkdir -p $HOME/testground/plans && ln -s $(pwd)/testplans/lotus-soup $HOME/testground/plans/lotus-soup && ln -s $(pwd)/testplans/graphsync $HOME/testground/plans/graphsync
|
command: mkdir -p $HOME/testground/plans && ln -s $(pwd)/testplans/lotus-soup $HOME/testground/plans/lotus-soup
|
||||||
- run:
|
- run:
|
||||||
name: "go get lotus@master"
|
name: "go get lotus@master"
|
||||||
command: cd testplans/lotus-soup && go get github.com/filecoin-project/lotus@master
|
command: cd testplans/lotus-soup && go get github.com/filecoin-project/lotus@master
|
||||||
@@ -340,15 +328,11 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: "trigger payment channel stress testplan on taas"
|
name: "trigger payment channel stress testplan on taas"
|
||||||
command: ~/testground-cli run composition -f $HOME/testground/plans/lotus-soup/_compositions/paych-stress-k8s.toml --metadata-commit=$CIRCLE_SHA1 --metadata-repo=filecoin-project/lotus --metadata-branch=$CIRCLE_BRANCH
|
command: ~/testground-cli run composition -f $HOME/testground/plans/lotus-soup/_compositions/paych-stress-k8s.toml --metadata-commit=$CIRCLE_SHA1 --metadata-repo=filecoin-project/lotus --metadata-branch=$CIRCLE_BRANCH
|
||||||
- run:
|
|
||||||
name: "trigger graphsync testplan on taas"
|
|
||||||
command: ~/testground-cli run composition -f $HOME/testground/plans/graphsync/_compositions/stress-k8s.toml --metadata-commit=$CIRCLE_SHA1 --metadata-repo=filecoin-project/lotus --metadata-branch=$CIRCLE_BRANCH
|
|
||||||
|
|
||||||
|
|
||||||
build-macos:
|
build-macos:
|
||||||
description: build darwin lotus binary
|
description: build darwin lotus binary
|
||||||
macos:
|
macos:
|
||||||
xcode: "10.0.0"
|
xcode: "12.5.0"
|
||||||
working_directory: ~/go/src/github.com/filecoin-project/lotus
|
working_directory: ~/go/src/github.com/filecoin-project/lotus
|
||||||
steps:
|
steps:
|
||||||
- prepare:
|
- prepare:
|
||||||
@@ -367,11 +351,6 @@ jobs:
|
|||||||
name: Install Rust
|
name: Install Rust
|
||||||
command: |
|
command: |
|
||||||
curl https://sh.rustup.rs -sSf | sh -s -- -y
|
curl https://sh.rustup.rs -sSf | sh -s -- -y
|
||||||
- run:
|
|
||||||
name: Install jq
|
|
||||||
command: |
|
|
||||||
curl --location https://github.com/stedolan/jq/releases/download/jq-1.6/jq-osx-amd64 --output /usr/local/bin/jq
|
|
||||||
chmod +x /usr/local/bin/jq
|
|
||||||
- run:
|
- run:
|
||||||
name: Install hwloc
|
name: Install hwloc
|
||||||
command: |
|
command: |
|
||||||
@@ -388,6 +367,9 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
command: make build
|
command: make build
|
||||||
no_output_timeout: 30m
|
no_output_timeout: 30m
|
||||||
|
- run:
|
||||||
|
name: check tag and version output match
|
||||||
|
command: ./scripts/version-check.sh ./lotus
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: lotus
|
path: lotus
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
@@ -723,18 +705,6 @@ jobs:
|
|||||||
- packer/build:
|
- packer/build:
|
||||||
template: tools/packer/lotus.pkr.hcl
|
template: tools/packer/lotus.pkr.hcl
|
||||||
args: "-var ci_workspace_bins=./linux-butterflynet -var lotus_network=butterflynet -var git_tag=$CIRCLE_TAG"
|
args: "-var ci_workspace_bins=./linux-butterflynet -var lotus_network=butterflynet -var git_tag=$CIRCLE_TAG"
|
||||||
publish-packer-nerpanet:
|
|
||||||
description: build and push AWS IAM and DigitalOcean droplet.
|
|
||||||
executor:
|
|
||||||
name: packer/default
|
|
||||||
packer-version: 1.6.6
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- attach_workspace:
|
|
||||||
at: "."
|
|
||||||
- packer/build:
|
|
||||||
template: tools/packer/lotus.pkr.hcl
|
|
||||||
args: "-var ci_workspace_bins=./linux-nerpanet -var lotus_network=nerpanet -var git_tag=$CIRCLE_TAG"
|
|
||||||
publish-dockerhub:
|
publish-dockerhub:
|
||||||
description: publish to dockerhub
|
description: publish to dockerhub
|
||||||
machine:
|
machine:
|
||||||
@@ -810,11 +780,21 @@ workflows:
|
|||||||
suite: itest-deadlines
|
suite: itest-deadlines
|
||||||
target: "./itests/deadlines_test.go"
|
target: "./itests/deadlines_test.go"
|
||||||
|
|
||||||
|
- test:
|
||||||
|
name: test-itest-deals_512mb
|
||||||
|
suite: itest-deals_512mb
|
||||||
|
target: "./itests/deals_512mb_test.go"
|
||||||
|
|
||||||
- test:
|
- test:
|
||||||
name: test-itest-deals_concurrent
|
name: test-itest-deals_concurrent
|
||||||
suite: itest-deals_concurrent
|
suite: itest-deals_concurrent
|
||||||
target: "./itests/deals_concurrent_test.go"
|
target: "./itests/deals_concurrent_test.go"
|
||||||
|
|
||||||
|
- test:
|
||||||
|
name: test-itest-deals_max_staging_deals
|
||||||
|
suite: itest-deals_max_staging_deals
|
||||||
|
target: "./itests/deals_max_staging_deals_test.go"
|
||||||
|
|
||||||
- test:
|
- test:
|
||||||
name: test-itest-deals_offline
|
name: test-itest-deals_offline
|
||||||
suite: itest-deals_offline
|
suite: itest-deals_offline
|
||||||
@@ -825,6 +805,16 @@ workflows:
|
|||||||
suite: itest-deals_padding
|
suite: itest-deals_padding
|
||||||
target: "./itests/deals_padding_test.go"
|
target: "./itests/deals_padding_test.go"
|
||||||
|
|
||||||
|
- test:
|
||||||
|
name: test-itest-deals_partial_retrieval_dm-level
|
||||||
|
suite: itest-deals_partial_retrieval_dm-level
|
||||||
|
target: "./itests/deals_partial_retrieval_dm-level_test.go"
|
||||||
|
|
||||||
|
- test:
|
||||||
|
name: test-itest-deals_partial_retrieval
|
||||||
|
suite: itest-deals_partial_retrieval
|
||||||
|
target: "./itests/deals_partial_retrieval_test.go"
|
||||||
|
|
||||||
- test:
|
- test:
|
||||||
name: test-itest-deals_power
|
name: test-itest-deals_power
|
||||||
suite: itest-deals_power
|
suite: itest-deals_power
|
||||||
@@ -840,6 +830,11 @@ workflows:
|
|||||||
suite: itest-deals_publish
|
suite: itest-deals_publish
|
||||||
target: "./itests/deals_publish_test.go"
|
target: "./itests/deals_publish_test.go"
|
||||||
|
|
||||||
|
- test:
|
||||||
|
name: test-itest-deals_retry_deal_no_funds
|
||||||
|
suite: itest-deals_retry_deal_no_funds
|
||||||
|
target: "./itests/deals_retry_deal_no_funds_test.go"
|
||||||
|
|
||||||
- test:
|
- test:
|
||||||
name: test-itest-deals
|
name: test-itest-deals
|
||||||
suite: itest-deals
|
suite: itest-deals
|
||||||
@@ -900,6 +895,11 @@ workflows:
|
|||||||
suite: itest-sector_terminate
|
suite: itest-sector_terminate
|
||||||
target: "./itests/sector_terminate_test.go"
|
target: "./itests/sector_terminate_test.go"
|
||||||
|
|
||||||
|
- test:
|
||||||
|
name: test-itest-self_sent_txn
|
||||||
|
suite: itest-self_sent_txn
|
||||||
|
target: "./itests/self_sent_txn_test.go"
|
||||||
|
|
||||||
- test:
|
- test:
|
||||||
name: test-itest-tape
|
name: test-itest-tape
|
||||||
suite: itest-tape
|
suite: itest-tape
|
||||||
@@ -950,7 +950,7 @@ workflows:
|
|||||||
codecov-upload: false
|
codecov-upload: false
|
||||||
suite: conformance-bleeding-edge
|
suite: conformance-bleeding-edge
|
||||||
target: "./conformance"
|
target: "./conformance"
|
||||||
vectors-branch: master
|
vectors-branch: specs-actors-v7
|
||||||
- trigger-testplans:
|
- trigger-testplans:
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
@@ -972,11 +972,6 @@ workflows:
|
|||||||
tags:
|
tags:
|
||||||
only:
|
only:
|
||||||
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
|
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
|
||||||
- build-ntwk-nerpa:
|
|
||||||
filters:
|
|
||||||
tags:
|
|
||||||
only:
|
|
||||||
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
|
|
||||||
- build-lotus-soup
|
- build-lotus-soup
|
||||||
- build-macos:
|
- build-macos:
|
||||||
filters:
|
filters:
|
||||||
@@ -986,19 +981,10 @@ workflows:
|
|||||||
tags:
|
tags:
|
||||||
only:
|
only:
|
||||||
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
|
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
|
||||||
- build-appimage:
|
|
||||||
filters:
|
|
||||||
branches:
|
|
||||||
ignore:
|
|
||||||
- /.*/
|
|
||||||
tags:
|
|
||||||
only:
|
|
||||||
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
|
|
||||||
- publish:
|
- publish:
|
||||||
requires:
|
requires:
|
||||||
- build-all
|
- build-all
|
||||||
- build-macos
|
- build-macos
|
||||||
- build-appimage
|
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
ignore:
|
ignore:
|
||||||
@@ -1041,16 +1027,6 @@ workflows:
|
|||||||
tags:
|
tags:
|
||||||
only:
|
only:
|
||||||
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
|
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
|
||||||
- publish-packer-nerpanet:
|
|
||||||
requires:
|
|
||||||
- build-ntwk-nerpa
|
|
||||||
filters:
|
|
||||||
branches:
|
|
||||||
ignore:
|
|
||||||
- /.*/
|
|
||||||
tags:
|
|
||||||
only:
|
|
||||||
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
|
|
||||||
- publish-snapcraft:
|
- publish-snapcraft:
|
||||||
name: publish-snapcraft-stable
|
name: publish-snapcraft-stable
|
||||||
channel: stable
|
channel: stable
|
||||||
|
|||||||
+11
-65
@@ -44,13 +44,13 @@ commands:
|
|||||||
- restore_cache:
|
- restore_cache:
|
||||||
name: Restore parameters cache
|
name: Restore parameters cache
|
||||||
keys:
|
keys:
|
||||||
- 'v25-2k-lotus-params'
|
- 'v26-2k-lotus-params'
|
||||||
paths:
|
paths:
|
||||||
- /var/tmp/filecoin-proof-parameters/
|
- /var/tmp/filecoin-proof-parameters/
|
||||||
- run: ./lotus fetch-params 2048
|
- run: ./lotus fetch-params 2048
|
||||||
- save_cache:
|
- save_cache:
|
||||||
name: Save parameters cache
|
name: Save parameters cache
|
||||||
key: 'v25-2k-lotus-params'
|
key: 'v26-2k-lotus-params'
|
||||||
paths:
|
paths:
|
||||||
- /var/tmp/filecoin-proof-parameters/
|
- /var/tmp/filecoin-proof-parameters/
|
||||||
install_ipfs:
|
install_ipfs:
|
||||||
@@ -92,6 +92,9 @@ jobs:
|
|||||||
- run: sudo apt-get install npm
|
- run: sudo apt-get install npm
|
||||||
- run:
|
- run:
|
||||||
command: make buildall
|
command: make buildall
|
||||||
|
- run:
|
||||||
|
name: check tag and version output match
|
||||||
|
command: ./scripts/version-check.sh ./lotus
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: lotus
|
path: lotus
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
@@ -282,21 +285,6 @@ jobs:
|
|||||||
root: "."
|
root: "."
|
||||||
paths:
|
paths:
|
||||||
- linux-butterflynet
|
- linux-butterflynet
|
||||||
build-ntwk-nerpa:
|
|
||||||
description: |
|
|
||||||
Compile lotus binaries for the nerpa network
|
|
||||||
parameters:
|
|
||||||
<<: *test-params
|
|
||||||
executor: << parameters.executor >>
|
|
||||||
steps:
|
|
||||||
- install-deps
|
|
||||||
- prepare
|
|
||||||
- run: make nerpanet
|
|
||||||
- run: mkdir linux-nerpanet && mv lotus lotus-miner lotus-worker linux-nerpanet
|
|
||||||
- persist_to_workspace:
|
|
||||||
root: "."
|
|
||||||
paths:
|
|
||||||
- linux-nerpanet
|
|
||||||
build-lotus-soup:
|
build-lotus-soup:
|
||||||
description: |
|
description: |
|
||||||
Compile `lotus-soup` Testground test plan
|
Compile `lotus-soup` Testground test plan
|
||||||
@@ -330,7 +318,7 @@ jobs:
|
|||||||
command: pushd testplans/lotus-soup && mkdir -p $HOME/testground && cp env-ci.toml $HOME/testground/.env.toml && echo 'endpoint="https://ci.testground.ipfs.team"' >> $HOME/testground/.env.toml && echo 'user="circleci"' >> $HOME/testground/.env.toml
|
command: pushd testplans/lotus-soup && mkdir -p $HOME/testground && cp env-ci.toml $HOME/testground/.env.toml && echo 'endpoint="https://ci.testground.ipfs.team"' >> $HOME/testground/.env.toml && echo 'user="circleci"' >> $HOME/testground/.env.toml
|
||||||
- run:
|
- run:
|
||||||
name: "prepare testground home dir and link test plans"
|
name: "prepare testground home dir and link test plans"
|
||||||
command: mkdir -p $HOME/testground/plans && ln -s $(pwd)/testplans/lotus-soup $HOME/testground/plans/lotus-soup && ln -s $(pwd)/testplans/graphsync $HOME/testground/plans/graphsync
|
command: mkdir -p $HOME/testground/plans && ln -s $(pwd)/testplans/lotus-soup $HOME/testground/plans/lotus-soup
|
||||||
- run:
|
- run:
|
||||||
name: "go get lotus@master"
|
name: "go get lotus@master"
|
||||||
command: cd testplans/lotus-soup && go get github.com/filecoin-project/lotus@master
|
command: cd testplans/lotus-soup && go get github.com/filecoin-project/lotus@master
|
||||||
@@ -340,15 +328,11 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: "trigger payment channel stress testplan on taas"
|
name: "trigger payment channel stress testplan on taas"
|
||||||
command: ~/testground-cli run composition -f $HOME/testground/plans/lotus-soup/_compositions/paych-stress-k8s.toml --metadata-commit=$CIRCLE_SHA1 --metadata-repo=filecoin-project/lotus --metadata-branch=$CIRCLE_BRANCH
|
command: ~/testground-cli run composition -f $HOME/testground/plans/lotus-soup/_compositions/paych-stress-k8s.toml --metadata-commit=$CIRCLE_SHA1 --metadata-repo=filecoin-project/lotus --metadata-branch=$CIRCLE_BRANCH
|
||||||
- run:
|
|
||||||
name: "trigger graphsync testplan on taas"
|
|
||||||
command: ~/testground-cli run composition -f $HOME/testground/plans/graphsync/_compositions/stress-k8s.toml --metadata-commit=$CIRCLE_SHA1 --metadata-repo=filecoin-project/lotus --metadata-branch=$CIRCLE_BRANCH
|
|
||||||
|
|
||||||
|
|
||||||
build-macos:
|
build-macos:
|
||||||
description: build darwin lotus binary
|
description: build darwin lotus binary
|
||||||
macos:
|
macos:
|
||||||
xcode: "10.0.0"
|
xcode: "12.5.0"
|
||||||
working_directory: ~/go/src/github.com/filecoin-project/lotus
|
working_directory: ~/go/src/github.com/filecoin-project/lotus
|
||||||
steps:
|
steps:
|
||||||
- prepare:
|
- prepare:
|
||||||
@@ -367,11 +351,6 @@ jobs:
|
|||||||
name: Install Rust
|
name: Install Rust
|
||||||
command: |
|
command: |
|
||||||
curl https://sh.rustup.rs -sSf | sh -s -- -y
|
curl https://sh.rustup.rs -sSf | sh -s -- -y
|
||||||
- run:
|
|
||||||
name: Install jq
|
|
||||||
command: |
|
|
||||||
curl --location https://github.com/stedolan/jq/releases/download/jq-1.6/jq-osx-amd64 --output /usr/local/bin/jq
|
|
||||||
chmod +x /usr/local/bin/jq
|
|
||||||
- run:
|
- run:
|
||||||
name: Install hwloc
|
name: Install hwloc
|
||||||
command: |
|
command: |
|
||||||
@@ -388,6 +367,9 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
command: make build
|
command: make build
|
||||||
no_output_timeout: 30m
|
no_output_timeout: 30m
|
||||||
|
- run:
|
||||||
|
name: check tag and version output match
|
||||||
|
command: ./scripts/version-check.sh ./lotus
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: lotus
|
path: lotus
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
@@ -723,18 +705,6 @@ jobs:
|
|||||||
- packer/build:
|
- packer/build:
|
||||||
template: tools/packer/lotus.pkr.hcl
|
template: tools/packer/lotus.pkr.hcl
|
||||||
args: "-var ci_workspace_bins=./linux-butterflynet -var lotus_network=butterflynet -var git_tag=$CIRCLE_TAG"
|
args: "-var ci_workspace_bins=./linux-butterflynet -var lotus_network=butterflynet -var git_tag=$CIRCLE_TAG"
|
||||||
publish-packer-nerpanet:
|
|
||||||
description: build and push AWS IAM and DigitalOcean droplet.
|
|
||||||
executor:
|
|
||||||
name: packer/default
|
|
||||||
packer-version: 1.6.6
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- attach_workspace:
|
|
||||||
at: "."
|
|
||||||
- packer/build:
|
|
||||||
template: tools/packer/lotus.pkr.hcl
|
|
||||||
args: "-var ci_workspace_bins=./linux-nerpanet -var lotus_network=nerpanet -var git_tag=$CIRCLE_TAG"
|
|
||||||
publish-dockerhub:
|
publish-dockerhub:
|
||||||
description: publish to dockerhub
|
description: publish to dockerhub
|
||||||
machine:
|
machine:
|
||||||
@@ -815,7 +785,7 @@ workflows:
|
|||||||
codecov-upload: false
|
codecov-upload: false
|
||||||
suite: conformance-bleeding-edge
|
suite: conformance-bleeding-edge
|
||||||
target: "./conformance"
|
target: "./conformance"
|
||||||
vectors-branch: master
|
vectors-branch: specs-actors-v7
|
||||||
- trigger-testplans:
|
- trigger-testplans:
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
@@ -837,11 +807,6 @@ workflows:
|
|||||||
tags:
|
tags:
|
||||||
only:
|
only:
|
||||||
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
|
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
|
||||||
- build-ntwk-nerpa:
|
|
||||||
filters:
|
|
||||||
tags:
|
|
||||||
only:
|
|
||||||
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
|
|
||||||
- build-lotus-soup
|
- build-lotus-soup
|
||||||
- build-macos:
|
- build-macos:
|
||||||
filters:
|
filters:
|
||||||
@@ -851,19 +816,10 @@ workflows:
|
|||||||
tags:
|
tags:
|
||||||
only:
|
only:
|
||||||
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
|
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
|
||||||
- build-appimage:
|
|
||||||
filters:
|
|
||||||
branches:
|
|
||||||
ignore:
|
|
||||||
- /.*/
|
|
||||||
tags:
|
|
||||||
only:
|
|
||||||
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
|
|
||||||
- publish:
|
- publish:
|
||||||
requires:
|
requires:
|
||||||
- build-all
|
- build-all
|
||||||
- build-macos
|
- build-macos
|
||||||
- build-appimage
|
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
ignore:
|
ignore:
|
||||||
@@ -906,16 +862,6 @@ workflows:
|
|||||||
tags:
|
tags:
|
||||||
only:
|
only:
|
||||||
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
|
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
|
||||||
- publish-packer-nerpanet:
|
|
||||||
requires:
|
|
||||||
- build-ntwk-nerpa
|
|
||||||
filters:
|
|
||||||
branches:
|
|
||||||
ignore:
|
|
||||||
- /.*/
|
|
||||||
tags:
|
|
||||||
only:
|
|
||||||
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
|
|
||||||
- publish-snapcraft:
|
- publish-snapcraft:
|
||||||
name: publish-snapcraft-stable
|
name: publish-snapcraft-stable
|
||||||
channel: stable
|
channel: stable
|
||||||
|
|||||||
+72
-18
@@ -1,19 +1,73 @@
|
|||||||
comment: off
|
|
||||||
ignore:
|
ignore:
|
||||||
- "**/cbor_gen.go"
|
# Auto generated
|
||||||
- "api/test/**/*"
|
- "^.*_gen.go$"
|
||||||
- "api/test/*"
|
- "^.*/mock_full.go$"
|
||||||
- "gen/**/*"
|
# Old actors.
|
||||||
- "gen/*"
|
- "^chain/actors/builtin/[^/]*/(message|state|v)[0-4]\\.go$" # We test the latest version only.
|
||||||
- "cmd/lotus-shed/*"
|
# Tests
|
||||||
- "cmd/tvx/*"
|
- "api/test/**"
|
||||||
- "cmd/lotus-pcr/*"
|
- "conformance/**"
|
||||||
- "cmd/tvx/*"
|
# Generators
|
||||||
- "cmd/lotus-chainwatch/*"
|
- "gen/**"
|
||||||
- "cmd/lotus-health/*"
|
- "chain/actors/agen/**"
|
||||||
- "cmd/lotus-fountain/*"
|
# Non-critical utilities
|
||||||
- "cmd/lotus-townhall/*"
|
- "api/docgen/**"
|
||||||
- "cmd/lotus-stats/*"
|
- "api/docgen-openrpc/**"
|
||||||
- "cmd/lotus-pcr/*"
|
coverage:
|
||||||
github_checks:
|
status:
|
||||||
annotations: false
|
patch: off
|
||||||
|
project:
|
||||||
|
tools-and-tests:
|
||||||
|
target: auto
|
||||||
|
threshold: 1%
|
||||||
|
informational: true
|
||||||
|
paths:
|
||||||
|
- "testplans"
|
||||||
|
- "tools"
|
||||||
|
- "system"
|
||||||
|
- "snap"
|
||||||
|
- "lotuspond"
|
||||||
|
- "conformance"
|
||||||
|
- "scripts"
|
||||||
|
- "gen"
|
||||||
|
- "build"
|
||||||
|
markets:
|
||||||
|
target: auto
|
||||||
|
threshold: 1%
|
||||||
|
informational: false
|
||||||
|
paths:
|
||||||
|
- "markets"
|
||||||
|
- "paychmgr"
|
||||||
|
miner:
|
||||||
|
target: auto
|
||||||
|
threshold: 1.5%
|
||||||
|
informational: false
|
||||||
|
paths:
|
||||||
|
- "miner"
|
||||||
|
- "storage"
|
||||||
|
chain:
|
||||||
|
target: auto
|
||||||
|
threshold: 1%
|
||||||
|
informational: false
|
||||||
|
paths:
|
||||||
|
- "chain"
|
||||||
|
node:
|
||||||
|
target: auto
|
||||||
|
threshold: 1%
|
||||||
|
informational: false
|
||||||
|
paths:
|
||||||
|
- "node"
|
||||||
|
- "blockstore"
|
||||||
|
- "metrics"
|
||||||
|
- "lib"
|
||||||
|
- "genesis"
|
||||||
|
- "gateway"
|
||||||
|
- "api"
|
||||||
|
- "journal"
|
||||||
|
cli:
|
||||||
|
target: auto
|
||||||
|
threshold: 1%
|
||||||
|
informational: true
|
||||||
|
paths:
|
||||||
|
- "cli"
|
||||||
|
- "cmd"
|
||||||
|
|||||||
@@ -21,35 +21,45 @@ body:
|
|||||||
required: true
|
required: true
|
||||||
- label: I did not make any code changes to lotus.
|
- label: I did not make any code changes to lotus.
|
||||||
required: false
|
required: false
|
||||||
- type: dropdown
|
- type: checkboxes
|
||||||
id: component-and-area
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
attributes:
|
attributes:
|
||||||
label: Lotus component
|
label: Lotus component
|
||||||
description: Please select the lotus component you are filing a bug for
|
description: Please select the lotus component you are filing a bug for
|
||||||
options:
|
options:
|
||||||
- lotus daemon - chain sync
|
- label: lotus daemon - chain sync
|
||||||
- lotus miner - mining and block production
|
required: false
|
||||||
- lotus miner/worker - sealing
|
- label: lotus miner - mining and block production
|
||||||
- lotus miner - proving(WindowPoSt)
|
required: false
|
||||||
- lotus miner/market - storage deal
|
- label: lotus miner/worker - sealing
|
||||||
- lotus miner/market - retrieval deal
|
required: false
|
||||||
- lotus client
|
- label: lotus miner - proving(WindowPoSt)
|
||||||
- lotus JSON-RPC API
|
required: false
|
||||||
- lotus message management (mpool)
|
- label: lotus miner/market - storage deal
|
||||||
- Other
|
required: false
|
||||||
|
- label: lotus miner/market - retrieval deal
|
||||||
|
required: false
|
||||||
|
- label: lotus miner/market - data transfer
|
||||||
|
required: false
|
||||||
|
- label: lotus client
|
||||||
|
required: false
|
||||||
|
- label: lotus JSON-RPC API
|
||||||
|
required: false
|
||||||
|
- label: lotus message management (mpool)
|
||||||
|
required: false
|
||||||
|
- label: Other
|
||||||
|
required: false
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: version
|
id: version
|
||||||
attributes:
|
attributes:
|
||||||
label: Lotus Version
|
label: Lotus Version
|
||||||
|
render: text
|
||||||
description: Enter the output of `lotus version` and `lotus-miner version` if applicable.
|
description: Enter the output of `lotus version` and `lotus-miner version` if applicable.
|
||||||
placeholder: |
|
placeholder: |
|
||||||
e.g.
|
e.g.
|
||||||
Daemon:1.11.0-rc2+debug+git.0519cd371.dirty+api1.3.0
|
Daemon:1.11.0-rc2+debug+git.0519cd371.dirty+api1.3.0
|
||||||
Local: lotus version 1.11.0-rc2+debug+git.0519cd371.dirty
|
Local: lotus version 1.11.0-rc2+debug+git.0519cd371.dirty
|
||||||
validations:
|
validations:
|
||||||
reuiqred: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: Description
|
id: Description
|
||||||
attributes:
|
attributes:
|
||||||
@@ -62,19 +72,18 @@ body:
|
|||||||
* For sealing issues, include the output of `lotus-miner sectors status --log <sectorId>` for the failed sector(s).
|
* For sealing issues, include the output of `lotus-miner sectors status --log <sectorId>` for the failed sector(s).
|
||||||
* For proving issues, include the output of `lotus-miner proving` info.
|
* For proving issues, include the output of `lotus-miner proving` info.
|
||||||
* For deal making issues, include the output of `lotus client list-deals -v` and/or `lotus-miner storage-deals|retrieval-deals|data-transfers list [-v]` commands for the deal(s) in question.
|
* For deal making issues, include the output of `lotus client list-deals -v` and/or `lotus-miner storage-deals|retrieval-deals|data-transfers list [-v]` commands for the deal(s) in question.
|
||||||
render: bash
|
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: extraInfo
|
id: extraInfo
|
||||||
attributes:
|
attributes:
|
||||||
label: Logging Information
|
label: Logging Information
|
||||||
|
render: text
|
||||||
description: |
|
description: |
|
||||||
Please provide debug logs of the problem, remember you can get set log level control for:
|
Please provide debug logs of the problem, remember you can get set log level control for:
|
||||||
* lotus: use `lotus log list` to get all log systems available and set level by `lotus log set-level`. An example can be found [here](https://docs.filecoin.io/get-started/lotus/configuration-and-advanced-usage/#log-level-control).
|
* lotus: use `lotus log list` to get all log systems available and set level by `lotus log set-level`. An example can be found [here](https://docs.filecoin.io/get-started/lotus/configuration-and-advanced-usage/#log-level-control).
|
||||||
* lotus-miner:`lotus-miner log list` to get all log systems available and set level by `lotus-miner log set-level
|
* lotus-miner:`lotus-miner log list` to get all log systems available and set level by `lotus-miner log set-level
|
||||||
If you don't provide detailed logs when you raise the issue it will almost certainly be the first request I make before furthur diagnosing the problem.
|
If you don't provide detailed logs when you raise the issue it will almost certainly be the first request I make before furthur diagnosing the problem.
|
||||||
render: bash
|
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
@@ -87,6 +96,5 @@ body:
|
|||||||
2. Do '...'
|
2. Do '...'
|
||||||
3. See error '...'
|
3. See error '...'
|
||||||
...
|
...
|
||||||
render: bash
|
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
|
|||||||
@@ -15,24 +15,33 @@ body:
|
|||||||
required: true
|
required: true
|
||||||
- label: I **have** a specific, actionable, and well motivated improvement to propose.
|
- label: I **have** a specific, actionable, and well motivated improvement to propose.
|
||||||
required: true
|
required: true
|
||||||
- type: dropdown
|
- type: checkboxes
|
||||||
id: component
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
attributes:
|
attributes:
|
||||||
label: Lotus component
|
label: Lotus component
|
||||||
description: Please select the lotus component you are propoing improvement for
|
description: Please select the lotus component you are filing an improvement request for
|
||||||
options:
|
options:
|
||||||
- lotus daemon - chain sync
|
- label: lotus daemon - chain sync
|
||||||
- lotus miner - mining and block production
|
required: false
|
||||||
- lotus miner/worker - sealing
|
- label: lotus miner - mining and block production
|
||||||
- lotus miner - proving(WindowPoSt)
|
required: false
|
||||||
- lotus miner/market - storage deal
|
- label: lotus miner/worker - sealing
|
||||||
- lotus miner/market - retrieval deal
|
required: false
|
||||||
- lotus client
|
- label: lotus miner - proving(WindowPoSt)
|
||||||
- lotus JSON-RPC API
|
required: false
|
||||||
- lotus message management (mpool)
|
- label: lotus miner/market - storage deal
|
||||||
- Other
|
required: false
|
||||||
|
- label: lotus miner/market - retrieval deal
|
||||||
|
required: false
|
||||||
|
- label: lotus miner/market - data transfer
|
||||||
|
required: false
|
||||||
|
- label: lotus client
|
||||||
|
required: false
|
||||||
|
- label: lotus JSON-RPC API
|
||||||
|
required: false
|
||||||
|
- label: lotus message management (mpool)
|
||||||
|
required: false
|
||||||
|
- label: Other
|
||||||
|
required: false
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: request
|
id: request
|
||||||
attributes:
|
attributes:
|
||||||
|
|||||||
@@ -13,24 +13,33 @@ body:
|
|||||||
required: true
|
required: true
|
||||||
- label: I **have** a specific, actionable, and well motivated feature request to propose.
|
- label: I **have** a specific, actionable, and well motivated feature request to propose.
|
||||||
required: true
|
required: true
|
||||||
- type: dropdown
|
- type: checkboxes
|
||||||
id: component
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
attributes:
|
attributes:
|
||||||
label: Lotus component
|
label: Lotus component
|
||||||
description: Please select the lotus component you are requesting a new feature for
|
description: Please select the lotus component you are filing a new feature request for
|
||||||
options:
|
options:
|
||||||
- lotus daemon - chain sync
|
- label: lotus daemon - chain sync
|
||||||
- lotus miner - mining and block production
|
required: false
|
||||||
- lotus miner/worker - sealing
|
- label: lotus miner - mining and block production
|
||||||
- lotus miner - proving(WindowPoSt)
|
required: false
|
||||||
- lotus miner/market - storage deal
|
- label: lotus miner/worker - sealing
|
||||||
- lotus miner/market - retrieval deal
|
required: false
|
||||||
- lotus client
|
- label: lotus miner - proving(WindowPoSt)
|
||||||
- lotus JSON-RPC API
|
required: false
|
||||||
- lotus message management (mpool)
|
- label: lotus miner/market - storage deal
|
||||||
- Other
|
required: false
|
||||||
|
- label: lotus miner/market - retrieval deal
|
||||||
|
required: false
|
||||||
|
- label: lotus miner/market - data transfer
|
||||||
|
required: false
|
||||||
|
- label: lotus client
|
||||||
|
required: false
|
||||||
|
- label: lotus JSON-RPC API
|
||||||
|
required: false
|
||||||
|
- label: lotus message management (mpool)
|
||||||
|
required: false
|
||||||
|
- label: Other
|
||||||
|
required: false
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: request
|
id: request
|
||||||
attributes:
|
attributes:
|
||||||
|
|||||||
@@ -1,91 +0,0 @@
|
|||||||
name: "M1 Bug Report For Deal Making"
|
|
||||||
description: "File a bug report around deal making for the M1 releases"
|
|
||||||
labels: [need/triage, kind/bug, M1-release]
|
|
||||||
body:
|
|
||||||
- type: checkboxes
|
|
||||||
id: checklist
|
|
||||||
attributes:
|
|
||||||
label: Checklist
|
|
||||||
description: Please check off the following boxes before continuing to file a bug report!
|
|
||||||
options:
|
|
||||||
- label: This is **not** a question or a support request. If you have any lotus related questions, please ask in the [lotus forum](https://github.com/filecoin-project/lotus/discussions).
|
|
||||||
required: true
|
|
||||||
- label: I **am** reporting a bug w.r.t one of the [M1 tags](https://github.com/filecoin-project/lotus/discussions/6852#discussioncomment-1043951). If not, choose another issue option [here](https://github.com/filecoin-project/lotus/issues/new/choose).
|
|
||||||
required: true
|
|
||||||
- label: I **am** reporting a bug around deal making. If not, create a [M1 Bug Report For Non Deal Making Issue](https://github.com/filecoin-project/lotus/issues/new?assignees=&labels=need%2Ftriage%2Ckind%2Fbug%2CM1-release&template=m1_bug_report_non_deal.yml).
|
|
||||||
required: true
|
|
||||||
- label: I have my log level set as instructed [here](https://github.com/filecoin-project/lotus/discussions/6852#discussioncomment-1043678) and have logs available for troubleshooting.
|
|
||||||
required: true
|
|
||||||
- label: The deal is coming from one of the M1 clients(communitcated in the coordination slack channel).
|
|
||||||
required: true
|
|
||||||
- label: I **have** searched on the [issue tracker](https://github.com/filecoin-project/lotus/issues) and the [lotus forum](https://github.com/filecoin-project/lotus/discussions), and there is no existing related issue or discussion.
|
|
||||||
required: true
|
|
||||||
- type: dropdown
|
|
||||||
id: lotus-componets
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
attributes:
|
|
||||||
label: Lotus Component
|
|
||||||
description: Please select the lotus component you are filing a bug for
|
|
||||||
options:
|
|
||||||
- lotus miner market subsystem - storage deal
|
|
||||||
- lotus miner market subsystem - retrieval deal
|
|
||||||
- lotus miner - storage deal
|
|
||||||
- lotus miner - retrieval deal
|
|
||||||
- type: textarea
|
|
||||||
id: version
|
|
||||||
attributes:
|
|
||||||
label: Lotus Tag and Version
|
|
||||||
description: Enter the lotus tag, output of `lotus version` and `lotus-miner version`.
|
|
||||||
validations:
|
|
||||||
reuiqred: true
|
|
||||||
- type: textarea
|
|
||||||
id: Description
|
|
||||||
attributes:
|
|
||||||
label: Describe the Bug
|
|
||||||
description: |
|
|
||||||
This is where you get to tell us what went wrong, when doing so, please try to provide a clear and concise description of the bug with all related information:
|
|
||||||
* What you were doding when you experienced the bug?
|
|
||||||
* Any *error* messages you saw, *where* you saw them, and what you believe may have caused them (if you have any ideas).
|
|
||||||
* What is the expected behaviour?
|
|
||||||
render: bash
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
id: deal-status
|
|
||||||
attributes:
|
|
||||||
label: Deal Status
|
|
||||||
description: What's the status of the deal?
|
|
||||||
placeholder: |
|
|
||||||
Please share the output of `lotus-miner storage-deals|retrieval-deals list [-v]` commands for the deal(s) in question.
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
id: data-transfer-status
|
|
||||||
attributes:
|
|
||||||
label: Data Transfer Status
|
|
||||||
description: What's the status of the data transfer?
|
|
||||||
placeholder: |
|
|
||||||
Please share the output of `lotus-miner data-transfers list -v` commands for the deal(s) in question.
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
id: logging
|
|
||||||
attributes:
|
|
||||||
label: Logging Information
|
|
||||||
description: Please link to the whole of the miner logs on your side of the transaction. You can upload the logs to a [gist](https://gist.github.com).
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
id: RepoSteps
|
|
||||||
attributes:
|
|
||||||
label: Repo Steps (optional)
|
|
||||||
description: "Steps to reproduce the behavior"
|
|
||||||
value: |
|
|
||||||
1. Run '...'
|
|
||||||
2. Do '...'
|
|
||||||
3. See error '...'
|
|
||||||
...
|
|
||||||
render: bash
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
name: "M1 Bug Report For Non Deal Making Issue"
|
|
||||||
description: "File a bug report around non deal making issue for the M1 releases"
|
|
||||||
labels: [need/triage, kind/bug, M1-release]
|
|
||||||
body:
|
|
||||||
- type: checkboxes
|
|
||||||
id: checklist
|
|
||||||
attributes:
|
|
||||||
label: Checklist
|
|
||||||
description: Please check off the following boxes before continuing to file a bug report!
|
|
||||||
options:
|
|
||||||
- label: This is **not** a question or a support request. If you have any lotus related questions, please ask in the [lotus forum](https://github.com/filecoin-project/lotus/discussions).
|
|
||||||
required: true
|
|
||||||
- label: I **am** reporting a bug w.r.t one of the [M1 tags](https://github.com/filecoin-project/lotus/discussions/6852#discussioncomment-1043951). If not, choose another issue option [here](https://github.com/filecoin-project/lotus/issues/new/choose).
|
|
||||||
required: true
|
|
||||||
- label: I am **not** reporting a bug around deal making. If yes, create a [M1 Bug Report For Deal Making](https://github.com/filecoin-project/lotus/issues/new?assignees=&labels=need%2Ftriage%2Ckind%2Fbug%2CM1-release&template=m1_bug_report_deal.yml).
|
|
||||||
required: true
|
|
||||||
- label: I **have** searched on the [issue tracker](https://github.com/filecoin-project/lotus/issues) and the [lotus forum](https://github.com/filecoin-project/lotus/discussions), and there is no existing related issue or discussion.
|
|
||||||
required: true
|
|
||||||
- type: dropdown
|
|
||||||
id: component-and-area
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
attributes:
|
|
||||||
label: Lotus component
|
|
||||||
description: Please select the lotus component you are filing a bug for
|
|
||||||
options:
|
|
||||||
- lotus daemon - chain sync **with** splitstore enabled
|
|
||||||
- lotus daemon - chain sync **without** splitstore enabled
|
|
||||||
- lotus miner - mining and block production
|
|
||||||
- lotus miner/worker - sealing
|
|
||||||
- lotus miner - proving(WindowPoSt)
|
|
||||||
- lotus client
|
|
||||||
- lotus JSON-RPC API
|
|
||||||
- lotus message management (mpool)
|
|
||||||
- Other
|
|
||||||
- type: textarea
|
|
||||||
id: version
|
|
||||||
attributes:
|
|
||||||
label: Lotus Tag and Version
|
|
||||||
description: Enter the lotus tag, output of `lotus version` and `lotus-miner version`.
|
|
||||||
validations:
|
|
||||||
reuiqred: true
|
|
||||||
- type: textarea
|
|
||||||
id: Description
|
|
||||||
attributes:
|
|
||||||
label: Describe the Bug
|
|
||||||
description: |
|
|
||||||
This is where you get to tell us what went wrong, when doing so, please try to provide a clear and concise description of the bug with all related information:
|
|
||||||
* What you were doding when you experienced the bug?
|
|
||||||
* Any *error* messages you saw, *where* you saw them, and what you believe may have caused them (if you have any ideas).
|
|
||||||
* What is the expected behaviour?
|
|
||||||
* For sealing issues, include the output of `lotus-miner sectors status --log <sectorId>` for the failed sector(s).
|
|
||||||
* For proving issues, include the output of `lotus-miner proving` info.
|
|
||||||
render: bash
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
id: extraInfo
|
|
||||||
attributes:
|
|
||||||
label: Logging Information
|
|
||||||
description: |
|
|
||||||
Please provide debug logs of the problem, remember you can get set log level control for:
|
|
||||||
* lotus: use `lotus log list` to get all log systems available and set level by `lotus log set-level`. An example can be found [here](https://docs.filecoin.io/get-started/lotus/configuration-and-advanced-usage/#log-level-control).
|
|
||||||
* lotus-miner:`lotus-miner log list` to get all log systems available and set level by `lotus-miner log set-level
|
|
||||||
If you don't provide detailed logs when you raise the issue it will almost certainly be the first request I make before furthur diagnosing the problem.
|
|
||||||
render: bash
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
id: RepoSteps
|
|
||||||
attributes:
|
|
||||||
label: Repo Steps
|
|
||||||
description: "Steps to reproduce the behavior"
|
|
||||||
value: |
|
|
||||||
1. Run '...'
|
|
||||||
2. Do '...'
|
|
||||||
3. See error '...'
|
|
||||||
...
|
|
||||||
render: bash
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
## Related Issues
|
||||||
|
<!-- link all issues that this PR might resolve/fix. If an issue doesn't exist, include a brief motivation for the change being made.-->
|
||||||
|
|
||||||
|
## Proposed Changes
|
||||||
|
<!-- provide a clear list of the changes being made-->
|
||||||
|
|
||||||
|
|
||||||
|
## Additional Info
|
||||||
|
<!-- callouts, links to documentation, and etc-->
|
||||||
|
|
||||||
|
## Checklist
|
||||||
|
|
||||||
|
Before you mark the PR ready for review, please make sure that:
|
||||||
|
- [ ] All commits have a clear commit message.
|
||||||
|
- [ ] The PR title is in the form of `<PR type>: <area>: <change being made>`
|
||||||
|
- example: ` fix: mempool: Introduce a cache for valid signatures`
|
||||||
|
- `PR type`: _fix_, _feat_, _INTERFACE BREAKING CHANGE_, _CONSENSUS BREAKING_, _build_, _chore_, _ci_, _docs_, _misc_,_perf_, _refactor_, _revert_, _style_, _test_
|
||||||
|
- `area`: _api_, _chain_, _state_, _vm_, _data transfer_, _market_, _mempool_, _message_, _block production_, _multisig_, _networking_, _paychan_, _proving_, _sealing_, _wallet_
|
||||||
|
- [ ] This PR has tests for new functionality or change in behaviour
|
||||||
|
- [ ] If new user-facing features are introduced, clear usage guidelines and / or documentation updates should be included in https://lotus.filecoin.io or [Discussion Tutorials.](https://github.com/filecoin-project/lotus/discussions/categories/tutorials)
|
||||||
|
- [ ] CI is green
|
||||||
@@ -29,5 +29,5 @@ jobs:
|
|||||||
days-before-pr-close: 2
|
days-before-pr-close: 2
|
||||||
remove-stale-when-updated: true
|
remove-stale-when-updated: true
|
||||||
enable-statistics: true
|
enable-statistics: true
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
name: sync-master-main
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
jobs:
|
||||||
|
sync:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: update remote branch main
|
||||||
|
run: |
|
||||||
|
# overrides the remote branch (origin:github) `main`
|
||||||
|
git push origin --force master:main
|
||||||
+1107
File diff suppressed because it is too large
Load Diff
+2
-21
@@ -36,7 +36,7 @@ WORKDIR /opt/filecoin
|
|||||||
ARG RUSTFLAGS=""
|
ARG RUSTFLAGS=""
|
||||||
ARG GOFLAGS=""
|
ARG GOFLAGS=""
|
||||||
|
|
||||||
RUN make lotus lotus-miner lotus-worker lotus-shed lotus-wallet lotus-gateway
|
RUN make lotus lotus-miner lotus-worker lotus-shed lotus-wallet lotus-gateway lotus-stats
|
||||||
|
|
||||||
|
|
||||||
FROM ubuntu:20.04 AS base
|
FROM ubuntu:20.04 AS base
|
||||||
@@ -66,8 +66,6 @@ COPY scripts/docker-lotus-entrypoint.sh /
|
|||||||
|
|
||||||
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
|
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
|
||||||
ENV LOTUS_PATH /var/lib/lotus
|
ENV LOTUS_PATH /var/lib/lotus
|
||||||
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1
|
|
||||||
ENV LOTUS_JAEGER_AGENT_PORT 6831
|
|
||||||
ENV DOCKER_LOTUS_IMPORT_SNAPSHOT https://fil-chain-snapshots-fallback.s3.amazonaws.com/mainnet/minimal_finality_stateroots_latest.car
|
ENV DOCKER_LOTUS_IMPORT_SNAPSHOT https://fil-chain-snapshots-fallback.s3.amazonaws.com/mainnet/minimal_finality_stateroots_latest.car
|
||||||
ENV DOCKER_LOTUS_IMPORT_WALLET ""
|
ENV DOCKER_LOTUS_IMPORT_WALLET ""
|
||||||
|
|
||||||
@@ -92,8 +90,6 @@ MAINTAINER Lotus Development Team
|
|||||||
COPY --from=builder /opt/filecoin/lotus-wallet /usr/local/bin/
|
COPY --from=builder /opt/filecoin/lotus-wallet /usr/local/bin/
|
||||||
|
|
||||||
ENV WALLET_PATH /var/lib/lotus-wallet
|
ENV WALLET_PATH /var/lib/lotus-wallet
|
||||||
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1
|
|
||||||
ENV LOTUS_JAEGER_AGENT_PORT 6831
|
|
||||||
|
|
||||||
RUN mkdir /var/lib/lotus-wallet
|
RUN mkdir /var/lib/lotus-wallet
|
||||||
RUN chown fc: /var/lib/lotus-wallet
|
RUN chown fc: /var/lib/lotus-wallet
|
||||||
@@ -114,10 +110,6 @@ MAINTAINER Lotus Development Team
|
|||||||
|
|
||||||
COPY --from=builder /opt/filecoin/lotus-gateway /usr/local/bin/
|
COPY --from=builder /opt/filecoin/lotus-gateway /usr/local/bin/
|
||||||
|
|
||||||
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1
|
|
||||||
ENV LOTUS_JAEGER_AGENT_PORT 6831
|
|
||||||
ENV FULLNODE_API_INFO /ip4/127.0.0.1/tcp/1234/http
|
|
||||||
|
|
||||||
USER fc
|
USER fc
|
||||||
|
|
||||||
EXPOSE 1234
|
EXPOSE 1234
|
||||||
@@ -135,11 +127,7 @@ COPY --from=builder /opt/filecoin/lotus-miner /usr/local/bin/
|
|||||||
COPY scripts/docker-lotus-miner-entrypoint.sh /
|
COPY scripts/docker-lotus-miner-entrypoint.sh /
|
||||||
|
|
||||||
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
|
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
|
||||||
ENV FULLNODE_API_INFO /ip4/127.0.0.1/tcp/1234/http
|
|
||||||
ENV LOTUS_MINER_PATH /var/lib/lotus-miner
|
ENV LOTUS_MINER_PATH /var/lib/lotus-miner
|
||||||
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1
|
|
||||||
ENV LOTUS_JAEGER_AGENT_PORT 6831
|
|
||||||
ENV DOCKER_LOTUS_MINER_INIT true
|
|
||||||
|
|
||||||
RUN mkdir /var/lib/lotus-miner /var/tmp/filecoin-proof-parameters
|
RUN mkdir /var/lib/lotus-miner /var/tmp/filecoin-proof-parameters
|
||||||
RUN chown fc: /var/lib/lotus-miner /var/tmp/filecoin-proof-parameters
|
RUN chown fc: /var/lib/lotus-miner /var/tmp/filecoin-proof-parameters
|
||||||
@@ -163,10 +151,7 @@ MAINTAINER Lotus Development Team
|
|||||||
COPY --from=builder /opt/filecoin/lotus-worker /usr/local/bin/
|
COPY --from=builder /opt/filecoin/lotus-worker /usr/local/bin/
|
||||||
|
|
||||||
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
|
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
|
||||||
ENV MINER_API_INFO /ip4/127.0.0.1/tcp/2345/http
|
|
||||||
ENV LOTUS_WORKER_PATH /var/lib/lotus-worker
|
ENV LOTUS_WORKER_PATH /var/lib/lotus-worker
|
||||||
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1
|
|
||||||
ENV LOTUS_JAEGER_AGENT_PORT 6831
|
|
||||||
|
|
||||||
RUN mkdir /var/lib/lotus-worker
|
RUN mkdir /var/lib/lotus-worker
|
||||||
RUN chown fc: /var/lib/lotus-worker
|
RUN chown fc: /var/lib/lotus-worker
|
||||||
@@ -186,16 +171,11 @@ CMD ["-help"]
|
|||||||
from base as lotus-all-in-one
|
from base as lotus-all-in-one
|
||||||
|
|
||||||
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
|
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
|
||||||
ENV FULLNODE_API_INFO /ip4/127.0.0.1/tcp/1234/http
|
|
||||||
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1
|
|
||||||
ENV LOTUS_JAEGER_AGENT_PORT 6831
|
|
||||||
ENV LOTUS_MINER_PATH /var/lib/lotus-miner
|
ENV LOTUS_MINER_PATH /var/lib/lotus-miner
|
||||||
ENV LOTUS_PATH /var/lib/lotus
|
ENV LOTUS_PATH /var/lib/lotus
|
||||||
ENV LOTUS_WORKER_PATH /var/lib/lotus-worker
|
ENV LOTUS_WORKER_PATH /var/lib/lotus-worker
|
||||||
ENV MINER_API_INFO /ip4/127.0.0.1/tcp/2345/http
|
|
||||||
ENV WALLET_PATH /var/lib/lotus-wallet
|
ENV WALLET_PATH /var/lib/lotus-wallet
|
||||||
ENV DOCKER_LOTUS_IMPORT_SNAPSHOT https://fil-chain-snapshots-fallback.s3.amazonaws.com/mainnet/minimal_finality_stateroots_latest.car
|
ENV DOCKER_LOTUS_IMPORT_SNAPSHOT https://fil-chain-snapshots-fallback.s3.amazonaws.com/mainnet/minimal_finality_stateroots_latest.car
|
||||||
ENV DOCKER_LOTUS_MINER_INIT true
|
|
||||||
|
|
||||||
COPY --from=builder /opt/filecoin/lotus /usr/local/bin/
|
COPY --from=builder /opt/filecoin/lotus /usr/local/bin/
|
||||||
COPY --from=builder /opt/filecoin/lotus-shed /usr/local/bin/
|
COPY --from=builder /opt/filecoin/lotus-shed /usr/local/bin/
|
||||||
@@ -203,6 +183,7 @@ COPY --from=builder /opt/filecoin/lotus-wallet /usr/local/bin/
|
|||||||
COPY --from=builder /opt/filecoin/lotus-gateway /usr/local/bin/
|
COPY --from=builder /opt/filecoin/lotus-gateway /usr/local/bin/
|
||||||
COPY --from=builder /opt/filecoin/lotus-miner /usr/local/bin/
|
COPY --from=builder /opt/filecoin/lotus-miner /usr/local/bin/
|
||||||
COPY --from=builder /opt/filecoin/lotus-worker /usr/local/bin/
|
COPY --from=builder /opt/filecoin/lotus-worker /usr/local/bin/
|
||||||
|
COPY --from=builder /opt/filecoin/lotus-stats /usr/local/bin/
|
||||||
|
|
||||||
RUN mkdir /var/tmp/filecoin-proof-parameters
|
RUN mkdir /var/tmp/filecoin-proof-parameters
|
||||||
RUN mkdir /var/lib/lotus
|
RUN mkdir /var/lib/lotus
|
||||||
|
|||||||
@@ -0,0 +1,142 @@
|
|||||||
|
|
||||||
|
<!-- TOC -->
|
||||||
|
|
||||||
|
- [`lotus` Release Flow](#lotus-release-flow)
|
||||||
|
- [Purpose](#purpose)
|
||||||
|
- [High-level Summary](#high-level-summary)
|
||||||
|
- [Motivation and Requirements](#motivation-and-requirements)
|
||||||
|
- [Adopted Conventions](#adopted-conventions)
|
||||||
|
- [Major Releases](#major-releases)
|
||||||
|
- [Mandatory Releases](#mandatory-releases)
|
||||||
|
- [Feature Releases](#feature-releases)
|
||||||
|
- [Examples Scenarios](#examples-scenarios)
|
||||||
|
- [Release Cycle](#release-cycle)
|
||||||
|
- [Patch Releases](#patch-releases)
|
||||||
|
- [Performing a Release](#performing-a-release)
|
||||||
|
- [Security Fix Policy](#security-fix-policy)
|
||||||
|
- [FAQ](#faq)
|
||||||
|
- [Why aren't Go major versions used more?](#why-arent-go-major-versions-used-more)
|
||||||
|
- [Related Items](#related-items)
|
||||||
|
|
||||||
|
<!-- /TOC -->
|
||||||
|
|
||||||
|
# `lotus` Release Flow
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
|
||||||
|
This document aims to describe how the Lotus team plans to ship releases of the Lotus implementation of Filecoin network. Interested parties can expect new releases to come out as described in this document.
|
||||||
|
|
||||||
|
## High-level Summary
|
||||||
|
|
||||||
|
- **Major releases** (1.0.0, 2.0.0, etc.) are reserved for significant changes to the Filecoin protocol that transform the network and its usecases. Such changes could include the addition of new Virtual Machines to the protocol, major upgrades to the Proofs of Replication used by Filecoin, etc.
|
||||||
|
- Even minor releases (1.2.0, 1.4.0, etc.) of the Lotus software correspond to **mandatory releases** as they ship Filecoin network upgrades. Users **must** upgrade to these releases before a certain time in order to keep in sync with the Filecoin network. We aim to ensure there is at least one week before the upgrade deadline.
|
||||||
|
- Patch versions of even minor releases (1.2.1, 1.4.2, etc.) correspond to **hotfix releases**. Such releases will only be shipped when a critical fix is needed to be applied on top of a mandatory release.
|
||||||
|
- Odd minor releases (1.3.0, 1.5.0, etc.), as well as patch releases in these series (1.3.1, 1.5.2, etc.) correspond to **feature releases** with new development and bugfixes. These releases are not mandatory, but still highly recommended, **as they may contain critical security fixes**.
|
||||||
|
- We aim to ship a new feature release of the Lotus software every 3 weeks, so users can expect a regular cadence of Lotus feature releases. Note that mandatory releases for network upgrades may disrupt this schedule.
|
||||||
|
|
||||||
|
## Motivation and Requirements
|
||||||
|
|
||||||
|
Our primary motivation is for users of the Lotus software (storage providers, storage clients, developers, etc.) to have a clear idea about when they can expect Lotus releases, and what they can expect in a release.
|
||||||
|
|
||||||
|
In order to achieve this, we need the following from our release process and conventions:
|
||||||
|
|
||||||
|
- Lotus version conventions make it immediately obvious whether a new Lotus release is mandatory or not. A release is mandatory if it ships a network upgrade to the Filecoin protocol.
|
||||||
|
- The ability to ship critical fixes on top of mandatory releases, so as to avoid forcing users to consume larger unrelated changes.
|
||||||
|
- A regular cadence of feature releases, so that users can know when a new Lotus release will be available for consumption.
|
||||||
|
- The ability to ship any number of feature releases between two mandatory releases.
|
||||||
|
- A clear description of the various stages of testing that a Lotus Release Candidate (RC) goes through.
|
||||||
|
- Lotus Release issues will present a single source of truth for what may be contained in Lotus releases, including security fixes, and how they will be disclosed.
|
||||||
|
|
||||||
|
## Adopted Conventions
|
||||||
|
|
||||||
|
This section describes the conventions we have adopted. Users of Lotus are encouraged to review this in detail so as to be informed when new Lotus releases are shipped.
|
||||||
|
|
||||||
|
### Major Releases
|
||||||
|
|
||||||
|
Bumps to the Lotus major version number (1.0.0, 2.0.0, etc.) are reserved for significant changes to the Filecoin protocol that dramatically transform the network itself. Such changes could include the addition of new Virtual Machines to the protocol, major upgrades to the Proofs of Replication used by Filecoin, etc. These releases are expected to take lots of time to develop and will be rare. See also "Why aren't Go major versions used more?" below.
|
||||||
|
|
||||||
|
### Mandatory Releases
|
||||||
|
|
||||||
|
Even bumps to the Lotus minor version number (1.2.0, 1.4.0, etc.) are reserved for **mandatory releases** that ship Filecoin network upgrades. Users **must** upgrade to these releases before a certain time in order to keep in sync with the Filecoin network.
|
||||||
|
|
||||||
|
Depending on the scope of the upgrade, these releases may take up to several weeks to fully develop and test. We aim to ensure there are at least 2 weeks between the publication of the final Lotus release and the Filecoin network upgrade deadline.
|
||||||
|
|
||||||
|
These releases do not follow a regular cadence, as they are developed in lockstep with the other implementations of the Filecoin protocol. As of August 2021, the developers aim to ship 3-4 Filecoin network upgrades a year, though smaller security-critical upgrades may occur unpredictably.
|
||||||
|
|
||||||
|
Mandatory releases are somewhat sensitive since all Lotus users are forced to upgrade to them at the same time. As a result, they will be shipped on top of the most recent stable release of Lotus, which will generally be the latest Lotus release that has been in production for more than 2 weeks. (Note: given this rule, the basis of a mandatory release could be a mandatory release or a feature release depending on timing). Mandatory releases will not include any new feature development or bugfixes that haven't already baked in production for 2+ weeks, except for the changes needed for the network upgrade itself. Further, any critical fixes that are needed after the network upgrade will be shipped as patch version bumps to the mandatory release (1.2.1, 1.2.2, etc.) This prevents users from being forced to quickly digest unnecessary changes.
|
||||||
|
|
||||||
|
Users should generally aim to always upgrade to a new even minor version release since they either introduce a mandatory network upgrade or a critical fix.
|
||||||
|
|
||||||
|
### Feature Releases
|
||||||
|
|
||||||
|
All releases under an odd minor version number indicate **feature releases**. These could include releases such as 1.3.0, 1.3.1, 1.5.2, etc.
|
||||||
|
|
||||||
|
Feature releases include new development and bug fixes. They are not mandatory, but still highly recommended, **as they may contain critical security fixes**. Note that some of these releases may be very small patch releases that include critical hotfixes. There is no way to distinguish between a bug fix release and a feature release on the "feature" version. Both cases will use the "patch" version number.
|
||||||
|
|
||||||
|
We aim to ship a new feature release of the Lotus software from our development (master) branch every 3 weeks, so users can expect a regular cadence of Lotus feature releases. Note that mandatory releases for network upgrades may disrupt this schedule. For more, see the Release Cycle section (TODO: Link).
|
||||||
|
|
||||||
|
### Examples Scenarios
|
||||||
|
|
||||||
|
- **Scenario 1**: **Lotus 1.12.0 shipped a network upgrade, and no network upgrades are needed for a long while.**
|
||||||
|
|
||||||
|
In this case, the next feature release will be Lotus 1.13.0. In three-week intervals, we will ship Lotus 1.13.1, 1.13.2, and 1.13.3, all containing new features and bug fixes.
|
||||||
|
|
||||||
|
Let us assume that after the release of 1.13.3, a critical issue is discovered and a hotfix quickly developed. This hotfix will then be shipped in **both** 1.12.1 and 1.13.4. Users who have already upgrade to the 1.13 series can simply upgrade to 1.13.4. Users who have chosen to still be on 1.12.0, however, can use 1.12.1 to patch the critical issue without being forced to consume all the changes in the 1.13 series.
|
||||||
|
|
||||||
|
- **Scenario 2**: **Lotus 1.12.0 shipped a network upgrade, but the need for an unexpected network upgrade soon arises**
|
||||||
|
|
||||||
|
In this case, the Lotus 1.13 series will be dropped entirely, including any RCs that may have been undergoing testing. Instead, the network upgrade will be shipped as Lotus 1.14.0, built on top of Lotus 1.12.0. It will thus include no unnecessary changes, only the work needed to support the new network upgrade.
|
||||||
|
|
||||||
|
Any changes that were being worked on in the 1.13.0 series will then get applied on top of Lotus 1.14.0 and get shipped as Lotus 1.15.0.
|
||||||
|
|
||||||
|
## Release Cycle
|
||||||
|
|
||||||
|
A mandatory release process should take about 3-6 weeks, depending on the amount and the overall complexity of new features being introduced to the network protocol. It may also be shorter if there is a network incident that requires an emergency upgrade. A feature release process should take about 2-3 weeks.
|
||||||
|
|
||||||
|
The start time of the mandatory release process is subject to the network upgrade timeline. We will start a new feature release process every 3 weeks on Tuesdays, regardless of when the previous release landed unless it's still ongoing.
|
||||||
|
|
||||||
|
### Patch Releases
|
||||||
|
|
||||||
|
**Mandatory Release**
|
||||||
|
|
||||||
|
If we encounter a serious bug in a mandatory release post a network upgrade, we will create a patch release based on this release. Strictly only the fix to the bug will be included in the patch, and the bug fix will be backported to the master (dev) branch, and any ongoing feature release branch if applicable.
|
||||||
|
|
||||||
|
Patch release process for the mandatory releases will follow a compressed release cycle from hours to days depending on the severity and the impact to the network of the bug. In a patch release:
|
||||||
|
|
||||||
|
1. Automated and internal testing (stage 0 and 1) will be compressed into a few hours.
|
||||||
|
2. Stage 2-3 will be skipped or shortened case by case.
|
||||||
|
|
||||||
|
Some patch releases, especially ones fixing one or more complex bugs that doesn't require a follow-up mandatory upgrade, may undergo the full release process.
|
||||||
|
|
||||||
|
**Feature Release**
|
||||||
|
|
||||||
|
Patch releases in odd minor releases (1.3.0, 1.5.0, etc.) like 1.3.1, 1.5.2 and etc are corresponding to another **feature releases** with new development and bugfixes. These releases are not mandatory, but still **highly** recommended, **as they may contain critical security fixes**.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Performing a Release
|
||||||
|
|
||||||
|
At the beginning of each release cycle, we will generate our "Release tracking issue", which is populated with the content at [https://github.com/filecoin-project/lotus/blob/master/documentation/misc/RELEASE_ISSUE_TEMPLATE.md](https://github.com/filecoin-project/lotus/blob/master/documentation/misc/RELEASE_ISSUE_TEMPLATE.md)
|
||||||
|
|
||||||
|
This template will be used to track major goals we have, a planned shipping date, and a complete release checklist tied to a specific release.
|
||||||
|
|
||||||
|
### Security Fix Policy
|
||||||
|
|
||||||
|
Any release may contain security fixes. Unless the fix addresses a bug being exploited in the wild, the fix will *not* be called out in the release notes. Please make sure to update ASAP.
|
||||||
|
|
||||||
|
By policy, the team will usually wait until about 3 weeks after the final release to announce any fixed security issues. However, depending on the impact and ease of discovery of the issue, the team may wait more or less time.
|
||||||
|
|
||||||
|
It is important to always update to the latest version ASAP and file issues if you're unable to update for some reason.
|
||||||
|
|
||||||
|
Finally, unless a security issue is actively being exploited or a significant number of users are unable to update to the latest version (e.g., due to a difficult migration, breaking changes, etc.), security fixes will *not* be backported to previous releases.
|
||||||
|
|
||||||
|
## FAQ
|
||||||
|
|
||||||
|
### Why aren't Go major versions used more?
|
||||||
|
|
||||||
|
Golang tightly couples source code with versioning (major versions beyond v1 leak into import paths). This poses logistical difficulties to using major versions here. Concretely, if we were to pick a policy that bumped the major version on every network upgrade, we would disrupt every single downstream library/application that consumed the native Lotus API (e.g., libraries depending on the JSON-RPC client, testground tests). They would need to update their code every single time that we released a network breaking change, even if it brought on zero expectation of breakage for the Golang APIs that they depend on. In this scenario, we are signaling breakage on the wrong API surface! We're signaling breakage on the Go level, when what breaks is the network protocol.
|
||||||
|
|
||||||
|
## Related Items
|
||||||
|
|
||||||
|
1. [Release Issue template](https://github.com/filecoin-project/lotus/blob/master/documentation/misc/RELEASE_ISSUE_TEMPLATE.md)
|
||||||
|
2. [Lotus Release Flow Discussion](https://github.com/filecoin-project/lotus/discussions/7053): Leave a comment if you have any questions or feedbacks with regard to the lotus release flow.
|
||||||
@@ -5,7 +5,9 @@ all: build
|
|||||||
|
|
||||||
unexport GOFLAGS
|
unexport GOFLAGS
|
||||||
|
|
||||||
GOVERSION:=$(shell go version | cut -d' ' -f 3 | sed 's/^go//' | awk -F. '{printf "%d%03d%03d", $$1, $$2, $$3}')
|
GOCC?=go
|
||||||
|
|
||||||
|
GOVERSION:=$(shell $(GOCC) version | tr ' ' '\n' | grep go1 | sed 's/^go//' | awk -F. '{printf "%d%03d%03d", $$1, $$2, $$3}')
|
||||||
ifeq ($(shell expr $(GOVERSION) \< 1016000), 1)
|
ifeq ($(shell expr $(GOVERSION) \< 1016000), 1)
|
||||||
$(warning Your Golang version is go$(shell expr $(GOVERSION) / 1000000).$(shell expr $(GOVERSION) % 1000000 / 1000).$(shell expr $(GOVERSION) % 1000))
|
$(warning Your Golang version is go$(shell expr $(GOVERSION) / 1000000).$(shell expr $(GOVERSION) % 1000000 / 1000).$(shell expr $(GOVERSION) % 1000))
|
||||||
$(error Update Golang to version to at least 1.16.0)
|
$(error Update Golang to version to at least 1.16.0)
|
||||||
@@ -74,9 +76,6 @@ debug: build-devnets
|
|||||||
calibnet: GOFLAGS+=-tags=calibnet
|
calibnet: GOFLAGS+=-tags=calibnet
|
||||||
calibnet: build-devnets
|
calibnet: build-devnets
|
||||||
|
|
||||||
nerpanet: GOFLAGS+=-tags=nerpanet
|
|
||||||
nerpanet: build-devnets
|
|
||||||
|
|
||||||
butterflynet: GOFLAGS+=-tags=butterflynet
|
butterflynet: GOFLAGS+=-tags=butterflynet
|
||||||
butterflynet: build-devnets
|
butterflynet: build-devnets
|
||||||
|
|
||||||
@@ -85,32 +84,32 @@ interopnet: build-devnets
|
|||||||
|
|
||||||
lotus: $(BUILD_DEPS)
|
lotus: $(BUILD_DEPS)
|
||||||
rm -f lotus
|
rm -f lotus
|
||||||
go build $(GOFLAGS) -o lotus ./cmd/lotus
|
$(GOCC) build $(GOFLAGS) -o lotus ./cmd/lotus
|
||||||
|
|
||||||
.PHONY: lotus
|
.PHONY: lotus
|
||||||
BINS+=lotus
|
BINS+=lotus
|
||||||
|
|
||||||
lotus-miner: $(BUILD_DEPS)
|
lotus-miner: $(BUILD_DEPS)
|
||||||
rm -f lotus-miner
|
rm -f lotus-miner
|
||||||
go build $(GOFLAGS) -o lotus-miner ./cmd/lotus-miner
|
$(GOCC) build $(GOFLAGS) -o lotus-miner ./cmd/lotus-miner
|
||||||
.PHONY: lotus-miner
|
.PHONY: lotus-miner
|
||||||
BINS+=lotus-miner
|
BINS+=lotus-miner
|
||||||
|
|
||||||
lotus-worker: $(BUILD_DEPS)
|
lotus-worker: $(BUILD_DEPS)
|
||||||
rm -f lotus-worker
|
rm -f lotus-worker
|
||||||
go build $(GOFLAGS) -o lotus-worker ./cmd/lotus-seal-worker
|
$(GOCC) build $(GOFLAGS) -o lotus-worker ./cmd/lotus-seal-worker
|
||||||
.PHONY: lotus-worker
|
.PHONY: lotus-worker
|
||||||
BINS+=lotus-worker
|
BINS+=lotus-worker
|
||||||
|
|
||||||
lotus-shed: $(BUILD_DEPS)
|
lotus-shed: $(BUILD_DEPS)
|
||||||
rm -f lotus-shed
|
rm -f lotus-shed
|
||||||
go build $(GOFLAGS) -o lotus-shed ./cmd/lotus-shed
|
$(GOCC) build $(GOFLAGS) -o lotus-shed ./cmd/lotus-shed
|
||||||
.PHONY: lotus-shed
|
.PHONY: lotus-shed
|
||||||
BINS+=lotus-shed
|
BINS+=lotus-shed
|
||||||
|
|
||||||
lotus-gateway: $(BUILD_DEPS)
|
lotus-gateway: $(BUILD_DEPS)
|
||||||
rm -f lotus-gateway
|
rm -f lotus-gateway
|
||||||
go build $(GOFLAGS) -o lotus-gateway ./cmd/lotus-gateway
|
$(GOCC) build $(GOFLAGS) -o lotus-gateway ./cmd/lotus-gateway
|
||||||
.PHONY: lotus-gateway
|
.PHONY: lotus-gateway
|
||||||
BINS+=lotus-gateway
|
BINS+=lotus-gateway
|
||||||
|
|
||||||
@@ -138,19 +137,19 @@ install-app:
|
|||||||
|
|
||||||
lotus-seed: $(BUILD_DEPS)
|
lotus-seed: $(BUILD_DEPS)
|
||||||
rm -f lotus-seed
|
rm -f lotus-seed
|
||||||
go build $(GOFLAGS) -o lotus-seed ./cmd/lotus-seed
|
$(GOCC) build $(GOFLAGS) -o lotus-seed ./cmd/lotus-seed
|
||||||
|
|
||||||
.PHONY: lotus-seed
|
.PHONY: lotus-seed
|
||||||
BINS+=lotus-seed
|
BINS+=lotus-seed
|
||||||
|
|
||||||
benchmarks:
|
benchmarks:
|
||||||
go run github.com/whyrusleeping/bencher ./... > bench.json
|
$(GOCC) run github.com/whyrusleeping/bencher ./... > bench.json
|
||||||
@echo Submitting results
|
@echo Submitting results
|
||||||
@curl -X POST 'http://benchmark.kittyhawk.wtf/benchmark' -d '@bench.json' -u "${benchmark_http_cred}"
|
@curl -X POST 'http://benchmark.kittyhawk.wtf/benchmark' -d '@bench.json' -u "${benchmark_http_cred}"
|
||||||
.PHONY: benchmarks
|
.PHONY: benchmarks
|
||||||
|
|
||||||
lotus-pond: 2k
|
lotus-pond: 2k
|
||||||
go build -o lotus-pond ./lotuspond
|
$(GOCC) build -o lotus-pond ./lotuspond
|
||||||
.PHONY: lotus-pond
|
.PHONY: lotus-pond
|
||||||
BINS+=lotus-pond
|
BINS+=lotus-pond
|
||||||
|
|
||||||
@@ -161,85 +160,64 @@ lotus-pond-front:
|
|||||||
lotus-pond-app: lotus-pond-front lotus-pond
|
lotus-pond-app: lotus-pond-front lotus-pond
|
||||||
.PHONY: lotus-pond-app
|
.PHONY: lotus-pond-app
|
||||||
|
|
||||||
lotus-townhall:
|
|
||||||
rm -f lotus-townhall
|
|
||||||
go build -o lotus-townhall ./cmd/lotus-townhall
|
|
||||||
.PHONY: lotus-townhall
|
|
||||||
BINS+=lotus-townhall
|
|
||||||
|
|
||||||
lotus-townhall-front:
|
|
||||||
(cd ./cmd/lotus-townhall/townhall && npm i && npm run build)
|
|
||||||
.PHONY: lotus-townhall-front
|
|
||||||
|
|
||||||
lotus-townhall-app: lotus-touch lotus-townhall-front
|
|
||||||
.PHONY: lotus-townhall-app
|
|
||||||
|
|
||||||
lotus-fountain:
|
lotus-fountain:
|
||||||
rm -f lotus-fountain
|
rm -f lotus-fountain
|
||||||
go build -o lotus-fountain ./cmd/lotus-fountain
|
go build $(GOFLAGS) -o lotus-fountain ./cmd/lotus-fountain
|
||||||
|
go run github.com/GeertJohan/go.rice/rice append --exec lotus-fountain -i ./cmd/lotus-fountain -i ./build
|
||||||
.PHONY: lotus-fountain
|
.PHONY: lotus-fountain
|
||||||
BINS+=lotus-fountain
|
BINS+=lotus-fountain
|
||||||
|
|
||||||
lotus-chainwatch:
|
|
||||||
rm -f lotus-chainwatch
|
|
||||||
go build $(GOFLAGS) -o lotus-chainwatch ./cmd/lotus-chainwatch
|
|
||||||
.PHONY: lotus-chainwatch
|
|
||||||
BINS+=lotus-chainwatch
|
|
||||||
|
|
||||||
lotus-bench:
|
lotus-bench:
|
||||||
rm -f lotus-bench
|
rm -f lotus-bench
|
||||||
go build -o lotus-bench ./cmd/lotus-bench
|
$(GOCC) build -o lotus-bench ./cmd/lotus-bench
|
||||||
.PHONY: lotus-bench
|
.PHONY: lotus-bench
|
||||||
BINS+=lotus-bench
|
BINS+=lotus-bench
|
||||||
|
|
||||||
lotus-stats:
|
lotus-stats:
|
||||||
rm -f lotus-stats
|
rm -f lotus-stats
|
||||||
go build $(GOFLAGS) -o lotus-stats ./cmd/lotus-stats
|
$(GOCC) build $(GOFLAGS) -o lotus-stats ./cmd/lotus-stats
|
||||||
.PHONY: lotus-stats
|
.PHONY: lotus-stats
|
||||||
BINS+=lotus-stats
|
BINS+=lotus-stats
|
||||||
|
|
||||||
lotus-pcr:
|
lotus-pcr:
|
||||||
rm -f lotus-pcr
|
rm -f lotus-pcr
|
||||||
go build $(GOFLAGS) -o lotus-pcr ./cmd/lotus-pcr
|
$(GOCC) build $(GOFLAGS) -o lotus-pcr ./cmd/lotus-pcr
|
||||||
.PHONY: lotus-pcr
|
.PHONY: lotus-pcr
|
||||||
BINS+=lotus-pcr
|
BINS+=lotus-pcr
|
||||||
|
|
||||||
lotus-health:
|
lotus-health:
|
||||||
rm -f lotus-health
|
rm -f lotus-health
|
||||||
go build -o lotus-health ./cmd/lotus-health
|
$(GOCC) build -o lotus-health ./cmd/lotus-health
|
||||||
.PHONY: lotus-health
|
.PHONY: lotus-health
|
||||||
BINS+=lotus-health
|
BINS+=lotus-health
|
||||||
|
|
||||||
lotus-wallet:
|
lotus-wallet:
|
||||||
rm -f lotus-wallet
|
rm -f lotus-wallet
|
||||||
go build -o lotus-wallet ./cmd/lotus-wallet
|
$(GOCC) build -o lotus-wallet ./cmd/lotus-wallet
|
||||||
.PHONY: lotus-wallet
|
.PHONY: lotus-wallet
|
||||||
BINS+=lotus-wallet
|
BINS+=lotus-wallet
|
||||||
|
|
||||||
lotus-keygen:
|
lotus-keygen:
|
||||||
rm -f lotus-keygen
|
rm -f lotus-keygen
|
||||||
go build -o lotus-keygen ./cmd/lotus-keygen
|
$(GOCC) build -o lotus-keygen ./cmd/lotus-keygen
|
||||||
.PHONY: lotus-keygen
|
.PHONY: lotus-keygen
|
||||||
BINS+=lotus-keygen
|
BINS+=lotus-keygen
|
||||||
|
|
||||||
testground:
|
testground:
|
||||||
go build -tags testground -o /dev/null ./cmd/lotus
|
$(GOCC) build -tags testground -o /dev/null ./cmd/lotus
|
||||||
.PHONY: testground
|
.PHONY: testground
|
||||||
BINS+=testground
|
BINS+=testground
|
||||||
|
|
||||||
|
|
||||||
tvx:
|
tvx:
|
||||||
rm -f tvx
|
rm -f tvx
|
||||||
go build -o tvx ./cmd/tvx
|
$(GOCC) build -o tvx ./cmd/tvx
|
||||||
.PHONY: tvx
|
.PHONY: tvx
|
||||||
BINS+=tvx
|
BINS+=tvx
|
||||||
|
|
||||||
install-chainwatch: lotus-chainwatch
|
|
||||||
install -C ./lotus-chainwatch /usr/local/bin/lotus-chainwatch
|
|
||||||
|
|
||||||
lotus-sim: $(BUILD_DEPS)
|
lotus-sim: $(BUILD_DEPS)
|
||||||
rm -f lotus-sim
|
rm -f lotus-sim
|
||||||
go build $(GOFLAGS) -o lotus-sim ./cmd/lotus-sim
|
$(GOCC) build $(GOFLAGS) -o lotus-sim ./cmd/lotus-sim
|
||||||
.PHONY: lotus-sim
|
.PHONY: lotus-sim
|
||||||
BINS+=lotus-sim
|
BINS+=lotus-sim
|
||||||
|
|
||||||
@@ -261,21 +239,13 @@ install-miner-service: install-miner install-daemon-service
|
|||||||
@echo
|
@echo
|
||||||
@echo "lotus-miner service installed. Don't forget to run 'sudo systemctl start lotus-miner' to start it and 'sudo systemctl enable lotus-miner' for it to be enabled on startup."
|
@echo "lotus-miner service installed. Don't forget to run 'sudo systemctl start lotus-miner' to start it and 'sudo systemctl enable lotus-miner' for it to be enabled on startup."
|
||||||
|
|
||||||
install-chainwatch-service: install-chainwatch install-daemon-service
|
|
||||||
mkdir -p /etc/systemd/system
|
|
||||||
mkdir -p /var/log/lotus
|
|
||||||
install -C -m 0644 ./scripts/lotus-chainwatch.service /etc/systemd/system/lotus-chainwatch.service
|
|
||||||
systemctl daemon-reload
|
|
||||||
@echo
|
|
||||||
@echo "chainwatch service installed. Don't forget to run 'sudo systemctl start lotus-chainwatch' to start it and 'sudo systemctl enable lotus-chainwatch' for it to be enabled on startup."
|
|
||||||
|
|
||||||
install-main-services: install-miner-service
|
install-main-services: install-miner-service
|
||||||
|
|
||||||
install-all-services: install-main-services install-chainwatch-service
|
install-all-services: install-main-services
|
||||||
|
|
||||||
install-services: install-main-services
|
install-services: install-main-services
|
||||||
|
|
||||||
clean-daemon-service: clean-miner-service clean-chainwatch-service
|
clean-daemon-service: clean-miner-service
|
||||||
-systemctl stop lotus-daemon
|
-systemctl stop lotus-daemon
|
||||||
-systemctl disable lotus-daemon
|
-systemctl disable lotus-daemon
|
||||||
rm -f /etc/systemd/system/lotus-daemon.service
|
rm -f /etc/systemd/system/lotus-daemon.service
|
||||||
@@ -287,12 +257,6 @@ clean-miner-service:
|
|||||||
rm -f /etc/systemd/system/lotus-miner.service
|
rm -f /etc/systemd/system/lotus-miner.service
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|
||||||
clean-chainwatch-service:
|
|
||||||
-systemctl stop lotus-chainwatch
|
|
||||||
-systemctl disable lotus-chainwatch
|
|
||||||
rm -f /etc/systemd/system/lotus-chainwatch.service
|
|
||||||
systemctl daemon-reload
|
|
||||||
|
|
||||||
clean-main-services: clean-daemon-service
|
clean-main-services: clean-daemon-service
|
||||||
|
|
||||||
clean-all-services: clean-main-services
|
clean-all-services: clean-main-services
|
||||||
@@ -319,25 +283,26 @@ dist-clean:
|
|||||||
.PHONY: dist-clean
|
.PHONY: dist-clean
|
||||||
|
|
||||||
type-gen: api-gen
|
type-gen: api-gen
|
||||||
go run ./gen/main.go
|
$(GOCC) run ./gen/main.go
|
||||||
go generate -x ./...
|
$(GOCC) generate -x ./...
|
||||||
goimports -w api/
|
goimports -w api/
|
||||||
|
|
||||||
method-gen: api-gen
|
method-gen: api-gen
|
||||||
(cd ./lotuspond/front/src/chain && go run ./methodgen.go)
|
(cd ./lotuspond/front/src/chain && $(GOCC) run ./methodgen.go)
|
||||||
|
|
||||||
actors-gen:
|
actors-gen:
|
||||||
go run ./chain/actors/agen
|
$(GOCC) run ./gen/inline-gen . gen/inlinegen-data.json
|
||||||
go fmt ./...
|
$(GOCC) run ./chain/actors/agen
|
||||||
|
$(GOCC) fmt ./...
|
||||||
|
|
||||||
api-gen:
|
api-gen:
|
||||||
go run ./gen/api
|
$(GOCC) run ./gen/api
|
||||||
goimports -w api
|
goimports -w api
|
||||||
goimports -w api
|
goimports -w api
|
||||||
.PHONY: api-gen
|
.PHONY: api-gen
|
||||||
|
|
||||||
cfgdoc-gen:
|
cfgdoc-gen:
|
||||||
go run ./node/config/cfgdocgen > ./node/config/doc_gen.go
|
$(GOCC) run ./node/config/cfgdocgen > ./node/config/doc_gen.go
|
||||||
|
|
||||||
appimage: lotus
|
appimage: lotus
|
||||||
rm -rf appimage-builder-cache || true
|
rm -rf appimage-builder-cache || true
|
||||||
@@ -351,9 +316,9 @@ appimage: lotus
|
|||||||
docsgen: docsgen-md docsgen-openrpc
|
docsgen: docsgen-md docsgen-openrpc
|
||||||
|
|
||||||
docsgen-md-bin: api-gen actors-gen
|
docsgen-md-bin: api-gen actors-gen
|
||||||
go build $(GOFLAGS) -o docgen-md ./api/docgen/cmd
|
$(GOCC) build $(GOFLAGS) -o docgen-md ./api/docgen/cmd
|
||||||
docsgen-openrpc-bin: api-gen actors-gen
|
docsgen-openrpc-bin: api-gen actors-gen
|
||||||
go build $(GOFLAGS) -o docgen-openrpc ./api/docgen-openrpc/cmd
|
$(GOCC) build $(GOFLAGS) -o docgen-openrpc ./api/docgen-openrpc/cmd
|
||||||
|
|
||||||
docsgen-md: docsgen-md-full docsgen-md-storage docsgen-md-worker
|
docsgen-md: docsgen-md-full docsgen-md-storage docsgen-md-worker
|
||||||
|
|
||||||
@@ -377,7 +342,7 @@ docsgen-openrpc-worker: docsgen-openrpc-bin
|
|||||||
.PHONY: docsgen docsgen-md-bin docsgen-openrpc-bin
|
.PHONY: docsgen docsgen-md-bin docsgen-openrpc-bin
|
||||||
|
|
||||||
gen: actors-gen type-gen method-gen cfgdoc-gen docsgen api-gen circleci
|
gen: actors-gen type-gen method-gen cfgdoc-gen docsgen api-gen circleci
|
||||||
@echo ">>> IF YOU'VE MODIFIED THE CLI, REMEMBER TO ALSO MAKE docsgen-cli"
|
@echo ">>> IF YOU'VE MODIFIED THE CLI OR CONFIG, REMEMBER TO ALSO MAKE docsgen-cli"
|
||||||
.PHONY: gen
|
.PHONY: gen
|
||||||
|
|
||||||
snap: lotus lotus-miner lotus-worker
|
snap: lotus lotus-miner lotus-worker
|
||||||
@@ -387,6 +352,8 @@ snap: lotus lotus-miner lotus-worker
|
|||||||
# separate from gen because it needs binaries
|
# separate from gen because it needs binaries
|
||||||
docsgen-cli: lotus lotus-miner lotus-worker
|
docsgen-cli: lotus lotus-miner lotus-worker
|
||||||
python ./scripts/generate-lotus-cli.py
|
python ./scripts/generate-lotus-cli.py
|
||||||
|
./lotus config default > documentation/en/default-lotus-config.toml
|
||||||
|
./lotus-miner config default > documentation/en/default-lotus-miner-config.toml
|
||||||
.PHONY: docsgen-cli
|
.PHONY: docsgen-cli
|
||||||
|
|
||||||
print-%:
|
print-%:
|
||||||
|
|||||||
@@ -123,7 +123,6 @@ Note: The default branch `master` is the dev branch where the latest new feature
|
|||||||
|
|
||||||
# Or to join a testnet or devnet:
|
# Or to join a testnet or devnet:
|
||||||
make clean calibnet # Calibration with min 32GiB sectors
|
make clean calibnet # Calibration with min 32GiB sectors
|
||||||
make clean nerpanet # Nerpa with min 512MiB sectors
|
|
||||||
|
|
||||||
sudo make install
|
sudo make install
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
apitypes "github.com/filecoin-project/lotus/api/types"
|
apitypes "github.com/filecoin-project/lotus/api/types"
|
||||||
|
"github.com/filecoin-project/lotus/journal/alerting"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
|
|
||||||
@@ -33,6 +34,10 @@ type Common interface {
|
|||||||
LogList(context.Context) ([]string, error) //perm:write
|
LogList(context.Context) ([]string, error) //perm:write
|
||||||
LogSetLevel(context.Context, string, string) error //perm:write
|
LogSetLevel(context.Context, string, string) error //perm:write
|
||||||
|
|
||||||
|
// LogAlerts returns list of all, active and inactive alerts tracked by the
|
||||||
|
// node
|
||||||
|
LogAlerts(ctx context.Context) ([]alerting.Alert, error) //perm:admin
|
||||||
|
|
||||||
// MethodGroup: Common
|
// MethodGroup: Common
|
||||||
|
|
||||||
// Version provides information about API provider
|
// Version provides information about API provider
|
||||||
|
|||||||
+51
-28
@@ -12,14 +12,14 @@ import (
|
|||||||
"github.com/filecoin-project/go-address"
|
"github.com/filecoin-project/go-address"
|
||||||
"github.com/filecoin-project/go-bitfield"
|
"github.com/filecoin-project/go-bitfield"
|
||||||
datatransfer "github.com/filecoin-project/go-data-transfer"
|
datatransfer "github.com/filecoin-project/go-data-transfer"
|
||||||
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
|
|
||||||
"github.com/filecoin-project/go-fil-markets/storagemarket"
|
|
||||||
"github.com/filecoin-project/go-multistore"
|
|
||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
"github.com/filecoin-project/go-state-types/big"
|
"github.com/filecoin-project/go-state-types/big"
|
||||||
"github.com/filecoin-project/go-state-types/crypto"
|
"github.com/filecoin-project/go-state-types/crypto"
|
||||||
"github.com/filecoin-project/go-state-types/dline"
|
"github.com/filecoin-project/go-state-types/dline"
|
||||||
|
|
||||||
|
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
|
||||||
|
"github.com/filecoin-project/go-fil-markets/storagemarket"
|
||||||
|
|
||||||
apitypes "github.com/filecoin-project/lotus/api/types"
|
apitypes "github.com/filecoin-project/lotus/api/types"
|
||||||
"github.com/filecoin-project/lotus/chain/actors/builtin"
|
"github.com/filecoin-project/lotus/chain/actors/builtin"
|
||||||
"github.com/filecoin-project/lotus/chain/actors/builtin/market"
|
"github.com/filecoin-project/lotus/chain/actors/builtin/market"
|
||||||
@@ -27,8 +27,8 @@ import (
|
|||||||
"github.com/filecoin-project/lotus/chain/actors/builtin/paych"
|
"github.com/filecoin-project/lotus/chain/actors/builtin/paych"
|
||||||
"github.com/filecoin-project/lotus/chain/actors/builtin/power"
|
"github.com/filecoin-project/lotus/chain/actors/builtin/power"
|
||||||
"github.com/filecoin-project/lotus/chain/types"
|
"github.com/filecoin-project/lotus/chain/types"
|
||||||
marketevents "github.com/filecoin-project/lotus/markets/loggers"
|
|
||||||
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
||||||
|
"github.com/filecoin-project/lotus/node/repo/imports"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:generate go run github.com/golang/mock/mockgen -destination=mocks/mock_full.go -package=mocks . FullNode
|
//go:generate go run github.com/golang/mock/mockgen -destination=mocks/mock_full.go -package=mocks . FullNode
|
||||||
@@ -71,12 +71,6 @@ type FullNode interface {
|
|||||||
// ChainHead returns the current head of the chain.
|
// ChainHead returns the current head of the chain.
|
||||||
ChainHead(context.Context) (*types.TipSet, error) //perm:read
|
ChainHead(context.Context) (*types.TipSet, error) //perm:read
|
||||||
|
|
||||||
// ChainGetRandomnessFromTickets is used to sample the chain for randomness.
|
|
||||||
ChainGetRandomnessFromTickets(ctx context.Context, tsk types.TipSetKey, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) (abi.Randomness, error) //perm:read
|
|
||||||
|
|
||||||
// ChainGetRandomnessFromBeacon is used to sample the beacon for randomness.
|
|
||||||
ChainGetRandomnessFromBeacon(ctx context.Context, tsk types.TipSetKey, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) (abi.Randomness, error) //perm:read
|
|
||||||
|
|
||||||
// ChainGetBlock returns the block specified by the given CID.
|
// ChainGetBlock returns the block specified by the given CID.
|
||||||
ChainGetBlock(context.Context, cid.Cid) (*types.BlockHeader, error) //perm:read
|
ChainGetBlock(context.Context, cid.Cid) (*types.BlockHeader, error) //perm:read
|
||||||
// ChainGetTipSet returns the tipset specified by the given TipSetKey.
|
// ChainGetTipSet returns the tipset specified by the given TipSetKey.
|
||||||
@@ -113,6 +107,11 @@ type FullNode interface {
|
|||||||
// will be returned.
|
// will be returned.
|
||||||
ChainGetTipSetByHeight(context.Context, abi.ChainEpoch, types.TipSetKey) (*types.TipSet, error) //perm:read
|
ChainGetTipSetByHeight(context.Context, abi.ChainEpoch, types.TipSetKey) (*types.TipSet, error) //perm:read
|
||||||
|
|
||||||
|
// ChainGetTipSetAfterHeight looks back for a tipset at the specified epoch.
|
||||||
|
// If there are no blocks at the specified epoch, the first non-nil tipset at a later epoch
|
||||||
|
// will be returned.
|
||||||
|
ChainGetTipSetAfterHeight(context.Context, abi.ChainEpoch, types.TipSetKey) (*types.TipSet, error) //perm:read
|
||||||
|
|
||||||
// ChainReadObj reads ipld nodes referenced by the specified CID from chain
|
// ChainReadObj reads ipld nodes referenced by the specified CID from chain
|
||||||
// blockstore and returns raw bytes.
|
// blockstore and returns raw bytes.
|
||||||
ChainReadObj(context.Context, cid.Cid) ([]byte, error) //perm:read
|
ChainReadObj(context.Context, cid.Cid) ([]byte, error) //perm:read
|
||||||
@@ -290,7 +289,7 @@ type FullNode interface {
|
|||||||
|
|
||||||
// // UX ?
|
// // UX ?
|
||||||
|
|
||||||
// MethodGroup: Wallet
|
// MethodGroup: WalletF
|
||||||
|
|
||||||
// WalletNew creates a new address in the wallet with the given sigType.
|
// WalletNew creates a new address in the wallet with the given sigType.
|
||||||
// Available key types: bls, secp256k1, secp256k1-ledger
|
// Available key types: bls, secp256k1, secp256k1-ledger
|
||||||
@@ -331,7 +330,7 @@ type FullNode interface {
|
|||||||
// ClientImport imports file under the specified path into filestore.
|
// ClientImport imports file under the specified path into filestore.
|
||||||
ClientImport(ctx context.Context, ref FileRef) (*ImportRes, error) //perm:admin
|
ClientImport(ctx context.Context, ref FileRef) (*ImportRes, error) //perm:admin
|
||||||
// ClientRemoveImport removes file import
|
// ClientRemoveImport removes file import
|
||||||
ClientRemoveImport(ctx context.Context, importID multistore.StoreID) error //perm:admin
|
ClientRemoveImport(ctx context.Context, importID imports.ID) error //perm:admin
|
||||||
// ClientStartDeal proposes a deal with a miner.
|
// ClientStartDeal proposes a deal with a miner.
|
||||||
ClientStartDeal(ctx context.Context, params *StartDealParams) (*cid.Cid, error) //perm:admin
|
ClientStartDeal(ctx context.Context, params *StartDealParams) (*cid.Cid, error) //perm:admin
|
||||||
// ClientStatelessDeal fire-and-forget-proposes an offline deal to a miner without subsequent tracking.
|
// ClientStatelessDeal fire-and-forget-proposes an offline deal to a miner without subsequent tracking.
|
||||||
@@ -351,10 +350,11 @@ type FullNode interface {
|
|||||||
// ClientMinerQueryOffer returns a QueryOffer for the specific miner and file.
|
// ClientMinerQueryOffer returns a QueryOffer for the specific miner and file.
|
||||||
ClientMinerQueryOffer(ctx context.Context, miner address.Address, root cid.Cid, piece *cid.Cid) (QueryOffer, error) //perm:read
|
ClientMinerQueryOffer(ctx context.Context, miner address.Address, root cid.Cid, piece *cid.Cid) (QueryOffer, error) //perm:read
|
||||||
// ClientRetrieve initiates the retrieval of a file, as specified in the order.
|
// ClientRetrieve initiates the retrieval of a file, as specified in the order.
|
||||||
ClientRetrieve(ctx context.Context, order RetrievalOrder, ref *FileRef) error //perm:admin
|
ClientRetrieve(ctx context.Context, params RetrievalOrder) (*RestrievalRes, error) //perm:admin
|
||||||
// ClientRetrieveWithEvents initiates the retrieval of a file, as specified in the order, and provides a channel
|
// ClientRetrieveWait waits for retrieval to be complete
|
||||||
// of status updates.
|
ClientRetrieveWait(ctx context.Context, deal retrievalmarket.DealID) error //perm:admin
|
||||||
ClientRetrieveWithEvents(ctx context.Context, order RetrievalOrder, ref *FileRef) (<-chan marketevents.RetrievalEvent, error) //perm:admin
|
// ClientExport exports a file stored in the local filestore to a system file
|
||||||
|
ClientExport(ctx context.Context, exportRef ExportRef, fileRef FileRef) error //perm:admin
|
||||||
// ClientListRetrievals returns information about retrievals made by the local client
|
// ClientListRetrievals returns information about retrievals made by the local client
|
||||||
ClientListRetrievals(ctx context.Context) ([]RetrievalInfo, error) //perm:write
|
ClientListRetrievals(ctx context.Context) ([]RetrievalInfo, error) //perm:write
|
||||||
// ClientGetRetrievalUpdates returns status of updated retrieval deals
|
// ClientGetRetrievalUpdates returns status of updated retrieval deals
|
||||||
@@ -428,6 +428,8 @@ type FullNode interface {
|
|||||||
StateListMessages(ctx context.Context, match *MessageMatch, tsk types.TipSetKey, toht abi.ChainEpoch) ([]cid.Cid, error) //perm:read
|
StateListMessages(ctx context.Context, match *MessageMatch, tsk types.TipSetKey, toht abi.ChainEpoch) ([]cid.Cid, error) //perm:read
|
||||||
// StateDecodeParams attempts to decode the provided params, based on the recipient actor address and method number.
|
// StateDecodeParams attempts to decode the provided params, based on the recipient actor address and method number.
|
||||||
StateDecodeParams(ctx context.Context, toAddr address.Address, method abi.MethodNum, params []byte, tsk types.TipSetKey) (interface{}, error) //perm:read
|
StateDecodeParams(ctx context.Context, toAddr address.Address, method abi.MethodNum, params []byte, tsk types.TipSetKey) (interface{}, error) //perm:read
|
||||||
|
// StateEncodeParams attempts to encode the provided json params to the binary from
|
||||||
|
StateEncodeParams(ctx context.Context, toActCode cid.Cid, method abi.MethodNum, params json.RawMessage) ([]byte, error) //perm:read
|
||||||
|
|
||||||
// StateNetworkName returns the name of the network the node is synced to
|
// StateNetworkName returns the name of the network the node is synced to
|
||||||
StateNetworkName(context.Context) (dtypes.NetworkName, error) //perm:read
|
StateNetworkName(context.Context) (dtypes.NetworkName, error) //perm:read
|
||||||
@@ -583,6 +585,11 @@ type FullNode interface {
|
|||||||
// StateNetworkVersion returns the network version at the given tipset
|
// StateNetworkVersion returns the network version at the given tipset
|
||||||
StateNetworkVersion(context.Context, types.TipSetKey) (apitypes.NetworkVersion, error) //perm:read
|
StateNetworkVersion(context.Context, types.TipSetKey) (apitypes.NetworkVersion, error) //perm:read
|
||||||
|
|
||||||
|
// StateGetRandomnessFromTickets is used to sample the chain for randomness.
|
||||||
|
StateGetRandomnessFromTickets(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) //perm:read
|
||||||
|
// StateGetRandomnessFromBeacon is used to sample the beacon for randomness.
|
||||||
|
StateGetRandomnessFromBeacon(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) //perm:read
|
||||||
|
|
||||||
// MethodGroup: Msig
|
// MethodGroup: Msig
|
||||||
// The Msig methods are used to interact with multisig wallets on the
|
// The Msig methods are used to interact with multisig wallets on the
|
||||||
// filecoin network
|
// filecoin network
|
||||||
@@ -622,10 +629,14 @@ type FullNode interface {
|
|||||||
// <sender address of the approve msg>, <method to call in the proposed message>, <params to include in the proposed message>
|
// <sender address of the approve msg>, <method to call in the proposed message>, <params to include in the proposed message>
|
||||||
MsigApproveTxnHash(context.Context, address.Address, uint64, address.Address, address.Address, types.BigInt, address.Address, uint64, []byte) (*MessagePrototype, error) //perm:sign
|
MsigApproveTxnHash(context.Context, address.Address, uint64, address.Address, address.Address, types.BigInt, address.Address, uint64, []byte) (*MessagePrototype, error) //perm:sign
|
||||||
|
|
||||||
|
// MsigCancel cancels a previously-proposed multisig message
|
||||||
|
// It takes the following params: <multisig address>, <proposed transaction ID> <signer address>
|
||||||
|
MsigCancel(context.Context, address.Address, uint64, address.Address) (*MessagePrototype, error) //perm:sign
|
||||||
|
|
||||||
// MsigCancel cancels a previously-proposed multisig message
|
// MsigCancel cancels a previously-proposed multisig message
|
||||||
// It takes the following params: <multisig address>, <proposed transaction ID>, <recipient address>, <value to transfer>,
|
// It takes the following params: <multisig address>, <proposed transaction ID>, <recipient address>, <value to transfer>,
|
||||||
// <sender address of the cancel msg>, <method to call in the proposed message>, <params to include in the proposed message>
|
// <sender address of the cancel msg>, <method to call in the proposed message>, <params to include in the proposed message>
|
||||||
MsigCancel(context.Context, address.Address, uint64, address.Address, types.BigInt, address.Address, uint64, []byte) (*MessagePrototype, error) //perm:sign
|
MsigCancelTxnHash(context.Context, address.Address, uint64, address.Address, types.BigInt, address.Address, uint64, []byte) (*MessagePrototype, error) //perm:sign
|
||||||
|
|
||||||
// MsigAddPropose proposes adding a signer in the multisig
|
// MsigAddPropose proposes adding a signer in the multisig
|
||||||
// It takes the following params: <multisig address>, <sender address of the propose msg>,
|
// It takes the following params: <multisig address>, <sender address of the propose msg>,
|
||||||
@@ -723,16 +734,28 @@ type MinerSectors struct {
|
|||||||
|
|
||||||
type ImportRes struct {
|
type ImportRes struct {
|
||||||
Root cid.Cid
|
Root cid.Cid
|
||||||
ImportID multistore.StoreID
|
ImportID imports.ID
|
||||||
}
|
}
|
||||||
|
|
||||||
type Import struct {
|
type Import struct {
|
||||||
Key multistore.StoreID
|
Key imports.ID
|
||||||
Err string
|
Err string
|
||||||
|
|
||||||
Root *cid.Cid
|
Root *cid.Cid
|
||||||
Source string
|
|
||||||
|
// Source is the provenance of the import, e.g. "import", "unknown", else.
|
||||||
|
// Currently useless but may be used in the future.
|
||||||
|
Source string
|
||||||
|
|
||||||
|
// FilePath is the path of the original file. It is important that the file
|
||||||
|
// is retained at this path, because it will be referenced during
|
||||||
|
// the transfer (when we do the UnixFS chunking, we don't duplicate the
|
||||||
|
// leaves, but rather point to chunks of the original data through
|
||||||
|
// positional references).
|
||||||
FilePath string
|
FilePath string
|
||||||
|
|
||||||
|
// CARPath is the path of the CAR file containing the DAG for this import.
|
||||||
|
CARPath string
|
||||||
}
|
}
|
||||||
|
|
||||||
type DealInfo struct {
|
type DealInfo struct {
|
||||||
@@ -910,14 +933,14 @@ type MarketDeal struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type RetrievalOrder struct {
|
type RetrievalOrder struct {
|
||||||
// TODO: make this less unixfs specific
|
Root cid.Cid
|
||||||
Root cid.Cid
|
Piece *cid.Cid
|
||||||
Piece *cid.Cid
|
DataSelector *Selector
|
||||||
|
|
||||||
|
// todo: Size/Total are only used for calculating price per byte; we should let users just pass that
|
||||||
Size uint64
|
Size uint64
|
||||||
|
Total types.BigInt
|
||||||
|
|
||||||
LocalStore *multistore.StoreID // if specified, get data from local store
|
|
||||||
// TODO: support offset
|
|
||||||
Total types.BigInt
|
|
||||||
UnsealPrice types.BigInt
|
UnsealPrice types.BigInt
|
||||||
PaymentInterval uint64
|
PaymentInterval uint64
|
||||||
PaymentIntervalIncrease uint64
|
PaymentIntervalIncrease uint64
|
||||||
@@ -1060,7 +1083,7 @@ type CirculatingSupply struct {
|
|||||||
type MiningBaseInfo struct {
|
type MiningBaseInfo struct {
|
||||||
MinerPower types.BigInt
|
MinerPower types.BigInt
|
||||||
NetworkPower types.BigInt
|
NetworkPower types.BigInt
|
||||||
Sectors []builtin.SectorInfo
|
Sectors []builtin.ExtendedSectorInfo
|
||||||
WorkerKey address.Address
|
WorkerKey address.Address
|
||||||
SectorSize abi.SectorSize
|
SectorSize abi.SectorSize
|
||||||
PrevBeaconEntry types.BeaconEntry
|
PrevBeaconEntry types.BeaconEntry
|
||||||
|
|||||||
@@ -31,12 +31,17 @@ import (
|
|||||||
type Gateway interface {
|
type Gateway interface {
|
||||||
ChainHasObj(context.Context, cid.Cid) (bool, error)
|
ChainHasObj(context.Context, cid.Cid) (bool, error)
|
||||||
ChainHead(ctx context.Context) (*types.TipSet, error)
|
ChainHead(ctx context.Context) (*types.TipSet, error)
|
||||||
|
ChainGetParentMessages(context.Context, cid.Cid) ([]Message, error)
|
||||||
|
ChainGetParentReceipts(context.Context, cid.Cid) ([]*types.MessageReceipt, error)
|
||||||
ChainGetBlockMessages(context.Context, cid.Cid) (*BlockMessages, error)
|
ChainGetBlockMessages(context.Context, cid.Cid) (*BlockMessages, error)
|
||||||
ChainGetMessage(ctx context.Context, mc cid.Cid) (*types.Message, error)
|
ChainGetMessage(ctx context.Context, mc cid.Cid) (*types.Message, error)
|
||||||
|
ChainGetPath(ctx context.Context, from, to types.TipSetKey) ([]*HeadChange, error)
|
||||||
ChainGetTipSet(ctx context.Context, tsk types.TipSetKey) (*types.TipSet, error)
|
ChainGetTipSet(ctx context.Context, tsk types.TipSetKey) (*types.TipSet, error)
|
||||||
ChainGetTipSetByHeight(ctx context.Context, h abi.ChainEpoch, tsk types.TipSetKey) (*types.TipSet, error)
|
ChainGetTipSetByHeight(ctx context.Context, h abi.ChainEpoch, tsk types.TipSetKey) (*types.TipSet, error)
|
||||||
|
ChainGetTipSetAfterHeight(ctx context.Context, h abi.ChainEpoch, tsk types.TipSetKey) (*types.TipSet, error)
|
||||||
ChainNotify(context.Context) (<-chan []*HeadChange, error)
|
ChainNotify(context.Context) (<-chan []*HeadChange, error)
|
||||||
ChainReadObj(context.Context, cid.Cid) ([]byte, error)
|
ChainReadObj(context.Context, cid.Cid) ([]byte, error)
|
||||||
|
ChainGetGenesis(context.Context) (*types.TipSet, error)
|
||||||
GasEstimateMessageGas(ctx context.Context, msg *types.Message, spec *MessageSendSpec, tsk types.TipSetKey) (*types.Message, error)
|
GasEstimateMessageGas(ctx context.Context, msg *types.Message, spec *MessageSendSpec, tsk types.TipSetKey) (*types.Message, error)
|
||||||
MpoolPush(ctx context.Context, sm *types.SignedMessage) (cid.Cid, error)
|
MpoolPush(ctx context.Context, sm *types.SignedMessage) (cid.Cid, error)
|
||||||
MsigGetAvailableBalance(ctx context.Context, addr address.Address, tsk types.TipSetKey) (types.BigInt, error)
|
MsigGetAvailableBalance(ctx context.Context, addr address.Address, tsk types.TipSetKey) (types.BigInt, error)
|
||||||
|
|||||||
+112
-18
@@ -13,12 +13,14 @@ import (
|
|||||||
|
|
||||||
"github.com/filecoin-project/go-address"
|
"github.com/filecoin-project/go-address"
|
||||||
datatransfer "github.com/filecoin-project/go-data-transfer"
|
datatransfer "github.com/filecoin-project/go-data-transfer"
|
||||||
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
|
abinetwork "github.com/filecoin-project/go-state-types/network"
|
||||||
|
"github.com/filecoin-project/specs-actors/v2/actors/builtin/market"
|
||||||
|
"github.com/filecoin-project/specs-storage/storage"
|
||||||
|
|
||||||
"github.com/filecoin-project/go-fil-markets/piecestore"
|
"github.com/filecoin-project/go-fil-markets/piecestore"
|
||||||
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
|
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
|
||||||
"github.com/filecoin-project/go-fil-markets/storagemarket"
|
"github.com/filecoin-project/go-fil-markets/storagemarket"
|
||||||
"github.com/filecoin-project/go-state-types/abi"
|
|
||||||
"github.com/filecoin-project/specs-actors/v2/actors/builtin/market"
|
|
||||||
"github.com/filecoin-project/specs-storage/storage"
|
|
||||||
|
|
||||||
"github.com/filecoin-project/lotus/chain/types"
|
"github.com/filecoin-project/lotus/chain/types"
|
||||||
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
|
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
|
||||||
@@ -98,8 +100,8 @@ type StorageMiner interface {
|
|||||||
// Returns null if message wasn't sent
|
// Returns null if message wasn't sent
|
||||||
SectorTerminateFlush(ctx context.Context) (*cid.Cid, error) //perm:admin
|
SectorTerminateFlush(ctx context.Context) (*cid.Cid, error) //perm:admin
|
||||||
// SectorTerminatePending returns a list of pending sector terminations to be sent in the next batch message
|
// SectorTerminatePending returns a list of pending sector terminations to be sent in the next batch message
|
||||||
SectorTerminatePending(ctx context.Context) ([]abi.SectorID, error) //perm:admin
|
SectorTerminatePending(ctx context.Context) ([]abi.SectorID, error) //perm:admin
|
||||||
SectorMarkForUpgrade(ctx context.Context, id abi.SectorNumber) error //perm:admin
|
SectorMarkForUpgrade(ctx context.Context, id abi.SectorNumber, snap bool) error //perm:admin
|
||||||
// SectorPreCommitFlush immediately sends a PreCommit message with sectors batched for PreCommit.
|
// SectorPreCommitFlush immediately sends a PreCommit message with sectors batched for PreCommit.
|
||||||
// Returns null if message wasn't sent
|
// Returns null if message wasn't sent
|
||||||
SectorPreCommitFlush(ctx context.Context) ([]sealiface.PreCommitBatchRes, error) //perm:admin
|
SectorPreCommitFlush(ctx context.Context) ([]sealiface.PreCommitBatchRes, error) //perm:admin
|
||||||
@@ -110,6 +112,9 @@ type StorageMiner interface {
|
|||||||
SectorCommitFlush(ctx context.Context) ([]sealiface.CommitBatchRes, error) //perm:admin
|
SectorCommitFlush(ctx context.Context) ([]sealiface.CommitBatchRes, error) //perm:admin
|
||||||
// SectorCommitPending returns a list of pending Commit sectors to be sent in the next aggregate message
|
// SectorCommitPending returns a list of pending Commit sectors to be sent in the next aggregate message
|
||||||
SectorCommitPending(ctx context.Context) ([]abi.SectorID, error) //perm:admin
|
SectorCommitPending(ctx context.Context) ([]abi.SectorID, error) //perm:admin
|
||||||
|
SectorMatchPendingPiecesToOpenSectors(ctx context.Context) error //perm:admin
|
||||||
|
// SectorAbortUpgrade can be called on sectors that are in the process of being upgraded to abort it
|
||||||
|
SectorAbortUpgrade(context.Context, abi.SectorNumber) error //perm:admin
|
||||||
|
|
||||||
// WorkerConnect tells the node to connect to workers RPC
|
// WorkerConnect tells the node to connect to workers RPC
|
||||||
WorkerConnect(context.Context, string) error //perm:admin retry:true
|
WorkerConnect(context.Context, string) error //perm:admin retry:true
|
||||||
@@ -117,17 +122,22 @@ type StorageMiner interface {
|
|||||||
WorkerJobs(context.Context) (map[uuid.UUID][]storiface.WorkerJob, error) //perm:admin
|
WorkerJobs(context.Context) (map[uuid.UUID][]storiface.WorkerJob, error) //perm:admin
|
||||||
|
|
||||||
//storiface.WorkerReturn
|
//storiface.WorkerReturn
|
||||||
ReturnAddPiece(ctx context.Context, callID storiface.CallID, pi abi.PieceInfo, err *storiface.CallError) error //perm:admin retry:true
|
ReturnAddPiece(ctx context.Context, callID storiface.CallID, pi abi.PieceInfo, err *storiface.CallError) error //perm:admin retry:true
|
||||||
ReturnSealPreCommit1(ctx context.Context, callID storiface.CallID, p1o storage.PreCommit1Out, err *storiface.CallError) error //perm:admin retry:true
|
ReturnSealPreCommit1(ctx context.Context, callID storiface.CallID, p1o storage.PreCommit1Out, err *storiface.CallError) error //perm:admin retry:true
|
||||||
ReturnSealPreCommit2(ctx context.Context, callID storiface.CallID, sealed storage.SectorCids, err *storiface.CallError) error //perm:admin retry:true
|
ReturnSealPreCommit2(ctx context.Context, callID storiface.CallID, sealed storage.SectorCids, err *storiface.CallError) error //perm:admin retry:true
|
||||||
ReturnSealCommit1(ctx context.Context, callID storiface.CallID, out storage.Commit1Out, err *storiface.CallError) error //perm:admin retry:true
|
ReturnSealCommit1(ctx context.Context, callID storiface.CallID, out storage.Commit1Out, err *storiface.CallError) error //perm:admin retry:true
|
||||||
ReturnSealCommit2(ctx context.Context, callID storiface.CallID, proof storage.Proof, err *storiface.CallError) error //perm:admin retry:true
|
ReturnSealCommit2(ctx context.Context, callID storiface.CallID, proof storage.Proof, err *storiface.CallError) error //perm:admin retry:true
|
||||||
ReturnFinalizeSector(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
|
ReturnFinalizeSector(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
|
||||||
ReturnReleaseUnsealed(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
|
ReturnReplicaUpdate(ctx context.Context, callID storiface.CallID, out storage.ReplicaUpdateOut, err *storiface.CallError) error //perm:admin retry:true
|
||||||
ReturnMoveStorage(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
|
ReturnProveReplicaUpdate1(ctx context.Context, callID storiface.CallID, vanillaProofs storage.ReplicaVanillaProofs, err *storiface.CallError) error //perm:admin retry:true
|
||||||
ReturnUnsealPiece(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
|
ReturnProveReplicaUpdate2(ctx context.Context, callID storiface.CallID, proof storage.ReplicaUpdateProof, err *storiface.CallError) error //perm:admin retry:true
|
||||||
ReturnReadPiece(ctx context.Context, callID storiface.CallID, ok bool, err *storiface.CallError) error //perm:admin retry:true
|
ReturnGenerateSectorKeyFromData(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
|
||||||
ReturnFetch(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
|
ReturnFinalizeReplicaUpdate(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
|
||||||
|
ReturnReleaseUnsealed(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
|
||||||
|
ReturnMoveStorage(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
|
||||||
|
ReturnUnsealPiece(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
|
||||||
|
ReturnReadPiece(ctx context.Context, callID storiface.CallID, ok bool, err *storiface.CallError) error //perm:admin retry:true
|
||||||
|
ReturnFetch(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
|
||||||
|
|
||||||
// SealingSchedDiag dumps internal sealing scheduler state
|
// SealingSchedDiag dumps internal sealing scheduler state
|
||||||
SealingSchedDiag(ctx context.Context, doSched bool) (interface{}, error) //perm:admin
|
SealingSchedDiag(ctx context.Context, doSched bool) (interface{}, error) //perm:admin
|
||||||
@@ -165,6 +175,53 @@ type StorageMiner interface {
|
|||||||
MarketCancelDataTransfer(ctx context.Context, transferID datatransfer.TransferID, otherPeer peer.ID, isInitiator bool) error //perm:write
|
MarketCancelDataTransfer(ctx context.Context, transferID datatransfer.TransferID, otherPeer peer.ID, isInitiator bool) error //perm:write
|
||||||
MarketPendingDeals(ctx context.Context) (PendingDealInfo, error) //perm:write
|
MarketPendingDeals(ctx context.Context) (PendingDealInfo, error) //perm:write
|
||||||
MarketPublishPendingDeals(ctx context.Context) error //perm:admin
|
MarketPublishPendingDeals(ctx context.Context) error //perm:admin
|
||||||
|
MarketRetryPublishDeal(ctx context.Context, propcid cid.Cid) error //perm:admin
|
||||||
|
|
||||||
|
// DagstoreListShards returns information about all shards known to the
|
||||||
|
// DAG store. Only available on nodes running the markets subsystem.
|
||||||
|
DagstoreListShards(ctx context.Context) ([]DagstoreShardInfo, error) //perm:read
|
||||||
|
|
||||||
|
// DagstoreInitializeShard initializes an uninitialized shard.
|
||||||
|
//
|
||||||
|
// Initialization consists of fetching the shard's data (deal payload) from
|
||||||
|
// the storage subsystem, generating an index, and persisting the index
|
||||||
|
// to facilitate later retrievals, and/or to publish to external sources.
|
||||||
|
//
|
||||||
|
// This operation is intended to complement the initial migration. The
|
||||||
|
// migration registers a shard for every unique piece CID, with lazy
|
||||||
|
// initialization. Thus, shards are not initialized immediately to avoid
|
||||||
|
// IO activity competing with proving. Instead, shard are initialized
|
||||||
|
// when first accessed. This method forces the initialization of a shard by
|
||||||
|
// accessing it and immediately releasing it. This is useful to warm up the
|
||||||
|
// cache to facilitate subsequent retrievals, and to generate the indexes
|
||||||
|
// to publish them externally.
|
||||||
|
//
|
||||||
|
// This operation fails if the shard is not in ShardStateNew state.
|
||||||
|
// It blocks until initialization finishes.
|
||||||
|
DagstoreInitializeShard(ctx context.Context, key string) error //perm:write
|
||||||
|
|
||||||
|
// DagstoreRecoverShard attempts to recover a failed shard.
|
||||||
|
//
|
||||||
|
// This operation fails if the shard is not in ShardStateErrored state.
|
||||||
|
// It blocks until recovery finishes. If recovery failed, it returns the
|
||||||
|
// error.
|
||||||
|
DagstoreRecoverShard(ctx context.Context, key string) error //perm:write
|
||||||
|
|
||||||
|
// DagstoreInitializeAll initializes all uninitialized shards in bulk,
|
||||||
|
// according to the policy passed in the parameters.
|
||||||
|
//
|
||||||
|
// It is recommended to set a maximum concurrency to avoid extreme
|
||||||
|
// IO pressure if the storage subsystem has a large amount of deals.
|
||||||
|
//
|
||||||
|
// It returns a stream of events to report progress.
|
||||||
|
DagstoreInitializeAll(ctx context.Context, params DagstoreInitializeAllParams) (<-chan DagstoreInitializeAllEvent, error) //perm:write
|
||||||
|
|
||||||
|
// DagstoreGC runs garbage collection on the DAG store.
|
||||||
|
DagstoreGC(ctx context.Context) ([]DagstoreShardResult, error) //perm:admin
|
||||||
|
|
||||||
|
// RuntimeSubsystems returns the subsystems that are enabled
|
||||||
|
// in this instance.
|
||||||
|
RuntimeSubsystems(ctx context.Context) (MinerSubsystems, error) //perm:read
|
||||||
|
|
||||||
DealsImportData(ctx context.Context, dealPropCid cid.Cid, file string) error //perm:admin
|
DealsImportData(ctx context.Context, dealPropCid cid.Cid, file string) error //perm:admin
|
||||||
DealsList(ctx context.Context) ([]MarketDeal, error) //perm:admin
|
DealsList(ctx context.Context) ([]MarketDeal, error) //perm:admin
|
||||||
@@ -196,9 +253,9 @@ type StorageMiner interface {
|
|||||||
// the path specified when calling CreateBackup is within the base path
|
// the path specified when calling CreateBackup is within the base path
|
||||||
CreateBackup(ctx context.Context, fpath string) error //perm:admin
|
CreateBackup(ctx context.Context, fpath string) error //perm:admin
|
||||||
|
|
||||||
CheckProvable(ctx context.Context, pp abi.RegisteredPoStProof, sectors []storage.SectorRef, expensive bool) (map[abi.SectorNumber]string, error) //perm:admin
|
CheckProvable(ctx context.Context, pp abi.RegisteredPoStProof, sectors []storage.SectorRef, update []bool, expensive bool) (map[abi.SectorNumber]string, error) //perm:admin
|
||||||
|
|
||||||
ComputeProof(ctx context.Context, ssi []builtin.SectorInfo, rand abi.PoStRandomness) ([]builtin.PoStProof, error) //perm:read
|
ComputeProof(ctx context.Context, ssi []builtin.ExtendedSectorInfo, rand abi.PoStRandomness, poStEpoch abi.ChainEpoch, nv abinetwork.Version) ([]builtin.PoStProof, error) //perm:read
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ storiface.WorkerReturn = *new(StorageMiner)
|
var _ storiface.WorkerReturn = *new(StorageMiner)
|
||||||
@@ -220,6 +277,11 @@ type SectorLog struct {
|
|||||||
Message string
|
Message string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SectorPiece struct {
|
||||||
|
Piece abi.PieceInfo
|
||||||
|
DealInfo *PieceDealInfo // nil for pieces which do not appear in deals (e.g. filler pieces)
|
||||||
|
}
|
||||||
|
|
||||||
type SectorInfo struct {
|
type SectorInfo struct {
|
||||||
SectorID abi.SectorNumber
|
SectorID abi.SectorNumber
|
||||||
State SectorState
|
State SectorState
|
||||||
@@ -227,6 +289,7 @@ type SectorInfo struct {
|
|||||||
CommR *cid.Cid
|
CommR *cid.Cid
|
||||||
Proof []byte
|
Proof []byte
|
||||||
Deals []abi.DealID
|
Deals []abi.DealID
|
||||||
|
Pieces []SectorPiece
|
||||||
Ticket SealTicket
|
Ticket SealTicket
|
||||||
Seed SealSeed
|
Seed SealSeed
|
||||||
PreCommitMsg *cid.Cid
|
PreCommitMsg *cid.Cid
|
||||||
@@ -332,3 +395,34 @@ type DealSchedule struct {
|
|||||||
StartEpoch abi.ChainEpoch
|
StartEpoch abi.ChainEpoch
|
||||||
EndEpoch abi.ChainEpoch
|
EndEpoch abi.ChainEpoch
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DagstoreShardInfo is the serialized form of dagstore.DagstoreShardInfo that
|
||||||
|
// we expose through JSON-RPC to avoid clients having to depend on the
|
||||||
|
// dagstore lib.
|
||||||
|
type DagstoreShardInfo struct {
|
||||||
|
Key string
|
||||||
|
State string
|
||||||
|
Error string
|
||||||
|
}
|
||||||
|
|
||||||
|
// DagstoreShardResult enumerates results per shard.
|
||||||
|
type DagstoreShardResult struct {
|
||||||
|
Key string
|
||||||
|
Success bool
|
||||||
|
Error string
|
||||||
|
}
|
||||||
|
|
||||||
|
type DagstoreInitializeAllParams struct {
|
||||||
|
MaxConcurrency int
|
||||||
|
IncludeSealed bool
|
||||||
|
}
|
||||||
|
|
||||||
|
// DagstoreInitializeAllEvent represents an initialization event.
|
||||||
|
type DagstoreInitializeAllEvent struct {
|
||||||
|
Key string
|
||||||
|
Event string // "start", "end"
|
||||||
|
Success bool
|
||||||
|
Error string
|
||||||
|
Total int
|
||||||
|
Current int
|
||||||
|
}
|
||||||
|
|||||||
+1
-1
@@ -76,7 +76,7 @@ func TestReturnTypes(t *testing.T) {
|
|||||||
seen[typ] = struct{}{}
|
seen[typ] = struct{}{}
|
||||||
|
|
||||||
if typ.Kind() == reflect.Interface && typ != bareIface && !typ.Implements(jmarsh) {
|
if typ.Kind() == reflect.Interface && typ != bareIface && !typ.Implements(jmarsh) {
|
||||||
t.Error("methods can't return interfaces", m.Name)
|
t.Error("methods can't return interfaces or struct types not implementing json.Marshaller", m.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch typ.Kind() {
|
switch typ.Kind() {
|
||||||
|
|||||||
@@ -39,6 +39,11 @@ type Worker interface {
|
|||||||
SealCommit1(ctx context.Context, sector storage.SectorRef, ticket abi.SealRandomness, seed abi.InteractiveSealRandomness, pieces []abi.PieceInfo, cids storage.SectorCids) (storiface.CallID, error) //perm:admin
|
SealCommit1(ctx context.Context, sector storage.SectorRef, ticket abi.SealRandomness, seed abi.InteractiveSealRandomness, pieces []abi.PieceInfo, cids storage.SectorCids) (storiface.CallID, error) //perm:admin
|
||||||
SealCommit2(ctx context.Context, sector storage.SectorRef, c1o storage.Commit1Out) (storiface.CallID, error) //perm:admin
|
SealCommit2(ctx context.Context, sector storage.SectorRef, c1o storage.Commit1Out) (storiface.CallID, error) //perm:admin
|
||||||
FinalizeSector(ctx context.Context, sector storage.SectorRef, keepUnsealed []storage.Range) (storiface.CallID, error) //perm:admin
|
FinalizeSector(ctx context.Context, sector storage.SectorRef, keepUnsealed []storage.Range) (storiface.CallID, error) //perm:admin
|
||||||
|
FinalizeReplicaUpdate(ctx context.Context, sector storage.SectorRef, keepUnsealed []storage.Range) (storiface.CallID, error) //perm:admin
|
||||||
|
ReplicaUpdate(ctx context.Context, sector storage.SectorRef, pieces []abi.PieceInfo) (storiface.CallID, error) //perm:admin
|
||||||
|
ProveReplicaUpdate1(ctx context.Context, sector storage.SectorRef, sectorKey, newSealed, newUnsealed cid.Cid) (storiface.CallID, error) //perm:admin
|
||||||
|
ProveReplicaUpdate2(ctx context.Context, sector storage.SectorRef, sectorKey, newSealed, newUnsealed cid.Cid, vanillaProofs storage.ReplicaVanillaProofs) (storiface.CallID, error) //perm:admin
|
||||||
|
GenerateSectorKeyFromData(ctx context.Context, sector storage.SectorRef, commD cid.Cid) (storiface.CallID, error) //perm:admin
|
||||||
ReleaseUnsealed(ctx context.Context, sector storage.SectorRef, safeToFree []storage.Range) (storiface.CallID, error) //perm:admin
|
ReleaseUnsealed(ctx context.Context, sector storage.SectorRef, safeToFree []storage.Range) (storiface.CallID, error) //perm:admin
|
||||||
MoveStorage(ctx context.Context, sector storage.SectorRef, types storiface.SectorFileType) (storiface.CallID, error) //perm:admin
|
MoveStorage(ctx context.Context, sector storage.SectorRef, types storiface.SectorFileType) (storiface.CallID, error) //perm:admin
|
||||||
UnsealPiece(context.Context, storage.SectorRef, storiface.UnpaddedByteIndex, abi.UnpaddedPieceSize, abi.SealRandomness, cid.Cid) (storiface.CallID, error) //perm:admin
|
UnsealPiece(context.Context, storage.SectorRef, storiface.UnpaddedByteIndex, abi.UnpaddedPieceSize, abi.SealRandomness, cid.Cid) (storiface.CallID, error) //perm:admin
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ package api
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
"math"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
abi "github.com/filecoin-project/go-state-types/abi"
|
abi "github.com/filecoin-project/go-state-types/abi"
|
||||||
@@ -17,6 +18,7 @@ import (
|
|||||||
|
|
||||||
var _ = xerrors.Errorf
|
var _ = xerrors.Errorf
|
||||||
var _ = cid.Undef
|
var _ = cid.Undef
|
||||||
|
var _ = math.E
|
||||||
var _ = sort.Sort
|
var _ = sort.Sort
|
||||||
|
|
||||||
func (t *PaymentInfo) MarshalCBOR(w io.Writer) error {
|
func (t *PaymentInfo) MarshalCBOR(w io.Writer) error {
|
||||||
|
|||||||
+43
-18
@@ -15,19 +15,18 @@ import (
|
|||||||
"github.com/filecoin-project/go-bitfield"
|
"github.com/filecoin-project/go-bitfield"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
"github.com/ipfs/go-filestore"
|
"github.com/libp2p/go-libp2p-core/metrics"
|
||||||
metrics "github.com/libp2p/go-libp2p-core/metrics"
|
|
||||||
"github.com/libp2p/go-libp2p-core/network"
|
"github.com/libp2p/go-libp2p-core/network"
|
||||||
"github.com/libp2p/go-libp2p-core/peer"
|
"github.com/libp2p/go-libp2p-core/peer"
|
||||||
protocol "github.com/libp2p/go-libp2p-core/protocol"
|
"github.com/libp2p/go-libp2p-core/protocol"
|
||||||
pubsub "github.com/libp2p/go-libp2p-pubsub"
|
pubsub "github.com/libp2p/go-libp2p-pubsub"
|
||||||
"github.com/multiformats/go-multiaddr"
|
"github.com/multiformats/go-multiaddr"
|
||||||
|
|
||||||
datatransfer "github.com/filecoin-project/go-data-transfer"
|
datatransfer "github.com/filecoin-project/go-data-transfer"
|
||||||
filestore2 "github.com/filecoin-project/go-fil-markets/filestore"
|
filestore "github.com/filecoin-project/go-fil-markets/filestore"
|
||||||
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
|
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
|
||||||
"github.com/filecoin-project/go-jsonrpc/auth"
|
"github.com/filecoin-project/go-jsonrpc/auth"
|
||||||
"github.com/filecoin-project/go-multistore"
|
textselector "github.com/ipld/go-ipld-selector-text-lite"
|
||||||
|
|
||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
"github.com/filecoin-project/go-state-types/crypto"
|
"github.com/filecoin-project/go-state-types/crypto"
|
||||||
@@ -43,14 +42,16 @@ import (
|
|||||||
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
|
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
|
||||||
sealing "github.com/filecoin-project/lotus/extern/storage-sealing"
|
sealing "github.com/filecoin-project/lotus/extern/storage-sealing"
|
||||||
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
||||||
|
"github.com/filecoin-project/lotus/node/repo/imports"
|
||||||
)
|
)
|
||||||
|
|
||||||
var ExampleValues = map[reflect.Type]interface{}{
|
var ExampleValues = map[reflect.Type]interface{}{
|
||||||
reflect.TypeOf(auth.Permission("")): auth.Permission("write"),
|
reflect.TypeOf(api.MinerSubsystem(0)): api.MinerSubsystem(1),
|
||||||
reflect.TypeOf(""): "string value",
|
reflect.TypeOf(auth.Permission("")): auth.Permission("write"),
|
||||||
reflect.TypeOf(uint64(42)): uint64(42),
|
reflect.TypeOf(""): "string value",
|
||||||
reflect.TypeOf(byte(7)): byte(7),
|
reflect.TypeOf(uint64(42)): uint64(42),
|
||||||
reflect.TypeOf([]byte{}): []byte("byte array"),
|
reflect.TypeOf(byte(7)): byte(7),
|
||||||
|
reflect.TypeOf([]byte{}): []byte("byte array"),
|
||||||
}
|
}
|
||||||
|
|
||||||
func addExample(v interface{}) {
|
func addExample(v interface{}) {
|
||||||
@@ -88,7 +89,10 @@ func init() {
|
|||||||
addExample(pid)
|
addExample(pid)
|
||||||
addExample(&pid)
|
addExample(&pid)
|
||||||
|
|
||||||
multistoreIDExample := multistore.StoreID(50)
|
storeIDExample := imports.ID(50)
|
||||||
|
textSelExample := textselector.Expression("Links/21/Hash/Links/42/Hash")
|
||||||
|
apiSelExample := api.Selector("Links/21/Hash/Links/42/Hash")
|
||||||
|
clientEvent := retrievalmarket.ClientEventDealAccepted
|
||||||
|
|
||||||
addExample(bitfield.NewFromSet([]uint64{5}))
|
addExample(bitfield.NewFromSet([]uint64{5}))
|
||||||
addExample(abi.RegisteredSealProof_StackedDrg32GiBV1_1)
|
addExample(abi.RegisteredSealProof_StackedDrg32GiBV1_1)
|
||||||
@@ -107,7 +111,6 @@ func init() {
|
|||||||
addExample(abi.UnpaddedPieceSize(1024))
|
addExample(abi.UnpaddedPieceSize(1024))
|
||||||
addExample(abi.UnpaddedPieceSize(1024).Padded())
|
addExample(abi.UnpaddedPieceSize(1024).Padded())
|
||||||
addExample(abi.DealID(5432))
|
addExample(abi.DealID(5432))
|
||||||
addExample(filestore.StatusFileChanged)
|
|
||||||
addExample(abi.SectorNumber(9))
|
addExample(abi.SectorNumber(9))
|
||||||
addExample(abi.SectorSize(32 * 1024 * 1024 * 1024))
|
addExample(abi.SectorSize(32 * 1024 * 1024 * 1024))
|
||||||
addExample(api.MpoolChange(0))
|
addExample(api.MpoolChange(0))
|
||||||
@@ -119,10 +122,14 @@ func init() {
|
|||||||
addExample(time.Minute)
|
addExample(time.Minute)
|
||||||
addExample(datatransfer.TransferID(3))
|
addExample(datatransfer.TransferID(3))
|
||||||
addExample(datatransfer.Ongoing)
|
addExample(datatransfer.Ongoing)
|
||||||
addExample(multistoreIDExample)
|
addExample(storeIDExample)
|
||||||
addExample(&multistoreIDExample)
|
addExample(&storeIDExample)
|
||||||
|
addExample(clientEvent)
|
||||||
|
addExample(&clientEvent)
|
||||||
addExample(retrievalmarket.ClientEventDealAccepted)
|
addExample(retrievalmarket.ClientEventDealAccepted)
|
||||||
addExample(retrievalmarket.DealStatusNew)
|
addExample(retrievalmarket.DealStatusNew)
|
||||||
|
addExample(&textSelExample)
|
||||||
|
addExample(&apiSelExample)
|
||||||
addExample(network.ReachabilityPublic)
|
addExample(network.ReachabilityPublic)
|
||||||
addExample(build.NewestNetworkVersion)
|
addExample(build.NewestNetworkVersion)
|
||||||
addExample(map[string]int{"name": 42})
|
addExample(map[string]int{"name": 42})
|
||||||
@@ -174,8 +181,8 @@ func init() {
|
|||||||
ExampleValues[reflect.TypeOf(struct{ A multiaddr.Multiaddr }{}).Field(0).Type] = maddr
|
ExampleValues[reflect.TypeOf(struct{ A multiaddr.Multiaddr }{}).Field(0).Type] = maddr
|
||||||
|
|
||||||
// miner specific
|
// miner specific
|
||||||
addExample(filestore2.Path(".lotusminer/fstmp123"))
|
addExample(filestore.Path(".lotusminer/fstmp123"))
|
||||||
si := multistore.StoreID(12)
|
si := uint64(12)
|
||||||
addExample(&si)
|
addExample(&si)
|
||||||
addExample(retrievalmarket.DealID(5))
|
addExample(retrievalmarket.DealID(5))
|
||||||
addExample(abi.ActorID(1000))
|
addExample(abi.ActorID(1000))
|
||||||
@@ -224,16 +231,18 @@ func init() {
|
|||||||
Hostname: "host",
|
Hostname: "host",
|
||||||
Resources: storiface.WorkerResources{
|
Resources: storiface.WorkerResources{
|
||||||
MemPhysical: 256 << 30,
|
MemPhysical: 256 << 30,
|
||||||
|
MemUsed: 2 << 30,
|
||||||
MemSwap: 120 << 30,
|
MemSwap: 120 << 30,
|
||||||
MemReserved: 2 << 30,
|
MemSwapUsed: 2 << 30,
|
||||||
CPUs: 64,
|
CPUs: 64,
|
||||||
GPUs: []string{"aGPU 1337"},
|
GPUs: []string{"aGPU 1337"},
|
||||||
|
Resources: storiface.ResourceTable,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
MemUsedMin: 0,
|
MemUsedMin: 0,
|
||||||
MemUsedMax: 0,
|
MemUsedMax: 0,
|
||||||
GpuUsed: false,
|
GpuUsed: 0,
|
||||||
CpuUse: 0,
|
CpuUse: 0,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -264,6 +273,22 @@ func init() {
|
|||||||
|
|
||||||
addExample(api.CheckStatusCode(0))
|
addExample(api.CheckStatusCode(0))
|
||||||
addExample(map[string]interface{}{"abc": 123})
|
addExample(map[string]interface{}{"abc": 123})
|
||||||
|
addExample(api.MinerSubsystems{
|
||||||
|
api.SubsystemMining,
|
||||||
|
api.SubsystemSealing,
|
||||||
|
api.SubsystemSectorStorage,
|
||||||
|
api.SubsystemMarkets,
|
||||||
|
})
|
||||||
|
addExample(api.DagstoreShardResult{
|
||||||
|
Key: "baga6ea4seaqecmtz7iak33dsfshi627abz4i4665dfuzr3qfs4bmad6dx3iigdq",
|
||||||
|
Error: "<error>",
|
||||||
|
})
|
||||||
|
addExample(api.DagstoreShardInfo{
|
||||||
|
Key: "baga6ea4seaqecmtz7iak33dsfshi627abz4i4665dfuzr3qfs4bmad6dx3iigdq",
|
||||||
|
State: "ShardStateAvailable",
|
||||||
|
Error: "<error>",
|
||||||
|
})
|
||||||
|
addExample(storiface.ResourceTable)
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetAPIType(name, pkg string) (i interface{}, t reflect.Type, permStruct []reflect.Type) {
|
func GetAPIType(name, pkg string) (i interface{}, t reflect.Type, permStruct []reflect.Type) {
|
||||||
|
|||||||
@@ -0,0 +1,79 @@
|
|||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MinerSubsystem represents a miner subsystem. Int and string values are not
|
||||||
|
// guaranteed to be stable over time is not
|
||||||
|
// guaranteed to be stable over time.
|
||||||
|
type MinerSubsystem int
|
||||||
|
|
||||||
|
const (
|
||||||
|
// SubsystemUnknown is a placeholder for the zero value. It should never
|
||||||
|
// be used.
|
||||||
|
SubsystemUnknown MinerSubsystem = iota
|
||||||
|
// SubsystemMarkets signifies the storage and retrieval
|
||||||
|
// deal-making subsystem.
|
||||||
|
SubsystemMarkets
|
||||||
|
// SubsystemMining signifies the mining subsystem.
|
||||||
|
SubsystemMining
|
||||||
|
// SubsystemSealing signifies the sealing subsystem.
|
||||||
|
SubsystemSealing
|
||||||
|
// SubsystemSectorStorage signifies the sector storage subsystem.
|
||||||
|
SubsystemSectorStorage
|
||||||
|
)
|
||||||
|
|
||||||
|
var MinerSubsystemToString = map[MinerSubsystem]string{
|
||||||
|
SubsystemUnknown: "Unknown",
|
||||||
|
SubsystemMarkets: "Markets",
|
||||||
|
SubsystemMining: "Mining",
|
||||||
|
SubsystemSealing: "Sealing",
|
||||||
|
SubsystemSectorStorage: "SectorStorage",
|
||||||
|
}
|
||||||
|
|
||||||
|
var MinerSubsystemToID = map[string]MinerSubsystem{
|
||||||
|
"Unknown": SubsystemUnknown,
|
||||||
|
"Markets": SubsystemMarkets,
|
||||||
|
"Mining": SubsystemMining,
|
||||||
|
"Sealing": SubsystemSealing,
|
||||||
|
"SectorStorage": SubsystemSectorStorage,
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ms MinerSubsystem) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(MinerSubsystemToString[ms])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ms *MinerSubsystem) UnmarshalJSON(b []byte) error {
|
||||||
|
var j string
|
||||||
|
err := json.Unmarshal(b, &j)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
s, ok := MinerSubsystemToID[j]
|
||||||
|
if !ok {
|
||||||
|
*ms = SubsystemUnknown
|
||||||
|
} else {
|
||||||
|
*ms = s
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type MinerSubsystems []MinerSubsystem
|
||||||
|
|
||||||
|
func (ms MinerSubsystems) Has(entry MinerSubsystem) bool {
|
||||||
|
for _, v := range ms {
|
||||||
|
if v == entry {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ms MinerSubsystem) String() string {
|
||||||
|
s, ok := MinerSubsystemToString[ms]
|
||||||
|
if !ok {
|
||||||
|
return MinerSubsystemToString[SubsystemUnknown]
|
||||||
|
}
|
||||||
|
return s
|
||||||
|
}
|
||||||
+127
-52
@@ -6,6 +6,7 @@ package mocks
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
|
json "encoding/json"
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
|
|
||||||
address "github.com/filecoin-project/go-address"
|
address "github.com/filecoin-project/go-address"
|
||||||
@@ -14,7 +15,6 @@ import (
|
|||||||
retrievalmarket "github.com/filecoin-project/go-fil-markets/retrievalmarket"
|
retrievalmarket "github.com/filecoin-project/go-fil-markets/retrievalmarket"
|
||||||
storagemarket "github.com/filecoin-project/go-fil-markets/storagemarket"
|
storagemarket "github.com/filecoin-project/go-fil-markets/storagemarket"
|
||||||
auth "github.com/filecoin-project/go-jsonrpc/auth"
|
auth "github.com/filecoin-project/go-jsonrpc/auth"
|
||||||
multistore "github.com/filecoin-project/go-multistore"
|
|
||||||
abi "github.com/filecoin-project/go-state-types/abi"
|
abi "github.com/filecoin-project/go-state-types/abi"
|
||||||
big "github.com/filecoin-project/go-state-types/big"
|
big "github.com/filecoin-project/go-state-types/big"
|
||||||
crypto "github.com/filecoin-project/go-state-types/crypto"
|
crypto "github.com/filecoin-project/go-state-types/crypto"
|
||||||
@@ -24,8 +24,9 @@ import (
|
|||||||
apitypes "github.com/filecoin-project/lotus/api/types"
|
apitypes "github.com/filecoin-project/lotus/api/types"
|
||||||
miner "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
|
miner "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
|
||||||
types "github.com/filecoin-project/lotus/chain/types"
|
types "github.com/filecoin-project/lotus/chain/types"
|
||||||
marketevents "github.com/filecoin-project/lotus/markets/loggers"
|
alerting "github.com/filecoin-project/lotus/journal/alerting"
|
||||||
dtypes "github.com/filecoin-project/lotus/node/modules/dtypes"
|
dtypes "github.com/filecoin-project/lotus/node/modules/dtypes"
|
||||||
|
imports "github.com/filecoin-project/lotus/node/repo/imports"
|
||||||
miner0 "github.com/filecoin-project/specs-actors/actors/builtin/miner"
|
miner0 "github.com/filecoin-project/specs-actors/actors/builtin/miner"
|
||||||
paych "github.com/filecoin-project/specs-actors/actors/builtin/paych"
|
paych "github.com/filecoin-project/specs-actors/actors/builtin/paych"
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
@@ -298,36 +299,6 @@ func (mr *MockFullNodeMockRecorder) ChainGetPath(arg0, arg1, arg2 interface{}) *
|
|||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainGetPath", reflect.TypeOf((*MockFullNode)(nil).ChainGetPath), arg0, arg1, arg2)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainGetPath", reflect.TypeOf((*MockFullNode)(nil).ChainGetPath), arg0, arg1, arg2)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ChainGetRandomnessFromBeacon mocks base method.
|
|
||||||
func (m *MockFullNode) ChainGetRandomnessFromBeacon(arg0 context.Context, arg1 types.TipSetKey, arg2 crypto.DomainSeparationTag, arg3 abi.ChainEpoch, arg4 []byte) (abi.Randomness, error) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "ChainGetRandomnessFromBeacon", arg0, arg1, arg2, arg3, arg4)
|
|
||||||
ret0, _ := ret[0].(abi.Randomness)
|
|
||||||
ret1, _ := ret[1].(error)
|
|
||||||
return ret0, ret1
|
|
||||||
}
|
|
||||||
|
|
||||||
// ChainGetRandomnessFromBeacon indicates an expected call of ChainGetRandomnessFromBeacon.
|
|
||||||
func (mr *MockFullNodeMockRecorder) ChainGetRandomnessFromBeacon(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainGetRandomnessFromBeacon", reflect.TypeOf((*MockFullNode)(nil).ChainGetRandomnessFromBeacon), arg0, arg1, arg2, arg3, arg4)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ChainGetRandomnessFromTickets mocks base method.
|
|
||||||
func (m *MockFullNode) ChainGetRandomnessFromTickets(arg0 context.Context, arg1 types.TipSetKey, arg2 crypto.DomainSeparationTag, arg3 abi.ChainEpoch, arg4 []byte) (abi.Randomness, error) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "ChainGetRandomnessFromTickets", arg0, arg1, arg2, arg3, arg4)
|
|
||||||
ret0, _ := ret[0].(abi.Randomness)
|
|
||||||
ret1, _ := ret[1].(error)
|
|
||||||
return ret0, ret1
|
|
||||||
}
|
|
||||||
|
|
||||||
// ChainGetRandomnessFromTickets indicates an expected call of ChainGetRandomnessFromTickets.
|
|
||||||
func (mr *MockFullNodeMockRecorder) ChainGetRandomnessFromTickets(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainGetRandomnessFromTickets", reflect.TypeOf((*MockFullNode)(nil).ChainGetRandomnessFromTickets), arg0, arg1, arg2, arg3, arg4)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ChainGetTipSet mocks base method.
|
// ChainGetTipSet mocks base method.
|
||||||
func (m *MockFullNode) ChainGetTipSet(arg0 context.Context, arg1 types.TipSetKey) (*types.TipSet, error) {
|
func (m *MockFullNode) ChainGetTipSet(arg0 context.Context, arg1 types.TipSetKey) (*types.TipSet, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
@@ -343,6 +314,21 @@ func (mr *MockFullNodeMockRecorder) ChainGetTipSet(arg0, arg1 interface{}) *gomo
|
|||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainGetTipSet", reflect.TypeOf((*MockFullNode)(nil).ChainGetTipSet), arg0, arg1)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainGetTipSet", reflect.TypeOf((*MockFullNode)(nil).ChainGetTipSet), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ChainGetTipSetAfterHeight mocks base method.
|
||||||
|
func (m *MockFullNode) ChainGetTipSetAfterHeight(arg0 context.Context, arg1 abi.ChainEpoch, arg2 types.TipSetKey) (*types.TipSet, error) {
|
||||||
|
m.ctrl.T.Helper()
|
||||||
|
ret := m.ctrl.Call(m, "ChainGetTipSetAfterHeight", arg0, arg1, arg2)
|
||||||
|
ret0, _ := ret[0].(*types.TipSet)
|
||||||
|
ret1, _ := ret[1].(error)
|
||||||
|
return ret0, ret1
|
||||||
|
}
|
||||||
|
|
||||||
|
// ChainGetTipSetAfterHeight indicates an expected call of ChainGetTipSetAfterHeight.
|
||||||
|
func (mr *MockFullNodeMockRecorder) ChainGetTipSetAfterHeight(arg0, arg1, arg2 interface{}) *gomock.Call {
|
||||||
|
mr.mock.ctrl.T.Helper()
|
||||||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainGetTipSetAfterHeight", reflect.TypeOf((*MockFullNode)(nil).ChainGetTipSetAfterHeight), arg0, arg1, arg2)
|
||||||
|
}
|
||||||
|
|
||||||
// ChainGetTipSetByHeight mocks base method.
|
// ChainGetTipSetByHeight mocks base method.
|
||||||
func (m *MockFullNode) ChainGetTipSetByHeight(arg0 context.Context, arg1 abi.ChainEpoch, arg2 types.TipSetKey) (*types.TipSet, error) {
|
func (m *MockFullNode) ChainGetTipSetByHeight(arg0 context.Context, arg1 abi.ChainEpoch, arg2 types.TipSetKey) (*types.TipSet, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
@@ -550,6 +536,20 @@ func (mr *MockFullNodeMockRecorder) ClientDealSize(arg0, arg1 interface{}) *gomo
|
|||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientDealSize", reflect.TypeOf((*MockFullNode)(nil).ClientDealSize), arg0, arg1)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientDealSize", reflect.TypeOf((*MockFullNode)(nil).ClientDealSize), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ClientExport mocks base method.
|
||||||
|
func (m *MockFullNode) ClientExport(arg0 context.Context, arg1 api.ExportRef, arg2 api.FileRef) error {
|
||||||
|
m.ctrl.T.Helper()
|
||||||
|
ret := m.ctrl.Call(m, "ClientExport", arg0, arg1, arg2)
|
||||||
|
ret0, _ := ret[0].(error)
|
||||||
|
return ret0
|
||||||
|
}
|
||||||
|
|
||||||
|
// ClientExport indicates an expected call of ClientExport.
|
||||||
|
func (mr *MockFullNodeMockRecorder) ClientExport(arg0, arg1, arg2 interface{}) *gomock.Call {
|
||||||
|
mr.mock.ctrl.T.Helper()
|
||||||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientExport", reflect.TypeOf((*MockFullNode)(nil).ClientExport), arg0, arg1, arg2)
|
||||||
|
}
|
||||||
|
|
||||||
// ClientFindData mocks base method.
|
// ClientFindData mocks base method.
|
||||||
func (m *MockFullNode) ClientFindData(arg0 context.Context, arg1 cid.Cid, arg2 *cid.Cid) ([]api.QueryOffer, error) {
|
func (m *MockFullNode) ClientFindData(arg0 context.Context, arg1 cid.Cid, arg2 *cid.Cid) ([]api.QueryOffer, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
@@ -760,7 +760,7 @@ func (mr *MockFullNodeMockRecorder) ClientQueryAsk(arg0, arg1, arg2 interface{})
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ClientRemoveImport mocks base method.
|
// ClientRemoveImport mocks base method.
|
||||||
func (m *MockFullNode) ClientRemoveImport(arg0 context.Context, arg1 multistore.StoreID) error {
|
func (m *MockFullNode) ClientRemoveImport(arg0 context.Context, arg1 imports.ID) error {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "ClientRemoveImport", arg0, arg1)
|
ret := m.ctrl.Call(m, "ClientRemoveImport", arg0, arg1)
|
||||||
ret0, _ := ret[0].(error)
|
ret0, _ := ret[0].(error)
|
||||||
@@ -788,17 +788,18 @@ func (mr *MockFullNodeMockRecorder) ClientRestartDataTransfer(arg0, arg1, arg2,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ClientRetrieve mocks base method.
|
// ClientRetrieve mocks base method.
|
||||||
func (m *MockFullNode) ClientRetrieve(arg0 context.Context, arg1 api.RetrievalOrder, arg2 *api.FileRef) error {
|
func (m *MockFullNode) ClientRetrieve(arg0 context.Context, arg1 api.RetrievalOrder) (*api.RestrievalRes, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "ClientRetrieve", arg0, arg1, arg2)
|
ret := m.ctrl.Call(m, "ClientRetrieve", arg0, arg1)
|
||||||
ret0, _ := ret[0].(error)
|
ret0, _ := ret[0].(*api.RestrievalRes)
|
||||||
return ret0
|
ret1, _ := ret[1].(error)
|
||||||
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClientRetrieve indicates an expected call of ClientRetrieve.
|
// ClientRetrieve indicates an expected call of ClientRetrieve.
|
||||||
func (mr *MockFullNodeMockRecorder) ClientRetrieve(arg0, arg1, arg2 interface{}) *gomock.Call {
|
func (mr *MockFullNodeMockRecorder) ClientRetrieve(arg0, arg1 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientRetrieve", reflect.TypeOf((*MockFullNode)(nil).ClientRetrieve), arg0, arg1, arg2)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientRetrieve", reflect.TypeOf((*MockFullNode)(nil).ClientRetrieve), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClientRetrieveTryRestartInsufficientFunds mocks base method.
|
// ClientRetrieveTryRestartInsufficientFunds mocks base method.
|
||||||
@@ -815,19 +816,18 @@ func (mr *MockFullNodeMockRecorder) ClientRetrieveTryRestartInsufficientFunds(ar
|
|||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientRetrieveTryRestartInsufficientFunds", reflect.TypeOf((*MockFullNode)(nil).ClientRetrieveTryRestartInsufficientFunds), arg0, arg1)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientRetrieveTryRestartInsufficientFunds", reflect.TypeOf((*MockFullNode)(nil).ClientRetrieveTryRestartInsufficientFunds), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClientRetrieveWithEvents mocks base method.
|
// ClientRetrieveWait mocks base method.
|
||||||
func (m *MockFullNode) ClientRetrieveWithEvents(arg0 context.Context, arg1 api.RetrievalOrder, arg2 *api.FileRef) (<-chan marketevents.RetrievalEvent, error) {
|
func (m *MockFullNode) ClientRetrieveWait(arg0 context.Context, arg1 retrievalmarket.DealID) error {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "ClientRetrieveWithEvents", arg0, arg1, arg2)
|
ret := m.ctrl.Call(m, "ClientRetrieveWait", arg0, arg1)
|
||||||
ret0, _ := ret[0].(<-chan marketevents.RetrievalEvent)
|
ret0, _ := ret[0].(error)
|
||||||
ret1, _ := ret[1].(error)
|
return ret0
|
||||||
return ret0, ret1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClientRetrieveWithEvents indicates an expected call of ClientRetrieveWithEvents.
|
// ClientRetrieveWait indicates an expected call of ClientRetrieveWait.
|
||||||
func (mr *MockFullNodeMockRecorder) ClientRetrieveWithEvents(arg0, arg1, arg2 interface{}) *gomock.Call {
|
func (mr *MockFullNodeMockRecorder) ClientRetrieveWait(arg0, arg1 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientRetrieveWithEvents", reflect.TypeOf((*MockFullNode)(nil).ClientRetrieveWithEvents), arg0, arg1, arg2)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientRetrieveWait", reflect.TypeOf((*MockFullNode)(nil).ClientRetrieveWait), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClientStartDeal mocks base method.
|
// ClientStartDeal mocks base method.
|
||||||
@@ -979,6 +979,21 @@ func (mr *MockFullNodeMockRecorder) ID(arg0 interface{}) *gomock.Call {
|
|||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockFullNode)(nil).ID), arg0)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockFullNode)(nil).ID), arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// LogAlerts mocks base method.
|
||||||
|
func (m *MockFullNode) LogAlerts(arg0 context.Context) ([]alerting.Alert, error) {
|
||||||
|
m.ctrl.T.Helper()
|
||||||
|
ret := m.ctrl.Call(m, "LogAlerts", arg0)
|
||||||
|
ret0, _ := ret[0].([]alerting.Alert)
|
||||||
|
ret1, _ := ret[1].(error)
|
||||||
|
return ret0, ret1
|
||||||
|
}
|
||||||
|
|
||||||
|
// LogAlerts indicates an expected call of LogAlerts.
|
||||||
|
func (mr *MockFullNodeMockRecorder) LogAlerts(arg0 interface{}) *gomock.Call {
|
||||||
|
mr.mock.ctrl.T.Helper()
|
||||||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogAlerts", reflect.TypeOf((*MockFullNode)(nil).LogAlerts), arg0)
|
||||||
|
}
|
||||||
|
|
||||||
// LogList mocks base method.
|
// LogList mocks base method.
|
||||||
func (m *MockFullNode) LogList(arg0 context.Context) ([]string, error) {
|
func (m *MockFullNode) LogList(arg0 context.Context) ([]string, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
@@ -1426,18 +1441,33 @@ func (mr *MockFullNodeMockRecorder) MsigApproveTxnHash(arg0, arg1, arg2, arg3, a
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MsigCancel mocks base method.
|
// MsigCancel mocks base method.
|
||||||
func (m *MockFullNode) MsigCancel(arg0 context.Context, arg1 address.Address, arg2 uint64, arg3 address.Address, arg4 big.Int, arg5 address.Address, arg6 uint64, arg7 []byte) (*api.MessagePrototype, error) {
|
func (m *MockFullNode) MsigCancel(arg0 context.Context, arg1 address.Address, arg2 uint64, arg3 address.Address) (*api.MessagePrototype, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "MsigCancel", arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
|
ret := m.ctrl.Call(m, "MsigCancel", arg0, arg1, arg2, arg3)
|
||||||
ret0, _ := ret[0].(*api.MessagePrototype)
|
ret0, _ := ret[0].(*api.MessagePrototype)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsigCancel indicates an expected call of MsigCancel.
|
// MsigCancel indicates an expected call of MsigCancel.
|
||||||
func (mr *MockFullNodeMockRecorder) MsigCancel(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 interface{}) *gomock.Call {
|
func (mr *MockFullNodeMockRecorder) MsigCancel(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MsigCancel", reflect.TypeOf((*MockFullNode)(nil).MsigCancel), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MsigCancel", reflect.TypeOf((*MockFullNode)(nil).MsigCancel), arg0, arg1, arg2, arg3)
|
||||||
|
}
|
||||||
|
|
||||||
|
// MsigCancelTxnHash mocks base method.
|
||||||
|
func (m *MockFullNode) MsigCancelTxnHash(arg0 context.Context, arg1 address.Address, arg2 uint64, arg3 address.Address, arg4 big.Int, arg5 address.Address, arg6 uint64, arg7 []byte) (*api.MessagePrototype, error) {
|
||||||
|
m.ctrl.T.Helper()
|
||||||
|
ret := m.ctrl.Call(m, "MsigCancelTxnHash", arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
|
||||||
|
ret0, _ := ret[0].(*api.MessagePrototype)
|
||||||
|
ret1, _ := ret[1].(error)
|
||||||
|
return ret0, ret1
|
||||||
|
}
|
||||||
|
|
||||||
|
// MsigCancelTxnHash indicates an expected call of MsigCancelTxnHash.
|
||||||
|
func (mr *MockFullNodeMockRecorder) MsigCancelTxnHash(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 interface{}) *gomock.Call {
|
||||||
|
mr.mock.ctrl.T.Helper()
|
||||||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MsigCancelTxnHash", reflect.TypeOf((*MockFullNode)(nil).MsigCancelTxnHash), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsigCreate mocks base method.
|
// MsigCreate mocks base method.
|
||||||
@@ -2229,6 +2259,21 @@ func (mr *MockFullNodeMockRecorder) StateDecodeParams(arg0, arg1, arg2, arg3, ar
|
|||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateDecodeParams", reflect.TypeOf((*MockFullNode)(nil).StateDecodeParams), arg0, arg1, arg2, arg3, arg4)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateDecodeParams", reflect.TypeOf((*MockFullNode)(nil).StateDecodeParams), arg0, arg1, arg2, arg3, arg4)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// StateEncodeParams mocks base method.
|
||||||
|
func (m *MockFullNode) StateEncodeParams(arg0 context.Context, arg1 cid.Cid, arg2 abi.MethodNum, arg3 json.RawMessage) ([]byte, error) {
|
||||||
|
m.ctrl.T.Helper()
|
||||||
|
ret := m.ctrl.Call(m, "StateEncodeParams", arg0, arg1, arg2, arg3)
|
||||||
|
ret0, _ := ret[0].([]byte)
|
||||||
|
ret1, _ := ret[1].(error)
|
||||||
|
return ret0, ret1
|
||||||
|
}
|
||||||
|
|
||||||
|
// StateEncodeParams indicates an expected call of StateEncodeParams.
|
||||||
|
func (mr *MockFullNodeMockRecorder) StateEncodeParams(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
|
||||||
|
mr.mock.ctrl.T.Helper()
|
||||||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateEncodeParams", reflect.TypeOf((*MockFullNode)(nil).StateEncodeParams), arg0, arg1, arg2, arg3)
|
||||||
|
}
|
||||||
|
|
||||||
// StateGetActor mocks base method.
|
// StateGetActor mocks base method.
|
||||||
func (m *MockFullNode) StateGetActor(arg0 context.Context, arg1 address.Address, arg2 types.TipSetKey) (*types.Actor, error) {
|
func (m *MockFullNode) StateGetActor(arg0 context.Context, arg1 address.Address, arg2 types.TipSetKey) (*types.Actor, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
@@ -2244,6 +2289,36 @@ func (mr *MockFullNodeMockRecorder) StateGetActor(arg0, arg1, arg2 interface{})
|
|||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetActor", reflect.TypeOf((*MockFullNode)(nil).StateGetActor), arg0, arg1, arg2)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetActor", reflect.TypeOf((*MockFullNode)(nil).StateGetActor), arg0, arg1, arg2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// StateGetRandomnessFromBeacon mocks base method.
|
||||||
|
func (m *MockFullNode) StateGetRandomnessFromBeacon(arg0 context.Context, arg1 crypto.DomainSeparationTag, arg2 abi.ChainEpoch, arg3 []byte, arg4 types.TipSetKey) (abi.Randomness, error) {
|
||||||
|
m.ctrl.T.Helper()
|
||||||
|
ret := m.ctrl.Call(m, "StateGetRandomnessFromBeacon", arg0, arg1, arg2, arg3, arg4)
|
||||||
|
ret0, _ := ret[0].(abi.Randomness)
|
||||||
|
ret1, _ := ret[1].(error)
|
||||||
|
return ret0, ret1
|
||||||
|
}
|
||||||
|
|
||||||
|
// StateGetRandomnessFromBeacon indicates an expected call of StateGetRandomnessFromBeacon.
|
||||||
|
func (mr *MockFullNodeMockRecorder) StateGetRandomnessFromBeacon(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
|
||||||
|
mr.mock.ctrl.T.Helper()
|
||||||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetRandomnessFromBeacon", reflect.TypeOf((*MockFullNode)(nil).StateGetRandomnessFromBeacon), arg0, arg1, arg2, arg3, arg4)
|
||||||
|
}
|
||||||
|
|
||||||
|
// StateGetRandomnessFromTickets mocks base method.
|
||||||
|
func (m *MockFullNode) StateGetRandomnessFromTickets(arg0 context.Context, arg1 crypto.DomainSeparationTag, arg2 abi.ChainEpoch, arg3 []byte, arg4 types.TipSetKey) (abi.Randomness, error) {
|
||||||
|
m.ctrl.T.Helper()
|
||||||
|
ret := m.ctrl.Call(m, "StateGetRandomnessFromTickets", arg0, arg1, arg2, arg3, arg4)
|
||||||
|
ret0, _ := ret[0].(abi.Randomness)
|
||||||
|
ret1, _ := ret[1].(error)
|
||||||
|
return ret0, ret1
|
||||||
|
}
|
||||||
|
|
||||||
|
// StateGetRandomnessFromTickets indicates an expected call of StateGetRandomnessFromTickets.
|
||||||
|
func (mr *MockFullNodeMockRecorder) StateGetRandomnessFromTickets(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
|
||||||
|
mr.mock.ctrl.T.Helper()
|
||||||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetRandomnessFromTickets", reflect.TypeOf((*MockFullNode)(nil).StateGetRandomnessFromTickets), arg0, arg1, arg2, arg3, arg4)
|
||||||
|
}
|
||||||
|
|
||||||
// StateListActors mocks base method.
|
// StateListActors mocks base method.
|
||||||
func (m *MockFullNode) StateListActors(arg0 context.Context, arg1 types.TipSetKey) ([]address.Address, error) {
|
func (m *MockFullNode) StateListActors(arg0 context.Context, arg1 types.TipSetKey) ([]address.Address, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
|
|||||||
+439
-60
@@ -4,6 +4,7 @@ package api
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"encoding/json"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/filecoin-project/go-address"
|
"github.com/filecoin-project/go-address"
|
||||||
@@ -13,10 +14,10 @@ import (
|
|||||||
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
|
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
|
||||||
"github.com/filecoin-project/go-fil-markets/storagemarket"
|
"github.com/filecoin-project/go-fil-markets/storagemarket"
|
||||||
"github.com/filecoin-project/go-jsonrpc/auth"
|
"github.com/filecoin-project/go-jsonrpc/auth"
|
||||||
"github.com/filecoin-project/go-multistore"
|
|
||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
"github.com/filecoin-project/go-state-types/crypto"
|
"github.com/filecoin-project/go-state-types/crypto"
|
||||||
"github.com/filecoin-project/go-state-types/dline"
|
"github.com/filecoin-project/go-state-types/dline"
|
||||||
|
abinetwork "github.com/filecoin-project/go-state-types/network"
|
||||||
apitypes "github.com/filecoin-project/lotus/api/types"
|
apitypes "github.com/filecoin-project/lotus/api/types"
|
||||||
"github.com/filecoin-project/lotus/chain/actors/builtin"
|
"github.com/filecoin-project/lotus/chain/actors/builtin"
|
||||||
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
|
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
|
||||||
@@ -27,8 +28,9 @@ import (
|
|||||||
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
|
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
|
||||||
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
|
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
|
||||||
"github.com/filecoin-project/lotus/extern/storage-sealing/sealiface"
|
"github.com/filecoin-project/lotus/extern/storage-sealing/sealiface"
|
||||||
marketevents "github.com/filecoin-project/lotus/markets/loggers"
|
"github.com/filecoin-project/lotus/journal/alerting"
|
||||||
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
||||||
|
"github.com/filecoin-project/lotus/node/repo/imports"
|
||||||
"github.com/filecoin-project/specs-storage/storage"
|
"github.com/filecoin-project/specs-storage/storage"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
@@ -62,6 +64,8 @@ type CommonStruct struct {
|
|||||||
|
|
||||||
Discover func(p0 context.Context) (apitypes.OpenRPCDocument, error) `perm:"read"`
|
Discover func(p0 context.Context) (apitypes.OpenRPCDocument, error) `perm:"read"`
|
||||||
|
|
||||||
|
LogAlerts func(p0 context.Context) ([]alerting.Alert, error) `perm:"admin"`
|
||||||
|
|
||||||
LogList func(p0 context.Context) ([]string, error) `perm:"write"`
|
LogList func(p0 context.Context) ([]string, error) `perm:"write"`
|
||||||
|
|
||||||
LogSetLevel func(p0 context.Context, p1 string, p2 string) error `perm:"write"`
|
LogSetLevel func(p0 context.Context, p1 string, p2 string) error `perm:"write"`
|
||||||
@@ -126,12 +130,10 @@ type FullNodeStruct struct {
|
|||||||
|
|
||||||
ChainGetPath func(p0 context.Context, p1 types.TipSetKey, p2 types.TipSetKey) ([]*HeadChange, error) `perm:"read"`
|
ChainGetPath func(p0 context.Context, p1 types.TipSetKey, p2 types.TipSetKey) ([]*HeadChange, error) `perm:"read"`
|
||||||
|
|
||||||
ChainGetRandomnessFromBeacon func(p0 context.Context, p1 types.TipSetKey, p2 crypto.DomainSeparationTag, p3 abi.ChainEpoch, p4 []byte) (abi.Randomness, error) `perm:"read"`
|
|
||||||
|
|
||||||
ChainGetRandomnessFromTickets func(p0 context.Context, p1 types.TipSetKey, p2 crypto.DomainSeparationTag, p3 abi.ChainEpoch, p4 []byte) (abi.Randomness, error) `perm:"read"`
|
|
||||||
|
|
||||||
ChainGetTipSet func(p0 context.Context, p1 types.TipSetKey) (*types.TipSet, error) `perm:"read"`
|
ChainGetTipSet func(p0 context.Context, p1 types.TipSetKey) (*types.TipSet, error) `perm:"read"`
|
||||||
|
|
||||||
|
ChainGetTipSetAfterHeight func(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) (*types.TipSet, error) `perm:"read"`
|
||||||
|
|
||||||
ChainGetTipSetByHeight func(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) (*types.TipSet, error) `perm:"read"`
|
ChainGetTipSetByHeight func(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) (*types.TipSet, error) `perm:"read"`
|
||||||
|
|
||||||
ChainHasObj func(p0 context.Context, p1 cid.Cid) (bool, error) `perm:"read"`
|
ChainHasObj func(p0 context.Context, p1 cid.Cid) (bool, error) `perm:"read"`
|
||||||
@@ -160,6 +162,8 @@ type FullNodeStruct struct {
|
|||||||
|
|
||||||
ClientDealSize func(p0 context.Context, p1 cid.Cid) (DataSize, error) `perm:"read"`
|
ClientDealSize func(p0 context.Context, p1 cid.Cid) (DataSize, error) `perm:"read"`
|
||||||
|
|
||||||
|
ClientExport func(p0 context.Context, p1 ExportRef, p2 FileRef) error `perm:"admin"`
|
||||||
|
|
||||||
ClientFindData func(p0 context.Context, p1 cid.Cid, p2 *cid.Cid) ([]QueryOffer, error) `perm:"read"`
|
ClientFindData func(p0 context.Context, p1 cid.Cid, p2 *cid.Cid) ([]QueryOffer, error) `perm:"read"`
|
||||||
|
|
||||||
ClientGenCar func(p0 context.Context, p1 FileRef, p2 string) error `perm:"write"`
|
ClientGenCar func(p0 context.Context, p1 FileRef, p2 string) error `perm:"write"`
|
||||||
@@ -188,15 +192,15 @@ type FullNodeStruct struct {
|
|||||||
|
|
||||||
ClientQueryAsk func(p0 context.Context, p1 peer.ID, p2 address.Address) (*storagemarket.StorageAsk, error) `perm:"read"`
|
ClientQueryAsk func(p0 context.Context, p1 peer.ID, p2 address.Address) (*storagemarket.StorageAsk, error) `perm:"read"`
|
||||||
|
|
||||||
ClientRemoveImport func(p0 context.Context, p1 multistore.StoreID) error `perm:"admin"`
|
ClientRemoveImport func(p0 context.Context, p1 imports.ID) error `perm:"admin"`
|
||||||
|
|
||||||
ClientRestartDataTransfer func(p0 context.Context, p1 datatransfer.TransferID, p2 peer.ID, p3 bool) error `perm:"write"`
|
ClientRestartDataTransfer func(p0 context.Context, p1 datatransfer.TransferID, p2 peer.ID, p3 bool) error `perm:"write"`
|
||||||
|
|
||||||
ClientRetrieve func(p0 context.Context, p1 RetrievalOrder, p2 *FileRef) error `perm:"admin"`
|
ClientRetrieve func(p0 context.Context, p1 RetrievalOrder) (*RestrievalRes, error) `perm:"admin"`
|
||||||
|
|
||||||
ClientRetrieveTryRestartInsufficientFunds func(p0 context.Context, p1 address.Address) error `perm:"write"`
|
ClientRetrieveTryRestartInsufficientFunds func(p0 context.Context, p1 address.Address) error `perm:"write"`
|
||||||
|
|
||||||
ClientRetrieveWithEvents func(p0 context.Context, p1 RetrievalOrder, p2 *FileRef) (<-chan marketevents.RetrievalEvent, error) `perm:"admin"`
|
ClientRetrieveWait func(p0 context.Context, p1 retrievalmarket.DealID) error `perm:"admin"`
|
||||||
|
|
||||||
ClientStartDeal func(p0 context.Context, p1 *StartDealParams) (*cid.Cid, error) `perm:"admin"`
|
ClientStartDeal func(p0 context.Context, p1 *StartDealParams) (*cid.Cid, error) `perm:"admin"`
|
||||||
|
|
||||||
@@ -268,7 +272,9 @@ type FullNodeStruct struct {
|
|||||||
|
|
||||||
MsigApproveTxnHash func(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address, p4 address.Address, p5 types.BigInt, p6 address.Address, p7 uint64, p8 []byte) (*MessagePrototype, error) `perm:"sign"`
|
MsigApproveTxnHash func(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address, p4 address.Address, p5 types.BigInt, p6 address.Address, p7 uint64, p8 []byte) (*MessagePrototype, error) `perm:"sign"`
|
||||||
|
|
||||||
MsigCancel func(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address, p4 types.BigInt, p5 address.Address, p6 uint64, p7 []byte) (*MessagePrototype, error) `perm:"sign"`
|
MsigCancel func(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address) (*MessagePrototype, error) `perm:"sign"`
|
||||||
|
|
||||||
|
MsigCancelTxnHash func(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address, p4 types.BigInt, p5 address.Address, p6 uint64, p7 []byte) (*MessagePrototype, error) `perm:"sign"`
|
||||||
|
|
||||||
MsigCreate func(p0 context.Context, p1 uint64, p2 []address.Address, p3 abi.ChainEpoch, p4 types.BigInt, p5 address.Address, p6 types.BigInt) (*MessagePrototype, error) `perm:"sign"`
|
MsigCreate func(p0 context.Context, p1 uint64, p2 []address.Address, p3 abi.ChainEpoch, p4 types.BigInt, p5 address.Address, p6 types.BigInt) (*MessagePrototype, error) `perm:"sign"`
|
||||||
|
|
||||||
@@ -340,8 +346,14 @@ type FullNodeStruct struct {
|
|||||||
|
|
||||||
StateDecodeParams func(p0 context.Context, p1 address.Address, p2 abi.MethodNum, p3 []byte, p4 types.TipSetKey) (interface{}, error) `perm:"read"`
|
StateDecodeParams func(p0 context.Context, p1 address.Address, p2 abi.MethodNum, p3 []byte, p4 types.TipSetKey) (interface{}, error) `perm:"read"`
|
||||||
|
|
||||||
|
StateEncodeParams func(p0 context.Context, p1 cid.Cid, p2 abi.MethodNum, p3 json.RawMessage) ([]byte, error) `perm:"read"`
|
||||||
|
|
||||||
StateGetActor func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*types.Actor, error) `perm:"read"`
|
StateGetActor func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*types.Actor, error) `perm:"read"`
|
||||||
|
|
||||||
|
StateGetRandomnessFromBeacon func(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) `perm:"read"`
|
||||||
|
|
||||||
|
StateGetRandomnessFromTickets func(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) `perm:"read"`
|
||||||
|
|
||||||
StateListActors func(p0 context.Context, p1 types.TipSetKey) ([]address.Address, error) `perm:"read"`
|
StateListActors func(p0 context.Context, p1 types.TipSetKey) ([]address.Address, error) `perm:"read"`
|
||||||
|
|
||||||
StateListMessages func(p0 context.Context, p1 *MessageMatch, p2 types.TipSetKey, p3 abi.ChainEpoch) ([]cid.Cid, error) `perm:"read"`
|
StateListMessages func(p0 context.Context, p1 *MessageMatch, p2 types.TipSetKey, p3 abi.ChainEpoch) ([]cid.Cid, error) `perm:"read"`
|
||||||
@@ -470,10 +482,20 @@ type GatewayStruct struct {
|
|||||||
Internal struct {
|
Internal struct {
|
||||||
ChainGetBlockMessages func(p0 context.Context, p1 cid.Cid) (*BlockMessages, error) ``
|
ChainGetBlockMessages func(p0 context.Context, p1 cid.Cid) (*BlockMessages, error) ``
|
||||||
|
|
||||||
|
ChainGetGenesis func(p0 context.Context) (*types.TipSet, error) ``
|
||||||
|
|
||||||
ChainGetMessage func(p0 context.Context, p1 cid.Cid) (*types.Message, error) ``
|
ChainGetMessage func(p0 context.Context, p1 cid.Cid) (*types.Message, error) ``
|
||||||
|
|
||||||
|
ChainGetParentMessages func(p0 context.Context, p1 cid.Cid) ([]Message, error) ``
|
||||||
|
|
||||||
|
ChainGetParentReceipts func(p0 context.Context, p1 cid.Cid) ([]*types.MessageReceipt, error) ``
|
||||||
|
|
||||||
|
ChainGetPath func(p0 context.Context, p1 types.TipSetKey, p2 types.TipSetKey) ([]*HeadChange, error) ``
|
||||||
|
|
||||||
ChainGetTipSet func(p0 context.Context, p1 types.TipSetKey) (*types.TipSet, error) ``
|
ChainGetTipSet func(p0 context.Context, p1 types.TipSetKey) (*types.TipSet, error) ``
|
||||||
|
|
||||||
|
ChainGetTipSetAfterHeight func(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) (*types.TipSet, error) ``
|
||||||
|
|
||||||
ChainGetTipSetByHeight func(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) (*types.TipSet, error) ``
|
ChainGetTipSetByHeight func(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) (*types.TipSet, error) ``
|
||||||
|
|
||||||
ChainHasObj func(p0 context.Context, p1 cid.Cid) (bool, error) ``
|
ChainHasObj func(p0 context.Context, p1 cid.Cid) (bool, error) ``
|
||||||
@@ -597,12 +619,22 @@ type StorageMinerStruct struct {
|
|||||||
|
|
||||||
ActorSectorSize func(p0 context.Context, p1 address.Address) (abi.SectorSize, error) `perm:"read"`
|
ActorSectorSize func(p0 context.Context, p1 address.Address) (abi.SectorSize, error) `perm:"read"`
|
||||||
|
|
||||||
CheckProvable func(p0 context.Context, p1 abi.RegisteredPoStProof, p2 []storage.SectorRef, p3 bool) (map[abi.SectorNumber]string, error) `perm:"admin"`
|
CheckProvable func(p0 context.Context, p1 abi.RegisteredPoStProof, p2 []storage.SectorRef, p3 []bool, p4 bool) (map[abi.SectorNumber]string, error) `perm:"admin"`
|
||||||
|
|
||||||
ComputeProof func(p0 context.Context, p1 []builtin.SectorInfo, p2 abi.PoStRandomness) ([]builtin.PoStProof, error) `perm:"read"`
|
ComputeProof func(p0 context.Context, p1 []builtin.ExtendedSectorInfo, p2 abi.PoStRandomness, p3 abi.ChainEpoch, p4 abinetwork.Version) ([]builtin.PoStProof, error) `perm:"read"`
|
||||||
|
|
||||||
CreateBackup func(p0 context.Context, p1 string) error `perm:"admin"`
|
CreateBackup func(p0 context.Context, p1 string) error `perm:"admin"`
|
||||||
|
|
||||||
|
DagstoreGC func(p0 context.Context) ([]DagstoreShardResult, error) `perm:"admin"`
|
||||||
|
|
||||||
|
DagstoreInitializeAll func(p0 context.Context, p1 DagstoreInitializeAllParams) (<-chan DagstoreInitializeAllEvent, error) `perm:"write"`
|
||||||
|
|
||||||
|
DagstoreInitializeShard func(p0 context.Context, p1 string) error `perm:"write"`
|
||||||
|
|
||||||
|
DagstoreListShards func(p0 context.Context) ([]DagstoreShardInfo, error) `perm:"read"`
|
||||||
|
|
||||||
|
DagstoreRecoverShard func(p0 context.Context, p1 string) error `perm:"write"`
|
||||||
|
|
||||||
DealsConsiderOfflineRetrievalDeals func(p0 context.Context) (bool, error) `perm:"admin"`
|
DealsConsiderOfflineRetrievalDeals func(p0 context.Context) (bool, error) `perm:"admin"`
|
||||||
|
|
||||||
DealsConsiderOfflineStorageDeals func(p0 context.Context) (bool, error) `perm:"admin"`
|
DealsConsiderOfflineStorageDeals func(p0 context.Context) (bool, error) `perm:"admin"`
|
||||||
@@ -661,6 +693,8 @@ type StorageMinerStruct struct {
|
|||||||
|
|
||||||
MarketRestartDataTransfer func(p0 context.Context, p1 datatransfer.TransferID, p2 peer.ID, p3 bool) error `perm:"write"`
|
MarketRestartDataTransfer func(p0 context.Context, p1 datatransfer.TransferID, p2 peer.ID, p3 bool) error `perm:"write"`
|
||||||
|
|
||||||
|
MarketRetryPublishDeal func(p0 context.Context, p1 cid.Cid) error `perm:"admin"`
|
||||||
|
|
||||||
MarketSetAsk func(p0 context.Context, p1 types.BigInt, p2 types.BigInt, p3 abi.ChainEpoch, p4 abi.PaddedPieceSize, p5 abi.PaddedPieceSize) error `perm:"admin"`
|
MarketSetAsk func(p0 context.Context, p1 types.BigInt, p2 types.BigInt, p3 abi.ChainEpoch, p4 abi.PaddedPieceSize, p5 abi.PaddedPieceSize) error `perm:"admin"`
|
||||||
|
|
||||||
MarketSetRetrievalAsk func(p0 context.Context, p1 *retrievalmarket.Ask) error `perm:"admin"`
|
MarketSetRetrievalAsk func(p0 context.Context, p1 *retrievalmarket.Ask) error `perm:"admin"`
|
||||||
@@ -681,14 +715,24 @@ type StorageMinerStruct struct {
|
|||||||
|
|
||||||
ReturnFetch func(p0 context.Context, p1 storiface.CallID, p2 *storiface.CallError) error `perm:"admin"`
|
ReturnFetch func(p0 context.Context, p1 storiface.CallID, p2 *storiface.CallError) error `perm:"admin"`
|
||||||
|
|
||||||
|
ReturnFinalizeReplicaUpdate func(p0 context.Context, p1 storiface.CallID, p2 *storiface.CallError) error `perm:"admin"`
|
||||||
|
|
||||||
ReturnFinalizeSector func(p0 context.Context, p1 storiface.CallID, p2 *storiface.CallError) error `perm:"admin"`
|
ReturnFinalizeSector func(p0 context.Context, p1 storiface.CallID, p2 *storiface.CallError) error `perm:"admin"`
|
||||||
|
|
||||||
|
ReturnGenerateSectorKeyFromData func(p0 context.Context, p1 storiface.CallID, p2 *storiface.CallError) error `perm:"admin"`
|
||||||
|
|
||||||
ReturnMoveStorage func(p0 context.Context, p1 storiface.CallID, p2 *storiface.CallError) error `perm:"admin"`
|
ReturnMoveStorage func(p0 context.Context, p1 storiface.CallID, p2 *storiface.CallError) error `perm:"admin"`
|
||||||
|
|
||||||
|
ReturnProveReplicaUpdate1 func(p0 context.Context, p1 storiface.CallID, p2 storage.ReplicaVanillaProofs, p3 *storiface.CallError) error `perm:"admin"`
|
||||||
|
|
||||||
|
ReturnProveReplicaUpdate2 func(p0 context.Context, p1 storiface.CallID, p2 storage.ReplicaUpdateProof, p3 *storiface.CallError) error `perm:"admin"`
|
||||||
|
|
||||||
ReturnReadPiece func(p0 context.Context, p1 storiface.CallID, p2 bool, p3 *storiface.CallError) error `perm:"admin"`
|
ReturnReadPiece func(p0 context.Context, p1 storiface.CallID, p2 bool, p3 *storiface.CallError) error `perm:"admin"`
|
||||||
|
|
||||||
ReturnReleaseUnsealed func(p0 context.Context, p1 storiface.CallID, p2 *storiface.CallError) error `perm:"admin"`
|
ReturnReleaseUnsealed func(p0 context.Context, p1 storiface.CallID, p2 *storiface.CallError) error `perm:"admin"`
|
||||||
|
|
||||||
|
ReturnReplicaUpdate func(p0 context.Context, p1 storiface.CallID, p2 storage.ReplicaUpdateOut, p3 *storiface.CallError) error `perm:"admin"`
|
||||||
|
|
||||||
ReturnSealCommit1 func(p0 context.Context, p1 storiface.CallID, p2 storage.Commit1Out, p3 *storiface.CallError) error `perm:"admin"`
|
ReturnSealCommit1 func(p0 context.Context, p1 storiface.CallID, p2 storage.Commit1Out, p3 *storiface.CallError) error `perm:"admin"`
|
||||||
|
|
||||||
ReturnSealCommit2 func(p0 context.Context, p1 storiface.CallID, p2 storage.Proof, p3 *storiface.CallError) error `perm:"admin"`
|
ReturnSealCommit2 func(p0 context.Context, p1 storiface.CallID, p2 storage.Proof, p3 *storiface.CallError) error `perm:"admin"`
|
||||||
@@ -699,10 +743,14 @@ type StorageMinerStruct struct {
|
|||||||
|
|
||||||
ReturnUnsealPiece func(p0 context.Context, p1 storiface.CallID, p2 *storiface.CallError) error `perm:"admin"`
|
ReturnUnsealPiece func(p0 context.Context, p1 storiface.CallID, p2 *storiface.CallError) error `perm:"admin"`
|
||||||
|
|
||||||
|
RuntimeSubsystems func(p0 context.Context) (MinerSubsystems, error) `perm:"read"`
|
||||||
|
|
||||||
SealingAbort func(p0 context.Context, p1 storiface.CallID) error `perm:"admin"`
|
SealingAbort func(p0 context.Context, p1 storiface.CallID) error `perm:"admin"`
|
||||||
|
|
||||||
SealingSchedDiag func(p0 context.Context, p1 bool) (interface{}, error) `perm:"admin"`
|
SealingSchedDiag func(p0 context.Context, p1 bool) (interface{}, error) `perm:"admin"`
|
||||||
|
|
||||||
|
SectorAbortUpgrade func(p0 context.Context, p1 abi.SectorNumber) error `perm:"admin"`
|
||||||
|
|
||||||
SectorAddPieceToAny func(p0 context.Context, p1 abi.UnpaddedPieceSize, p2 storage.Data, p3 PieceDealInfo) (SectorOffset, error) `perm:"admin"`
|
SectorAddPieceToAny func(p0 context.Context, p1 abi.UnpaddedPieceSize, p2 storage.Data, p3 PieceDealInfo) (SectorOffset, error) `perm:"admin"`
|
||||||
|
|
||||||
SectorCommitFlush func(p0 context.Context) ([]sealiface.CommitBatchRes, error) `perm:"admin"`
|
SectorCommitFlush func(p0 context.Context) ([]sealiface.CommitBatchRes, error) `perm:"admin"`
|
||||||
@@ -713,7 +761,9 @@ type StorageMinerStruct struct {
|
|||||||
|
|
||||||
SectorGetSealDelay func(p0 context.Context) (time.Duration, error) `perm:"read"`
|
SectorGetSealDelay func(p0 context.Context) (time.Duration, error) `perm:"read"`
|
||||||
|
|
||||||
SectorMarkForUpgrade func(p0 context.Context, p1 abi.SectorNumber) error `perm:"admin"`
|
SectorMarkForUpgrade func(p0 context.Context, p1 abi.SectorNumber, p2 bool) error `perm:"admin"`
|
||||||
|
|
||||||
|
SectorMatchPendingPiecesToOpenSectors func(p0 context.Context) error `perm:"admin"`
|
||||||
|
|
||||||
SectorPreCommitFlush func(p0 context.Context) ([]sealiface.PreCommitBatchRes, error) `perm:"admin"`
|
SectorPreCommitFlush func(p0 context.Context) ([]sealiface.PreCommitBatchRes, error) `perm:"admin"`
|
||||||
|
|
||||||
@@ -816,8 +866,12 @@ type WorkerStruct struct {
|
|||||||
|
|
||||||
Fetch func(p0 context.Context, p1 storage.SectorRef, p2 storiface.SectorFileType, p3 storiface.PathType, p4 storiface.AcquireMode) (storiface.CallID, error) `perm:"admin"`
|
Fetch func(p0 context.Context, p1 storage.SectorRef, p2 storiface.SectorFileType, p3 storiface.PathType, p4 storiface.AcquireMode) (storiface.CallID, error) `perm:"admin"`
|
||||||
|
|
||||||
|
FinalizeReplicaUpdate func(p0 context.Context, p1 storage.SectorRef, p2 []storage.Range) (storiface.CallID, error) `perm:"admin"`
|
||||||
|
|
||||||
FinalizeSector func(p0 context.Context, p1 storage.SectorRef, p2 []storage.Range) (storiface.CallID, error) `perm:"admin"`
|
FinalizeSector func(p0 context.Context, p1 storage.SectorRef, p2 []storage.Range) (storiface.CallID, error) `perm:"admin"`
|
||||||
|
|
||||||
|
GenerateSectorKeyFromData func(p0 context.Context, p1 storage.SectorRef, p2 cid.Cid) (storiface.CallID, error) `perm:"admin"`
|
||||||
|
|
||||||
Info func(p0 context.Context) (storiface.WorkerInfo, error) `perm:"admin"`
|
Info func(p0 context.Context) (storiface.WorkerInfo, error) `perm:"admin"`
|
||||||
|
|
||||||
MoveStorage func(p0 context.Context, p1 storage.SectorRef, p2 storiface.SectorFileType) (storiface.CallID, error) `perm:"admin"`
|
MoveStorage func(p0 context.Context, p1 storage.SectorRef, p2 storiface.SectorFileType) (storiface.CallID, error) `perm:"admin"`
|
||||||
@@ -826,10 +880,16 @@ type WorkerStruct struct {
|
|||||||
|
|
||||||
ProcessSession func(p0 context.Context) (uuid.UUID, error) `perm:"admin"`
|
ProcessSession func(p0 context.Context) (uuid.UUID, error) `perm:"admin"`
|
||||||
|
|
||||||
|
ProveReplicaUpdate1 func(p0 context.Context, p1 storage.SectorRef, p2 cid.Cid, p3 cid.Cid, p4 cid.Cid) (storiface.CallID, error) `perm:"admin"`
|
||||||
|
|
||||||
|
ProveReplicaUpdate2 func(p0 context.Context, p1 storage.SectorRef, p2 cid.Cid, p3 cid.Cid, p4 cid.Cid, p5 storage.ReplicaVanillaProofs) (storiface.CallID, error) `perm:"admin"`
|
||||||
|
|
||||||
ReleaseUnsealed func(p0 context.Context, p1 storage.SectorRef, p2 []storage.Range) (storiface.CallID, error) `perm:"admin"`
|
ReleaseUnsealed func(p0 context.Context, p1 storage.SectorRef, p2 []storage.Range) (storiface.CallID, error) `perm:"admin"`
|
||||||
|
|
||||||
Remove func(p0 context.Context, p1 abi.SectorID) error `perm:"admin"`
|
Remove func(p0 context.Context, p1 abi.SectorID) error `perm:"admin"`
|
||||||
|
|
||||||
|
ReplicaUpdate func(p0 context.Context, p1 storage.SectorRef, p2 []abi.PieceInfo) (storiface.CallID, error) `perm:"admin"`
|
||||||
|
|
||||||
SealCommit1 func(p0 context.Context, p1 storage.SectorRef, p2 abi.SealRandomness, p3 abi.InteractiveSealRandomness, p4 []abi.PieceInfo, p5 storage.SectorCids) (storiface.CallID, error) `perm:"admin"`
|
SealCommit1 func(p0 context.Context, p1 storage.SectorRef, p2 abi.SealRandomness, p3 abi.InteractiveSealRandomness, p4 []abi.PieceInfo, p5 storage.SectorCids) (storiface.CallID, error) `perm:"admin"`
|
||||||
|
|
||||||
SealCommit2 func(p0 context.Context, p1 storage.SectorRef, p2 storage.Commit1Out) (storiface.CallID, error) `perm:"admin"`
|
SealCommit2 func(p0 context.Context, p1 storage.SectorRef, p2 storage.Commit1Out) (storiface.CallID, error) `perm:"admin"`
|
||||||
@@ -927,6 +987,17 @@ func (s *CommonStub) Discover(p0 context.Context) (apitypes.OpenRPCDocument, err
|
|||||||
return *new(apitypes.OpenRPCDocument), ErrNotSupported
|
return *new(apitypes.OpenRPCDocument), ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *CommonStruct) LogAlerts(p0 context.Context) ([]alerting.Alert, error) {
|
||||||
|
if s.Internal.LogAlerts == nil {
|
||||||
|
return *new([]alerting.Alert), ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.LogAlerts(p0)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *CommonStub) LogAlerts(p0 context.Context) ([]alerting.Alert, error) {
|
||||||
|
return *new([]alerting.Alert), ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
func (s *CommonStruct) LogList(p0 context.Context) ([]string, error) {
|
func (s *CommonStruct) LogList(p0 context.Context) ([]string, error) {
|
||||||
if s.Internal.LogList == nil {
|
if s.Internal.LogList == nil {
|
||||||
return *new([]string), ErrNotSupported
|
return *new([]string), ErrNotSupported
|
||||||
@@ -1136,28 +1207,6 @@ func (s *FullNodeStub) ChainGetPath(p0 context.Context, p1 types.TipSetKey, p2 t
|
|||||||
return *new([]*HeadChange), ErrNotSupported
|
return *new([]*HeadChange), ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FullNodeStruct) ChainGetRandomnessFromBeacon(p0 context.Context, p1 types.TipSetKey, p2 crypto.DomainSeparationTag, p3 abi.ChainEpoch, p4 []byte) (abi.Randomness, error) {
|
|
||||||
if s.Internal.ChainGetRandomnessFromBeacon == nil {
|
|
||||||
return *new(abi.Randomness), ErrNotSupported
|
|
||||||
}
|
|
||||||
return s.Internal.ChainGetRandomnessFromBeacon(p0, p1, p2, p3, p4)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *FullNodeStub) ChainGetRandomnessFromBeacon(p0 context.Context, p1 types.TipSetKey, p2 crypto.DomainSeparationTag, p3 abi.ChainEpoch, p4 []byte) (abi.Randomness, error) {
|
|
||||||
return *new(abi.Randomness), ErrNotSupported
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *FullNodeStruct) ChainGetRandomnessFromTickets(p0 context.Context, p1 types.TipSetKey, p2 crypto.DomainSeparationTag, p3 abi.ChainEpoch, p4 []byte) (abi.Randomness, error) {
|
|
||||||
if s.Internal.ChainGetRandomnessFromTickets == nil {
|
|
||||||
return *new(abi.Randomness), ErrNotSupported
|
|
||||||
}
|
|
||||||
return s.Internal.ChainGetRandomnessFromTickets(p0, p1, p2, p3, p4)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *FullNodeStub) ChainGetRandomnessFromTickets(p0 context.Context, p1 types.TipSetKey, p2 crypto.DomainSeparationTag, p3 abi.ChainEpoch, p4 []byte) (abi.Randomness, error) {
|
|
||||||
return *new(abi.Randomness), ErrNotSupported
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *FullNodeStruct) ChainGetTipSet(p0 context.Context, p1 types.TipSetKey) (*types.TipSet, error) {
|
func (s *FullNodeStruct) ChainGetTipSet(p0 context.Context, p1 types.TipSetKey) (*types.TipSet, error) {
|
||||||
if s.Internal.ChainGetTipSet == nil {
|
if s.Internal.ChainGetTipSet == nil {
|
||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
@@ -1169,6 +1218,17 @@ func (s *FullNodeStub) ChainGetTipSet(p0 context.Context, p1 types.TipSetKey) (*
|
|||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *FullNodeStruct) ChainGetTipSetAfterHeight(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) (*types.TipSet, error) {
|
||||||
|
if s.Internal.ChainGetTipSetAfterHeight == nil {
|
||||||
|
return nil, ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.ChainGetTipSetAfterHeight(p0, p1, p2)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *FullNodeStub) ChainGetTipSetAfterHeight(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) (*types.TipSet, error) {
|
||||||
|
return nil, ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
func (s *FullNodeStruct) ChainGetTipSetByHeight(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) (*types.TipSet, error) {
|
func (s *FullNodeStruct) ChainGetTipSetByHeight(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) (*types.TipSet, error) {
|
||||||
if s.Internal.ChainGetTipSetByHeight == nil {
|
if s.Internal.ChainGetTipSetByHeight == nil {
|
||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
@@ -1323,6 +1383,17 @@ func (s *FullNodeStub) ClientDealSize(p0 context.Context, p1 cid.Cid) (DataSize,
|
|||||||
return *new(DataSize), ErrNotSupported
|
return *new(DataSize), ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *FullNodeStruct) ClientExport(p0 context.Context, p1 ExportRef, p2 FileRef) error {
|
||||||
|
if s.Internal.ClientExport == nil {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.ClientExport(p0, p1, p2)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *FullNodeStub) ClientExport(p0 context.Context, p1 ExportRef, p2 FileRef) error {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
func (s *FullNodeStruct) ClientFindData(p0 context.Context, p1 cid.Cid, p2 *cid.Cid) ([]QueryOffer, error) {
|
func (s *FullNodeStruct) ClientFindData(p0 context.Context, p1 cid.Cid, p2 *cid.Cid) ([]QueryOffer, error) {
|
||||||
if s.Internal.ClientFindData == nil {
|
if s.Internal.ClientFindData == nil {
|
||||||
return *new([]QueryOffer), ErrNotSupported
|
return *new([]QueryOffer), ErrNotSupported
|
||||||
@@ -1477,14 +1548,14 @@ func (s *FullNodeStub) ClientQueryAsk(p0 context.Context, p1 peer.ID, p2 address
|
|||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FullNodeStruct) ClientRemoveImport(p0 context.Context, p1 multistore.StoreID) error {
|
func (s *FullNodeStruct) ClientRemoveImport(p0 context.Context, p1 imports.ID) error {
|
||||||
if s.Internal.ClientRemoveImport == nil {
|
if s.Internal.ClientRemoveImport == nil {
|
||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
return s.Internal.ClientRemoveImport(p0, p1)
|
return s.Internal.ClientRemoveImport(p0, p1)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FullNodeStub) ClientRemoveImport(p0 context.Context, p1 multistore.StoreID) error {
|
func (s *FullNodeStub) ClientRemoveImport(p0 context.Context, p1 imports.ID) error {
|
||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1499,15 +1570,15 @@ func (s *FullNodeStub) ClientRestartDataTransfer(p0 context.Context, p1 datatran
|
|||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FullNodeStruct) ClientRetrieve(p0 context.Context, p1 RetrievalOrder, p2 *FileRef) error {
|
func (s *FullNodeStruct) ClientRetrieve(p0 context.Context, p1 RetrievalOrder) (*RestrievalRes, error) {
|
||||||
if s.Internal.ClientRetrieve == nil {
|
if s.Internal.ClientRetrieve == nil {
|
||||||
return ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
return s.Internal.ClientRetrieve(p0, p1, p2)
|
return s.Internal.ClientRetrieve(p0, p1)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FullNodeStub) ClientRetrieve(p0 context.Context, p1 RetrievalOrder, p2 *FileRef) error {
|
func (s *FullNodeStub) ClientRetrieve(p0 context.Context, p1 RetrievalOrder) (*RestrievalRes, error) {
|
||||||
return ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FullNodeStruct) ClientRetrieveTryRestartInsufficientFunds(p0 context.Context, p1 address.Address) error {
|
func (s *FullNodeStruct) ClientRetrieveTryRestartInsufficientFunds(p0 context.Context, p1 address.Address) error {
|
||||||
@@ -1521,15 +1592,15 @@ func (s *FullNodeStub) ClientRetrieveTryRestartInsufficientFunds(p0 context.Cont
|
|||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FullNodeStruct) ClientRetrieveWithEvents(p0 context.Context, p1 RetrievalOrder, p2 *FileRef) (<-chan marketevents.RetrievalEvent, error) {
|
func (s *FullNodeStruct) ClientRetrieveWait(p0 context.Context, p1 retrievalmarket.DealID) error {
|
||||||
if s.Internal.ClientRetrieveWithEvents == nil {
|
if s.Internal.ClientRetrieveWait == nil {
|
||||||
return nil, ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
return s.Internal.ClientRetrieveWithEvents(p0, p1, p2)
|
return s.Internal.ClientRetrieveWait(p0, p1)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FullNodeStub) ClientRetrieveWithEvents(p0 context.Context, p1 RetrievalOrder, p2 *FileRef) (<-chan marketevents.RetrievalEvent, error) {
|
func (s *FullNodeStub) ClientRetrieveWait(p0 context.Context, p1 retrievalmarket.DealID) error {
|
||||||
return nil, ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FullNodeStruct) ClientStartDeal(p0 context.Context, p1 *StartDealParams) (*cid.Cid, error) {
|
func (s *FullNodeStruct) ClientStartDeal(p0 context.Context, p1 *StartDealParams) (*cid.Cid, error) {
|
||||||
@@ -1917,14 +1988,25 @@ func (s *FullNodeStub) MsigApproveTxnHash(p0 context.Context, p1 address.Address
|
|||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FullNodeStruct) MsigCancel(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address, p4 types.BigInt, p5 address.Address, p6 uint64, p7 []byte) (*MessagePrototype, error) {
|
func (s *FullNodeStruct) MsigCancel(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address) (*MessagePrototype, error) {
|
||||||
if s.Internal.MsigCancel == nil {
|
if s.Internal.MsigCancel == nil {
|
||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
return s.Internal.MsigCancel(p0, p1, p2, p3, p4, p5, p6, p7)
|
return s.Internal.MsigCancel(p0, p1, p2, p3)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FullNodeStub) MsigCancel(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address, p4 types.BigInt, p5 address.Address, p6 uint64, p7 []byte) (*MessagePrototype, error) {
|
func (s *FullNodeStub) MsigCancel(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address) (*MessagePrototype, error) {
|
||||||
|
return nil, ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *FullNodeStruct) MsigCancelTxnHash(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address, p4 types.BigInt, p5 address.Address, p6 uint64, p7 []byte) (*MessagePrototype, error) {
|
||||||
|
if s.Internal.MsigCancelTxnHash == nil {
|
||||||
|
return nil, ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.MsigCancelTxnHash(p0, p1, p2, p3, p4, p5, p6, p7)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *FullNodeStub) MsigCancelTxnHash(p0 context.Context, p1 address.Address, p2 uint64, p3 address.Address, p4 types.BigInt, p5 address.Address, p6 uint64, p7 []byte) (*MessagePrototype, error) {
|
||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2313,6 +2395,17 @@ func (s *FullNodeStub) StateDecodeParams(p0 context.Context, p1 address.Address,
|
|||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *FullNodeStruct) StateEncodeParams(p0 context.Context, p1 cid.Cid, p2 abi.MethodNum, p3 json.RawMessage) ([]byte, error) {
|
||||||
|
if s.Internal.StateEncodeParams == nil {
|
||||||
|
return *new([]byte), ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.StateEncodeParams(p0, p1, p2, p3)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *FullNodeStub) StateEncodeParams(p0 context.Context, p1 cid.Cid, p2 abi.MethodNum, p3 json.RawMessage) ([]byte, error) {
|
||||||
|
return *new([]byte), ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
func (s *FullNodeStruct) StateGetActor(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*types.Actor, error) {
|
func (s *FullNodeStruct) StateGetActor(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*types.Actor, error) {
|
||||||
if s.Internal.StateGetActor == nil {
|
if s.Internal.StateGetActor == nil {
|
||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
@@ -2324,6 +2417,28 @@ func (s *FullNodeStub) StateGetActor(p0 context.Context, p1 address.Address, p2
|
|||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *FullNodeStruct) StateGetRandomnessFromBeacon(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) {
|
||||||
|
if s.Internal.StateGetRandomnessFromBeacon == nil {
|
||||||
|
return *new(abi.Randomness), ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.StateGetRandomnessFromBeacon(p0, p1, p2, p3, p4)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *FullNodeStub) StateGetRandomnessFromBeacon(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) {
|
||||||
|
return *new(abi.Randomness), ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *FullNodeStruct) StateGetRandomnessFromTickets(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) {
|
||||||
|
if s.Internal.StateGetRandomnessFromTickets == nil {
|
||||||
|
return *new(abi.Randomness), ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.StateGetRandomnessFromTickets(p0, p1, p2, p3, p4)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *FullNodeStub) StateGetRandomnessFromTickets(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) {
|
||||||
|
return *new(abi.Randomness), ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
func (s *FullNodeStruct) StateListActors(p0 context.Context, p1 types.TipSetKey) ([]address.Address, error) {
|
func (s *FullNodeStruct) StateListActors(p0 context.Context, p1 types.TipSetKey) ([]address.Address, error) {
|
||||||
if s.Internal.StateListActors == nil {
|
if s.Internal.StateListActors == nil {
|
||||||
return *new([]address.Address), ErrNotSupported
|
return *new([]address.Address), ErrNotSupported
|
||||||
@@ -2973,6 +3088,17 @@ func (s *GatewayStub) ChainGetBlockMessages(p0 context.Context, p1 cid.Cid) (*Bl
|
|||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *GatewayStruct) ChainGetGenesis(p0 context.Context) (*types.TipSet, error) {
|
||||||
|
if s.Internal.ChainGetGenesis == nil {
|
||||||
|
return nil, ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.ChainGetGenesis(p0)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *GatewayStub) ChainGetGenesis(p0 context.Context) (*types.TipSet, error) {
|
||||||
|
return nil, ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
func (s *GatewayStruct) ChainGetMessage(p0 context.Context, p1 cid.Cid) (*types.Message, error) {
|
func (s *GatewayStruct) ChainGetMessage(p0 context.Context, p1 cid.Cid) (*types.Message, error) {
|
||||||
if s.Internal.ChainGetMessage == nil {
|
if s.Internal.ChainGetMessage == nil {
|
||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
@@ -2984,6 +3110,39 @@ func (s *GatewayStub) ChainGetMessage(p0 context.Context, p1 cid.Cid) (*types.Me
|
|||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *GatewayStruct) ChainGetParentMessages(p0 context.Context, p1 cid.Cid) ([]Message, error) {
|
||||||
|
if s.Internal.ChainGetParentMessages == nil {
|
||||||
|
return *new([]Message), ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.ChainGetParentMessages(p0, p1)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *GatewayStub) ChainGetParentMessages(p0 context.Context, p1 cid.Cid) ([]Message, error) {
|
||||||
|
return *new([]Message), ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *GatewayStruct) ChainGetParentReceipts(p0 context.Context, p1 cid.Cid) ([]*types.MessageReceipt, error) {
|
||||||
|
if s.Internal.ChainGetParentReceipts == nil {
|
||||||
|
return *new([]*types.MessageReceipt), ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.ChainGetParentReceipts(p0, p1)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *GatewayStub) ChainGetParentReceipts(p0 context.Context, p1 cid.Cid) ([]*types.MessageReceipt, error) {
|
||||||
|
return *new([]*types.MessageReceipt), ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *GatewayStruct) ChainGetPath(p0 context.Context, p1 types.TipSetKey, p2 types.TipSetKey) ([]*HeadChange, error) {
|
||||||
|
if s.Internal.ChainGetPath == nil {
|
||||||
|
return *new([]*HeadChange), ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.ChainGetPath(p0, p1, p2)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *GatewayStub) ChainGetPath(p0 context.Context, p1 types.TipSetKey, p2 types.TipSetKey) ([]*HeadChange, error) {
|
||||||
|
return *new([]*HeadChange), ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
func (s *GatewayStruct) ChainGetTipSet(p0 context.Context, p1 types.TipSetKey) (*types.TipSet, error) {
|
func (s *GatewayStruct) ChainGetTipSet(p0 context.Context, p1 types.TipSetKey) (*types.TipSet, error) {
|
||||||
if s.Internal.ChainGetTipSet == nil {
|
if s.Internal.ChainGetTipSet == nil {
|
||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
@@ -2995,6 +3154,17 @@ func (s *GatewayStub) ChainGetTipSet(p0 context.Context, p1 types.TipSetKey) (*t
|
|||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *GatewayStruct) ChainGetTipSetAfterHeight(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) (*types.TipSet, error) {
|
||||||
|
if s.Internal.ChainGetTipSetAfterHeight == nil {
|
||||||
|
return nil, ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.ChainGetTipSetAfterHeight(p0, p1, p2)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *GatewayStub) ChainGetTipSetAfterHeight(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) (*types.TipSet, error) {
|
||||||
|
return nil, ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
func (s *GatewayStruct) ChainGetTipSetByHeight(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) (*types.TipSet, error) {
|
func (s *GatewayStruct) ChainGetTipSetByHeight(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) (*types.TipSet, error) {
|
||||||
if s.Internal.ChainGetTipSetByHeight == nil {
|
if s.Internal.ChainGetTipSetByHeight == nil {
|
||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
@@ -3534,25 +3704,25 @@ func (s *StorageMinerStub) ActorSectorSize(p0 context.Context, p1 address.Addres
|
|||||||
return *new(abi.SectorSize), ErrNotSupported
|
return *new(abi.SectorSize), ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *StorageMinerStruct) CheckProvable(p0 context.Context, p1 abi.RegisteredPoStProof, p2 []storage.SectorRef, p3 bool) (map[abi.SectorNumber]string, error) {
|
func (s *StorageMinerStruct) CheckProvable(p0 context.Context, p1 abi.RegisteredPoStProof, p2 []storage.SectorRef, p3 []bool, p4 bool) (map[abi.SectorNumber]string, error) {
|
||||||
if s.Internal.CheckProvable == nil {
|
if s.Internal.CheckProvable == nil {
|
||||||
return *new(map[abi.SectorNumber]string), ErrNotSupported
|
return *new(map[abi.SectorNumber]string), ErrNotSupported
|
||||||
}
|
}
|
||||||
return s.Internal.CheckProvable(p0, p1, p2, p3)
|
return s.Internal.CheckProvable(p0, p1, p2, p3, p4)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *StorageMinerStub) CheckProvable(p0 context.Context, p1 abi.RegisteredPoStProof, p2 []storage.SectorRef, p3 bool) (map[abi.SectorNumber]string, error) {
|
func (s *StorageMinerStub) CheckProvable(p0 context.Context, p1 abi.RegisteredPoStProof, p2 []storage.SectorRef, p3 []bool, p4 bool) (map[abi.SectorNumber]string, error) {
|
||||||
return *new(map[abi.SectorNumber]string), ErrNotSupported
|
return *new(map[abi.SectorNumber]string), ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *StorageMinerStruct) ComputeProof(p0 context.Context, p1 []builtin.SectorInfo, p2 abi.PoStRandomness) ([]builtin.PoStProof, error) {
|
func (s *StorageMinerStruct) ComputeProof(p0 context.Context, p1 []builtin.ExtendedSectorInfo, p2 abi.PoStRandomness, p3 abi.ChainEpoch, p4 abinetwork.Version) ([]builtin.PoStProof, error) {
|
||||||
if s.Internal.ComputeProof == nil {
|
if s.Internal.ComputeProof == nil {
|
||||||
return *new([]builtin.PoStProof), ErrNotSupported
|
return *new([]builtin.PoStProof), ErrNotSupported
|
||||||
}
|
}
|
||||||
return s.Internal.ComputeProof(p0, p1, p2)
|
return s.Internal.ComputeProof(p0, p1, p2, p3, p4)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *StorageMinerStub) ComputeProof(p0 context.Context, p1 []builtin.SectorInfo, p2 abi.PoStRandomness) ([]builtin.PoStProof, error) {
|
func (s *StorageMinerStub) ComputeProof(p0 context.Context, p1 []builtin.ExtendedSectorInfo, p2 abi.PoStRandomness, p3 abi.ChainEpoch, p4 abinetwork.Version) ([]builtin.PoStProof, error) {
|
||||||
return *new([]builtin.PoStProof), ErrNotSupported
|
return *new([]builtin.PoStProof), ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3567,6 +3737,61 @@ func (s *StorageMinerStub) CreateBackup(p0 context.Context, p1 string) error {
|
|||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStruct) DagstoreGC(p0 context.Context) ([]DagstoreShardResult, error) {
|
||||||
|
if s.Internal.DagstoreGC == nil {
|
||||||
|
return *new([]DagstoreShardResult), ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.DagstoreGC(p0)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStub) DagstoreGC(p0 context.Context) ([]DagstoreShardResult, error) {
|
||||||
|
return *new([]DagstoreShardResult), ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStruct) DagstoreInitializeAll(p0 context.Context, p1 DagstoreInitializeAllParams) (<-chan DagstoreInitializeAllEvent, error) {
|
||||||
|
if s.Internal.DagstoreInitializeAll == nil {
|
||||||
|
return nil, ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.DagstoreInitializeAll(p0, p1)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStub) DagstoreInitializeAll(p0 context.Context, p1 DagstoreInitializeAllParams) (<-chan DagstoreInitializeAllEvent, error) {
|
||||||
|
return nil, ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStruct) DagstoreInitializeShard(p0 context.Context, p1 string) error {
|
||||||
|
if s.Internal.DagstoreInitializeShard == nil {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.DagstoreInitializeShard(p0, p1)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStub) DagstoreInitializeShard(p0 context.Context, p1 string) error {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStruct) DagstoreListShards(p0 context.Context) ([]DagstoreShardInfo, error) {
|
||||||
|
if s.Internal.DagstoreListShards == nil {
|
||||||
|
return *new([]DagstoreShardInfo), ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.DagstoreListShards(p0)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStub) DagstoreListShards(p0 context.Context) ([]DagstoreShardInfo, error) {
|
||||||
|
return *new([]DagstoreShardInfo), ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStruct) DagstoreRecoverShard(p0 context.Context, p1 string) error {
|
||||||
|
if s.Internal.DagstoreRecoverShard == nil {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.DagstoreRecoverShard(p0, p1)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStub) DagstoreRecoverShard(p0 context.Context, p1 string) error {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
func (s *StorageMinerStruct) DealsConsiderOfflineRetrievalDeals(p0 context.Context) (bool, error) {
|
func (s *StorageMinerStruct) DealsConsiderOfflineRetrievalDeals(p0 context.Context) (bool, error) {
|
||||||
if s.Internal.DealsConsiderOfflineRetrievalDeals == nil {
|
if s.Internal.DealsConsiderOfflineRetrievalDeals == nil {
|
||||||
return false, ErrNotSupported
|
return false, ErrNotSupported
|
||||||
@@ -3886,6 +4111,17 @@ func (s *StorageMinerStub) MarketRestartDataTransfer(p0 context.Context, p1 data
|
|||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStruct) MarketRetryPublishDeal(p0 context.Context, p1 cid.Cid) error {
|
||||||
|
if s.Internal.MarketRetryPublishDeal == nil {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.MarketRetryPublishDeal(p0, p1)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStub) MarketRetryPublishDeal(p0 context.Context, p1 cid.Cid) error {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
func (s *StorageMinerStruct) MarketSetAsk(p0 context.Context, p1 types.BigInt, p2 types.BigInt, p3 abi.ChainEpoch, p4 abi.PaddedPieceSize, p5 abi.PaddedPieceSize) error {
|
func (s *StorageMinerStruct) MarketSetAsk(p0 context.Context, p1 types.BigInt, p2 types.BigInt, p3 abi.ChainEpoch, p4 abi.PaddedPieceSize, p5 abi.PaddedPieceSize) error {
|
||||||
if s.Internal.MarketSetAsk == nil {
|
if s.Internal.MarketSetAsk == nil {
|
||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
@@ -3996,6 +4232,17 @@ func (s *StorageMinerStub) ReturnFetch(p0 context.Context, p1 storiface.CallID,
|
|||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStruct) ReturnFinalizeReplicaUpdate(p0 context.Context, p1 storiface.CallID, p2 *storiface.CallError) error {
|
||||||
|
if s.Internal.ReturnFinalizeReplicaUpdate == nil {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.ReturnFinalizeReplicaUpdate(p0, p1, p2)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStub) ReturnFinalizeReplicaUpdate(p0 context.Context, p1 storiface.CallID, p2 *storiface.CallError) error {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
func (s *StorageMinerStruct) ReturnFinalizeSector(p0 context.Context, p1 storiface.CallID, p2 *storiface.CallError) error {
|
func (s *StorageMinerStruct) ReturnFinalizeSector(p0 context.Context, p1 storiface.CallID, p2 *storiface.CallError) error {
|
||||||
if s.Internal.ReturnFinalizeSector == nil {
|
if s.Internal.ReturnFinalizeSector == nil {
|
||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
@@ -4007,6 +4254,17 @@ func (s *StorageMinerStub) ReturnFinalizeSector(p0 context.Context, p1 storiface
|
|||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStruct) ReturnGenerateSectorKeyFromData(p0 context.Context, p1 storiface.CallID, p2 *storiface.CallError) error {
|
||||||
|
if s.Internal.ReturnGenerateSectorKeyFromData == nil {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.ReturnGenerateSectorKeyFromData(p0, p1, p2)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStub) ReturnGenerateSectorKeyFromData(p0 context.Context, p1 storiface.CallID, p2 *storiface.CallError) error {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
func (s *StorageMinerStruct) ReturnMoveStorage(p0 context.Context, p1 storiface.CallID, p2 *storiface.CallError) error {
|
func (s *StorageMinerStruct) ReturnMoveStorage(p0 context.Context, p1 storiface.CallID, p2 *storiface.CallError) error {
|
||||||
if s.Internal.ReturnMoveStorage == nil {
|
if s.Internal.ReturnMoveStorage == nil {
|
||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
@@ -4018,6 +4276,28 @@ func (s *StorageMinerStub) ReturnMoveStorage(p0 context.Context, p1 storiface.Ca
|
|||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStruct) ReturnProveReplicaUpdate1(p0 context.Context, p1 storiface.CallID, p2 storage.ReplicaVanillaProofs, p3 *storiface.CallError) error {
|
||||||
|
if s.Internal.ReturnProveReplicaUpdate1 == nil {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.ReturnProveReplicaUpdate1(p0, p1, p2, p3)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStub) ReturnProveReplicaUpdate1(p0 context.Context, p1 storiface.CallID, p2 storage.ReplicaVanillaProofs, p3 *storiface.CallError) error {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStruct) ReturnProveReplicaUpdate2(p0 context.Context, p1 storiface.CallID, p2 storage.ReplicaUpdateProof, p3 *storiface.CallError) error {
|
||||||
|
if s.Internal.ReturnProveReplicaUpdate2 == nil {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.ReturnProveReplicaUpdate2(p0, p1, p2, p3)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStub) ReturnProveReplicaUpdate2(p0 context.Context, p1 storiface.CallID, p2 storage.ReplicaUpdateProof, p3 *storiface.CallError) error {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
func (s *StorageMinerStruct) ReturnReadPiece(p0 context.Context, p1 storiface.CallID, p2 bool, p3 *storiface.CallError) error {
|
func (s *StorageMinerStruct) ReturnReadPiece(p0 context.Context, p1 storiface.CallID, p2 bool, p3 *storiface.CallError) error {
|
||||||
if s.Internal.ReturnReadPiece == nil {
|
if s.Internal.ReturnReadPiece == nil {
|
||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
@@ -4040,6 +4320,17 @@ func (s *StorageMinerStub) ReturnReleaseUnsealed(p0 context.Context, p1 storifac
|
|||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStruct) ReturnReplicaUpdate(p0 context.Context, p1 storiface.CallID, p2 storage.ReplicaUpdateOut, p3 *storiface.CallError) error {
|
||||||
|
if s.Internal.ReturnReplicaUpdate == nil {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.ReturnReplicaUpdate(p0, p1, p2, p3)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStub) ReturnReplicaUpdate(p0 context.Context, p1 storiface.CallID, p2 storage.ReplicaUpdateOut, p3 *storiface.CallError) error {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
func (s *StorageMinerStruct) ReturnSealCommit1(p0 context.Context, p1 storiface.CallID, p2 storage.Commit1Out, p3 *storiface.CallError) error {
|
func (s *StorageMinerStruct) ReturnSealCommit1(p0 context.Context, p1 storiface.CallID, p2 storage.Commit1Out, p3 *storiface.CallError) error {
|
||||||
if s.Internal.ReturnSealCommit1 == nil {
|
if s.Internal.ReturnSealCommit1 == nil {
|
||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
@@ -4095,6 +4386,17 @@ func (s *StorageMinerStub) ReturnUnsealPiece(p0 context.Context, p1 storiface.Ca
|
|||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStruct) RuntimeSubsystems(p0 context.Context) (MinerSubsystems, error) {
|
||||||
|
if s.Internal.RuntimeSubsystems == nil {
|
||||||
|
return *new(MinerSubsystems), ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.RuntimeSubsystems(p0)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStub) RuntimeSubsystems(p0 context.Context) (MinerSubsystems, error) {
|
||||||
|
return *new(MinerSubsystems), ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
func (s *StorageMinerStruct) SealingAbort(p0 context.Context, p1 storiface.CallID) error {
|
func (s *StorageMinerStruct) SealingAbort(p0 context.Context, p1 storiface.CallID) error {
|
||||||
if s.Internal.SealingAbort == nil {
|
if s.Internal.SealingAbort == nil {
|
||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
@@ -4117,6 +4419,17 @@ func (s *StorageMinerStub) SealingSchedDiag(p0 context.Context, p1 bool) (interf
|
|||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStruct) SectorAbortUpgrade(p0 context.Context, p1 abi.SectorNumber) error {
|
||||||
|
if s.Internal.SectorAbortUpgrade == nil {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.SectorAbortUpgrade(p0, p1)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStub) SectorAbortUpgrade(p0 context.Context, p1 abi.SectorNumber) error {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
func (s *StorageMinerStruct) SectorAddPieceToAny(p0 context.Context, p1 abi.UnpaddedPieceSize, p2 storage.Data, p3 PieceDealInfo) (SectorOffset, error) {
|
func (s *StorageMinerStruct) SectorAddPieceToAny(p0 context.Context, p1 abi.UnpaddedPieceSize, p2 storage.Data, p3 PieceDealInfo) (SectorOffset, error) {
|
||||||
if s.Internal.SectorAddPieceToAny == nil {
|
if s.Internal.SectorAddPieceToAny == nil {
|
||||||
return *new(SectorOffset), ErrNotSupported
|
return *new(SectorOffset), ErrNotSupported
|
||||||
@@ -4172,14 +4485,25 @@ func (s *StorageMinerStub) SectorGetSealDelay(p0 context.Context) (time.Duration
|
|||||||
return *new(time.Duration), ErrNotSupported
|
return *new(time.Duration), ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *StorageMinerStruct) SectorMarkForUpgrade(p0 context.Context, p1 abi.SectorNumber) error {
|
func (s *StorageMinerStruct) SectorMarkForUpgrade(p0 context.Context, p1 abi.SectorNumber, p2 bool) error {
|
||||||
if s.Internal.SectorMarkForUpgrade == nil {
|
if s.Internal.SectorMarkForUpgrade == nil {
|
||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
return s.Internal.SectorMarkForUpgrade(p0, p1)
|
return s.Internal.SectorMarkForUpgrade(p0, p1, p2)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *StorageMinerStub) SectorMarkForUpgrade(p0 context.Context, p1 abi.SectorNumber) error {
|
func (s *StorageMinerStub) SectorMarkForUpgrade(p0 context.Context, p1 abi.SectorNumber, p2 bool) error {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStruct) SectorMatchPendingPiecesToOpenSectors(p0 context.Context) error {
|
||||||
|
if s.Internal.SectorMatchPendingPiecesToOpenSectors == nil {
|
||||||
|
return ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.SectorMatchPendingPiecesToOpenSectors(p0)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *StorageMinerStub) SectorMatchPendingPiecesToOpenSectors(p0 context.Context) error {
|
||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4645,6 +4969,17 @@ func (s *WorkerStub) Fetch(p0 context.Context, p1 storage.SectorRef, p2 storifac
|
|||||||
return *new(storiface.CallID), ErrNotSupported
|
return *new(storiface.CallID), ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *WorkerStruct) FinalizeReplicaUpdate(p0 context.Context, p1 storage.SectorRef, p2 []storage.Range) (storiface.CallID, error) {
|
||||||
|
if s.Internal.FinalizeReplicaUpdate == nil {
|
||||||
|
return *new(storiface.CallID), ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.FinalizeReplicaUpdate(p0, p1, p2)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *WorkerStub) FinalizeReplicaUpdate(p0 context.Context, p1 storage.SectorRef, p2 []storage.Range) (storiface.CallID, error) {
|
||||||
|
return *new(storiface.CallID), ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
func (s *WorkerStruct) FinalizeSector(p0 context.Context, p1 storage.SectorRef, p2 []storage.Range) (storiface.CallID, error) {
|
func (s *WorkerStruct) FinalizeSector(p0 context.Context, p1 storage.SectorRef, p2 []storage.Range) (storiface.CallID, error) {
|
||||||
if s.Internal.FinalizeSector == nil {
|
if s.Internal.FinalizeSector == nil {
|
||||||
return *new(storiface.CallID), ErrNotSupported
|
return *new(storiface.CallID), ErrNotSupported
|
||||||
@@ -4656,6 +4991,17 @@ func (s *WorkerStub) FinalizeSector(p0 context.Context, p1 storage.SectorRef, p2
|
|||||||
return *new(storiface.CallID), ErrNotSupported
|
return *new(storiface.CallID), ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *WorkerStruct) GenerateSectorKeyFromData(p0 context.Context, p1 storage.SectorRef, p2 cid.Cid) (storiface.CallID, error) {
|
||||||
|
if s.Internal.GenerateSectorKeyFromData == nil {
|
||||||
|
return *new(storiface.CallID), ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.GenerateSectorKeyFromData(p0, p1, p2)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *WorkerStub) GenerateSectorKeyFromData(p0 context.Context, p1 storage.SectorRef, p2 cid.Cid) (storiface.CallID, error) {
|
||||||
|
return *new(storiface.CallID), ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
func (s *WorkerStruct) Info(p0 context.Context) (storiface.WorkerInfo, error) {
|
func (s *WorkerStruct) Info(p0 context.Context) (storiface.WorkerInfo, error) {
|
||||||
if s.Internal.Info == nil {
|
if s.Internal.Info == nil {
|
||||||
return *new(storiface.WorkerInfo), ErrNotSupported
|
return *new(storiface.WorkerInfo), ErrNotSupported
|
||||||
@@ -4700,6 +5046,28 @@ func (s *WorkerStub) ProcessSession(p0 context.Context) (uuid.UUID, error) {
|
|||||||
return *new(uuid.UUID), ErrNotSupported
|
return *new(uuid.UUID), ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *WorkerStruct) ProveReplicaUpdate1(p0 context.Context, p1 storage.SectorRef, p2 cid.Cid, p3 cid.Cid, p4 cid.Cid) (storiface.CallID, error) {
|
||||||
|
if s.Internal.ProveReplicaUpdate1 == nil {
|
||||||
|
return *new(storiface.CallID), ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.ProveReplicaUpdate1(p0, p1, p2, p3, p4)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *WorkerStub) ProveReplicaUpdate1(p0 context.Context, p1 storage.SectorRef, p2 cid.Cid, p3 cid.Cid, p4 cid.Cid) (storiface.CallID, error) {
|
||||||
|
return *new(storiface.CallID), ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *WorkerStruct) ProveReplicaUpdate2(p0 context.Context, p1 storage.SectorRef, p2 cid.Cid, p3 cid.Cid, p4 cid.Cid, p5 storage.ReplicaVanillaProofs) (storiface.CallID, error) {
|
||||||
|
if s.Internal.ProveReplicaUpdate2 == nil {
|
||||||
|
return *new(storiface.CallID), ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.ProveReplicaUpdate2(p0, p1, p2, p3, p4, p5)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *WorkerStub) ProveReplicaUpdate2(p0 context.Context, p1 storage.SectorRef, p2 cid.Cid, p3 cid.Cid, p4 cid.Cid, p5 storage.ReplicaVanillaProofs) (storiface.CallID, error) {
|
||||||
|
return *new(storiface.CallID), ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
func (s *WorkerStruct) ReleaseUnsealed(p0 context.Context, p1 storage.SectorRef, p2 []storage.Range) (storiface.CallID, error) {
|
func (s *WorkerStruct) ReleaseUnsealed(p0 context.Context, p1 storage.SectorRef, p2 []storage.Range) (storiface.CallID, error) {
|
||||||
if s.Internal.ReleaseUnsealed == nil {
|
if s.Internal.ReleaseUnsealed == nil {
|
||||||
return *new(storiface.CallID), ErrNotSupported
|
return *new(storiface.CallID), ErrNotSupported
|
||||||
@@ -4722,6 +5090,17 @@ func (s *WorkerStub) Remove(p0 context.Context, p1 abi.SectorID) error {
|
|||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *WorkerStruct) ReplicaUpdate(p0 context.Context, p1 storage.SectorRef, p2 []abi.PieceInfo) (storiface.CallID, error) {
|
||||||
|
if s.Internal.ReplicaUpdate == nil {
|
||||||
|
return *new(storiface.CallID), ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.ReplicaUpdate(p0, p1, p2)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *WorkerStub) ReplicaUpdate(p0 context.Context, p1 storage.SectorRef, p2 []abi.PieceInfo) (storiface.CallID, error) {
|
||||||
|
return *new(storiface.CallID), ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
func (s *WorkerStruct) SealCommit1(p0 context.Context, p1 storage.SectorRef, p2 abi.SealRandomness, p3 abi.InteractiveSealRandomness, p4 []abi.PieceInfo, p5 storage.SectorCids) (storiface.CallID, error) {
|
func (s *WorkerStruct) SealCommit1(p0 context.Context, p1 storage.SectorRef, p2 abi.SealRandomness, p3 abi.InteractiveSealRandomness, p4 []abi.PieceInfo, p5 storage.SectorCids) (storiface.CallID, error) {
|
||||||
if s.Internal.SealCommit1 == nil {
|
if s.Internal.SealCommit1 == nil {
|
||||||
return *new(storiface.CallID), ErrNotSupported
|
return *new(storiface.CallID), ErrNotSupported
|
||||||
|
|||||||
+45
-3
@@ -5,11 +5,10 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
|
|
||||||
"github.com/filecoin-project/lotus/chain/types"
|
|
||||||
|
|
||||||
datatransfer "github.com/filecoin-project/go-data-transfer"
|
datatransfer "github.com/filecoin-project/go-data-transfer"
|
||||||
|
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
|
||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
|
"github.com/filecoin-project/lotus/chain/types"
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
|
|
||||||
"github.com/libp2p/go-libp2p-core/peer"
|
"github.com/libp2p/go-libp2p-core/peer"
|
||||||
@@ -194,4 +193,47 @@ type RetrievalInfo struct {
|
|||||||
|
|
||||||
TransferChannelID *datatransfer.ChannelID
|
TransferChannelID *datatransfer.ChannelID
|
||||||
DataTransfer *DataTransferChannel
|
DataTransfer *DataTransferChannel
|
||||||
|
|
||||||
|
// optional event if part of ClientGetRetrievalUpdates
|
||||||
|
Event *retrievalmarket.ClientEvent
|
||||||
|
}
|
||||||
|
|
||||||
|
type RestrievalRes struct {
|
||||||
|
DealID retrievalmarket.DealID
|
||||||
|
}
|
||||||
|
|
||||||
|
// Selector specifies ipld selector string
|
||||||
|
// - if the string starts with '{', it's interpreted as json selector string
|
||||||
|
// see https://ipld.io/specs/selectors/ and https://ipld.io/specs/selectors/fixtures/selector-fixtures-1/
|
||||||
|
// - otherwise the string is interpreted as ipld-selector-text-lite (simple ipld path)
|
||||||
|
// see https://github.com/ipld/go-ipld-selector-text-lite
|
||||||
|
type Selector string
|
||||||
|
|
||||||
|
type DagSpec struct {
|
||||||
|
// DataSelector matches data to be retrieved
|
||||||
|
// - when using textselector, the path specifies subtree
|
||||||
|
// - the matched graph must have a single root
|
||||||
|
DataSelector *Selector
|
||||||
|
|
||||||
|
// ExportMerkleProof is applicable only when exporting to a CAR file via a path textselector
|
||||||
|
// When true, in addition to the selection target, the resulting CAR will contain every block along the
|
||||||
|
// path back to, and including the original root
|
||||||
|
// When false the resulting CAR contains only the blocks of the target subdag
|
||||||
|
ExportMerkleProof bool
|
||||||
|
}
|
||||||
|
|
||||||
|
type ExportRef struct {
|
||||||
|
Root cid.Cid
|
||||||
|
|
||||||
|
// DAGs array specifies a list of DAGs to export
|
||||||
|
// - If exporting into unixfs files, only one DAG is supported, DataSelector is only used to find the targeted root node
|
||||||
|
// - If exporting into a car file
|
||||||
|
// - When exactly one text-path DataSelector is specified exports the subgraph and its full merkle-path from the original root
|
||||||
|
// - Otherwise ( multiple paths and/or JSON selector specs) determines each individual subroot and exports the subtrees as a multi-root car
|
||||||
|
// - When not specified defaults to a single DAG:
|
||||||
|
// - Data - the entire DAG: `{"R":{"l":{"none":{}},":>":{"a":{">":{"@":{}}}}}}`
|
||||||
|
DAGs []DagSpec
|
||||||
|
|
||||||
|
FromLocalCAR string // if specified, get data from a local CARv2 file.
|
||||||
|
DealID retrievalmarket.DealID
|
||||||
}
|
}
|
||||||
|
|||||||
+44
-4
@@ -8,11 +8,11 @@ import (
|
|||||||
datatransfer "github.com/filecoin-project/go-data-transfer"
|
datatransfer "github.com/filecoin-project/go-data-transfer"
|
||||||
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
|
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
|
||||||
"github.com/filecoin-project/go-fil-markets/storagemarket"
|
"github.com/filecoin-project/go-fil-markets/storagemarket"
|
||||||
"github.com/filecoin-project/go-multistore"
|
|
||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
"github.com/filecoin-project/go-state-types/crypto"
|
"github.com/filecoin-project/go-state-types/crypto"
|
||||||
"github.com/filecoin-project/go-state-types/dline"
|
"github.com/filecoin-project/go-state-types/dline"
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
|
textselector "github.com/ipld/go-ipld-selector-text-lite"
|
||||||
"github.com/libp2p/go-libp2p-core/peer"
|
"github.com/libp2p/go-libp2p-core/peer"
|
||||||
|
|
||||||
"github.com/filecoin-project/lotus/api"
|
"github.com/filecoin-project/lotus/api"
|
||||||
@@ -22,6 +22,7 @@ import (
|
|||||||
"github.com/filecoin-project/lotus/chain/types"
|
"github.com/filecoin-project/lotus/chain/types"
|
||||||
marketevents "github.com/filecoin-project/lotus/markets/loggers"
|
marketevents "github.com/filecoin-project/lotus/markets/loggers"
|
||||||
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
||||||
|
"github.com/filecoin-project/lotus/node/repo/imports"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:generate go run github.com/golang/mock/mockgen -destination=v0mocks/mock_full.go -package=v0mocks . FullNode
|
//go:generate go run github.com/golang/mock/mockgen -destination=v0mocks/mock_full.go -package=v0mocks . FullNode
|
||||||
@@ -305,7 +306,7 @@ type FullNode interface {
|
|||||||
// ClientImport imports file under the specified path into filestore.
|
// ClientImport imports file under the specified path into filestore.
|
||||||
ClientImport(ctx context.Context, ref api.FileRef) (*api.ImportRes, error) //perm:admin
|
ClientImport(ctx context.Context, ref api.FileRef) (*api.ImportRes, error) //perm:admin
|
||||||
// ClientRemoveImport removes file import
|
// ClientRemoveImport removes file import
|
||||||
ClientRemoveImport(ctx context.Context, importID multistore.StoreID) error //perm:admin
|
ClientRemoveImport(ctx context.Context, importID imports.ID) error //perm:admin
|
||||||
// ClientStartDeal proposes a deal with a miner.
|
// ClientStartDeal proposes a deal with a miner.
|
||||||
ClientStartDeal(ctx context.Context, params *api.StartDealParams) (*cid.Cid, error) //perm:admin
|
ClientStartDeal(ctx context.Context, params *api.StartDealParams) (*cid.Cid, error) //perm:admin
|
||||||
// ClientStatelessDeal fire-and-forget-proposes an offline deal to a miner without subsequent tracking.
|
// ClientStatelessDeal fire-and-forget-proposes an offline deal to a miner without subsequent tracking.
|
||||||
@@ -325,10 +326,10 @@ type FullNode interface {
|
|||||||
// ClientMinerQueryOffer returns a QueryOffer for the specific miner and file.
|
// ClientMinerQueryOffer returns a QueryOffer for the specific miner and file.
|
||||||
ClientMinerQueryOffer(ctx context.Context, miner address.Address, root cid.Cid, piece *cid.Cid) (api.QueryOffer, error) //perm:read
|
ClientMinerQueryOffer(ctx context.Context, miner address.Address, root cid.Cid, piece *cid.Cid) (api.QueryOffer, error) //perm:read
|
||||||
// ClientRetrieve initiates the retrieval of a file, as specified in the order.
|
// ClientRetrieve initiates the retrieval of a file, as specified in the order.
|
||||||
ClientRetrieve(ctx context.Context, order api.RetrievalOrder, ref *api.FileRef) error //perm:admin
|
ClientRetrieve(ctx context.Context, order RetrievalOrder, ref *api.FileRef) error //perm:admin
|
||||||
// ClientRetrieveWithEvents initiates the retrieval of a file, as specified in the order, and provides a channel
|
// ClientRetrieveWithEvents initiates the retrieval of a file, as specified in the order, and provides a channel
|
||||||
// of status updates.
|
// of status updates.
|
||||||
ClientRetrieveWithEvents(ctx context.Context, order api.RetrievalOrder, ref *api.FileRef) (<-chan marketevents.RetrievalEvent, error) //perm:admin
|
ClientRetrieveWithEvents(ctx context.Context, order RetrievalOrder, ref *api.FileRef) (<-chan marketevents.RetrievalEvent, error) //perm:admin
|
||||||
// ClientQueryAsk returns a signed StorageAsk from the specified miner.
|
// ClientQueryAsk returns a signed StorageAsk from the specified miner.
|
||||||
// ClientListRetrievals returns information about retrievals made by the local client
|
// ClientListRetrievals returns information about retrievals made by the local client
|
||||||
ClientListRetrievals(ctx context.Context) ([]api.RetrievalInfo, error) //perm:write
|
ClientListRetrievals(ctx context.Context) ([]api.RetrievalInfo, error) //perm:write
|
||||||
@@ -598,6 +599,11 @@ type FullNode interface {
|
|||||||
// StateNetworkVersion returns the network version at the given tipset
|
// StateNetworkVersion returns the network version at the given tipset
|
||||||
StateNetworkVersion(context.Context, types.TipSetKey) (apitypes.NetworkVersion, error) //perm:read
|
StateNetworkVersion(context.Context, types.TipSetKey) (apitypes.NetworkVersion, error) //perm:read
|
||||||
|
|
||||||
|
// StateGetRandomnessFromTickets is used to sample the chain for randomness.
|
||||||
|
StateGetRandomnessFromTickets(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) //perm:read
|
||||||
|
// StateGetRandomnessFromBeacon is used to sample the beacon for randomness.
|
||||||
|
StateGetRandomnessFromBeacon(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) //perm:read
|
||||||
|
|
||||||
// MethodGroup: Msig
|
// MethodGroup: Msig
|
||||||
// The Msig methods are used to interact with multisig wallets on the
|
// The Msig methods are used to interact with multisig wallets on the
|
||||||
// filecoin network
|
// filecoin network
|
||||||
@@ -709,3 +715,37 @@ type FullNode interface {
|
|||||||
// the path specified when calling CreateBackup is within the base path
|
// the path specified when calling CreateBackup is within the base path
|
||||||
CreateBackup(ctx context.Context, fpath string) error //perm:admin
|
CreateBackup(ctx context.Context, fpath string) error //perm:admin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func OfferOrder(o api.QueryOffer, client address.Address) RetrievalOrder {
|
||||||
|
return RetrievalOrder{
|
||||||
|
Root: o.Root,
|
||||||
|
Piece: o.Piece,
|
||||||
|
Size: o.Size,
|
||||||
|
Total: o.MinPrice,
|
||||||
|
UnsealPrice: o.UnsealPrice,
|
||||||
|
PaymentInterval: o.PaymentInterval,
|
||||||
|
PaymentIntervalIncrease: o.PaymentIntervalIncrease,
|
||||||
|
Client: client,
|
||||||
|
|
||||||
|
Miner: o.Miner,
|
||||||
|
MinerPeer: &o.MinerPeer,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
type RetrievalOrder struct {
|
||||||
|
// TODO: make this less unixfs specific
|
||||||
|
Root cid.Cid
|
||||||
|
Piece *cid.Cid
|
||||||
|
DatamodelPathSelector *textselector.Expression
|
||||||
|
Size uint64
|
||||||
|
|
||||||
|
FromLocalCAR string // if specified, get data from a local CARv2 file.
|
||||||
|
// TODO: support offset
|
||||||
|
Total types.BigInt
|
||||||
|
UnsealPrice types.BigInt
|
||||||
|
PaymentInterval uint64
|
||||||
|
PaymentIntervalIncrease uint64
|
||||||
|
Client address.Address
|
||||||
|
Miner address.Address
|
||||||
|
MinerPeer *retrievalmarket.RetrievalPeer
|
||||||
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"github.com/filecoin-project/go-address"
|
"github.com/filecoin-project/go-address"
|
||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
"github.com/filecoin-project/go-state-types/dline"
|
"github.com/filecoin-project/go-state-types/dline"
|
||||||
"github.com/filecoin-project/go-state-types/network"
|
abinetwork "github.com/filecoin-project/go-state-types/network"
|
||||||
|
|
||||||
"github.com/filecoin-project/lotus/api"
|
"github.com/filecoin-project/lotus/api"
|
||||||
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
|
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
|
||||||
@@ -57,7 +57,7 @@ type Gateway interface {
|
|||||||
StateMinerInfo(ctx context.Context, actor address.Address, tsk types.TipSetKey) (miner.MinerInfo, error)
|
StateMinerInfo(ctx context.Context, actor address.Address, tsk types.TipSetKey) (miner.MinerInfo, error)
|
||||||
StateMinerProvingDeadline(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*dline.Info, error)
|
StateMinerProvingDeadline(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*dline.Info, error)
|
||||||
StateMinerPower(context.Context, address.Address, types.TipSetKey) (*api.MinerPower, error)
|
StateMinerPower(context.Context, address.Address, types.TipSetKey) (*api.MinerPower, error)
|
||||||
StateNetworkVersion(context.Context, types.TipSetKey) (network.Version, error)
|
StateNetworkVersion(context.Context, types.TipSetKey) (abinetwork.Version, error)
|
||||||
StateSearchMsg(ctx context.Context, msg cid.Cid) (*api.MsgLookup, error)
|
StateSearchMsg(ctx context.Context, msg cid.Cid) (*api.MsgLookup, error)
|
||||||
StateSectorGetInfo(ctx context.Context, maddr address.Address, n abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorOnChainInfo, error)
|
StateSectorGetInfo(ctx context.Context, maddr address.Address, n abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorOnChainInfo, error)
|
||||||
StateVerifiedClientStatus(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*abi.StoragePower, error)
|
StateVerifiedClientStatus(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*abi.StoragePower, error)
|
||||||
|
|||||||
+42
-16
@@ -10,11 +10,10 @@ import (
|
|||||||
datatransfer "github.com/filecoin-project/go-data-transfer"
|
datatransfer "github.com/filecoin-project/go-data-transfer"
|
||||||
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
|
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
|
||||||
"github.com/filecoin-project/go-fil-markets/storagemarket"
|
"github.com/filecoin-project/go-fil-markets/storagemarket"
|
||||||
"github.com/filecoin-project/go-multistore"
|
|
||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
"github.com/filecoin-project/go-state-types/crypto"
|
"github.com/filecoin-project/go-state-types/crypto"
|
||||||
"github.com/filecoin-project/go-state-types/dline"
|
"github.com/filecoin-project/go-state-types/dline"
|
||||||
"github.com/filecoin-project/go-state-types/network"
|
abinetwork "github.com/filecoin-project/go-state-types/network"
|
||||||
"github.com/filecoin-project/lotus/api"
|
"github.com/filecoin-project/lotus/api"
|
||||||
apitypes "github.com/filecoin-project/lotus/api/types"
|
apitypes "github.com/filecoin-project/lotus/api/types"
|
||||||
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
|
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
|
||||||
@@ -22,6 +21,7 @@ import (
|
|||||||
"github.com/filecoin-project/lotus/chain/types"
|
"github.com/filecoin-project/lotus/chain/types"
|
||||||
marketevents "github.com/filecoin-project/lotus/markets/loggers"
|
marketevents "github.com/filecoin-project/lotus/markets/loggers"
|
||||||
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
||||||
|
"github.com/filecoin-project/lotus/node/repo/imports"
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
"github.com/libp2p/go-libp2p-core/peer"
|
"github.com/libp2p/go-libp2p-core/peer"
|
||||||
"golang.org/x/xerrors"
|
"golang.org/x/xerrors"
|
||||||
@@ -121,15 +121,15 @@ type FullNodeStruct struct {
|
|||||||
|
|
||||||
ClientQueryAsk func(p0 context.Context, p1 peer.ID, p2 address.Address) (*storagemarket.StorageAsk, error) `perm:"read"`
|
ClientQueryAsk func(p0 context.Context, p1 peer.ID, p2 address.Address) (*storagemarket.StorageAsk, error) `perm:"read"`
|
||||||
|
|
||||||
ClientRemoveImport func(p0 context.Context, p1 multistore.StoreID) error `perm:"admin"`
|
ClientRemoveImport func(p0 context.Context, p1 imports.ID) error `perm:"admin"`
|
||||||
|
|
||||||
ClientRestartDataTransfer func(p0 context.Context, p1 datatransfer.TransferID, p2 peer.ID, p3 bool) error `perm:"write"`
|
ClientRestartDataTransfer func(p0 context.Context, p1 datatransfer.TransferID, p2 peer.ID, p3 bool) error `perm:"write"`
|
||||||
|
|
||||||
ClientRetrieve func(p0 context.Context, p1 api.RetrievalOrder, p2 *api.FileRef) error `perm:"admin"`
|
ClientRetrieve func(p0 context.Context, p1 RetrievalOrder, p2 *api.FileRef) error `perm:"admin"`
|
||||||
|
|
||||||
ClientRetrieveTryRestartInsufficientFunds func(p0 context.Context, p1 address.Address) error `perm:"write"`
|
ClientRetrieveTryRestartInsufficientFunds func(p0 context.Context, p1 address.Address) error `perm:"write"`
|
||||||
|
|
||||||
ClientRetrieveWithEvents func(p0 context.Context, p1 api.RetrievalOrder, p2 *api.FileRef) (<-chan marketevents.RetrievalEvent, error) `perm:"admin"`
|
ClientRetrieveWithEvents func(p0 context.Context, p1 RetrievalOrder, p2 *api.FileRef) (<-chan marketevents.RetrievalEvent, error) `perm:"admin"`
|
||||||
|
|
||||||
ClientStartDeal func(p0 context.Context, p1 *api.StartDealParams) (*cid.Cid, error) `perm:"admin"`
|
ClientStartDeal func(p0 context.Context, p1 *api.StartDealParams) (*cid.Cid, error) `perm:"admin"`
|
||||||
|
|
||||||
@@ -267,6 +267,10 @@ type FullNodeStruct struct {
|
|||||||
|
|
||||||
StateGetActor func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*types.Actor, error) `perm:"read"`
|
StateGetActor func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*types.Actor, error) `perm:"read"`
|
||||||
|
|
||||||
|
StateGetRandomnessFromBeacon func(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) `perm:"read"`
|
||||||
|
|
||||||
|
StateGetRandomnessFromTickets func(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) `perm:"read"`
|
||||||
|
|
||||||
StateGetReceipt func(p0 context.Context, p1 cid.Cid, p2 types.TipSetKey) (*types.MessageReceipt, error) `perm:"read"`
|
StateGetReceipt func(p0 context.Context, p1 cid.Cid, p2 types.TipSetKey) (*types.MessageReceipt, error) `perm:"read"`
|
||||||
|
|
||||||
StateListActors func(p0 context.Context, p1 types.TipSetKey) ([]address.Address, error) `perm:"read"`
|
StateListActors func(p0 context.Context, p1 types.TipSetKey) ([]address.Address, error) `perm:"read"`
|
||||||
@@ -447,7 +451,7 @@ type GatewayStruct struct {
|
|||||||
|
|
||||||
StateMinerProvingDeadline func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*dline.Info, error) ``
|
StateMinerProvingDeadline func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*dline.Info, error) ``
|
||||||
|
|
||||||
StateNetworkVersion func(p0 context.Context, p1 types.TipSetKey) (network.Version, error) ``
|
StateNetworkVersion func(p0 context.Context, p1 types.TipSetKey) (abinetwork.Version, error) ``
|
||||||
|
|
||||||
StateSearchMsg func(p0 context.Context, p1 cid.Cid) (*api.MsgLookup, error) ``
|
StateSearchMsg func(p0 context.Context, p1 cid.Cid) (*api.MsgLookup, error) ``
|
||||||
|
|
||||||
@@ -939,14 +943,14 @@ func (s *FullNodeStub) ClientQueryAsk(p0 context.Context, p1 peer.ID, p2 address
|
|||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FullNodeStruct) ClientRemoveImport(p0 context.Context, p1 multistore.StoreID) error {
|
func (s *FullNodeStruct) ClientRemoveImport(p0 context.Context, p1 imports.ID) error {
|
||||||
if s.Internal.ClientRemoveImport == nil {
|
if s.Internal.ClientRemoveImport == nil {
|
||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
return s.Internal.ClientRemoveImport(p0, p1)
|
return s.Internal.ClientRemoveImport(p0, p1)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FullNodeStub) ClientRemoveImport(p0 context.Context, p1 multistore.StoreID) error {
|
func (s *FullNodeStub) ClientRemoveImport(p0 context.Context, p1 imports.ID) error {
|
||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -961,14 +965,14 @@ func (s *FullNodeStub) ClientRestartDataTransfer(p0 context.Context, p1 datatran
|
|||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FullNodeStruct) ClientRetrieve(p0 context.Context, p1 api.RetrievalOrder, p2 *api.FileRef) error {
|
func (s *FullNodeStruct) ClientRetrieve(p0 context.Context, p1 RetrievalOrder, p2 *api.FileRef) error {
|
||||||
if s.Internal.ClientRetrieve == nil {
|
if s.Internal.ClientRetrieve == nil {
|
||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
return s.Internal.ClientRetrieve(p0, p1, p2)
|
return s.Internal.ClientRetrieve(p0, p1, p2)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FullNodeStub) ClientRetrieve(p0 context.Context, p1 api.RetrievalOrder, p2 *api.FileRef) error {
|
func (s *FullNodeStub) ClientRetrieve(p0 context.Context, p1 RetrievalOrder, p2 *api.FileRef) error {
|
||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -983,14 +987,14 @@ func (s *FullNodeStub) ClientRetrieveTryRestartInsufficientFunds(p0 context.Cont
|
|||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FullNodeStruct) ClientRetrieveWithEvents(p0 context.Context, p1 api.RetrievalOrder, p2 *api.FileRef) (<-chan marketevents.RetrievalEvent, error) {
|
func (s *FullNodeStruct) ClientRetrieveWithEvents(p0 context.Context, p1 RetrievalOrder, p2 *api.FileRef) (<-chan marketevents.RetrievalEvent, error) {
|
||||||
if s.Internal.ClientRetrieveWithEvents == nil {
|
if s.Internal.ClientRetrieveWithEvents == nil {
|
||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
return s.Internal.ClientRetrieveWithEvents(p0, p1, p2)
|
return s.Internal.ClientRetrieveWithEvents(p0, p1, p2)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FullNodeStub) ClientRetrieveWithEvents(p0 context.Context, p1 api.RetrievalOrder, p2 *api.FileRef) (<-chan marketevents.RetrievalEvent, error) {
|
func (s *FullNodeStub) ClientRetrieveWithEvents(p0 context.Context, p1 RetrievalOrder, p2 *api.FileRef) (<-chan marketevents.RetrievalEvent, error) {
|
||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1742,6 +1746,28 @@ func (s *FullNodeStub) StateGetActor(p0 context.Context, p1 address.Address, p2
|
|||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *FullNodeStruct) StateGetRandomnessFromBeacon(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) {
|
||||||
|
if s.Internal.StateGetRandomnessFromBeacon == nil {
|
||||||
|
return *new(abi.Randomness), ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.StateGetRandomnessFromBeacon(p0, p1, p2, p3, p4)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *FullNodeStub) StateGetRandomnessFromBeacon(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) {
|
||||||
|
return *new(abi.Randomness), ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *FullNodeStruct) StateGetRandomnessFromTickets(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) {
|
||||||
|
if s.Internal.StateGetRandomnessFromTickets == nil {
|
||||||
|
return *new(abi.Randomness), ErrNotSupported
|
||||||
|
}
|
||||||
|
return s.Internal.StateGetRandomnessFromTickets(p0, p1, p2, p3, p4)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *FullNodeStub) StateGetRandomnessFromTickets(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) {
|
||||||
|
return *new(abi.Randomness), ErrNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
func (s *FullNodeStruct) StateGetReceipt(p0 context.Context, p1 cid.Cid, p2 types.TipSetKey) (*types.MessageReceipt, error) {
|
func (s *FullNodeStruct) StateGetReceipt(p0 context.Context, p1 cid.Cid, p2 types.TipSetKey) (*types.MessageReceipt, error) {
|
||||||
if s.Internal.StateGetReceipt == nil {
|
if s.Internal.StateGetReceipt == nil {
|
||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
@@ -2677,15 +2703,15 @@ func (s *GatewayStub) StateMinerProvingDeadline(p0 context.Context, p1 address.A
|
|||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *GatewayStruct) StateNetworkVersion(p0 context.Context, p1 types.TipSetKey) (network.Version, error) {
|
func (s *GatewayStruct) StateNetworkVersion(p0 context.Context, p1 types.TipSetKey) (abinetwork.Version, error) {
|
||||||
if s.Internal.StateNetworkVersion == nil {
|
if s.Internal.StateNetworkVersion == nil {
|
||||||
return *new(network.Version), ErrNotSupported
|
return *new(abinetwork.Version), ErrNotSupported
|
||||||
}
|
}
|
||||||
return s.Internal.StateNetworkVersion(p0, p1)
|
return s.Internal.StateNetworkVersion(p0, p1)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *GatewayStub) StateNetworkVersion(p0 context.Context, p1 types.TipSetKey) (network.Version, error) {
|
func (s *GatewayStub) StateNetworkVersion(p0 context.Context, p1 types.TipSetKey) (abinetwork.Version, error) {
|
||||||
return *new(network.Version), ErrNotSupported
|
return *new(abinetwork.Version), ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *GatewayStruct) StateSearchMsg(p0 context.Context, p1 cid.Cid) (*api.MsgLookup, error) {
|
func (s *GatewayStruct) StateSearchMsg(p0 context.Context, p1 cid.Cid) (*api.MsgLookup, error) {
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import (
|
|||||||
retrievalmarket "github.com/filecoin-project/go-fil-markets/retrievalmarket"
|
retrievalmarket "github.com/filecoin-project/go-fil-markets/retrievalmarket"
|
||||||
storagemarket "github.com/filecoin-project/go-fil-markets/storagemarket"
|
storagemarket "github.com/filecoin-project/go-fil-markets/storagemarket"
|
||||||
auth "github.com/filecoin-project/go-jsonrpc/auth"
|
auth "github.com/filecoin-project/go-jsonrpc/auth"
|
||||||
multistore "github.com/filecoin-project/go-multistore"
|
|
||||||
abi "github.com/filecoin-project/go-state-types/abi"
|
abi "github.com/filecoin-project/go-state-types/abi"
|
||||||
big "github.com/filecoin-project/go-state-types/big"
|
big "github.com/filecoin-project/go-state-types/big"
|
||||||
crypto "github.com/filecoin-project/go-state-types/crypto"
|
crypto "github.com/filecoin-project/go-state-types/crypto"
|
||||||
@@ -22,10 +21,13 @@ import (
|
|||||||
network "github.com/filecoin-project/go-state-types/network"
|
network "github.com/filecoin-project/go-state-types/network"
|
||||||
api "github.com/filecoin-project/lotus/api"
|
api "github.com/filecoin-project/lotus/api"
|
||||||
apitypes "github.com/filecoin-project/lotus/api/types"
|
apitypes "github.com/filecoin-project/lotus/api/types"
|
||||||
|
v0api "github.com/filecoin-project/lotus/api/v0api"
|
||||||
miner "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
|
miner "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
|
||||||
types "github.com/filecoin-project/lotus/chain/types"
|
types "github.com/filecoin-project/lotus/chain/types"
|
||||||
|
alerting "github.com/filecoin-project/lotus/journal/alerting"
|
||||||
marketevents "github.com/filecoin-project/lotus/markets/loggers"
|
marketevents "github.com/filecoin-project/lotus/markets/loggers"
|
||||||
dtypes "github.com/filecoin-project/lotus/node/modules/dtypes"
|
dtypes "github.com/filecoin-project/lotus/node/modules/dtypes"
|
||||||
|
imports "github.com/filecoin-project/lotus/node/repo/imports"
|
||||||
miner0 "github.com/filecoin-project/specs-actors/actors/builtin/miner"
|
miner0 "github.com/filecoin-project/specs-actors/actors/builtin/miner"
|
||||||
paych "github.com/filecoin-project/specs-actors/actors/builtin/paych"
|
paych "github.com/filecoin-project/specs-actors/actors/builtin/paych"
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
@@ -731,7 +733,7 @@ func (mr *MockFullNodeMockRecorder) ClientQueryAsk(arg0, arg1, arg2 interface{})
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ClientRemoveImport mocks base method.
|
// ClientRemoveImport mocks base method.
|
||||||
func (m *MockFullNode) ClientRemoveImport(arg0 context.Context, arg1 multistore.StoreID) error {
|
func (m *MockFullNode) ClientRemoveImport(arg0 context.Context, arg1 imports.ID) error {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "ClientRemoveImport", arg0, arg1)
|
ret := m.ctrl.Call(m, "ClientRemoveImport", arg0, arg1)
|
||||||
ret0, _ := ret[0].(error)
|
ret0, _ := ret[0].(error)
|
||||||
@@ -759,7 +761,7 @@ func (mr *MockFullNodeMockRecorder) ClientRestartDataTransfer(arg0, arg1, arg2,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ClientRetrieve mocks base method.
|
// ClientRetrieve mocks base method.
|
||||||
func (m *MockFullNode) ClientRetrieve(arg0 context.Context, arg1 api.RetrievalOrder, arg2 *api.FileRef) error {
|
func (m *MockFullNode) ClientRetrieve(arg0 context.Context, arg1 v0api.RetrievalOrder, arg2 *api.FileRef) error {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "ClientRetrieve", arg0, arg1, arg2)
|
ret := m.ctrl.Call(m, "ClientRetrieve", arg0, arg1, arg2)
|
||||||
ret0, _ := ret[0].(error)
|
ret0, _ := ret[0].(error)
|
||||||
@@ -787,7 +789,7 @@ func (mr *MockFullNodeMockRecorder) ClientRetrieveTryRestartInsufficientFunds(ar
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ClientRetrieveWithEvents mocks base method.
|
// ClientRetrieveWithEvents mocks base method.
|
||||||
func (m *MockFullNode) ClientRetrieveWithEvents(arg0 context.Context, arg1 api.RetrievalOrder, arg2 *api.FileRef) (<-chan marketevents.RetrievalEvent, error) {
|
func (m *MockFullNode) ClientRetrieveWithEvents(arg0 context.Context, arg1 v0api.RetrievalOrder, arg2 *api.FileRef) (<-chan marketevents.RetrievalEvent, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "ClientRetrieveWithEvents", arg0, arg1, arg2)
|
ret := m.ctrl.Call(m, "ClientRetrieveWithEvents", arg0, arg1, arg2)
|
||||||
ret0, _ := ret[0].(<-chan marketevents.RetrievalEvent)
|
ret0, _ := ret[0].(<-chan marketevents.RetrievalEvent)
|
||||||
@@ -950,6 +952,21 @@ func (mr *MockFullNodeMockRecorder) ID(arg0 interface{}) *gomock.Call {
|
|||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockFullNode)(nil).ID), arg0)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockFullNode)(nil).ID), arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// LogAlerts mocks base method.
|
||||||
|
func (m *MockFullNode) LogAlerts(arg0 context.Context) ([]alerting.Alert, error) {
|
||||||
|
m.ctrl.T.Helper()
|
||||||
|
ret := m.ctrl.Call(m, "LogAlerts", arg0)
|
||||||
|
ret0, _ := ret[0].([]alerting.Alert)
|
||||||
|
ret1, _ := ret[1].(error)
|
||||||
|
return ret0, ret1
|
||||||
|
}
|
||||||
|
|
||||||
|
// LogAlerts indicates an expected call of LogAlerts.
|
||||||
|
func (mr *MockFullNodeMockRecorder) LogAlerts(arg0 interface{}) *gomock.Call {
|
||||||
|
mr.mock.ctrl.T.Helper()
|
||||||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogAlerts", reflect.TypeOf((*MockFullNode)(nil).LogAlerts), arg0)
|
||||||
|
}
|
||||||
|
|
||||||
// LogList mocks base method.
|
// LogList mocks base method.
|
||||||
func (m *MockFullNode) LogList(arg0 context.Context) ([]string, error) {
|
func (m *MockFullNode) LogList(arg0 context.Context) ([]string, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
@@ -2155,6 +2172,36 @@ func (mr *MockFullNodeMockRecorder) StateGetActor(arg0, arg1, arg2 interface{})
|
|||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetActor", reflect.TypeOf((*MockFullNode)(nil).StateGetActor), arg0, arg1, arg2)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetActor", reflect.TypeOf((*MockFullNode)(nil).StateGetActor), arg0, arg1, arg2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// StateGetRandomnessFromBeacon mocks base method.
|
||||||
|
func (m *MockFullNode) StateGetRandomnessFromBeacon(arg0 context.Context, arg1 crypto.DomainSeparationTag, arg2 abi.ChainEpoch, arg3 []byte, arg4 types.TipSetKey) (abi.Randomness, error) {
|
||||||
|
m.ctrl.T.Helper()
|
||||||
|
ret := m.ctrl.Call(m, "StateGetRandomnessFromBeacon", arg0, arg1, arg2, arg3, arg4)
|
||||||
|
ret0, _ := ret[0].(abi.Randomness)
|
||||||
|
ret1, _ := ret[1].(error)
|
||||||
|
return ret0, ret1
|
||||||
|
}
|
||||||
|
|
||||||
|
// StateGetRandomnessFromBeacon indicates an expected call of StateGetRandomnessFromBeacon.
|
||||||
|
func (mr *MockFullNodeMockRecorder) StateGetRandomnessFromBeacon(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
|
||||||
|
mr.mock.ctrl.T.Helper()
|
||||||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetRandomnessFromBeacon", reflect.TypeOf((*MockFullNode)(nil).StateGetRandomnessFromBeacon), arg0, arg1, arg2, arg3, arg4)
|
||||||
|
}
|
||||||
|
|
||||||
|
// StateGetRandomnessFromTickets mocks base method.
|
||||||
|
func (m *MockFullNode) StateGetRandomnessFromTickets(arg0 context.Context, arg1 crypto.DomainSeparationTag, arg2 abi.ChainEpoch, arg3 []byte, arg4 types.TipSetKey) (abi.Randomness, error) {
|
||||||
|
m.ctrl.T.Helper()
|
||||||
|
ret := m.ctrl.Call(m, "StateGetRandomnessFromTickets", arg0, arg1, arg2, arg3, arg4)
|
||||||
|
ret0, _ := ret[0].(abi.Randomness)
|
||||||
|
ret1, _ := ret[1].(error)
|
||||||
|
return ret0, ret1
|
||||||
|
}
|
||||||
|
|
||||||
|
// StateGetRandomnessFromTickets indicates an expected call of StateGetRandomnessFromTickets.
|
||||||
|
func (mr *MockFullNodeMockRecorder) StateGetRandomnessFromTickets(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
|
||||||
|
mr.mock.ctrl.T.Helper()
|
||||||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetRandomnessFromTickets", reflect.TypeOf((*MockFullNode)(nil).StateGetRandomnessFromTickets), arg0, arg1, arg2, arg3, arg4)
|
||||||
|
}
|
||||||
|
|
||||||
// StateGetReceipt mocks base method.
|
// StateGetReceipt mocks base method.
|
||||||
func (m *MockFullNode) StateGetReceipt(arg0 context.Context, arg1 cid.Cid, arg2 types.TipSetKey) (*types.MessageReceipt, error) {
|
func (m *MockFullNode) StateGetReceipt(arg0 context.Context, arg1 cid.Cid, arg2 types.TipSetKey) (*types.MessageReceipt, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
|
|||||||
+154
-1
@@ -3,6 +3,11 @@ package v0api
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
|
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
|
||||||
|
"github.com/filecoin-project/go-state-types/big"
|
||||||
|
"github.com/filecoin-project/go-state-types/crypto"
|
||||||
|
marketevents "github.com/filecoin-project/lotus/markets/loggers"
|
||||||
|
|
||||||
"github.com/filecoin-project/go-address"
|
"github.com/filecoin-project/go-address"
|
||||||
"github.com/filecoin-project/lotus/chain/types"
|
"github.com/filecoin-project/lotus/chain/types"
|
||||||
"golang.org/x/xerrors"
|
"golang.org/x/xerrors"
|
||||||
@@ -106,7 +111,7 @@ func (w *WrapperV1Full) MsigApproveTxnHash(ctx context.Context, msig address.Add
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (w *WrapperV1Full) MsigCancel(ctx context.Context, msig address.Address, txID uint64, to address.Address, amt types.BigInt, src address.Address, method uint64, params []byte) (cid.Cid, error) {
|
func (w *WrapperV1Full) MsigCancel(ctx context.Context, msig address.Address, txID uint64, to address.Address, amt types.BigInt, src address.Address, method uint64, params []byte) (cid.Cid, error) {
|
||||||
p, err := w.FullNode.MsigCancel(ctx, msig, txID, to, amt, src, method, params)
|
p, err := w.FullNode.MsigCancelTxnHash(ctx, msig, txID, to, amt, src, method, params)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return cid.Undef, xerrors.Errorf("creating prototype: %w", err)
|
return cid.Undef, xerrors.Errorf("creating prototype: %w", err)
|
||||||
}
|
}
|
||||||
@@ -184,4 +189,152 @@ func (w *WrapperV1Full) MsigRemoveSigner(ctx context.Context, msig address.Addre
|
|||||||
return w.executePrototype(ctx, p)
|
return w.executePrototype(ctx, p)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (w *WrapperV1Full) ChainGetRandomnessFromTickets(ctx context.Context, tsk types.TipSetKey, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) (abi.Randomness, error) {
|
||||||
|
return w.StateGetRandomnessFromTickets(ctx, personalization, randEpoch, entropy, tsk)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (w *WrapperV1Full) ChainGetRandomnessFromBeacon(ctx context.Context, tsk types.TipSetKey, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) (abi.Randomness, error) {
|
||||||
|
return w.StateGetRandomnessFromBeacon(ctx, personalization, randEpoch, entropy, tsk)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (w *WrapperV1Full) ClientRetrieve(ctx context.Context, order RetrievalOrder, ref *api.FileRef) error {
|
||||||
|
events := make(chan marketevents.RetrievalEvent)
|
||||||
|
go w.clientRetrieve(ctx, order, ref, events)
|
||||||
|
|
||||||
|
for {
|
||||||
|
select {
|
||||||
|
case evt, ok := <-events:
|
||||||
|
if !ok { // done successfully
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if evt.Err != "" {
|
||||||
|
return xerrors.Errorf("retrieval failed: %s", evt.Err)
|
||||||
|
}
|
||||||
|
case <-ctx.Done():
|
||||||
|
return xerrors.Errorf("retrieval timed out")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (w *WrapperV1Full) ClientRetrieveWithEvents(ctx context.Context, order RetrievalOrder, ref *api.FileRef) (<-chan marketevents.RetrievalEvent, error) {
|
||||||
|
events := make(chan marketevents.RetrievalEvent)
|
||||||
|
go w.clientRetrieve(ctx, order, ref, events)
|
||||||
|
return events, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func readSubscribeEvents(ctx context.Context, dealID retrievalmarket.DealID, subscribeEvents <-chan api.RetrievalInfo, events chan marketevents.RetrievalEvent) error {
|
||||||
|
for {
|
||||||
|
var subscribeEvent api.RetrievalInfo
|
||||||
|
var evt retrievalmarket.ClientEvent
|
||||||
|
select {
|
||||||
|
case <-ctx.Done():
|
||||||
|
return xerrors.New("Retrieval Timed Out")
|
||||||
|
case subscribeEvent = <-subscribeEvents:
|
||||||
|
if subscribeEvent.ID != dealID {
|
||||||
|
// we can't check the deal ID ahead of time because:
|
||||||
|
// 1. We need to subscribe before retrieving.
|
||||||
|
// 2. We won't know the deal ID until after retrieving.
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if subscribeEvent.Event != nil {
|
||||||
|
evt = *subscribeEvent.Event
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
case <-ctx.Done():
|
||||||
|
return xerrors.New("Retrieval Timed Out")
|
||||||
|
case events <- marketevents.RetrievalEvent{
|
||||||
|
Event: evt,
|
||||||
|
Status: subscribeEvent.Status,
|
||||||
|
BytesReceived: subscribeEvent.BytesReceived,
|
||||||
|
FundsSpent: subscribeEvent.TotalPaid,
|
||||||
|
}:
|
||||||
|
}
|
||||||
|
|
||||||
|
switch subscribeEvent.Status {
|
||||||
|
case retrievalmarket.DealStatusCompleted:
|
||||||
|
return nil
|
||||||
|
case retrievalmarket.DealStatusRejected:
|
||||||
|
return xerrors.Errorf("Retrieval Proposal Rejected: %s", subscribeEvent.Message)
|
||||||
|
case
|
||||||
|
retrievalmarket.DealStatusDealNotFound,
|
||||||
|
retrievalmarket.DealStatusErrored:
|
||||||
|
return xerrors.Errorf("Retrieval Error: %s", subscribeEvent.Message)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (w *WrapperV1Full) clientRetrieve(ctx context.Context, order RetrievalOrder, ref *api.FileRef, events chan marketevents.RetrievalEvent) {
|
||||||
|
defer close(events)
|
||||||
|
|
||||||
|
finish := func(e error) {
|
||||||
|
if e != nil {
|
||||||
|
events <- marketevents.RetrievalEvent{Err: e.Error(), FundsSpent: big.Zero()}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var dealID retrievalmarket.DealID
|
||||||
|
if order.FromLocalCAR == "" {
|
||||||
|
// Subscribe to events before retrieving to avoid losing events.
|
||||||
|
subscribeCtx, cancel := context.WithCancel(ctx)
|
||||||
|
defer cancel()
|
||||||
|
retrievalEvents, err := w.ClientGetRetrievalUpdates(subscribeCtx)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
finish(xerrors.Errorf("GetRetrievalUpdates failed: %w", err))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
retrievalRes, err := w.FullNode.ClientRetrieve(ctx, api.RetrievalOrder{
|
||||||
|
Root: order.Root,
|
||||||
|
Piece: order.Piece,
|
||||||
|
Size: order.Size,
|
||||||
|
Total: order.Total,
|
||||||
|
UnsealPrice: order.UnsealPrice,
|
||||||
|
PaymentInterval: order.PaymentInterval,
|
||||||
|
PaymentIntervalIncrease: order.PaymentIntervalIncrease,
|
||||||
|
Client: order.Client,
|
||||||
|
Miner: order.Miner,
|
||||||
|
MinerPeer: order.MinerPeer,
|
||||||
|
})
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
finish(xerrors.Errorf("Retrieve failed: %w", err))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
dealID = retrievalRes.DealID
|
||||||
|
|
||||||
|
err = readSubscribeEvents(ctx, retrievalRes.DealID, retrievalEvents, events)
|
||||||
|
if err != nil {
|
||||||
|
finish(xerrors.Errorf("Retrieve: %w", err))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If ref is nil, it only fetches the data into the configured blockstore.
|
||||||
|
if ref == nil {
|
||||||
|
finish(nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
eref := api.ExportRef{
|
||||||
|
Root: order.Root,
|
||||||
|
FromLocalCAR: order.FromLocalCAR,
|
||||||
|
DealID: dealID,
|
||||||
|
}
|
||||||
|
|
||||||
|
if order.DatamodelPathSelector != nil {
|
||||||
|
s := api.Selector(*order.DatamodelPathSelector)
|
||||||
|
eref.DAGs = append(eref.DAGs, api.DagSpec{
|
||||||
|
DataSelector: &s,
|
||||||
|
ExportMerkleProof: true,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
finish(w.ClientExport(ctx, eref, *ref))
|
||||||
|
}
|
||||||
|
|
||||||
var _ FullNode = &WrapperV1Full{}
|
var _ FullNode = &WrapperV1Full{}
|
||||||
|
|||||||
+4
-4
@@ -54,11 +54,11 @@ func VersionForType(nodeType NodeType) (Version, error) {
|
|||||||
|
|
||||||
// semver versions of the rpc api exposed
|
// semver versions of the rpc api exposed
|
||||||
var (
|
var (
|
||||||
FullAPIVersion0 = newVer(1, 3, 1)
|
FullAPIVersion0 = newVer(1, 5, 0)
|
||||||
FullAPIVersion1 = newVer(2, 1, 1)
|
FullAPIVersion1 = newVer(2, 2, 0)
|
||||||
|
|
||||||
MinerAPIVersion0 = newVer(1, 2, 0)
|
MinerAPIVersion0 = newVer(1, 4, 0)
|
||||||
WorkerAPIVersion0 = newVer(1, 1, 0)
|
WorkerAPIVersion0 = newVer(1, 5, 0)
|
||||||
)
|
)
|
||||||
|
|
||||||
//nolint:varcheck,deadcode
|
//nolint:varcheck,deadcode
|
||||||
|
|||||||
@@ -0,0 +1,262 @@
|
|||||||
|
package blockstore
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"sync"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"golang.org/x/xerrors"
|
||||||
|
|
||||||
|
block "github.com/ipfs/go-block-format"
|
||||||
|
"github.com/ipfs/go-cid"
|
||||||
|
)
|
||||||
|
|
||||||
|
// autolog is a logger for the autobatching blockstore. It is subscoped from the
|
||||||
|
// blockstore logger.
|
||||||
|
var autolog = log.Named("auto")
|
||||||
|
|
||||||
|
// contains the same set of blocks twice, once as an ordered list for flushing, and as a map for fast access
|
||||||
|
type blockBatch struct {
|
||||||
|
blockList []block.Block
|
||||||
|
blockMap map[cid.Cid]block.Block
|
||||||
|
}
|
||||||
|
|
||||||
|
type AutobatchBlockstore struct {
|
||||||
|
// TODO: drop if memory consumption is too high
|
||||||
|
addedCids map[cid.Cid]struct{}
|
||||||
|
|
||||||
|
stateLock sync.Mutex
|
||||||
|
bufferedBatch blockBatch
|
||||||
|
|
||||||
|
flushingBatch blockBatch
|
||||||
|
flushErr error
|
||||||
|
|
||||||
|
flushCh chan struct{}
|
||||||
|
|
||||||
|
doFlushLock sync.Mutex
|
||||||
|
flushRetryDelay time.Duration
|
||||||
|
doneCh chan struct{}
|
||||||
|
shutdown context.CancelFunc
|
||||||
|
|
||||||
|
backingBs Blockstore
|
||||||
|
|
||||||
|
bufferCapacity int
|
||||||
|
bufferSize int
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewAutobatch(ctx context.Context, backingBs Blockstore, bufferCapacity int) *AutobatchBlockstore {
|
||||||
|
ctx, cancel := context.WithCancel(ctx)
|
||||||
|
bs := &AutobatchBlockstore{
|
||||||
|
addedCids: make(map[cid.Cid]struct{}),
|
||||||
|
backingBs: backingBs,
|
||||||
|
bufferCapacity: bufferCapacity,
|
||||||
|
flushCh: make(chan struct{}, 1),
|
||||||
|
doneCh: make(chan struct{}),
|
||||||
|
// could be made configable
|
||||||
|
flushRetryDelay: time.Millisecond * 100,
|
||||||
|
shutdown: cancel,
|
||||||
|
}
|
||||||
|
|
||||||
|
bs.bufferedBatch.blockMap = make(map[cid.Cid]block.Block)
|
||||||
|
|
||||||
|
go bs.flushWorker(ctx)
|
||||||
|
|
||||||
|
return bs
|
||||||
|
}
|
||||||
|
|
||||||
|
func (bs *AutobatchBlockstore) Put(blk block.Block) error {
|
||||||
|
bs.stateLock.Lock()
|
||||||
|
defer bs.stateLock.Unlock()
|
||||||
|
|
||||||
|
_, ok := bs.addedCids[blk.Cid()]
|
||||||
|
if !ok {
|
||||||
|
bs.addedCids[blk.Cid()] = struct{}{}
|
||||||
|
bs.bufferedBatch.blockList = append(bs.bufferedBatch.blockList, blk)
|
||||||
|
bs.bufferedBatch.blockMap[blk.Cid()] = blk
|
||||||
|
bs.bufferSize += len(blk.RawData())
|
||||||
|
if bs.bufferSize >= bs.bufferCapacity {
|
||||||
|
// signal that a flush is appropriate, may be ignored
|
||||||
|
select {
|
||||||
|
case bs.flushCh <- struct{}{}:
|
||||||
|
default:
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (bs *AutobatchBlockstore) flushWorker(ctx context.Context) {
|
||||||
|
defer close(bs.doneCh)
|
||||||
|
for {
|
||||||
|
select {
|
||||||
|
case <-bs.flushCh:
|
||||||
|
// TODO: check if we _should_ actually flush. We could get a spurious wakeup
|
||||||
|
// here.
|
||||||
|
putErr := bs.doFlush(false)
|
||||||
|
for putErr != nil {
|
||||||
|
select {
|
||||||
|
case <-ctx.Done():
|
||||||
|
return
|
||||||
|
case <-time.After(bs.flushRetryDelay):
|
||||||
|
autolog.Errorf("FLUSH ERRORED: %w, retrying after %v", putErr, bs.flushRetryDelay)
|
||||||
|
putErr = bs.doFlush(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case <-ctx.Done():
|
||||||
|
// Do one last flush.
|
||||||
|
_ = bs.doFlush(false)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// caller must NOT hold stateLock
|
||||||
|
// set retryOnly to true to only retry a failed flush and not flush anything new.
|
||||||
|
func (bs *AutobatchBlockstore) doFlush(retryOnly bool) error {
|
||||||
|
bs.doFlushLock.Lock()
|
||||||
|
defer bs.doFlushLock.Unlock()
|
||||||
|
|
||||||
|
// If we failed to flush last time, try flushing again.
|
||||||
|
if bs.flushErr != nil {
|
||||||
|
bs.flushErr = bs.backingBs.PutMany(bs.flushingBatch.blockList)
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we failed, or we're _only_ retrying, bail.
|
||||||
|
if retryOnly || bs.flushErr != nil {
|
||||||
|
return bs.flushErr
|
||||||
|
}
|
||||||
|
|
||||||
|
// Then take the current batch...
|
||||||
|
bs.stateLock.Lock()
|
||||||
|
// We do NOT clear addedCids here, because its purpose is to expedite Puts
|
||||||
|
bs.flushingBatch = bs.bufferedBatch
|
||||||
|
bs.bufferedBatch.blockList = make([]block.Block, 0, len(bs.flushingBatch.blockList))
|
||||||
|
bs.bufferedBatch.blockMap = make(map[cid.Cid]block.Block, len(bs.flushingBatch.blockMap))
|
||||||
|
bs.stateLock.Unlock()
|
||||||
|
|
||||||
|
// And try to flush it.
|
||||||
|
bs.flushErr = bs.backingBs.PutMany(bs.flushingBatch.blockList)
|
||||||
|
|
||||||
|
// If we succeeded, reset the batch. Otherwise, we'll try again next time.
|
||||||
|
if bs.flushErr == nil {
|
||||||
|
bs.stateLock.Lock()
|
||||||
|
bs.flushingBatch = blockBatch{}
|
||||||
|
bs.stateLock.Unlock()
|
||||||
|
}
|
||||||
|
|
||||||
|
return bs.flushErr
|
||||||
|
}
|
||||||
|
|
||||||
|
// caller must NOT hold stateLock
|
||||||
|
func (bs *AutobatchBlockstore) Flush(ctx context.Context) error {
|
||||||
|
return bs.doFlush(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (bs *AutobatchBlockstore) Shutdown(ctx context.Context) error {
|
||||||
|
// TODO: Prevent puts after we call this to avoid losing data.
|
||||||
|
bs.shutdown()
|
||||||
|
select {
|
||||||
|
case <-bs.doneCh:
|
||||||
|
case <-ctx.Done():
|
||||||
|
return ctx.Err()
|
||||||
|
}
|
||||||
|
|
||||||
|
bs.doFlushLock.Lock()
|
||||||
|
defer bs.doFlushLock.Unlock()
|
||||||
|
|
||||||
|
return bs.flushErr
|
||||||
|
}
|
||||||
|
|
||||||
|
func (bs *AutobatchBlockstore) Get(c cid.Cid) (block.Block, error) {
|
||||||
|
// may seem backward to check the backingBs first, but that is the likeliest case
|
||||||
|
blk, err := bs.backingBs.Get(c)
|
||||||
|
if err == nil {
|
||||||
|
return blk, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if err != ErrNotFound {
|
||||||
|
return blk, err
|
||||||
|
}
|
||||||
|
|
||||||
|
bs.stateLock.Lock()
|
||||||
|
defer bs.stateLock.Unlock()
|
||||||
|
v, ok := bs.flushingBatch.blockMap[c]
|
||||||
|
if ok {
|
||||||
|
return v, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
v, ok = bs.bufferedBatch.blockMap[c]
|
||||||
|
if ok {
|
||||||
|
return v, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
return bs.Get(c)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (bs *AutobatchBlockstore) DeleteBlock(cid.Cid) error {
|
||||||
|
// if we wanted to support this, we would have to:
|
||||||
|
// - flush
|
||||||
|
// - delete from the backingBs (if present)
|
||||||
|
// - remove from addedCids (if present)
|
||||||
|
// - if present in addedCids, also walk the ordered lists and remove if present
|
||||||
|
return xerrors.New("deletion is unsupported")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (bs *AutobatchBlockstore) DeleteMany(cids []cid.Cid) error {
|
||||||
|
// see note in DeleteBlock()
|
||||||
|
return xerrors.New("deletion is unsupported")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (bs *AutobatchBlockstore) Has(c cid.Cid) (bool, error) {
|
||||||
|
_, err := bs.Get(c)
|
||||||
|
if err == nil {
|
||||||
|
return true, nil
|
||||||
|
}
|
||||||
|
if err == ErrNotFound {
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (bs *AutobatchBlockstore) GetSize(c cid.Cid) (int, error) {
|
||||||
|
blk, err := bs.Get(c)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return len(blk.RawData()), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (bs *AutobatchBlockstore) PutMany(blks []block.Block) error {
|
||||||
|
for _, blk := range blks {
|
||||||
|
if err := bs.Put(blk); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (bs *AutobatchBlockstore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error) {
|
||||||
|
if err := bs.Flush(ctx); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return bs.backingBs.AllKeysChan(ctx)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (bs *AutobatchBlockstore) HashOnRead(enabled bool) {
|
||||||
|
bs.backingBs.HashOnRead(enabled)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (bs *AutobatchBlockstore) View(cid cid.Cid, callback func([]byte) error) error {
|
||||||
|
blk, err := bs.Get(cid)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return callback(blk.RawData())
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package blockstore
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestAutobatchBlockstore(t *testing.T) {
|
||||||
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
|
defer cancel()
|
||||||
|
|
||||||
|
ab := NewAutobatch(ctx, NewMemory(), len(b0.RawData())+len(b1.RawData())-1)
|
||||||
|
|
||||||
|
require.NoError(t, ab.Put(b0))
|
||||||
|
require.NoError(t, ab.Put(b1))
|
||||||
|
require.NoError(t, ab.Put(b2))
|
||||||
|
|
||||||
|
v0, err := ab.Get(b0.Cid())
|
||||||
|
require.NoError(t, err)
|
||||||
|
require.Equal(t, b0.RawData(), v0.RawData())
|
||||||
|
|
||||||
|
v1, err := ab.Get(b1.Cid())
|
||||||
|
require.NoError(t, err)
|
||||||
|
require.Equal(t, b1.RawData(), v1.RawData())
|
||||||
|
|
||||||
|
v2, err := ab.Get(b2.Cid())
|
||||||
|
require.NoError(t, err)
|
||||||
|
require.Equal(t, b2.RawData(), v2.RawData())
|
||||||
|
|
||||||
|
require.NoError(t, ab.Flush(ctx))
|
||||||
|
require.NoError(t, ab.Shutdown(ctx))
|
||||||
|
}
|
||||||
@@ -258,16 +258,16 @@ func (b *Blockstore) movingGC() error {
|
|||||||
b.moveCond.Broadcast()
|
b.moveCond.Broadcast()
|
||||||
b.moveMx.Unlock()
|
b.moveMx.Unlock()
|
||||||
|
|
||||||
var path string
|
var newPath string
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
b.lockMove()
|
b.lockMove()
|
||||||
|
|
||||||
db2 := b.dbNext
|
dbNext := b.dbNext
|
||||||
b.dbNext = nil
|
b.dbNext = nil
|
||||||
|
|
||||||
var state bsMoveState
|
var state bsMoveState
|
||||||
if db2 != nil {
|
if dbNext != nil {
|
||||||
state = moveStateCleanup
|
state = moveStateCleanup
|
||||||
} else {
|
} else {
|
||||||
state = moveStateNone
|
state = moveStateNone
|
||||||
@@ -275,12 +275,13 @@ func (b *Blockstore) movingGC() error {
|
|||||||
|
|
||||||
b.unlockMove(state)
|
b.unlockMove(state)
|
||||||
|
|
||||||
if db2 != nil {
|
if dbNext != nil {
|
||||||
err := db2.Close()
|
// the move failed and we have a left-over db; delete it.
|
||||||
|
err := dbNext.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warnf("error closing badger db: %s", err)
|
log.Warnf("error closing badger db: %s", err)
|
||||||
}
|
}
|
||||||
b.deleteDB(path)
|
b.deleteDB(newPath)
|
||||||
|
|
||||||
b.lockMove()
|
b.lockMove()
|
||||||
b.unlockMove(moveStateNone)
|
b.unlockMove(moveStateNone)
|
||||||
@@ -296,68 +297,96 @@ func (b *Blockstore) movingGC() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if basePath == linkPath {
|
if basePath == linkPath {
|
||||||
path = basePath
|
newPath = basePath
|
||||||
} else {
|
} else {
|
||||||
|
// we do this dance to create a name adjacent to the current one, while avoiding clown
|
||||||
|
// shoes with multiple moves (i.e. we can't just take the basename of the linkPath, as it
|
||||||
|
// could have been created in a previous move and have the timestamp suffix, which would then
|
||||||
|
// perpetuate itself.
|
||||||
name := filepath.Base(basePath)
|
name := filepath.Base(basePath)
|
||||||
dir := filepath.Dir(linkPath)
|
dir := filepath.Dir(linkPath)
|
||||||
path = filepath.Join(dir, name)
|
newPath = filepath.Join(dir, name)
|
||||||
}
|
}
|
||||||
path = fmt.Sprintf("%s.%d", path, time.Now().UnixNano())
|
newPath = fmt.Sprintf("%s.%d", newPath, time.Now().UnixNano())
|
||||||
|
|
||||||
log.Infof("moving blockstore from %s to %s", b.opts.Dir, path)
|
log.Infof("moving blockstore from %s to %s", b.opts.Dir, newPath)
|
||||||
|
|
||||||
opts := b.opts
|
opts := b.opts
|
||||||
opts.Dir = path
|
opts.Dir = newPath
|
||||||
opts.ValueDir = path
|
opts.ValueDir = newPath
|
||||||
|
|
||||||
db2, err := badger.Open(opts.Options)
|
dbNew, err := badger.Open(opts.Options)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to open badger blockstore in %s: %w", path, err)
|
return fmt.Errorf("failed to open badger blockstore in %s: %w", newPath, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
b.lockMove()
|
b.lockMove()
|
||||||
b.dbNext = db2
|
b.dbNext = dbNew
|
||||||
b.unlockMove(moveStateMoving)
|
b.unlockMove(moveStateMoving)
|
||||||
|
|
||||||
log.Info("copying blockstore")
|
log.Info("copying blockstore")
|
||||||
err = b.doCopy(b.db, b.dbNext)
|
err = b.doCopy(b.db, b.dbNext)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("error moving badger blockstore to %s: %w", path, err)
|
return fmt.Errorf("error moving badger blockstore to %s: %w", newPath, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
b.lockMove()
|
b.lockMove()
|
||||||
db1 := b.db
|
dbOld := b.db
|
||||||
b.db = b.dbNext
|
b.db = b.dbNext
|
||||||
b.dbNext = nil
|
b.dbNext = nil
|
||||||
b.unlockMove(moveStateCleanup)
|
b.unlockMove(moveStateCleanup)
|
||||||
|
|
||||||
err = db1.Close()
|
err = dbOld.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warnf("error closing old badger db: %s", err)
|
log.Warnf("error closing old badger db: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
dbpath := b.opts.Dir
|
// this is the canonical db path; this is where our db lives.
|
||||||
oldpath := fmt.Sprintf("%s.old.%d", dbpath, time.Now().Unix())
|
dbPath := b.opts.Dir
|
||||||
|
|
||||||
if err = os.Rename(dbpath, oldpath); err != nil {
|
// we first move the existing db out of the way, and only delete it after we have symlinked the
|
||||||
|
// new db to the canonical path
|
||||||
|
backupPath := fmt.Sprintf("%s.old.%d", dbPath, time.Now().Unix())
|
||||||
|
if err = os.Rename(dbPath, backupPath); err != nil {
|
||||||
// this is not catastrophic in the sense that we have not lost any data.
|
// this is not catastrophic in the sense that we have not lost any data.
|
||||||
// but it is pretty bad, as the db path points to the old db, while we are now using to the new
|
// but it is pretty bad, as the db path points to the old db, while we are now using to the new
|
||||||
// db; we can't continue and leave a ticking bomb for the next restart.
|
// db; we can't continue and leave a ticking bomb for the next restart.
|
||||||
// so a panic is appropriate and user can fix.
|
// so a panic is appropriate and user can fix.
|
||||||
panic(fmt.Errorf("error renaming old badger db dir from %s to %s: %w; USER ACTION REQUIRED", dbpath, oldpath, err)) //nolint
|
panic(fmt.Errorf("error renaming old badger db dir from %s to %s: %w; USER ACTION REQUIRED", dbPath, backupPath, err)) //nolint
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = os.Symlink(path, dbpath); err != nil {
|
if err = symlink(newPath, dbPath); err != nil {
|
||||||
// same here; the db path is pointing to the void. panic and let the user fix.
|
// same here; the db path is pointing to the void. panic and let the user fix.
|
||||||
panic(fmt.Errorf("error symlinking new badger db dir from %s to %s: %w; USER ACTION REQUIRED", path, dbpath, err)) //nolint
|
panic(fmt.Errorf("error symlinking new badger db dir from %s to %s: %w; USER ACTION REQUIRED", newPath, dbPath, err)) //nolint
|
||||||
}
|
}
|
||||||
|
|
||||||
b.deleteDB(oldpath)
|
// the delete follows symlinks
|
||||||
|
b.deleteDB(backupPath)
|
||||||
|
|
||||||
log.Info("moving blockstore done")
|
log.Info("moving blockstore done")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// symlink creates a symlink from path to linkTo; the link is relative if the two are
|
||||||
|
// in the same directory
|
||||||
|
func symlink(path, linkTo string) error {
|
||||||
|
resolvedPathDir, err := filepath.EvalSymlinks(filepath.Dir(path))
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("error resolving links in %s: %w", path, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
resolvedLinkDir, err := filepath.EvalSymlinks(filepath.Dir(linkTo))
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("error resolving links in %s: %w", linkTo, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if resolvedPathDir == resolvedLinkDir {
|
||||||
|
path = filepath.Base(path)
|
||||||
|
}
|
||||||
|
|
||||||
|
return os.Symlink(path, linkTo)
|
||||||
|
}
|
||||||
|
|
||||||
// doCopy copies a badger blockstore to another, with an optional filter; if the filter
|
// doCopy copies a badger blockstore to another, with an optional filter; if the filter
|
||||||
// is not nil, then only cids that satisfy the filter will be copied.
|
// is not nil, then only cids that satisfy the filter will be copied.
|
||||||
func (b *Blockstore) doCopy(from, to *badger.DB) error {
|
func (b *Blockstore) doCopy(from, to *badger.DB) error {
|
||||||
@@ -390,19 +419,19 @@ func (b *Blockstore) doCopy(from, to *badger.DB) error {
|
|||||||
|
|
||||||
func (b *Blockstore) deleteDB(path string) {
|
func (b *Blockstore) deleteDB(path string) {
|
||||||
// follow symbolic links, otherwise the data wil be left behind
|
// follow symbolic links, otherwise the data wil be left behind
|
||||||
lpath, err := filepath.EvalSymlinks(path)
|
linkPath, err := filepath.EvalSymlinks(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warnf("error resolving symlinks in %s", path)
|
log.Warnf("error resolving symlinks in %s", path)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Infof("removing data directory %s", lpath)
|
log.Infof("removing data directory %s", linkPath)
|
||||||
if err := os.RemoveAll(lpath); err != nil {
|
if err := os.RemoveAll(linkPath); err != nil {
|
||||||
log.Warnf("error deleting db at %s: %s", lpath, err)
|
log.Warnf("error deleting db at %s: %s", linkPath, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if path != lpath {
|
if path != linkPath {
|
||||||
log.Infof("removing link %s", path)
|
log.Infof("removing link %s", path)
|
||||||
if err := os.Remove(path); err != nil {
|
if err := os.Remove(path); err != nil {
|
||||||
log.Warnf("error removing symbolic link %s", err)
|
log.Warnf("error removing symbolic link %s", err)
|
||||||
|
|||||||
@@ -245,6 +245,21 @@ func testMove(t *testing.T, optsF func(string) Options) {
|
|||||||
|
|
||||||
checkBlocks()
|
checkBlocks()
|
||||||
checkPath()
|
checkPath()
|
||||||
|
|
||||||
|
// reopen the db to make sure our relative link works:
|
||||||
|
err = db.Close()
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
db, err = Open(optsF(dbPath))
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// db.Close() is already deferred
|
||||||
|
|
||||||
|
checkBlocks()
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMoveNoPrefix(t *testing.T) {
|
func TestMoveNoPrefix(t *testing.T) {
|
||||||
|
|||||||
@@ -119,6 +119,7 @@ TBD -- see [#6577](https://github.com/filecoin-project/lotus/issues/6577)
|
|||||||
It can also optionally compact/gc the coldstore after the copy (with the `--gc-coldstore` flag)
|
It can also optionally compact/gc the coldstore after the copy (with the `--gc-coldstore` flag)
|
||||||
and automatically rewrite the lotus config to disable splitstore (with the `--rewrite-config` flag).
|
and automatically rewrite the lotus config to disable splitstore (with the `--rewrite-config` flag).
|
||||||
Note: the node *must be stopped* before running this command.
|
Note: the node *must be stopped* before running this command.
|
||||||
|
- `clear` -- clears a splitstore installation for restart from snapshot.
|
||||||
- `check` -- asynchronously runs a basic healthcheck on the splitstore.
|
- `check` -- asynchronously runs a basic healthcheck on the splitstore.
|
||||||
The results are appended to `<lotus-repo>/datastore/splitstore/check.txt`.
|
The results are appended to `<lotus-repo>/datastore/splitstore/check.txt`.
|
||||||
- `info` -- prints some basic information about the splitstore.
|
- `info` -- prints some basic information about the splitstore.
|
||||||
|
|||||||
@@ -21,15 +21,26 @@ type MarkSet interface {
|
|||||||
SetConcurrent()
|
SetConcurrent()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type MarkSetVisitor interface {
|
||||||
|
MarkSet
|
||||||
|
ObjectVisitor
|
||||||
|
}
|
||||||
|
|
||||||
type MarkSetEnv interface {
|
type MarkSetEnv interface {
|
||||||
|
// Create creates a new markset within the environment.
|
||||||
|
// name is a unique name for this markset, mapped to the filesystem in disk-backed environments
|
||||||
|
// sizeHint is a hint about the expected size of the markset
|
||||||
Create(name string, sizeHint int64) (MarkSet, error)
|
Create(name string, sizeHint int64) (MarkSet, error)
|
||||||
|
// CreateVisitor is like Create, but returns a wider interface that supports atomic visits.
|
||||||
|
// It may not be supported by some markset types (e.g. bloom).
|
||||||
|
CreateVisitor(name string, sizeHint int64) (MarkSetVisitor, error)
|
||||||
|
// SupportsVisitor returns true if the marksets created by this environment support the visitor interface.
|
||||||
|
SupportsVisitor() bool
|
||||||
Close() error
|
Close() error
|
||||||
}
|
}
|
||||||
|
|
||||||
func OpenMarkSetEnv(path string, mtype string) (MarkSetEnv, error) {
|
func OpenMarkSetEnv(path string, mtype string) (MarkSetEnv, error) {
|
||||||
switch mtype {
|
switch mtype {
|
||||||
case "bloom":
|
|
||||||
return NewBloomMarkSetEnv()
|
|
||||||
case "map":
|
case "map":
|
||||||
return NewMapMarkSetEnv()
|
return NewMapMarkSetEnv()
|
||||||
case "badger":
|
case "badger":
|
||||||
|
|||||||
@@ -27,12 +27,14 @@ type BadgerMarkSet struct {
|
|||||||
writing map[int]map[string]struct{}
|
writing map[int]map[string]struct{}
|
||||||
writers int
|
writers int
|
||||||
seqno int
|
seqno int
|
||||||
|
version int
|
||||||
|
|
||||||
db *badger.DB
|
db *badger.DB
|
||||||
path string
|
path string
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ MarkSet = (*BadgerMarkSet)(nil)
|
var _ MarkSet = (*BadgerMarkSet)(nil)
|
||||||
|
var _ MarkSetVisitor = (*BadgerMarkSet)(nil)
|
||||||
|
|
||||||
var badgerMarkSetBatchSize = 16384
|
var badgerMarkSetBatchSize = 16384
|
||||||
|
|
||||||
@@ -46,9 +48,241 @@ func NewBadgerMarkSetEnv(path string) (MarkSetEnv, error) {
|
|||||||
return &BadgerMarkSetEnv{path: msPath}, nil
|
return &BadgerMarkSetEnv{path: msPath}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *BadgerMarkSetEnv) Create(name string, sizeHint int64) (MarkSet, error) {
|
func (e *BadgerMarkSetEnv) create(name string, sizeHint int64) (*BadgerMarkSet, error) {
|
||||||
|
name += ".tmp"
|
||||||
path := filepath.Join(e.path, name)
|
path := filepath.Join(e.path, name)
|
||||||
|
|
||||||
|
db, err := openTransientBadgerDB(path)
|
||||||
|
if err != nil {
|
||||||
|
return nil, xerrors.Errorf("error creating badger db: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
ms := &BadgerMarkSet{
|
||||||
|
pend: make(map[string]struct{}),
|
||||||
|
writing: make(map[int]map[string]struct{}),
|
||||||
|
db: db,
|
||||||
|
path: path,
|
||||||
|
}
|
||||||
|
ms.cond.L = &ms.mx
|
||||||
|
|
||||||
|
return ms, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *BadgerMarkSetEnv) Create(name string, sizeHint int64) (MarkSet, error) {
|
||||||
|
return e.create(name, sizeHint)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *BadgerMarkSetEnv) CreateVisitor(name string, sizeHint int64) (MarkSetVisitor, error) {
|
||||||
|
return e.create(name, sizeHint)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *BadgerMarkSetEnv) SupportsVisitor() bool { return true }
|
||||||
|
|
||||||
|
func (e *BadgerMarkSetEnv) Close() error {
|
||||||
|
return os.RemoveAll(e.path)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *BadgerMarkSet) Mark(c cid.Cid) error {
|
||||||
|
s.mx.Lock()
|
||||||
|
if s.pend == nil {
|
||||||
|
s.mx.Unlock()
|
||||||
|
return errMarkSetClosed
|
||||||
|
}
|
||||||
|
|
||||||
|
write, seqno := s.put(string(c.Hash()))
|
||||||
|
s.mx.Unlock()
|
||||||
|
|
||||||
|
if write {
|
||||||
|
return s.write(seqno)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *BadgerMarkSet) Has(c cid.Cid) (bool, error) {
|
||||||
|
s.mx.RLock()
|
||||||
|
defer s.mx.RUnlock()
|
||||||
|
|
||||||
|
key := c.Hash()
|
||||||
|
pendKey := string(key)
|
||||||
|
|
||||||
|
has, err := s.tryPending(pendKey)
|
||||||
|
if has || err != nil {
|
||||||
|
return has, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return s.tryDB(key)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *BadgerMarkSet) Visit(c cid.Cid) (bool, error) {
|
||||||
|
key := c.Hash()
|
||||||
|
pendKey := string(key)
|
||||||
|
|
||||||
|
s.mx.RLock()
|
||||||
|
|
||||||
|
has, err := s.tryPending(pendKey)
|
||||||
|
if has || err != nil {
|
||||||
|
s.mx.RUnlock()
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
|
||||||
|
has, err = s.tryDB(key)
|
||||||
|
if has || err != nil {
|
||||||
|
s.mx.RUnlock()
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// we need to upgrade the lock to exclusive in order to write; take the version count to see
|
||||||
|
// if there was another write while we were upgrading
|
||||||
|
version := s.version
|
||||||
|
s.mx.RUnlock()
|
||||||
|
|
||||||
|
s.mx.Lock()
|
||||||
|
// we have to do the check dance again
|
||||||
|
has, err = s.tryPending(pendKey)
|
||||||
|
if has || err != nil {
|
||||||
|
s.mx.Unlock()
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if version != s.version {
|
||||||
|
// something was written to the db, we need to check it
|
||||||
|
has, err = s.tryDB(key)
|
||||||
|
if has || err != nil {
|
||||||
|
s.mx.Unlock()
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
write, seqno := s.put(pendKey)
|
||||||
|
s.mx.Unlock()
|
||||||
|
|
||||||
|
if write {
|
||||||
|
err = s.write(seqno)
|
||||||
|
}
|
||||||
|
|
||||||
|
return true, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// reader holds the (r)lock
|
||||||
|
func (s *BadgerMarkSet) tryPending(key string) (has bool, err error) {
|
||||||
|
if s.pend == nil {
|
||||||
|
return false, errMarkSetClosed
|
||||||
|
}
|
||||||
|
|
||||||
|
if _, ok := s.pend[key]; ok {
|
||||||
|
return true, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, wr := range s.writing {
|
||||||
|
if _, ok := wr[key]; ok {
|
||||||
|
return true, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *BadgerMarkSet) tryDB(key []byte) (has bool, err error) {
|
||||||
|
err = s.db.View(func(txn *badger.Txn) error {
|
||||||
|
_, err := txn.Get(key)
|
||||||
|
return err
|
||||||
|
})
|
||||||
|
|
||||||
|
switch err {
|
||||||
|
case nil:
|
||||||
|
return true, nil
|
||||||
|
|
||||||
|
case badger.ErrKeyNotFound:
|
||||||
|
return false, nil
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// writer holds the exclusive lock
|
||||||
|
func (s *BadgerMarkSet) put(key string) (write bool, seqno int) {
|
||||||
|
s.pend[key] = struct{}{}
|
||||||
|
if len(s.pend) < badgerMarkSetBatchSize {
|
||||||
|
return false, 0
|
||||||
|
}
|
||||||
|
|
||||||
|
seqno = s.seqno
|
||||||
|
s.seqno++
|
||||||
|
s.writing[seqno] = s.pend
|
||||||
|
s.pend = make(map[string]struct{})
|
||||||
|
|
||||||
|
return true, seqno
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *BadgerMarkSet) write(seqno int) (err error) {
|
||||||
|
s.mx.Lock()
|
||||||
|
if s.pend == nil {
|
||||||
|
s.mx.Unlock()
|
||||||
|
return errMarkSetClosed
|
||||||
|
}
|
||||||
|
|
||||||
|
pend := s.writing[seqno]
|
||||||
|
s.writers++
|
||||||
|
s.mx.Unlock()
|
||||||
|
|
||||||
|
defer func() {
|
||||||
|
s.mx.Lock()
|
||||||
|
defer s.mx.Unlock()
|
||||||
|
|
||||||
|
if err == nil {
|
||||||
|
delete(s.writing, seqno)
|
||||||
|
s.version++
|
||||||
|
}
|
||||||
|
|
||||||
|
s.writers--
|
||||||
|
if s.writers == 0 {
|
||||||
|
s.cond.Broadcast()
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
|
empty := []byte{} // not nil
|
||||||
|
|
||||||
|
batch := s.db.NewWriteBatch()
|
||||||
|
defer batch.Cancel()
|
||||||
|
|
||||||
|
for k := range pend {
|
||||||
|
if err = batch.Set([]byte(k), empty); err != nil {
|
||||||
|
return xerrors.Errorf("error setting batch: %w", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
err = batch.Flush()
|
||||||
|
if err != nil {
|
||||||
|
return xerrors.Errorf("error flushing batch to badger markset: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *BadgerMarkSet) Close() error {
|
||||||
|
s.mx.Lock()
|
||||||
|
defer s.mx.Unlock()
|
||||||
|
|
||||||
|
if s.pend == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for s.writers > 0 {
|
||||||
|
s.cond.Wait()
|
||||||
|
}
|
||||||
|
|
||||||
|
s.pend = nil
|
||||||
|
db := s.db
|
||||||
|
s.db = nil
|
||||||
|
|
||||||
|
return closeTransientBadgerDB(db, s.path)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *BadgerMarkSet) SetConcurrent() {}
|
||||||
|
|
||||||
|
func openTransientBadgerDB(path string) (*badger.DB, error) {
|
||||||
// clean up first
|
// clean up first
|
||||||
err := os.RemoveAll(path)
|
err := os.RemoveAll(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -76,140 +310,16 @@ func (e *BadgerMarkSetEnv) Create(name string, sizeHint int64) (MarkSet, error)
|
|||||||
skip2: log.Desugar().WithOptions(zap.AddCallerSkip(2)).Sugar(),
|
skip2: log.Desugar().WithOptions(zap.AddCallerSkip(2)).Sugar(),
|
||||||
}
|
}
|
||||||
|
|
||||||
db, err := badger.Open(opts)
|
return badger.Open(opts)
|
||||||
if err != nil {
|
|
||||||
return nil, xerrors.Errorf("error creating badger markset: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
ms := &BadgerMarkSet{
|
|
||||||
pend: make(map[string]struct{}),
|
|
||||||
writing: make(map[int]map[string]struct{}),
|
|
||||||
db: db,
|
|
||||||
path: path,
|
|
||||||
}
|
|
||||||
ms.cond.L = &ms.mx
|
|
||||||
|
|
||||||
return ms, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *BadgerMarkSetEnv) Close() error {
|
func closeTransientBadgerDB(db *badger.DB, path string) error {
|
||||||
return os.RemoveAll(e.path)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *BadgerMarkSet) Mark(c cid.Cid) error {
|
|
||||||
s.mx.Lock()
|
|
||||||
|
|
||||||
if s.pend == nil {
|
|
||||||
s.mx.Unlock()
|
|
||||||
return errMarkSetClosed
|
|
||||||
}
|
|
||||||
|
|
||||||
s.pend[string(c.Hash())] = struct{}{}
|
|
||||||
|
|
||||||
if len(s.pend) < badgerMarkSetBatchSize {
|
|
||||||
s.mx.Unlock()
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
pend := s.pend
|
|
||||||
seqno := s.seqno
|
|
||||||
s.seqno++
|
|
||||||
s.writing[seqno] = pend
|
|
||||||
s.pend = make(map[string]struct{})
|
|
||||||
s.writers++
|
|
||||||
s.mx.Unlock()
|
|
||||||
|
|
||||||
defer func() {
|
|
||||||
s.mx.Lock()
|
|
||||||
defer s.mx.Unlock()
|
|
||||||
|
|
||||||
delete(s.writing, seqno)
|
|
||||||
s.writers--
|
|
||||||
if s.writers == 0 {
|
|
||||||
s.cond.Broadcast()
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
|
|
||||||
empty := []byte{} // not nil
|
|
||||||
|
|
||||||
batch := s.db.NewWriteBatch()
|
|
||||||
defer batch.Cancel()
|
|
||||||
|
|
||||||
for k := range pend {
|
|
||||||
if err := batch.Set([]byte(k), empty); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
err := batch.Flush()
|
|
||||||
if err != nil {
|
|
||||||
return xerrors.Errorf("error flushing batch to badger markset: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *BadgerMarkSet) Has(c cid.Cid) (bool, error) {
|
|
||||||
s.mx.RLock()
|
|
||||||
defer s.mx.RUnlock()
|
|
||||||
|
|
||||||
if s.pend == nil {
|
|
||||||
return false, errMarkSetClosed
|
|
||||||
}
|
|
||||||
|
|
||||||
key := c.Hash()
|
|
||||||
pendKey := string(key)
|
|
||||||
_, ok := s.pend[pendKey]
|
|
||||||
if ok {
|
|
||||||
return true, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, wr := range s.writing {
|
|
||||||
_, ok := wr[pendKey]
|
|
||||||
if ok {
|
|
||||||
return true, nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
err := s.db.View(func(txn *badger.Txn) error {
|
|
||||||
_, err := txn.Get(key)
|
|
||||||
return err
|
|
||||||
})
|
|
||||||
|
|
||||||
switch err {
|
|
||||||
case nil:
|
|
||||||
return true, nil
|
|
||||||
|
|
||||||
case badger.ErrKeyNotFound:
|
|
||||||
return false, nil
|
|
||||||
|
|
||||||
default:
|
|
||||||
return false, xerrors.Errorf("error checking badger markset: %w", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *BadgerMarkSet) Close() error {
|
|
||||||
s.mx.Lock()
|
|
||||||
defer s.mx.Unlock()
|
|
||||||
|
|
||||||
if s.pend == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
for s.writers > 0 {
|
|
||||||
s.cond.Wait()
|
|
||||||
}
|
|
||||||
|
|
||||||
s.pend = nil
|
|
||||||
db := s.db
|
|
||||||
s.db = nil
|
|
||||||
|
|
||||||
err := db.Close()
|
err := db.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("error closing badger markset: %w", err)
|
return xerrors.Errorf("error closing badger markset: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
err = os.RemoveAll(s.path)
|
err = os.RemoveAll(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("error deleting badger markset: %w", err)
|
return xerrors.Errorf("error deleting badger markset: %w", err)
|
||||||
}
|
}
|
||||||
@@ -217,8 +327,6 @@ func (s *BadgerMarkSet) Close() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *BadgerMarkSet) SetConcurrent() {}
|
|
||||||
|
|
||||||
// badger logging through go-log
|
// badger logging through go-log
|
||||||
type badgerLogger struct {
|
type badgerLogger struct {
|
||||||
*zap.SugaredLogger
|
*zap.SugaredLogger
|
||||||
|
|||||||
@@ -1,107 +0,0 @@
|
|||||||
package splitstore
|
|
||||||
|
|
||||||
import (
|
|
||||||
"crypto/rand"
|
|
||||||
"crypto/sha256"
|
|
||||||
"sync"
|
|
||||||
|
|
||||||
"golang.org/x/xerrors"
|
|
||||||
|
|
||||||
bbloom "github.com/ipfs/bbloom"
|
|
||||||
cid "github.com/ipfs/go-cid"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
BloomFilterMinSize = 10_000_000
|
|
||||||
BloomFilterProbability = 0.01
|
|
||||||
)
|
|
||||||
|
|
||||||
type BloomMarkSetEnv struct{}
|
|
||||||
|
|
||||||
var _ MarkSetEnv = (*BloomMarkSetEnv)(nil)
|
|
||||||
|
|
||||||
type BloomMarkSet struct {
|
|
||||||
salt []byte
|
|
||||||
mx sync.RWMutex
|
|
||||||
bf *bbloom.Bloom
|
|
||||||
ts bool
|
|
||||||
}
|
|
||||||
|
|
||||||
var _ MarkSet = (*BloomMarkSet)(nil)
|
|
||||||
|
|
||||||
func NewBloomMarkSetEnv() (*BloomMarkSetEnv, error) {
|
|
||||||
return &BloomMarkSetEnv{}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (e *BloomMarkSetEnv) Create(name string, sizeHint int64) (MarkSet, error) {
|
|
||||||
size := int64(BloomFilterMinSize)
|
|
||||||
for size < sizeHint {
|
|
||||||
size += BloomFilterMinSize
|
|
||||||
}
|
|
||||||
|
|
||||||
salt := make([]byte, 4)
|
|
||||||
_, err := rand.Read(salt)
|
|
||||||
if err != nil {
|
|
||||||
return nil, xerrors.Errorf("error reading salt: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
bf, err := bbloom.New(float64(size), BloomFilterProbability)
|
|
||||||
if err != nil {
|
|
||||||
return nil, xerrors.Errorf("error creating bloom filter: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
return &BloomMarkSet{salt: salt, bf: bf}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (e *BloomMarkSetEnv) Close() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *BloomMarkSet) saltedKey(cid cid.Cid) []byte {
|
|
||||||
hash := cid.Hash()
|
|
||||||
key := make([]byte, len(s.salt)+len(hash))
|
|
||||||
n := copy(key, s.salt)
|
|
||||||
copy(key[n:], hash)
|
|
||||||
rehash := sha256.Sum256(key)
|
|
||||||
return rehash[:]
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *BloomMarkSet) Mark(cid cid.Cid) error {
|
|
||||||
if s.ts {
|
|
||||||
s.mx.Lock()
|
|
||||||
defer s.mx.Unlock()
|
|
||||||
}
|
|
||||||
|
|
||||||
if s.bf == nil {
|
|
||||||
return errMarkSetClosed
|
|
||||||
}
|
|
||||||
|
|
||||||
s.bf.Add(s.saltedKey(cid))
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *BloomMarkSet) Has(cid cid.Cid) (bool, error) {
|
|
||||||
if s.ts {
|
|
||||||
s.mx.RLock()
|
|
||||||
defer s.mx.RUnlock()
|
|
||||||
}
|
|
||||||
|
|
||||||
if s.bf == nil {
|
|
||||||
return false, errMarkSetClosed
|
|
||||||
}
|
|
||||||
|
|
||||||
return s.bf.Has(s.saltedKey(cid)), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *BloomMarkSet) Close() error {
|
|
||||||
if s.ts {
|
|
||||||
s.mx.Lock()
|
|
||||||
defer s.mx.Unlock()
|
|
||||||
}
|
|
||||||
s.bf = nil
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *BloomMarkSet) SetConcurrent() {
|
|
||||||
s.ts = true
|
|
||||||
}
|
|
||||||
@@ -18,17 +18,28 @@ type MapMarkSet struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var _ MarkSet = (*MapMarkSet)(nil)
|
var _ MarkSet = (*MapMarkSet)(nil)
|
||||||
|
var _ MarkSetVisitor = (*MapMarkSet)(nil)
|
||||||
|
|
||||||
func NewMapMarkSetEnv() (*MapMarkSetEnv, error) {
|
func NewMapMarkSetEnv() (*MapMarkSetEnv, error) {
|
||||||
return &MapMarkSetEnv{}, nil
|
return &MapMarkSetEnv{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *MapMarkSetEnv) Create(name string, sizeHint int64) (MarkSet, error) {
|
func (e *MapMarkSetEnv) create(name string, sizeHint int64) (*MapMarkSet, error) {
|
||||||
return &MapMarkSet{
|
return &MapMarkSet{
|
||||||
set: make(map[string]struct{}, sizeHint),
|
set: make(map[string]struct{}, sizeHint),
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (e *MapMarkSetEnv) Create(name string, sizeHint int64) (MarkSet, error) {
|
||||||
|
return e.create(name, sizeHint)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *MapMarkSetEnv) CreateVisitor(name string, sizeHint int64) (MarkSetVisitor, error) {
|
||||||
|
return e.create(name, sizeHint)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *MapMarkSetEnv) SupportsVisitor() bool { return true }
|
||||||
|
|
||||||
func (e *MapMarkSetEnv) Close() error {
|
func (e *MapMarkSetEnv) Close() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@@ -61,6 +72,25 @@ func (s *MapMarkSet) Has(cid cid.Cid) (bool, error) {
|
|||||||
return ok, nil
|
return ok, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *MapMarkSet) Visit(c cid.Cid) (bool, error) {
|
||||||
|
if s.ts {
|
||||||
|
s.mx.Lock()
|
||||||
|
defer s.mx.Unlock()
|
||||||
|
}
|
||||||
|
|
||||||
|
if s.set == nil {
|
||||||
|
return false, errMarkSetClosed
|
||||||
|
}
|
||||||
|
|
||||||
|
key := string(c.Hash())
|
||||||
|
if _, ok := s.set[key]; ok {
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
s.set[key] = struct{}{}
|
||||||
|
return true, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (s *MapMarkSet) Close() error {
|
func (s *MapMarkSet) Close() error {
|
||||||
if s.ts {
|
if s.ts {
|
||||||
s.mx.Lock()
|
s.mx.Lock()
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package splitstore
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
cid "github.com/ipfs/go-cid"
|
cid "github.com/ipfs/go-cid"
|
||||||
@@ -10,10 +11,7 @@ import (
|
|||||||
|
|
||||||
func TestMapMarkSet(t *testing.T) {
|
func TestMapMarkSet(t *testing.T) {
|
||||||
testMarkSet(t, "map")
|
testMarkSet(t, "map")
|
||||||
}
|
testMarkSetVisitor(t, "map")
|
||||||
|
|
||||||
func TestBloomMarkSet(t *testing.T) {
|
|
||||||
testMarkSet(t, "bloom")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestBadgerMarkSet(t *testing.T) {
|
func TestBadgerMarkSet(t *testing.T) {
|
||||||
@@ -23,16 +21,21 @@ func TestBadgerMarkSet(t *testing.T) {
|
|||||||
badgerMarkSetBatchSize = bs
|
badgerMarkSetBatchSize = bs
|
||||||
})
|
})
|
||||||
testMarkSet(t, "badger")
|
testMarkSet(t, "badger")
|
||||||
|
testMarkSetVisitor(t, "badger")
|
||||||
}
|
}
|
||||||
|
|
||||||
func testMarkSet(t *testing.T, lsType string) {
|
func testMarkSet(t *testing.T, lsType string) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
|
|
||||||
path, err := ioutil.TempDir("", "sweep-test.*")
|
path, err := ioutil.TempDir("", "markset.*")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
t.Cleanup(func() {
|
||||||
|
_ = os.RemoveAll(path)
|
||||||
|
})
|
||||||
|
|
||||||
env, err := OpenMarkSetEnv(path, lsType)
|
env, err := OpenMarkSetEnv(path, lsType)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
@@ -145,3 +148,74 @@ func testMarkSet(t *testing.T, lsType string) {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func testMarkSetVisitor(t *testing.T, lsType string) {
|
||||||
|
t.Helper()
|
||||||
|
|
||||||
|
path, err := ioutil.TempDir("", "markset.*")
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
t.Cleanup(func() {
|
||||||
|
_ = os.RemoveAll(path)
|
||||||
|
})
|
||||||
|
|
||||||
|
env, err := OpenMarkSetEnv(path, lsType)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
defer env.Close() //nolint:errcheck
|
||||||
|
|
||||||
|
visitor, err := env.CreateVisitor("test", 0)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
defer visitor.Close() //nolint:errcheck
|
||||||
|
|
||||||
|
makeCid := func(key string) cid.Cid {
|
||||||
|
h, err := multihash.Sum([]byte(key), multihash.SHA2_256, -1)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return cid.NewCidV1(cid.Raw, h)
|
||||||
|
}
|
||||||
|
|
||||||
|
mustVisit := func(v ObjectVisitor, cid cid.Cid) {
|
||||||
|
visit, err := v.Visit(cid)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if !visit {
|
||||||
|
t.Fatal("object should be visited")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mustNotVisit := func(v ObjectVisitor, cid cid.Cid) {
|
||||||
|
visit, err := v.Visit(cid)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if visit {
|
||||||
|
t.Fatal("unexpected visit")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
k1 := makeCid("a")
|
||||||
|
k2 := makeCid("b")
|
||||||
|
k3 := makeCid("c")
|
||||||
|
k4 := makeCid("d")
|
||||||
|
|
||||||
|
mustVisit(visitor, k1)
|
||||||
|
mustVisit(visitor, k2)
|
||||||
|
mustVisit(visitor, k3)
|
||||||
|
mustVisit(visitor, k4)
|
||||||
|
|
||||||
|
mustNotVisit(visitor, k1)
|
||||||
|
mustNotVisit(visitor, k2)
|
||||||
|
mustNotVisit(visitor, k3)
|
||||||
|
mustNotVisit(visitor, k4)
|
||||||
|
}
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ import (
|
|||||||
|
|
||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
bstore "github.com/filecoin-project/lotus/blockstore"
|
bstore "github.com/filecoin-project/lotus/blockstore"
|
||||||
|
"github.com/filecoin-project/lotus/build"
|
||||||
|
"github.com/filecoin-project/lotus/chain/stmgr"
|
||||||
"github.com/filecoin-project/lotus/chain/types"
|
"github.com/filecoin-project/lotus/chain/types"
|
||||||
"github.com/filecoin-project/lotus/metrics"
|
"github.com/filecoin-project/lotus/metrics"
|
||||||
|
|
||||||
@@ -47,6 +49,9 @@ var (
|
|||||||
enableDebugLog = false
|
enableDebugLog = false
|
||||||
// set this to true if you want to track origin stack traces in the write log
|
// set this to true if you want to track origin stack traces in the write log
|
||||||
enableDebugLogWriteTraces = false
|
enableDebugLogWriteTraces = false
|
||||||
|
|
||||||
|
// upgradeBoundary is the boundary before and after an upgrade where we suppress compaction
|
||||||
|
upgradeBoundary = build.Finality
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -98,6 +103,12 @@ type ChainAccessor interface {
|
|||||||
SubscribeHeadChanges(change func(revert []*types.TipSet, apply []*types.TipSet) error)
|
SubscribeHeadChanges(change func(revert []*types.TipSet, apply []*types.TipSet) error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// upgradeRange is a precomputed epoch range during which we shouldn't compact so as to not
|
||||||
|
// interfere with an upgrade
|
||||||
|
type upgradeRange struct {
|
||||||
|
start, end abi.ChainEpoch
|
||||||
|
}
|
||||||
|
|
||||||
// hotstore is the interface that must be satisfied by the hot blockstore; it is an extension
|
// hotstore is the interface that must be satisfied by the hot blockstore; it is an extension
|
||||||
// of the Blockstore interface with the traits we need for compaction.
|
// of the Blockstore interface with the traits we need for compaction.
|
||||||
type hotstore interface {
|
type hotstore interface {
|
||||||
@@ -125,6 +136,8 @@ type SplitStore struct {
|
|||||||
cold bstore.Blockstore
|
cold bstore.Blockstore
|
||||||
hot hotstore
|
hot hotstore
|
||||||
|
|
||||||
|
upgrades []upgradeRange
|
||||||
|
|
||||||
markSetEnv MarkSetEnv
|
markSetEnv MarkSetEnv
|
||||||
markSetSize int64
|
markSetSize int64
|
||||||
|
|
||||||
@@ -142,7 +155,6 @@ type SplitStore struct {
|
|||||||
txnViews int
|
txnViews int
|
||||||
txnViewsWaiting bool
|
txnViewsWaiting bool
|
||||||
txnActive bool
|
txnActive bool
|
||||||
txnProtect MarkSet
|
|
||||||
txnRefsMx sync.Mutex
|
txnRefsMx sync.Mutex
|
||||||
txnRefs map[cid.Cid]struct{}
|
txnRefs map[cid.Cid]struct{}
|
||||||
txnMissing map[cid.Cid]struct{}
|
txnMissing map[cid.Cid]struct{}
|
||||||
@@ -174,6 +186,10 @@ func Open(path string, ds dstore.Datastore, hot, cold bstore.Blockstore, cfg *Co
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !markSetEnv.SupportsVisitor() {
|
||||||
|
return nil, xerrors.Errorf("markset type does not support atomic visitors")
|
||||||
|
}
|
||||||
|
|
||||||
// and now we can make a SplitStore
|
// and now we can make a SplitStore
|
||||||
ss := &SplitStore{
|
ss := &SplitStore{
|
||||||
cfg: cfg,
|
cfg: cfg,
|
||||||
@@ -460,10 +476,27 @@ func (s *SplitStore) isWarm() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// State tracking
|
// State tracking
|
||||||
func (s *SplitStore) Start(chain ChainAccessor) error {
|
func (s *SplitStore) Start(chain ChainAccessor, us stmgr.UpgradeSchedule) error {
|
||||||
s.chain = chain
|
s.chain = chain
|
||||||
curTs := chain.GetHeaviestTipSet()
|
curTs := chain.GetHeaviestTipSet()
|
||||||
|
|
||||||
|
// precompute the upgrade boundaries
|
||||||
|
s.upgrades = make([]upgradeRange, 0, len(us))
|
||||||
|
for _, upgrade := range us {
|
||||||
|
boundary := upgrade.Height
|
||||||
|
for _, pre := range upgrade.PreMigrations {
|
||||||
|
preMigrationBoundary := upgrade.Height - pre.StartWithin
|
||||||
|
if preMigrationBoundary < boundary {
|
||||||
|
boundary = preMigrationBoundary
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
upgradeStart := boundary - upgradeBoundary
|
||||||
|
upgradeEnd := upgrade.Height + upgradeBoundary
|
||||||
|
|
||||||
|
s.upgrades = append(s.upgrades, upgradeRange{start: upgradeStart, end: upgradeEnd})
|
||||||
|
}
|
||||||
|
|
||||||
// should we warmup
|
// should we warmup
|
||||||
warmup := false
|
warmup := false
|
||||||
|
|
||||||
|
|||||||
@@ -83,7 +83,14 @@ func (s *SplitStore) doCheck(curTs *types.TipSet) error {
|
|||||||
write("--")
|
write("--")
|
||||||
|
|
||||||
var coldCnt, missingCnt int64
|
var coldCnt, missingCnt int64
|
||||||
err = s.walkChain(curTs, boundaryEpoch, boundaryEpoch,
|
|
||||||
|
visitor, err := s.markSetEnv.CreateVisitor("check", 0)
|
||||||
|
if err != nil {
|
||||||
|
return xerrors.Errorf("error creating visitor: %w", err)
|
||||||
|
}
|
||||||
|
defer visitor.Close() //nolint
|
||||||
|
|
||||||
|
err = s.walkChain(curTs, boundaryEpoch, boundaryEpoch, visitor,
|
||||||
func(c cid.Cid) error {
|
func(c cid.Cid) error {
|
||||||
if isUnitaryObject(c) {
|
if isUnitaryObject(c) {
|
||||||
return errStopWalk
|
return errStopWalk
|
||||||
|
|||||||
@@ -99,6 +99,12 @@ func (s *SplitStore) HeadChange(_, apply []*types.TipSet) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if s.isNearUpgrade(epoch) {
|
||||||
|
// we are near an upgrade epoch, suppress compaction
|
||||||
|
atomic.StoreInt32(&s.compacting, 0)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
if epoch-s.baseEpoch > CompactionThreshold {
|
if epoch-s.baseEpoch > CompactionThreshold {
|
||||||
// it's time to compact -- prepare the transaction and go!
|
// it's time to compact -- prepare the transaction and go!
|
||||||
s.beginTxnProtect()
|
s.beginTxnProtect()
|
||||||
@@ -121,6 +127,16 @@ func (s *SplitStore) HeadChange(_, apply []*types.TipSet) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *SplitStore) isNearUpgrade(epoch abi.ChainEpoch) bool {
|
||||||
|
for _, upgrade := range s.upgrades {
|
||||||
|
if epoch >= upgrade.start && epoch <= upgrade.end {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
// transactionally protect incoming tipsets
|
// transactionally protect incoming tipsets
|
||||||
func (s *SplitStore) protectTipSets(apply []*types.TipSet) {
|
func (s *SplitStore) protectTipSets(apply []*types.TipSet) {
|
||||||
s.txnLk.RLock()
|
s.txnLk.RLock()
|
||||||
@@ -211,7 +227,7 @@ func (s *SplitStore) trackTxnRefMany(cids []cid.Cid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// protect all pending transactional references
|
// protect all pending transactional references
|
||||||
func (s *SplitStore) protectTxnRefs(markSet MarkSet) error {
|
func (s *SplitStore) protectTxnRefs(markSet MarkSetVisitor) error {
|
||||||
for {
|
for {
|
||||||
var txnRefs map[cid.Cid]struct{}
|
var txnRefs map[cid.Cid]struct{}
|
||||||
|
|
||||||
@@ -283,30 +299,29 @@ func (s *SplitStore) protectTxnRefs(markSet MarkSet) error {
|
|||||||
|
|
||||||
// transactionally protect a reference by walking the object and marking.
|
// transactionally protect a reference by walking the object and marking.
|
||||||
// concurrent markings are short circuited by checking the markset.
|
// concurrent markings are short circuited by checking the markset.
|
||||||
func (s *SplitStore) doTxnProtect(root cid.Cid, markSet MarkSet) error {
|
func (s *SplitStore) doTxnProtect(root cid.Cid, markSet MarkSetVisitor) error {
|
||||||
if err := s.checkClosing(); err != nil {
|
if err := s.checkClosing(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: cold objects are deleted heaviest first, so the consituents of an object
|
// Note: cold objects are deleted heaviest first, so the consituents of an object
|
||||||
// cannot be deleted before the object itself.
|
// cannot be deleted before the object itself.
|
||||||
return s.walkObjectIncomplete(root, cid.NewSet(),
|
return s.walkObjectIncomplete(root, tmpVisitor(),
|
||||||
func(c cid.Cid) error {
|
func(c cid.Cid) error {
|
||||||
if isUnitaryObject(c) {
|
if isUnitaryObject(c) {
|
||||||
return errStopWalk
|
return errStopWalk
|
||||||
}
|
}
|
||||||
|
|
||||||
mark, err := markSet.Has(c)
|
visit, err := markSet.Visit(c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("error checking markset: %w", err)
|
return xerrors.Errorf("error visiting object: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// it's marked, nothing to do
|
if !visit {
|
||||||
if mark {
|
|
||||||
return errStopWalk
|
return errStopWalk
|
||||||
}
|
}
|
||||||
|
|
||||||
return markSet.Mark(c)
|
return nil
|
||||||
},
|
},
|
||||||
func(c cid.Cid) error {
|
func(c cid.Cid) error {
|
||||||
if s.txnMissing != nil {
|
if s.txnMissing != nil {
|
||||||
@@ -382,7 +397,7 @@ func (s *SplitStore) doCompact(curTs *types.TipSet) error {
|
|||||||
|
|
||||||
log.Infow("running compaction", "currentEpoch", currentEpoch, "baseEpoch", s.baseEpoch, "boundaryEpoch", boundaryEpoch, "inclMsgsEpoch", inclMsgsEpoch, "compactionIndex", s.compactionIndex)
|
log.Infow("running compaction", "currentEpoch", currentEpoch, "baseEpoch", s.baseEpoch, "boundaryEpoch", boundaryEpoch, "inclMsgsEpoch", inclMsgsEpoch, "compactionIndex", s.compactionIndex)
|
||||||
|
|
||||||
markSet, err := s.markSetEnv.Create("live", s.markSetSize)
|
markSet, err := s.markSetEnv.CreateVisitor("live", s.markSetSize)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("error creating mark set: %w", err)
|
return xerrors.Errorf("error creating mark set: %w", err)
|
||||||
}
|
}
|
||||||
@@ -410,14 +425,23 @@ func (s *SplitStore) doCompact(curTs *types.TipSet) error {
|
|||||||
startMark := time.Now()
|
startMark := time.Now()
|
||||||
|
|
||||||
var count int64
|
var count int64
|
||||||
err = s.walkChain(curTs, boundaryEpoch, inclMsgsEpoch,
|
err = s.walkChain(curTs, boundaryEpoch, inclMsgsEpoch, &noopVisitor{},
|
||||||
func(c cid.Cid) error {
|
func(c cid.Cid) error {
|
||||||
if isUnitaryObject(c) {
|
if isUnitaryObject(c) {
|
||||||
return errStopWalk
|
return errStopWalk
|
||||||
}
|
}
|
||||||
|
|
||||||
|
visit, err := markSet.Visit(c)
|
||||||
|
if err != nil {
|
||||||
|
return xerrors.Errorf("error visiting object: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if !visit {
|
||||||
|
return errStopWalk
|
||||||
|
}
|
||||||
|
|
||||||
count++
|
count++
|
||||||
return markSet.Mark(c)
|
return nil
|
||||||
})
|
})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -578,12 +602,8 @@ func (s *SplitStore) beginTxnProtect() {
|
|||||||
s.txnMissing = make(map[cid.Cid]struct{})
|
s.txnMissing = make(map[cid.Cid]struct{})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SplitStore) beginTxnMarking(markSet MarkSet) {
|
func (s *SplitStore) beginTxnMarking(markSet MarkSetVisitor) {
|
||||||
markSet.SetConcurrent()
|
markSet.SetConcurrent()
|
||||||
|
|
||||||
s.txnLk.Lock()
|
|
||||||
s.txnProtect = markSet
|
|
||||||
s.txnLk.Unlock()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SplitStore) endTxnProtect() {
|
func (s *SplitStore) endTxnProtect() {
|
||||||
@@ -594,21 +614,14 @@ func (s *SplitStore) endTxnProtect() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// release markset memory
|
|
||||||
if s.txnProtect != nil {
|
|
||||||
_ = s.txnProtect.Close()
|
|
||||||
}
|
|
||||||
|
|
||||||
s.txnActive = false
|
s.txnActive = false
|
||||||
s.txnProtect = nil
|
|
||||||
s.txnRefs = nil
|
s.txnRefs = nil
|
||||||
s.txnMissing = nil
|
s.txnMissing = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SplitStore) walkChain(ts *types.TipSet, inclState, inclMsgs abi.ChainEpoch,
|
func (s *SplitStore) walkChain(ts *types.TipSet, inclState, inclMsgs abi.ChainEpoch,
|
||||||
f func(cid.Cid) error) error {
|
visitor ObjectVisitor, f func(cid.Cid) error) error {
|
||||||
visited := cid.NewSet()
|
var walked *cid.Set
|
||||||
walked := cid.NewSet()
|
|
||||||
toWalk := ts.Cids()
|
toWalk := ts.Cids()
|
||||||
walkCnt := 0
|
walkCnt := 0
|
||||||
scanCnt := 0
|
scanCnt := 0
|
||||||
@@ -616,7 +629,7 @@ func (s *SplitStore) walkChain(ts *types.TipSet, inclState, inclMsgs abi.ChainEp
|
|||||||
stopWalk := func(_ cid.Cid) error { return errStopWalk }
|
stopWalk := func(_ cid.Cid) error { return errStopWalk }
|
||||||
|
|
||||||
walkBlock := func(c cid.Cid) error {
|
walkBlock := func(c cid.Cid) error {
|
||||||
if !visited.Visit(c) {
|
if !walked.Visit(c) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -640,19 +653,19 @@ func (s *SplitStore) walkChain(ts *types.TipSet, inclState, inclMsgs abi.ChainEp
|
|||||||
if inclMsgs < inclState {
|
if inclMsgs < inclState {
|
||||||
// we need to use walkObjectIncomplete here, as messages/receipts may be missing early on if we
|
// we need to use walkObjectIncomplete here, as messages/receipts may be missing early on if we
|
||||||
// synced from snapshot and have a long HotStoreMessageRetentionPolicy.
|
// synced from snapshot and have a long HotStoreMessageRetentionPolicy.
|
||||||
if err := s.walkObjectIncomplete(hdr.Messages, walked, f, stopWalk); err != nil {
|
if err := s.walkObjectIncomplete(hdr.Messages, visitor, f, stopWalk); err != nil {
|
||||||
return xerrors.Errorf("error walking messages (cid: %s): %w", hdr.Messages, err)
|
return xerrors.Errorf("error walking messages (cid: %s): %w", hdr.Messages, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := s.walkObjectIncomplete(hdr.ParentMessageReceipts, walked, f, stopWalk); err != nil {
|
if err := s.walkObjectIncomplete(hdr.ParentMessageReceipts, visitor, f, stopWalk); err != nil {
|
||||||
return xerrors.Errorf("error walking messages receipts (cid: %s): %w", hdr.ParentMessageReceipts, err)
|
return xerrors.Errorf("error walking messages receipts (cid: %s): %w", hdr.ParentMessageReceipts, err)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if err := s.walkObject(hdr.Messages, walked, f); err != nil {
|
if err := s.walkObject(hdr.Messages, visitor, f); err != nil {
|
||||||
return xerrors.Errorf("error walking messages (cid: %s): %w", hdr.Messages, err)
|
return xerrors.Errorf("error walking messages (cid: %s): %w", hdr.Messages, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := s.walkObject(hdr.ParentMessageReceipts, walked, f); err != nil {
|
if err := s.walkObject(hdr.ParentMessageReceipts, visitor, f); err != nil {
|
||||||
return xerrors.Errorf("error walking message receipts (cid: %s): %w", hdr.ParentMessageReceipts, err)
|
return xerrors.Errorf("error walking message receipts (cid: %s): %w", hdr.ParentMessageReceipts, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -660,7 +673,7 @@ func (s *SplitStore) walkChain(ts *types.TipSet, inclState, inclMsgs abi.ChainEp
|
|||||||
|
|
||||||
// state is only retained if within the inclState boundary, with the exception of genesis
|
// state is only retained if within the inclState boundary, with the exception of genesis
|
||||||
if hdr.Height >= inclState || hdr.Height == 0 {
|
if hdr.Height >= inclState || hdr.Height == 0 {
|
||||||
if err := s.walkObject(hdr.ParentStateRoot, walked, f); err != nil {
|
if err := s.walkObject(hdr.ParentStateRoot, visitor, f); err != nil {
|
||||||
return xerrors.Errorf("error walking state root (cid: %s): %w", hdr.ParentStateRoot, err)
|
return xerrors.Errorf("error walking state root (cid: %s): %w", hdr.ParentStateRoot, err)
|
||||||
}
|
}
|
||||||
scanCnt++
|
scanCnt++
|
||||||
@@ -679,6 +692,10 @@ func (s *SplitStore) walkChain(ts *types.TipSet, inclState, inclMsgs abi.ChainEp
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// the walk is BFS, so we can reset the walked set in every iteration and avoid building up
|
||||||
|
// a set that contains all blocks (1M epochs -> 5M blocks -> 200MB worth of memory and growing
|
||||||
|
// over time)
|
||||||
|
walked = cid.NewSet()
|
||||||
walking := toWalk
|
walking := toWalk
|
||||||
toWalk = nil
|
toWalk = nil
|
||||||
for _, c := range walking {
|
for _, c := range walking {
|
||||||
@@ -693,8 +710,13 @@ func (s *SplitStore) walkChain(ts *types.TipSet, inclState, inclMsgs abi.ChainEp
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SplitStore) walkObject(c cid.Cid, walked *cid.Set, f func(cid.Cid) error) error {
|
func (s *SplitStore) walkObject(c cid.Cid, visitor ObjectVisitor, f func(cid.Cid) error) error {
|
||||||
if !walked.Visit(c) {
|
visit, err := visitor.Visit(c)
|
||||||
|
if err != nil {
|
||||||
|
return xerrors.Errorf("error visiting object: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if !visit {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -716,7 +738,7 @@ func (s *SplitStore) walkObject(c cid.Cid, walked *cid.Set, f func(cid.Cid) erro
|
|||||||
}
|
}
|
||||||
|
|
||||||
var links []cid.Cid
|
var links []cid.Cid
|
||||||
err := s.view(c, func(data []byte) error {
|
err = s.view(c, func(data []byte) error {
|
||||||
return cbg.ScanForLinks(bytes.NewReader(data), func(c cid.Cid) {
|
return cbg.ScanForLinks(bytes.NewReader(data), func(c cid.Cid) {
|
||||||
links = append(links, c)
|
links = append(links, c)
|
||||||
})
|
})
|
||||||
@@ -727,7 +749,7 @@ func (s *SplitStore) walkObject(c cid.Cid, walked *cid.Set, f func(cid.Cid) erro
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, c := range links {
|
for _, c := range links {
|
||||||
err := s.walkObject(c, walked, f)
|
err := s.walkObject(c, visitor, f)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("error walking link (cid: %s): %w", c, err)
|
return xerrors.Errorf("error walking link (cid: %s): %w", c, err)
|
||||||
}
|
}
|
||||||
@@ -737,8 +759,13 @@ func (s *SplitStore) walkObject(c cid.Cid, walked *cid.Set, f func(cid.Cid) erro
|
|||||||
}
|
}
|
||||||
|
|
||||||
// like walkObject, but the object may be potentially incomplete (references missing)
|
// like walkObject, but the object may be potentially incomplete (references missing)
|
||||||
func (s *SplitStore) walkObjectIncomplete(c cid.Cid, walked *cid.Set, f, missing func(cid.Cid) error) error {
|
func (s *SplitStore) walkObjectIncomplete(c cid.Cid, visitor ObjectVisitor, f, missing func(cid.Cid) error) error {
|
||||||
if !walked.Visit(c) {
|
visit, err := visitor.Visit(c)
|
||||||
|
if err != nil {
|
||||||
|
return xerrors.Errorf("error visiting object: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if !visit {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -777,7 +804,7 @@ func (s *SplitStore) walkObjectIncomplete(c cid.Cid, walked *cid.Set, f, missing
|
|||||||
}
|
}
|
||||||
|
|
||||||
var links []cid.Cid
|
var links []cid.Cid
|
||||||
err := s.view(c, func(data []byte) error {
|
err = s.view(c, func(data []byte) error {
|
||||||
return cbg.ScanForLinks(bytes.NewReader(data), func(c cid.Cid) {
|
return cbg.ScanForLinks(bytes.NewReader(data), func(c cid.Cid) {
|
||||||
links = append(links, c)
|
links = append(links, c)
|
||||||
})
|
})
|
||||||
@@ -788,7 +815,7 @@ func (s *SplitStore) walkObjectIncomplete(c cid.Cid, walked *cid.Set, f, missing
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, c := range links {
|
for _, c := range links {
|
||||||
err := s.walkObjectIncomplete(c, walked, f, missing)
|
err := s.walkObjectIncomplete(c, visitor, f, missing)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("error walking link (cid: %s): %w", c, err)
|
return xerrors.Errorf("error walking link (cid: %s): %w", c, err)
|
||||||
}
|
}
|
||||||
@@ -984,7 +1011,7 @@ func (s *SplitStore) purgeBatch(cids []cid.Cid, deleteBatch func([]cid.Cid) erro
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SplitStore) purge(cids []cid.Cid, markSet MarkSet) error {
|
func (s *SplitStore) purge(cids []cid.Cid, markSet MarkSetVisitor) error {
|
||||||
deadCids := make([]cid.Cid, 0, batchSize)
|
deadCids := make([]cid.Cid, 0, batchSize)
|
||||||
var purgeCnt, liveCnt int
|
var purgeCnt, liveCnt int
|
||||||
defer func() {
|
defer func() {
|
||||||
@@ -1050,7 +1077,7 @@ func (s *SplitStore) purge(cids []cid.Cid, markSet MarkSet) error {
|
|||||||
// have this gem[TM].
|
// have this gem[TM].
|
||||||
// My best guess is that they are parent message receipts or yet to be computed state roots; magik
|
// My best guess is that they are parent message receipts or yet to be computed state roots; magik
|
||||||
// thinks the cause may be block validation.
|
// thinks the cause may be block validation.
|
||||||
func (s *SplitStore) waitForMissingRefs(markSet MarkSet) {
|
func (s *SplitStore) waitForMissingRefs(markSet MarkSetVisitor) {
|
||||||
s.txnLk.Lock()
|
s.txnLk.Lock()
|
||||||
missing := s.txnMissing
|
missing := s.txnMissing
|
||||||
s.txnMissing = nil
|
s.txnMissing = nil
|
||||||
@@ -1079,27 +1106,27 @@ func (s *SplitStore) waitForMissingRefs(markSet MarkSet) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
towalk := missing
|
towalk := missing
|
||||||
walked := cid.NewSet()
|
visitor := tmpVisitor()
|
||||||
missing = make(map[cid.Cid]struct{})
|
missing = make(map[cid.Cid]struct{})
|
||||||
|
|
||||||
for c := range towalk {
|
for c := range towalk {
|
||||||
err := s.walkObjectIncomplete(c, walked,
|
err := s.walkObjectIncomplete(c, visitor,
|
||||||
func(c cid.Cid) error {
|
func(c cid.Cid) error {
|
||||||
if isUnitaryObject(c) {
|
if isUnitaryObject(c) {
|
||||||
return errStopWalk
|
return errStopWalk
|
||||||
}
|
}
|
||||||
|
|
||||||
mark, err := markSet.Has(c)
|
visit, err := markSet.Visit(c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("error checking markset for %s: %w", c, err)
|
return xerrors.Errorf("error visiting object: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if mark {
|
if !visit {
|
||||||
return errStopWalk
|
return errStopWalk
|
||||||
}
|
}
|
||||||
|
|
||||||
count++
|
count++
|
||||||
return markSet.Mark(c)
|
return nil
|
||||||
},
|
},
|
||||||
func(c cid.Cid) error {
|
func(c cid.Cid) error {
|
||||||
missing[c] = struct{}{}
|
missing[c] = struct{}{}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import (
|
|||||||
|
|
||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
"github.com/filecoin-project/lotus/blockstore"
|
"github.com/filecoin-project/lotus/blockstore"
|
||||||
|
"github.com/filecoin-project/lotus/chain/stmgr"
|
||||||
"github.com/filecoin-project/lotus/chain/types"
|
"github.com/filecoin-project/lotus/chain/types"
|
||||||
"github.com/filecoin-project/lotus/chain/types/mock"
|
"github.com/filecoin-project/lotus/chain/types/mock"
|
||||||
|
|
||||||
@@ -90,7 +91,7 @@ func testSplitStore(t *testing.T, cfg *Config) {
|
|||||||
return protect(protected.Cid())
|
return protect(protected.Cid())
|
||||||
})
|
})
|
||||||
|
|
||||||
err = ss.Start(chain)
|
err = ss.Start(chain, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
@@ -220,6 +221,140 @@ func TestSplitStoreCompactionWithBadger(t *testing.T) {
|
|||||||
testSplitStore(t, &Config{MarkSetType: "badger"})
|
testSplitStore(t, &Config{MarkSetType: "badger"})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestSplitStoreSuppressCompactionNearUpgrade(t *testing.T) {
|
||||||
|
chain := &mockChain{t: t}
|
||||||
|
|
||||||
|
// the myriads of stores
|
||||||
|
ds := dssync.MutexWrap(datastore.NewMapDatastore())
|
||||||
|
hot := newMockStore()
|
||||||
|
cold := newMockStore()
|
||||||
|
|
||||||
|
// this is necessary to avoid the garbage mock puts in the blocks
|
||||||
|
garbage := blocks.NewBlock([]byte{1, 2, 3})
|
||||||
|
err := cold.Put(garbage)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// genesis
|
||||||
|
genBlock := mock.MkBlock(nil, 0, 0)
|
||||||
|
genBlock.Messages = garbage.Cid()
|
||||||
|
genBlock.ParentMessageReceipts = garbage.Cid()
|
||||||
|
genBlock.ParentStateRoot = garbage.Cid()
|
||||||
|
genBlock.Timestamp = uint64(time.Now().Unix())
|
||||||
|
|
||||||
|
genTs := mock.TipSet(genBlock)
|
||||||
|
chain.push(genTs)
|
||||||
|
|
||||||
|
// put the genesis block to cold store
|
||||||
|
blk, err := genBlock.ToStorageBlock()
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
err = cold.Put(blk)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// open the splitstore
|
||||||
|
ss, err := Open("", ds, hot, cold, &Config{MarkSetType: "map"})
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
defer ss.Close() //nolint
|
||||||
|
|
||||||
|
// create an upgrade schedule that will suppress compaction during the test
|
||||||
|
upgradeBoundary = 0
|
||||||
|
upgrade := stmgr.Upgrade{
|
||||||
|
Height: 10,
|
||||||
|
PreMigrations: []stmgr.PreMigration{{StartWithin: 10}},
|
||||||
|
}
|
||||||
|
|
||||||
|
err = ss.Start(chain, []stmgr.Upgrade{upgrade})
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
mkBlock := func(curTs *types.TipSet, i int, stateRoot blocks.Block) *types.TipSet {
|
||||||
|
blk := mock.MkBlock(curTs, uint64(i), uint64(i))
|
||||||
|
|
||||||
|
blk.Messages = garbage.Cid()
|
||||||
|
blk.ParentMessageReceipts = garbage.Cid()
|
||||||
|
blk.ParentStateRoot = stateRoot.Cid()
|
||||||
|
blk.Timestamp = uint64(time.Now().Unix())
|
||||||
|
|
||||||
|
sblk, err := blk.ToStorageBlock()
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
err = ss.Put(stateRoot)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
err = ss.Put(sblk)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
ts := mock.TipSet(blk)
|
||||||
|
chain.push(ts)
|
||||||
|
|
||||||
|
return ts
|
||||||
|
}
|
||||||
|
|
||||||
|
waitForCompaction := func() {
|
||||||
|
for atomic.LoadInt32(&ss.compacting) == 1 {
|
||||||
|
time.Sleep(100 * time.Millisecond)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
curTs := genTs
|
||||||
|
for i := 1; i < 10; i++ {
|
||||||
|
stateRoot := blocks.NewBlock([]byte{byte(i), 3, 3, 7})
|
||||||
|
curTs = mkBlock(curTs, i, stateRoot)
|
||||||
|
waitForCompaction()
|
||||||
|
}
|
||||||
|
|
||||||
|
countBlocks := func(bs blockstore.Blockstore) int {
|
||||||
|
count := 0
|
||||||
|
_ = bs.(blockstore.BlockstoreIterator).ForEachKey(func(_ cid.Cid) error {
|
||||||
|
count++
|
||||||
|
return nil
|
||||||
|
})
|
||||||
|
return count
|
||||||
|
}
|
||||||
|
|
||||||
|
// we should not have compacted due to suppression and everything should still be hot
|
||||||
|
hotCnt := countBlocks(hot)
|
||||||
|
coldCnt := countBlocks(cold)
|
||||||
|
|
||||||
|
if hotCnt != 20 {
|
||||||
|
t.Errorf("expected %d blocks, but got %d", 20, hotCnt)
|
||||||
|
}
|
||||||
|
|
||||||
|
if coldCnt != 2 {
|
||||||
|
t.Errorf("expected %d blocks, but got %d", 2, coldCnt)
|
||||||
|
}
|
||||||
|
|
||||||
|
// put some more blocks, now we should compact
|
||||||
|
for i := 10; i < 20; i++ {
|
||||||
|
stateRoot := blocks.NewBlock([]byte{byte(i), 3, 3, 7})
|
||||||
|
curTs = mkBlock(curTs, i, stateRoot)
|
||||||
|
waitForCompaction()
|
||||||
|
}
|
||||||
|
|
||||||
|
hotCnt = countBlocks(hot)
|
||||||
|
coldCnt = countBlocks(cold)
|
||||||
|
|
||||||
|
if hotCnt != 24 {
|
||||||
|
t.Errorf("expected %d blocks, but got %d", 24, hotCnt)
|
||||||
|
}
|
||||||
|
|
||||||
|
if coldCnt != 18 {
|
||||||
|
t.Errorf("expected %d blocks, but got %d", 18, coldCnt)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
type mockChain struct {
|
type mockChain struct {
|
||||||
t testing.TB
|
t testing.TB
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,15 @@ func (s *SplitStore) doWarmup(curTs *types.TipSet) error {
|
|||||||
count := int64(0)
|
count := int64(0)
|
||||||
xcount := int64(0)
|
xcount := int64(0)
|
||||||
missing := int64(0)
|
missing := int64(0)
|
||||||
err := s.walkChain(curTs, boundaryEpoch, epoch+1, // we don't load messages/receipts in warmup
|
|
||||||
|
visitor, err := s.markSetEnv.CreateVisitor("warmup", 0)
|
||||||
|
if err != nil {
|
||||||
|
return xerrors.Errorf("error creating visitor: %w", err)
|
||||||
|
}
|
||||||
|
defer visitor.Close() //nolint
|
||||||
|
|
||||||
|
err = s.walkChain(curTs, boundaryEpoch, epoch+1, // we don't load messages/receipts in warmup
|
||||||
|
visitor,
|
||||||
func(c cid.Cid) error {
|
func(c cid.Cid) error {
|
||||||
if isUnitaryObject(c) {
|
if isUnitaryObject(c) {
|
||||||
return errStopWalk
|
return errStopWalk
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package splitstore
|
||||||
|
|
||||||
|
import (
|
||||||
|
cid "github.com/ipfs/go-cid"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ObjectVisitor is an interface for deduplicating objects during walks
|
||||||
|
type ObjectVisitor interface {
|
||||||
|
Visit(cid.Cid) (bool, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type noopVisitor struct{}
|
||||||
|
|
||||||
|
var _ ObjectVisitor = (*noopVisitor)(nil)
|
||||||
|
|
||||||
|
func (v *noopVisitor) Visit(_ cid.Cid) (bool, error) {
|
||||||
|
return true, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type cidSetVisitor struct {
|
||||||
|
set *cid.Set
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ ObjectVisitor = (*cidSetVisitor)(nil)
|
||||||
|
|
||||||
|
func (v *cidSetVisitor) Visit(c cid.Cid) (bool, error) {
|
||||||
|
return v.set.Visit(c), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func tmpVisitor() ObjectVisitor {
|
||||||
|
return &cidSetVisitor{set: cid.NewSet()}
|
||||||
|
}
|
||||||
+5
-1
@@ -47,8 +47,12 @@ func (t *TimedCacheBlockstore) Start(_ context.Context) error {
|
|||||||
return fmt.Errorf("already started")
|
return fmt.Errorf("already started")
|
||||||
}
|
}
|
||||||
t.closeCh = make(chan struct{})
|
t.closeCh = make(chan struct{})
|
||||||
|
|
||||||
|
// Create this timer before starting the goroutine. Otherwise, creating the timer will race
|
||||||
|
// with adding time to the mock clock, and we could add time _first_, then stall waiting for
|
||||||
|
// a timer that'll never fire.
|
||||||
|
ticker := t.clock.Ticker(t.interval)
|
||||||
go func() {
|
go func() {
|
||||||
ticker := t.clock.Ticker(t.interval)
|
|
||||||
defer ticker.Stop()
|
defer ticker.Stop()
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
/dns4/bootstrap-0.butterfly.fildev.network/tcp/1347/p2p/12D3KooWBbZd7Su9XfLUQ12RynGQ3ZmGY1nGqFntmqop9pLNJE6g
|
/dns4/bootstrap-0.butterfly.fildev.network/tcp/1347/p2p/12D3KooWFHDtFx7CVTy4xoCDutVo1cScvSnQjDeaM8UzwVS1qwkh
|
||||||
/dns4/bootstrap-1.butterfly.fildev.network/tcp/1347/p2p/12D3KooWGKRzEY4tJFTmAmrYUpa1CVVohmV9YjJbC9v5XWY2gUji
|
/dns4/bootstrap-1.butterfly.fildev.network/tcp/1347/p2p/12D3KooWKt8cwpkiumkT8x32c3YFxsPRwhV5J8hCYPn9mhUmcAXt
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
/dns4/bootstrap-2.nerpa.interplanetary.dev/tcp/1347/p2p/12D3KooWQcL6ReWmR6ASWx4iT7EiAmxKDQpvgq1MKNTQZp5NPnWW
|
|
||||||
/dns4/bootstrap-0.nerpa.interplanetary.dev/tcp/1347/p2p/12D3KooWGyJCwCm7EfupM15CFPXM4c7zRVHwwwjcuy9umaGeztMX
|
|
||||||
/dns4/bootstrap-3.nerpa.interplanetary.dev/tcp/1347/p2p/12D3KooWNK9RmfksKXSCQj7ZwAM7L6roqbN4kwJteihq7yPvSgPs
|
|
||||||
/dns4/bootstrap-1.nerpa.interplanetary.dev/tcp/1347/p2p/12D3KooWCWSaH6iUyXYspYxELjDfzToBsyVGVz3QvC7ysXv7wESo
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,6 @@
|
|||||||
|
package build
|
||||||
|
|
||||||
|
var (
|
||||||
|
DefaultFDLimit uint64 = 16 << 10
|
||||||
|
MinerFDLimit uint64 = 100_000
|
||||||
|
)
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,183 @@
|
|||||||
|
package build
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
"runtime/debug"
|
||||||
|
"runtime/pprof"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/icza/backscanner"
|
||||||
|
logging "github.com/ipfs/go-log/v2"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
panicLog = logging.Logger("panic-reporter")
|
||||||
|
defaultJournalTail = 500
|
||||||
|
)
|
||||||
|
|
||||||
|
// PanicReportingPath is the name of the subdir created within the repoPath
|
||||||
|
// path provided to GeneratePanicReport
|
||||||
|
var PanicReportingPath = "panic-reports"
|
||||||
|
|
||||||
|
// PanicReportJournalTail is the number of lines captured from the end of
|
||||||
|
// the lotus journal to be included in the panic report.
|
||||||
|
var PanicReportJournalTail = defaultJournalTail
|
||||||
|
|
||||||
|
// GeneratePanicReport produces a timestamped dump of the application state
|
||||||
|
// for inspection and debugging purposes. Call this function from any place
|
||||||
|
// where a panic or severe error needs to be examined. `persistPath` is the
|
||||||
|
// path where the reports should be saved. `repoPath` is the path where the
|
||||||
|
// journal should be read from. `label` is an optional string to include
|
||||||
|
// next to the report timestamp.
|
||||||
|
func GeneratePanicReport(persistPath, repoPath, label string) {
|
||||||
|
// make sure we always dump the latest logs on the way out
|
||||||
|
// especially since we're probably panicking
|
||||||
|
defer panicLog.Sync() //nolint:errcheck
|
||||||
|
|
||||||
|
if persistPath == "" && repoPath == "" {
|
||||||
|
panicLog.Warn("missing persist and repo paths, aborting panic report creation")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
reportPath := filepath.Join(repoPath, PanicReportingPath, generateReportName(label))
|
||||||
|
if persistPath != "" {
|
||||||
|
reportPath = filepath.Join(persistPath, generateReportName(label))
|
||||||
|
}
|
||||||
|
panicLog.Warnf("generating panic report at %s", reportPath)
|
||||||
|
|
||||||
|
tl := os.Getenv("LOTUS_PANIC_JOURNAL_LOOKBACK")
|
||||||
|
if tl != "" && PanicReportJournalTail == defaultJournalTail {
|
||||||
|
i, err := strconv.Atoi(tl)
|
||||||
|
if err == nil {
|
||||||
|
PanicReportJournalTail = i
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
err := os.MkdirAll(reportPath, 0755)
|
||||||
|
if err != nil {
|
||||||
|
panicLog.Error(err.Error())
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
writeAppVersion(filepath.Join(reportPath, "version"))
|
||||||
|
writeStackTrace(filepath.Join(reportPath, "stacktrace.dump"))
|
||||||
|
writeProfile("goroutines", filepath.Join(reportPath, "goroutines.pprof.gz"))
|
||||||
|
writeProfile("heap", filepath.Join(reportPath, "heap.pprof.gz"))
|
||||||
|
writeJournalTail(PanicReportJournalTail, repoPath, filepath.Join(reportPath, "journal.ndjson"))
|
||||||
|
}
|
||||||
|
|
||||||
|
func writeAppVersion(file string) {
|
||||||
|
f, err := os.Create(file)
|
||||||
|
if err != nil {
|
||||||
|
panicLog.Error(err.Error())
|
||||||
|
}
|
||||||
|
defer f.Close() //nolint:errcheck
|
||||||
|
|
||||||
|
versionString := []byte(BuildVersion + BuildTypeString() + CurrentCommit + "\n")
|
||||||
|
if _, err := f.Write(versionString); err != nil {
|
||||||
|
panicLog.Error(err.Error())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func writeStackTrace(file string) {
|
||||||
|
f, err := os.Create(file)
|
||||||
|
if err != nil {
|
||||||
|
panicLog.Error(err.Error())
|
||||||
|
}
|
||||||
|
defer f.Close() //nolint:errcheck
|
||||||
|
|
||||||
|
if _, err := f.Write(debug.Stack()); err != nil {
|
||||||
|
panicLog.Error(err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func writeProfile(profileType string, file string) {
|
||||||
|
p := pprof.Lookup(profileType)
|
||||||
|
if p == nil {
|
||||||
|
panicLog.Warnf("%s profile not available", profileType)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
f, err := os.Create(file)
|
||||||
|
if err != nil {
|
||||||
|
panicLog.Error(err.Error())
|
||||||
|
return
|
||||||
|
}
|
||||||
|
defer f.Close() //nolint:errcheck
|
||||||
|
|
||||||
|
if err := p.WriteTo(f, 0); err != nil {
|
||||||
|
panicLog.Error(err.Error())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func writeJournalTail(tailLen int, repoPath, file string) {
|
||||||
|
if repoPath == "" {
|
||||||
|
panicLog.Warn("repo path is empty, aborting copy of journal log")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
f, err := os.Create(file)
|
||||||
|
if err != nil {
|
||||||
|
panicLog.Error(err.Error())
|
||||||
|
return
|
||||||
|
}
|
||||||
|
defer f.Close() //nolint:errcheck
|
||||||
|
|
||||||
|
jPath, err := getLatestJournalFilePath(repoPath)
|
||||||
|
if err != nil {
|
||||||
|
panicLog.Warnf("failed getting latest journal: %s", err.Error())
|
||||||
|
return
|
||||||
|
}
|
||||||
|
j, err := os.OpenFile(jPath, os.O_RDONLY, 0400)
|
||||||
|
if err != nil {
|
||||||
|
panicLog.Error(err.Error())
|
||||||
|
return
|
||||||
|
}
|
||||||
|
js, err := j.Stat()
|
||||||
|
if err != nil {
|
||||||
|
panicLog.Error(err.Error())
|
||||||
|
return
|
||||||
|
}
|
||||||
|
jScan := backscanner.New(j, int(js.Size()))
|
||||||
|
linesWritten := 0
|
||||||
|
for {
|
||||||
|
if linesWritten > tailLen {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
line, _, err := jScan.LineBytes()
|
||||||
|
if err != nil {
|
||||||
|
if err != io.EOF {
|
||||||
|
panicLog.Error(err.Error())
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
if _, err := f.Write(line); err != nil {
|
||||||
|
panicLog.Error(err.Error())
|
||||||
|
break
|
||||||
|
}
|
||||||
|
if _, err := f.Write([]byte("\n")); err != nil {
|
||||||
|
panicLog.Error(err.Error())
|
||||||
|
break
|
||||||
|
}
|
||||||
|
linesWritten++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func getLatestJournalFilePath(repoPath string) (string, error) {
|
||||||
|
journalPath := filepath.Join(repoPath, "journal")
|
||||||
|
entries, err := os.ReadDir(journalPath)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
return filepath.Join(journalPath, entries[len(entries)-1].Name()), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func generateReportName(label string) string {
|
||||||
|
label = strings.ReplaceAll(label, " ", "")
|
||||||
|
return fmt.Sprintf("report_%s_%s", label, time.Now().Format("2006-01-02T150405"))
|
||||||
|
}
|
||||||
+11
-1
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build debug || 2k
|
||||||
// +build debug 2k
|
// +build debug 2k
|
||||||
|
|
||||||
package build
|
package build
|
||||||
@@ -9,12 +10,15 @@ import (
|
|||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
|
|
||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
|
"github.com/filecoin-project/go-state-types/network"
|
||||||
"github.com/filecoin-project/lotus/chain/actors/policy"
|
"github.com/filecoin-project/lotus/chain/actors/policy"
|
||||||
)
|
)
|
||||||
|
|
||||||
const BootstrappersFile = ""
|
const BootstrappersFile = ""
|
||||||
const GenesisFile = ""
|
const GenesisFile = ""
|
||||||
|
|
||||||
|
const GenesisNetworkVersion = network.Version15
|
||||||
|
|
||||||
var UpgradeBreezeHeight = abi.ChainEpoch(-1)
|
var UpgradeBreezeHeight = abi.ChainEpoch(-1)
|
||||||
|
|
||||||
const BreezeGasTampingDuration = 0
|
const BreezeGasTampingDuration = 0
|
||||||
@@ -28,7 +32,6 @@ var UpgradeAssemblyHeight = abi.ChainEpoch(-5)
|
|||||||
var UpgradeLiftoffHeight = abi.ChainEpoch(-6)
|
var UpgradeLiftoffHeight = abi.ChainEpoch(-6)
|
||||||
|
|
||||||
var UpgradeKumquatHeight = abi.ChainEpoch(-7)
|
var UpgradeKumquatHeight = abi.ChainEpoch(-7)
|
||||||
var UpgradePricelistOopsHeight = abi.ChainEpoch(-8)
|
|
||||||
var UpgradeCalicoHeight = abi.ChainEpoch(-9)
|
var UpgradeCalicoHeight = abi.ChainEpoch(-9)
|
||||||
var UpgradePersianHeight = abi.ChainEpoch(-10)
|
var UpgradePersianHeight = abi.ChainEpoch(-10)
|
||||||
var UpgradeOrangeHeight = abi.ChainEpoch(-11)
|
var UpgradeOrangeHeight = abi.ChainEpoch(-11)
|
||||||
@@ -42,6 +45,10 @@ var UpgradeTurboHeight = abi.ChainEpoch(-15)
|
|||||||
|
|
||||||
var UpgradeHyperdriveHeight = abi.ChainEpoch(-16)
|
var UpgradeHyperdriveHeight = abi.ChainEpoch(-16)
|
||||||
|
|
||||||
|
var UpgradeChocolateHeight = abi.ChainEpoch(-17)
|
||||||
|
|
||||||
|
var UpgradeOhSnapHeight = abi.ChainEpoch(-18)
|
||||||
|
|
||||||
var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
|
var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
|
||||||
0: DrandMainnet,
|
0: DrandMainnet,
|
||||||
}
|
}
|
||||||
@@ -82,8 +89,11 @@ func init() {
|
|||||||
UpgradeNorwegianHeight = getUpgradeHeight("LOTUS_NORWEGIAN_HEIGHT", UpgradeNorwegianHeight)
|
UpgradeNorwegianHeight = getUpgradeHeight("LOTUS_NORWEGIAN_HEIGHT", UpgradeNorwegianHeight)
|
||||||
UpgradeTurboHeight = getUpgradeHeight("LOTUS_ACTORSV4_HEIGHT", UpgradeTurboHeight)
|
UpgradeTurboHeight = getUpgradeHeight("LOTUS_ACTORSV4_HEIGHT", UpgradeTurboHeight)
|
||||||
UpgradeHyperdriveHeight = getUpgradeHeight("LOTUS_HYPERDRIVE_HEIGHT", UpgradeHyperdriveHeight)
|
UpgradeHyperdriveHeight = getUpgradeHeight("LOTUS_HYPERDRIVE_HEIGHT", UpgradeHyperdriveHeight)
|
||||||
|
UpgradeChocolateHeight = getUpgradeHeight("LOTUS_CHOCOLATE_HEIGHT", UpgradeChocolateHeight)
|
||||||
|
UpgradeOhSnapHeight = getUpgradeHeight("LOTUS_OHSNAP_HEIGHT", UpgradeOhSnapHeight)
|
||||||
|
|
||||||
BuildType |= Build2k
|
BuildType |= Build2k
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const BlockDelaySecs = uint64(4)
|
const BlockDelaySecs = uint64(4)
|
||||||
|
|||||||
+23
-13
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build butterflynet
|
||||||
// +build butterflynet
|
// +build butterflynet
|
||||||
|
|
||||||
package build
|
package build
|
||||||
@@ -5,6 +6,7 @@ package build
|
|||||||
import (
|
import (
|
||||||
"github.com/filecoin-project/go-address"
|
"github.com/filecoin-project/go-address"
|
||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
|
"github.com/filecoin-project/go-state-types/network"
|
||||||
"github.com/filecoin-project/lotus/chain/actors/policy"
|
"github.com/filecoin-project/lotus/chain/actors/policy"
|
||||||
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
|
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
@@ -14,6 +16,8 @@ var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
|
|||||||
0: DrandMainnet,
|
0: DrandMainnet,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const GenesisNetworkVersion = network.Version14
|
||||||
|
|
||||||
const BootstrappersFile = "butterflynet.pi"
|
const BootstrappersFile = "butterflynet.pi"
|
||||||
const GenesisFile = "butterflynet.car"
|
const GenesisFile = "butterflynet.car"
|
||||||
|
|
||||||
@@ -23,30 +27,36 @@ const UpgradeSmokeHeight = -2
|
|||||||
const UpgradeIgnitionHeight = -3
|
const UpgradeIgnitionHeight = -3
|
||||||
const UpgradeRefuelHeight = -4
|
const UpgradeRefuelHeight = -4
|
||||||
|
|
||||||
var UpgradeAssemblyHeight = abi.ChainEpoch(30)
|
var UpgradeAssemblyHeight = abi.ChainEpoch(-5)
|
||||||
|
|
||||||
const UpgradeTapeHeight = 60
|
const UpgradeTapeHeight = -6
|
||||||
const UpgradeLiftoffHeight = -5
|
const UpgradeLiftoffHeight = -7
|
||||||
const UpgradeKumquatHeight = 90
|
const UpgradeKumquatHeight = -8
|
||||||
const UpgradePricelistOopsHeight = 119
|
const UpgradeCalicoHeight = -9
|
||||||
const UpgradeCalicoHeight = 120
|
const UpgradePersianHeight = -10
|
||||||
const UpgradePersianHeight = 150
|
const UpgradeClausHeight = -11
|
||||||
const UpgradeClausHeight = 180
|
const UpgradeOrangeHeight = -12
|
||||||
const UpgradeOrangeHeight = 210
|
const UpgradeTrustHeight = -13
|
||||||
const UpgradeTrustHeight = 240
|
const UpgradeNorwegianHeight = -14
|
||||||
const UpgradeNorwegianHeight = UpgradeTrustHeight + (builtin2.EpochsInHour * 12)
|
const UpgradeTurboHeight = -15
|
||||||
const UpgradeTurboHeight = 8922
|
const UpgradeHyperdriveHeight = -16
|
||||||
const UpgradeHyperdriveHeight = 9999999
|
const UpgradeChocolateHeight = -17
|
||||||
|
|
||||||
|
const UpgradeOhSnapHeight = 240
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
policy.SetConsensusMinerMinPower(abi.NewStoragePower(2 << 30))
|
policy.SetConsensusMinerMinPower(abi.NewStoragePower(2 << 30))
|
||||||
policy.SetSupportedProofTypes(
|
policy.SetSupportedProofTypes(
|
||||||
abi.RegisteredSealProof_StackedDrg512MiBV1,
|
abi.RegisteredSealProof_StackedDrg512MiBV1,
|
||||||
|
abi.RegisteredSealProof_StackedDrg32GiBV1,
|
||||||
|
abi.RegisteredSealProof_StackedDrg64GiBV1,
|
||||||
)
|
)
|
||||||
|
|
||||||
SetAddressNetwork(address.Testnet)
|
SetAddressNetwork(address.Testnet)
|
||||||
|
|
||||||
Devnet = true
|
Devnet = true
|
||||||
|
|
||||||
|
BuildType = BuildButterflynet
|
||||||
}
|
}
|
||||||
|
|
||||||
const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds)
|
const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build calibnet
|
||||||
// +build calibnet
|
// +build calibnet
|
||||||
|
|
||||||
package build
|
package build
|
||||||
@@ -5,6 +6,7 @@ package build
|
|||||||
import (
|
import (
|
||||||
"github.com/filecoin-project/go-address"
|
"github.com/filecoin-project/go-address"
|
||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
|
"github.com/filecoin-project/go-state-types/network"
|
||||||
"github.com/filecoin-project/lotus/chain/actors/policy"
|
"github.com/filecoin-project/lotus/chain/actors/policy"
|
||||||
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
|
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
@@ -14,6 +16,8 @@ var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
|
|||||||
0: DrandMainnet,
|
0: DrandMainnet,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const GenesisNetworkVersion = network.Version0
|
||||||
|
|
||||||
const BootstrappersFile = "calibnet.pi"
|
const BootstrappersFile = "calibnet.pi"
|
||||||
const GenesisFile = "calibnet.car"
|
const GenesisFile = "calibnet.car"
|
||||||
|
|
||||||
@@ -33,8 +37,6 @@ const UpgradeLiftoffHeight = -5
|
|||||||
|
|
||||||
const UpgradeKumquatHeight = 90
|
const UpgradeKumquatHeight = 90
|
||||||
|
|
||||||
const UpgradePricelistOopsHeight = 119
|
|
||||||
|
|
||||||
const UpgradeCalicoHeight = 120
|
const UpgradeCalicoHeight = 120
|
||||||
const UpgradePersianHeight = UpgradeCalicoHeight + (builtin2.EpochsInHour * 1)
|
const UpgradePersianHeight = UpgradeCalicoHeight + (builtin2.EpochsInHour * 1)
|
||||||
|
|
||||||
@@ -50,6 +52,11 @@ const UpgradeTurboHeight = 390
|
|||||||
|
|
||||||
const UpgradeHyperdriveHeight = 420
|
const UpgradeHyperdriveHeight = 420
|
||||||
|
|
||||||
|
const UpgradeChocolateHeight = 312746
|
||||||
|
|
||||||
|
// 2022-02-10T19:23:00Z
|
||||||
|
const UpgradeOhSnapHeight = 682006
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
policy.SetConsensusMinerMinPower(abi.NewStoragePower(32 << 30))
|
policy.SetConsensusMinerMinPower(abi.NewStoragePower(32 << 30))
|
||||||
policy.SetSupportedProofTypes(
|
policy.SetSupportedProofTypes(
|
||||||
@@ -62,6 +69,7 @@ func init() {
|
|||||||
Devnet = true
|
Devnet = true
|
||||||
|
|
||||||
BuildType = BuildCalibnet
|
BuildType = BuildCalibnet
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds)
|
const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build debug
|
||||||
// +build debug
|
// +build debug
|
||||||
|
|
||||||
package build
|
package build
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build interopnet
|
||||||
// +build interopnet
|
// +build interopnet
|
||||||
|
|
||||||
package build
|
package build
|
||||||
@@ -10,14 +11,16 @@ import (
|
|||||||
|
|
||||||
"github.com/filecoin-project/go-address"
|
"github.com/filecoin-project/go-address"
|
||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
|
"github.com/filecoin-project/go-state-types/network"
|
||||||
|
|
||||||
"github.com/filecoin-project/lotus/chain/actors/policy"
|
"github.com/filecoin-project/lotus/chain/actors/policy"
|
||||||
|
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
|
||||||
)
|
)
|
||||||
|
|
||||||
const BootstrappersFile = "interopnet.pi"
|
const BootstrappersFile = "interopnet.pi"
|
||||||
const GenesisFile = "interopnet.car"
|
const GenesisFile = "interopnet.car"
|
||||||
|
|
||||||
|
const GenesisNetworkVersion = network.Version13
|
||||||
|
|
||||||
var UpgradeBreezeHeight = abi.ChainEpoch(-1)
|
var UpgradeBreezeHeight = abi.ChainEpoch(-1)
|
||||||
|
|
||||||
const BreezeGasTampingDuration = 0
|
const BreezeGasTampingDuration = 0
|
||||||
@@ -31,7 +34,6 @@ var UpgradeAssemblyHeight = abi.ChainEpoch(-5)
|
|||||||
var UpgradeLiftoffHeight = abi.ChainEpoch(-6)
|
var UpgradeLiftoffHeight = abi.ChainEpoch(-6)
|
||||||
|
|
||||||
var UpgradeKumquatHeight = abi.ChainEpoch(-7)
|
var UpgradeKumquatHeight = abi.ChainEpoch(-7)
|
||||||
var UpgradePricelistOopsHeight = abi.ChainEpoch(-8)
|
|
||||||
var UpgradeCalicoHeight = abi.ChainEpoch(-9)
|
var UpgradeCalicoHeight = abi.ChainEpoch(-9)
|
||||||
var UpgradePersianHeight = abi.ChainEpoch(-10)
|
var UpgradePersianHeight = abi.ChainEpoch(-10)
|
||||||
var UpgradeOrangeHeight = abi.ChainEpoch(-11)
|
var UpgradeOrangeHeight = abi.ChainEpoch(-11)
|
||||||
@@ -44,6 +46,8 @@ var UpgradeNorwegianHeight = abi.ChainEpoch(-14)
|
|||||||
var UpgradeTurboHeight = abi.ChainEpoch(-15)
|
var UpgradeTurboHeight = abi.ChainEpoch(-15)
|
||||||
|
|
||||||
var UpgradeHyperdriveHeight = abi.ChainEpoch(-16)
|
var UpgradeHyperdriveHeight = abi.ChainEpoch(-16)
|
||||||
|
var UpgradeChocolateHeight = abi.ChainEpoch(-17)
|
||||||
|
var UpgradeOhSnapHeight = abi.ChainEpoch(-18)
|
||||||
|
|
||||||
var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
|
var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
|
||||||
0: DrandMainnet,
|
0: DrandMainnet,
|
||||||
@@ -93,6 +97,7 @@ func init() {
|
|||||||
BuildType |= BuildInteropnet
|
BuildType |= BuildInteropnet
|
||||||
SetAddressNetwork(address.Testnet)
|
SetAddressNetwork(address.Testnet)
|
||||||
Devnet = true
|
Devnet = true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds)
|
const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds)
|
||||||
|
|||||||
+15
-11
@@ -1,10 +1,5 @@
|
|||||||
// +build !debug
|
//go:build !debug && !2k && !testground && !calibnet && !nerpanet && !butterflynet && !interopnet
|
||||||
// +build !2k
|
// +build !debug,!2k,!testground,!calibnet,!nerpanet,!butterflynet,!interopnet
|
||||||
// +build !testground
|
|
||||||
// +build !calibnet
|
|
||||||
// +build !nerpanet
|
|
||||||
// +build !butterflynet
|
|
||||||
// +build !interopnet
|
|
||||||
|
|
||||||
package build
|
package build
|
||||||
|
|
||||||
@@ -12,6 +7,8 @@ import (
|
|||||||
"math"
|
"math"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/filecoin-project/go-state-types/network"
|
||||||
|
|
||||||
"github.com/filecoin-project/go-address"
|
"github.com/filecoin-project/go-address"
|
||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
|
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
|
||||||
@@ -22,6 +19,8 @@ var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
|
|||||||
UpgradeSmokeHeight: DrandMainnet,
|
UpgradeSmokeHeight: DrandMainnet,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const GenesisNetworkVersion = network.Version0
|
||||||
|
|
||||||
const BootstrappersFile = "mainnet.pi"
|
const BootstrappersFile = "mainnet.pi"
|
||||||
const GenesisFile = "mainnet.car"
|
const GenesisFile = "mainnet.car"
|
||||||
|
|
||||||
@@ -45,7 +44,6 @@ const UpgradeLiftoffHeight = 148888
|
|||||||
|
|
||||||
const UpgradeKumquatHeight = 170000
|
const UpgradeKumquatHeight = 170000
|
||||||
|
|
||||||
const UpgradePricelistOopsHeight = 265199
|
|
||||||
const UpgradeCalicoHeight = 265200
|
const UpgradeCalicoHeight = 265200
|
||||||
const UpgradePersianHeight = UpgradeCalicoHeight + (builtin2.EpochsInHour * 60)
|
const UpgradePersianHeight = UpgradeCalicoHeight + (builtin2.EpochsInHour * 60)
|
||||||
|
|
||||||
@@ -64,15 +62,21 @@ const UpgradeNorwegianHeight = 665280
|
|||||||
const UpgradeTurboHeight = 712320
|
const UpgradeTurboHeight = 712320
|
||||||
|
|
||||||
// 2021-06-30T22:00:00Z
|
// 2021-06-30T22:00:00Z
|
||||||
var UpgradeHyperdriveHeight = abi.ChainEpoch(892800)
|
const UpgradeHyperdriveHeight = 892800
|
||||||
|
|
||||||
|
// 2021-10-26T13:30:00Z
|
||||||
|
const UpgradeChocolateHeight = 1231620
|
||||||
|
|
||||||
|
// 2022-03-01T15:00:00Z
|
||||||
|
var UpgradeOhSnapHeight = abi.ChainEpoch(1594680)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
if os.Getenv("LOTUS_USE_TEST_ADDRESSES") != "1" {
|
if os.Getenv("LOTUS_USE_TEST_ADDRESSES") != "1" {
|
||||||
SetAddressNetwork(address.Mainnet)
|
SetAddressNetwork(address.Mainnet)
|
||||||
}
|
}
|
||||||
|
|
||||||
if os.Getenv("LOTUS_DISABLE_HYPERDRIVE") == "1" {
|
if os.Getenv("LOTUS_DISABLE_SNAPDEALS") == "1" {
|
||||||
UpgradeHyperdriveHeight = math.MaxInt64
|
UpgradeOhSnapHeight = math.MaxInt64
|
||||||
}
|
}
|
||||||
|
|
||||||
Devnet = false
|
Devnet = false
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
|
//go:build nerpanet
|
||||||
// +build nerpanet
|
// +build nerpanet
|
||||||
|
|
||||||
package build
|
package build
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
|
"github.com/filecoin-project/go-state-types/network"
|
||||||
"github.com/filecoin-project/lotus/chain/actors/policy"
|
"github.com/filecoin-project/lotus/chain/actors/policy"
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
|
|
||||||
@@ -14,6 +16,8 @@ var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
|
|||||||
0: DrandMainnet,
|
0: DrandMainnet,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const GenesisNetworkVersion = network.Version0
|
||||||
|
|
||||||
const BootstrappersFile = "nerpanet.pi"
|
const BootstrappersFile = "nerpanet.pi"
|
||||||
const GenesisFile = "nerpanet.car"
|
const GenesisFile = "nerpanet.car"
|
||||||
|
|
||||||
@@ -32,7 +36,6 @@ const UpgradeTapeHeight = 60
|
|||||||
|
|
||||||
const UpgradeKumquatHeight = 90
|
const UpgradeKumquatHeight = 90
|
||||||
|
|
||||||
const UpgradePricelistOopsHeight = 99
|
|
||||||
const UpgradeCalicoHeight = 100
|
const UpgradeCalicoHeight = 100
|
||||||
const UpgradePersianHeight = UpgradeCalicoHeight + (builtin2.EpochsInHour * 1)
|
const UpgradePersianHeight = UpgradeCalicoHeight + (builtin2.EpochsInHour * 1)
|
||||||
|
|
||||||
@@ -45,6 +48,8 @@ const UpgradeNorwegianHeight = 201000
|
|||||||
const UpgradeTurboHeight = 203000
|
const UpgradeTurboHeight = 203000
|
||||||
const UpgradeHyperdriveHeight = 379178
|
const UpgradeHyperdriveHeight = 379178
|
||||||
|
|
||||||
|
const UpgradeChocolateHeight = 999999999
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// Minimum block production power is set to 4 TiB
|
// Minimum block production power is set to 4 TiB
|
||||||
// Rationale is to discourage small-scale miners from trying to take over the network
|
// Rationale is to discourage small-scale miners from trying to take over the network
|
||||||
@@ -67,6 +72,9 @@ func init() {
|
|||||||
//miner.WPoStChallengeLookback = abi.ChainEpoch(2)
|
//miner.WPoStChallengeLookback = abi.ChainEpoch(2)
|
||||||
|
|
||||||
Devnet = false
|
Devnet = false
|
||||||
|
|
||||||
|
BuildType = BuildNerpanet
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds)
|
const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build !testground
|
||||||
// +build !testground
|
// +build !testground
|
||||||
|
|
||||||
package build
|
package build
|
||||||
@@ -25,8 +26,17 @@ const UnixfsLinksPerLevel = 1024
|
|||||||
// Consensus / Network
|
// Consensus / Network
|
||||||
|
|
||||||
const AllowableClockDriftSecs = uint64(1)
|
const AllowableClockDriftSecs = uint64(1)
|
||||||
const NewestNetworkVersion = network.Version13
|
|
||||||
const ActorUpgradeNetworkVersion = network.Version4
|
// TODO: This is still terrible...What's the impact of updating this before mainnet actually upgrades
|
||||||
|
/* inline-gen template
|
||||||
|
|
||||||
|
const NewestNetworkVersion = network.Version{{.latestNetworkVersion}}
|
||||||
|
|
||||||
|
/* inline-gen start */
|
||||||
|
|
||||||
|
const NewestNetworkVersion = network.Version15
|
||||||
|
|
||||||
|
/* inline-gen end */
|
||||||
|
|
||||||
// Epochs
|
// Epochs
|
||||||
const ForkLengthThreshold = Finality
|
const ForkLengthThreshold = Finality
|
||||||
|
|||||||
+22
-18
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build testground
|
||||||
// +build testground
|
// +build testground
|
||||||
|
|
||||||
// This file makes hardcoded parameters (const) configurable as vars.
|
// This file makes hardcoded parameters (const) configurable as vars.
|
||||||
@@ -82,29 +83,32 @@ var (
|
|||||||
UpgradeBreezeHeight abi.ChainEpoch = -1
|
UpgradeBreezeHeight abi.ChainEpoch = -1
|
||||||
BreezeGasTampingDuration abi.ChainEpoch = 0
|
BreezeGasTampingDuration abi.ChainEpoch = 0
|
||||||
|
|
||||||
UpgradeSmokeHeight abi.ChainEpoch = -1
|
UpgradeSmokeHeight abi.ChainEpoch = -1
|
||||||
UpgradeIgnitionHeight abi.ChainEpoch = -2
|
UpgradeIgnitionHeight abi.ChainEpoch = -2
|
||||||
UpgradeRefuelHeight abi.ChainEpoch = -3
|
UpgradeRefuelHeight abi.ChainEpoch = -3
|
||||||
UpgradeTapeHeight abi.ChainEpoch = -4
|
UpgradeTapeHeight abi.ChainEpoch = -4
|
||||||
UpgradeAssemblyHeight abi.ChainEpoch = 10
|
UpgradeAssemblyHeight abi.ChainEpoch = 10
|
||||||
UpgradeLiftoffHeight abi.ChainEpoch = -5
|
UpgradeLiftoffHeight abi.ChainEpoch = -5
|
||||||
UpgradeKumquatHeight abi.ChainEpoch = -6
|
UpgradeKumquatHeight abi.ChainEpoch = -6
|
||||||
UpgradePricelistOopsHeight abi.ChainEpoch = -7
|
UpgradeCalicoHeight abi.ChainEpoch = -8
|
||||||
UpgradeCalicoHeight abi.ChainEpoch = -8
|
UpgradePersianHeight abi.ChainEpoch = -9
|
||||||
UpgradePersianHeight abi.ChainEpoch = -9
|
UpgradeOrangeHeight abi.ChainEpoch = -10
|
||||||
UpgradeOrangeHeight abi.ChainEpoch = -10
|
UpgradeClausHeight abi.ChainEpoch = -11
|
||||||
UpgradeClausHeight abi.ChainEpoch = -11
|
UpgradeTrustHeight abi.ChainEpoch = -12
|
||||||
UpgradeTrustHeight abi.ChainEpoch = -12
|
UpgradeNorwegianHeight abi.ChainEpoch = -13
|
||||||
UpgradeNorwegianHeight abi.ChainEpoch = -13
|
UpgradeTurboHeight abi.ChainEpoch = -14
|
||||||
UpgradeTurboHeight abi.ChainEpoch = -14
|
UpgradeHyperdriveHeight abi.ChainEpoch = -15
|
||||||
UpgradeHyperdriveHeight abi.ChainEpoch = -15
|
UpgradeChocolateHeight abi.ChainEpoch = -16
|
||||||
|
UpgradeOhSnapHeight abi.ChainEpoch = -17
|
||||||
|
|
||||||
DrandSchedule = map[abi.ChainEpoch]DrandEnum{
|
DrandSchedule = map[abi.ChainEpoch]DrandEnum{
|
||||||
0: DrandMainnet,
|
0: DrandMainnet,
|
||||||
}
|
}
|
||||||
|
|
||||||
NewestNetworkVersion = network.Version11
|
GenesisNetworkVersion = network.Version0
|
||||||
ActorUpgradeNetworkVersion = network.Version4
|
|
||||||
|
NewestNetworkVersion = network.Version15
|
||||||
|
ActorUpgradeNetworkVersion = network.Version15
|
||||||
|
|
||||||
Devnet = true
|
Devnet = true
|
||||||
ZeroAddress = MustParseAddress("f3yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaby2smx7a")
|
ZeroAddress = MustParseAddress("f3yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaby2smx7a")
|
||||||
|
|||||||
@@ -1,4 +1,54 @@
|
|||||||
{
|
{
|
||||||
|
"v28-empty-sector-update-merkletree-poseidon_hasher-8-0-0-61fa69f38b9cc771ba27b670124714b4ea77fbeae05e377fb859c4a43b73a30c.params": {
|
||||||
|
"cid": "Qma5WL6abSqYg9uUQAZ3EHS286bsNsha7oAGsJBD48Bq2q",
|
||||||
|
"digest": "c3ad7bb549470b82ad52ed070aebb4f4",
|
||||||
|
"sector_size": 536870912
|
||||||
|
},
|
||||||
|
"v28-empty-sector-update-merkletree-poseidon_hasher-8-0-0-61fa69f38b9cc771ba27b670124714b4ea77fbeae05e377fb859c4a43b73a30c.vk": {
|
||||||
|
"cid": "QmUa7f9JtJMsqJJ3s3ZXk6WyF4xJLE8FiqYskZGgk8GCDv",
|
||||||
|
"digest": "994c5b7d450ca9da348c910689f2dc7f",
|
||||||
|
"sector_size": 536870912
|
||||||
|
},
|
||||||
|
"v28-empty-sector-update-merkletree-poseidon_hasher-8-0-0-92180959e1918d26350b8e6cfe217bbdd0a2d8de51ebec269078b364b715ad63.params": {
|
||||||
|
"cid": "QmQiT4qBGodrVNEgVTDXxBNDdPbaD8Ag7Sx3ZTq1zHX79S",
|
||||||
|
"digest": "5aedd2cf3e5c0a15623d56a1b43110ad",
|
||||||
|
"sector_size": 8388608
|
||||||
|
},
|
||||||
|
"v28-empty-sector-update-merkletree-poseidon_hasher-8-0-0-92180959e1918d26350b8e6cfe217bbdd0a2d8de51ebec269078b364b715ad63.vk": {
|
||||||
|
"cid": "QmdcpKUQvHM8RFRVKbk1yHfEqMcBzhtFWKRp9SNEmWq37i",
|
||||||
|
"digest": "abd80269054d391a734febdac0d2e687",
|
||||||
|
"sector_size": 8388608
|
||||||
|
},
|
||||||
|
"v28-empty-sector-update-merkletree-poseidon_hasher-8-0-0-fb9e095bebdd77511c0269b967b4d87ba8b8a525edaa0e165de23ba454510194.params": {
|
||||||
|
"cid": "QmYM6Hg7mjmvA3ZHTsqkss1fkdyDju5dDmLiBZGJ5pz9y9",
|
||||||
|
"digest": "311f92a3e75036ced01b1c0025f1fa0c",
|
||||||
|
"sector_size": 2048
|
||||||
|
},
|
||||||
|
"v28-empty-sector-update-merkletree-poseidon_hasher-8-0-0-fb9e095bebdd77511c0269b967b4d87ba8b8a525edaa0e165de23ba454510194.vk": {
|
||||||
|
"cid": "QmaQsTLL3nc5dw6wAvaioJSBfd1jhQrA2o6ucFf7XeV74P",
|
||||||
|
"digest": "eadad9784969890d30f2749708c79771",
|
||||||
|
"sector_size": 2048
|
||||||
|
},
|
||||||
|
"v28-empty-sector-update-merkletree-poseidon_hasher-8-8-0-3b7f44a9362e3985369454947bc94022e118211e49fd672d52bec1cbfd599d18.params": {
|
||||||
|
"cid": "QmNPc75iEfcahCwNKdqnWLtxnjspUGGR4iscjiz3wP3RtS",
|
||||||
|
"digest": "1b3cfd761a961543f9eb273e435a06a2",
|
||||||
|
"sector_size": 34359738368
|
||||||
|
},
|
||||||
|
"v28-empty-sector-update-merkletree-poseidon_hasher-8-8-0-3b7f44a9362e3985369454947bc94022e118211e49fd672d52bec1cbfd599d18.vk": {
|
||||||
|
"cid": "QmdFFUe1gcz9MMHc6YW8aoV48w4ckvcERjt7PkydQAMfCN",
|
||||||
|
"digest": "3a6941983754737fde880d29c7094905",
|
||||||
|
"sector_size": 34359738368
|
||||||
|
},
|
||||||
|
"v28-empty-sector-update-merkletree-poseidon_hasher-8-8-2-102e1444a7e9a97ebf1e3d6855dcc77e66c011ea66f936d9b2c508f87f2f83a7.params": {
|
||||||
|
"cid": "QmUB6xTVjzBQGuDNeyJMrrJ1byk58vhPm8eY2Lv9pgwanp",
|
||||||
|
"digest": "1a392e7b759fb18e036c7559b5ece816",
|
||||||
|
"sector_size": 68719476736
|
||||||
|
},
|
||||||
|
"v28-empty-sector-update-merkletree-poseidon_hasher-8-8-2-102e1444a7e9a97ebf1e3d6855dcc77e66c011ea66f936d9b2c508f87f2f83a7.vk": {
|
||||||
|
"cid": "Qmd794Jty7k26XJ8Eg4NDEks65Qk8G4GVfGkwqvymv8HAg",
|
||||||
|
"digest": "80e366df2f1011953c2d01c7b7c9ee8e",
|
||||||
|
"sector_size": 68719476736
|
||||||
|
},
|
||||||
"v28-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-0170db1f394b35d995252228ee359194b13199d259380541dc529fb0099096b0.params": {
|
"v28-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-0170db1f394b35d995252228ee359194b13199d259380541dc529fb0099096b0.params": {
|
||||||
"cid": "QmVxjFRyhmyQaZEtCh7nk2abc7LhFkzhnRX4rcHqCCpikR",
|
"cid": "QmVxjFRyhmyQaZEtCh7nk2abc7LhFkzhnRX4rcHqCCpikR",
|
||||||
"digest": "7610b9f82bfc88405b7a832b651ce2f6",
|
"digest": "7610b9f82bfc88405b7a832b651ce2f6",
|
||||||
|
|||||||
+2
-1
@@ -1,4 +1,5 @@
|
|||||||
//+build tools
|
//go:build tools
|
||||||
|
// +build tools
|
||||||
|
|
||||||
package build
|
package build
|
||||||
|
|
||||||
|
|||||||
+13
-10
@@ -6,15 +6,16 @@ var CurrentCommit string
|
|||||||
var BuildType int
|
var BuildType int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
BuildDefault = 0
|
BuildDefault = 0
|
||||||
BuildMainnet = 0x1
|
BuildMainnet = 0x1
|
||||||
Build2k = 0x2
|
Build2k = 0x2
|
||||||
BuildDebug = 0x3
|
BuildDebug = 0x3
|
||||||
BuildCalibnet = 0x4
|
BuildCalibnet = 0x4
|
||||||
BuildInteropnet = 0x5
|
BuildInteropnet = 0x5
|
||||||
|
BuildButterflynet = 0x7
|
||||||
)
|
)
|
||||||
|
|
||||||
func buildType() string {
|
func BuildTypeString() string {
|
||||||
switch BuildType {
|
switch BuildType {
|
||||||
case BuildDefault:
|
case BuildDefault:
|
||||||
return ""
|
return ""
|
||||||
@@ -28,18 +29,20 @@ func buildType() string {
|
|||||||
return "+calibnet"
|
return "+calibnet"
|
||||||
case BuildInteropnet:
|
case BuildInteropnet:
|
||||||
return "+interopnet"
|
return "+interopnet"
|
||||||
|
case BuildButterflynet:
|
||||||
|
return "+butterflynet"
|
||||||
default:
|
default:
|
||||||
return "+huh?"
|
return "+huh?"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// BuildVersion is the local build version, set by build system
|
// BuildVersion is the local build version
|
||||||
const BuildVersion = "1.11.1-dev"
|
const BuildVersion = "1.14.2"
|
||||||
|
|
||||||
func UserVersion() string {
|
func UserVersion() string {
|
||||||
if os.Getenv("LOTUS_VERSION_IGNORE_COMMIT") == "1" {
|
if os.Getenv("LOTUS_VERSION_IGNORE_COMMIT") == "1" {
|
||||||
return BuildVersion
|
return BuildVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
return BuildVersion + buildType() + CurrentCommit
|
return BuildVersion + BuildTypeString() + CurrentCommit
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ import (
|
|||||||
builtin4 "github.com/filecoin-project/specs-actors/v4/actors/builtin"
|
builtin4 "github.com/filecoin-project/specs-actors/v4/actors/builtin"
|
||||||
|
|
||||||
builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin"
|
builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin"
|
||||||
|
|
||||||
|
builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin"
|
||||||
|
|
||||||
|
builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -44,6 +48,14 @@ func init() {
|
|||||||
builtin.RegisterActorState(builtin5.AccountActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) {
|
builtin.RegisterActorState(builtin5.AccountActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) {
|
||||||
return load5(store, root)
|
return load5(store, root)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
builtin.RegisterActorState(builtin6.AccountActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) {
|
||||||
|
return load6(store, root)
|
||||||
|
})
|
||||||
|
|
||||||
|
builtin.RegisterActorState(builtin7.AccountActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) {
|
||||||
|
return load7(store, root)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
var Methods = builtin4.MethodsAccount
|
var Methods = builtin4.MethodsAccount
|
||||||
@@ -66,6 +78,12 @@ func Load(store adt.Store, act *types.Actor) (State, error) {
|
|||||||
case builtin5.AccountActorCodeID:
|
case builtin5.AccountActorCodeID:
|
||||||
return load5(store, act.Head)
|
return load5(store, act.Head)
|
||||||
|
|
||||||
|
case builtin6.AccountActorCodeID:
|
||||||
|
return load6(store, act.Head)
|
||||||
|
|
||||||
|
case builtin7.AccountActorCodeID:
|
||||||
|
return load7(store, act.Head)
|
||||||
|
|
||||||
}
|
}
|
||||||
return nil, xerrors.Errorf("unknown actor code %s", act.Code)
|
return nil, xerrors.Errorf("unknown actor code %s", act.Code)
|
||||||
}
|
}
|
||||||
@@ -88,6 +106,12 @@ func MakeState(store adt.Store, av actors.Version, addr address.Address) (State,
|
|||||||
case actors.Version5:
|
case actors.Version5:
|
||||||
return make5(store, addr)
|
return make5(store, addr)
|
||||||
|
|
||||||
|
case actors.Version6:
|
||||||
|
return make6(store, addr)
|
||||||
|
|
||||||
|
case actors.Version7:
|
||||||
|
return make7(store, addr)
|
||||||
|
|
||||||
}
|
}
|
||||||
return nil, xerrors.Errorf("unknown actor version %d", av)
|
return nil, xerrors.Errorf("unknown actor version %d", av)
|
||||||
}
|
}
|
||||||
@@ -110,6 +134,12 @@ func GetActorCodeID(av actors.Version) (cid.Cid, error) {
|
|||||||
case actors.Version5:
|
case actors.Version5:
|
||||||
return builtin5.AccountActorCodeID, nil
|
return builtin5.AccountActorCodeID, nil
|
||||||
|
|
||||||
|
case actors.Version6:
|
||||||
|
return builtin6.AccountActorCodeID, nil
|
||||||
|
|
||||||
|
case actors.Version7:
|
||||||
|
return builtin7.AccountActorCodeID, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return cid.Undef, xerrors.Errorf("unknown actor version %d", av)
|
return cid.Undef, xerrors.Errorf("unknown actor version %d", av)
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package account
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/filecoin-project/go-address"
|
||||||
|
"github.com/ipfs/go-cid"
|
||||||
|
|
||||||
|
"github.com/filecoin-project/lotus/chain/actors/adt"
|
||||||
|
|
||||||
|
account6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/account"
|
||||||
|
)
|
||||||
|
|
||||||
|
var _ State = (*state6)(nil)
|
||||||
|
|
||||||
|
func load6(store adt.Store, root cid.Cid) (State, error) {
|
||||||
|
out := state6{store: store}
|
||||||
|
err := store.Get(store.Context(), root, &out)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func make6(store adt.Store, addr address.Address) (State, error) {
|
||||||
|
out := state6{store: store}
|
||||||
|
out.State = account6.State{Address: addr}
|
||||||
|
return &out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type state6 struct {
|
||||||
|
account6.State
|
||||||
|
store adt.Store
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) PubkeyAddress() (address.Address, error) {
|
||||||
|
return s.Address, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) GetState() interface{} {
|
||||||
|
return &s.State
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package account
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/filecoin-project/go-address"
|
||||||
|
"github.com/ipfs/go-cid"
|
||||||
|
|
||||||
|
"github.com/filecoin-project/lotus/chain/actors/adt"
|
||||||
|
|
||||||
|
account7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/account"
|
||||||
|
)
|
||||||
|
|
||||||
|
var _ State = (*state7)(nil)
|
||||||
|
|
||||||
|
func load7(store adt.Store, root cid.Cid) (State, error) {
|
||||||
|
out := state7{store: store}
|
||||||
|
err := store.Get(store.Context(), root, &out)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func make7(store adt.Store, addr address.Address) (State, error) {
|
||||||
|
out := state7{store: store}
|
||||||
|
out.State = account7.State{Address: addr}
|
||||||
|
return &out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type state7 struct {
|
||||||
|
account7.State
|
||||||
|
store adt.Store
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) PubkeyAddress() (address.Address, error) {
|
||||||
|
return s.Address, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) GetState() interface{} {
|
||||||
|
return &s.State
|
||||||
|
}
|
||||||
@@ -20,46 +20,53 @@ import (
|
|||||||
builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin"
|
builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin"
|
||||||
smoothing5 "github.com/filecoin-project/specs-actors/v5/actors/util/smoothing"
|
smoothing5 "github.com/filecoin-project/specs-actors/v5/actors/util/smoothing"
|
||||||
|
|
||||||
|
builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin"
|
||||||
|
smoothing6 "github.com/filecoin-project/specs-actors/v6/actors/util/smoothing"
|
||||||
|
|
||||||
|
builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin"
|
||||||
|
smoothing7 "github.com/filecoin-project/specs-actors/v7/actors/util/smoothing"
|
||||||
|
|
||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
"github.com/filecoin-project/go-state-types/cbor"
|
"github.com/filecoin-project/go-state-types/cbor"
|
||||||
|
|
||||||
"github.com/filecoin-project/lotus/chain/actors/adt"
|
"github.com/filecoin-project/lotus/chain/actors/adt"
|
||||||
"github.com/filecoin-project/lotus/chain/types"
|
"github.com/filecoin-project/lotus/chain/types"
|
||||||
|
|
||||||
miner5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/miner"
|
miner7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/miner"
|
||||||
proof5 "github.com/filecoin-project/specs-actors/v5/actors/runtime/proof"
|
proof7 "github.com/filecoin-project/specs-actors/v7/actors/runtime/proof"
|
||||||
)
|
)
|
||||||
|
|
||||||
var SystemActorAddr = builtin5.SystemActorAddr
|
var SystemActorAddr = builtin7.SystemActorAddr
|
||||||
var BurntFundsActorAddr = builtin5.BurntFundsActorAddr
|
var BurntFundsActorAddr = builtin7.BurntFundsActorAddr
|
||||||
var CronActorAddr = builtin5.CronActorAddr
|
var CronActorAddr = builtin7.CronActorAddr
|
||||||
var SaftAddress = makeAddress("t0122")
|
var SaftAddress = makeAddress("t0122")
|
||||||
var ReserveAddress = makeAddress("t090")
|
var ReserveAddress = makeAddress("t090")
|
||||||
var RootVerifierAddress = makeAddress("t080")
|
var RootVerifierAddress = makeAddress("t080")
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ExpectedLeadersPerEpoch = builtin5.ExpectedLeadersPerEpoch
|
ExpectedLeadersPerEpoch = builtin7.ExpectedLeadersPerEpoch
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
EpochDurationSeconds = builtin5.EpochDurationSeconds
|
EpochDurationSeconds = builtin7.EpochDurationSeconds
|
||||||
EpochsInDay = builtin5.EpochsInDay
|
EpochsInDay = builtin7.EpochsInDay
|
||||||
SecondsInDay = builtin5.SecondsInDay
|
SecondsInDay = builtin7.SecondsInDay
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
MethodSend = builtin5.MethodSend
|
MethodSend = builtin7.MethodSend
|
||||||
MethodConstructor = builtin5.MethodConstructor
|
MethodConstructor = builtin7.MethodConstructor
|
||||||
)
|
)
|
||||||
|
|
||||||
// These are all just type aliases across actor versions. In the future, that might change
|
// These are all just type aliases across actor versions. In the future, that might change
|
||||||
// and we might need to do something fancier.
|
// and we might need to do something fancier.
|
||||||
type SectorInfo = proof5.SectorInfo
|
type SectorInfo = proof7.SectorInfo
|
||||||
type PoStProof = proof5.PoStProof
|
type ExtendedSectorInfo = proof7.ExtendedSectorInfo
|
||||||
|
type PoStProof = proof7.PoStProof
|
||||||
type FilterEstimate = smoothing0.FilterEstimate
|
type FilterEstimate = smoothing0.FilterEstimate
|
||||||
|
|
||||||
func QAPowerForWeight(size abi.SectorSize, duration abi.ChainEpoch, dealWeight, verifiedWeight abi.DealWeight) abi.StoragePower {
|
func QAPowerForWeight(size abi.SectorSize, duration abi.ChainEpoch, dealWeight, verifiedWeight abi.DealWeight) abi.StoragePower {
|
||||||
return miner5.QAPowerForWeight(size, duration, dealWeight, verifiedWeight)
|
return miner7.QAPowerForWeight(size, duration, dealWeight, verifiedWeight)
|
||||||
}
|
}
|
||||||
|
|
||||||
func FromV0FilterEstimate(v0 smoothing0.FilterEstimate) FilterEstimate {
|
func FromV0FilterEstimate(v0 smoothing0.FilterEstimate) FilterEstimate {
|
||||||
@@ -92,6 +99,18 @@ func FromV5FilterEstimate(v5 smoothing5.FilterEstimate) FilterEstimate {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func FromV6FilterEstimate(v6 smoothing6.FilterEstimate) FilterEstimate {
|
||||||
|
|
||||||
|
return (FilterEstimate)(v6)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func FromV7FilterEstimate(v7 smoothing7.FilterEstimate) FilterEstimate {
|
||||||
|
|
||||||
|
return (FilterEstimate)(v7)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
type ActorStateLoader func(store adt.Store, root cid.Cid) (cbor.Marshaler, error)
|
type ActorStateLoader func(store adt.Store, root cid.Cid) (cbor.Marshaler, error)
|
||||||
|
|
||||||
var ActorStateLoaders = make(map[cid.Cid]ActorStateLoader)
|
var ActorStateLoaders = make(map[cid.Cid]ActorStateLoader)
|
||||||
@@ -126,6 +145,12 @@ func ActorNameByCode(c cid.Cid) string {
|
|||||||
case builtin5.IsBuiltinActor(c):
|
case builtin5.IsBuiltinActor(c):
|
||||||
return builtin5.ActorNameByCode(c)
|
return builtin5.ActorNameByCode(c)
|
||||||
|
|
||||||
|
case builtin6.IsBuiltinActor(c):
|
||||||
|
return builtin6.ActorNameByCode(c)
|
||||||
|
|
||||||
|
case builtin7.IsBuiltinActor(c):
|
||||||
|
return builtin7.ActorNameByCode(c)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return "<unknown>"
|
return "<unknown>"
|
||||||
}
|
}
|
||||||
@@ -153,6 +178,14 @@ func IsBuiltinActor(c cid.Cid) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if builtin6.IsBuiltinActor(c) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if builtin7.IsBuiltinActor(c) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,6 +211,14 @@ func IsAccountActor(c cid.Cid) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if c == builtin6.AccountActorCodeID {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if c == builtin7.AccountActorCodeID {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,6 +244,14 @@ func IsStorageMinerActor(c cid.Cid) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if c == builtin6.StorageMinerActorCodeID {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if c == builtin7.StorageMinerActorCodeID {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,6 +277,14 @@ func IsMultisigActor(c cid.Cid) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if c == builtin6.MultisigActorCodeID {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if c == builtin7.MultisigActorCodeID {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,6 +310,14 @@ func IsPaymentChannelActor(c cid.Cid) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if c == builtin6.PaymentChannelActorCodeID {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if c == builtin7.PaymentChannelActorCodeID {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ const (
|
|||||||
// These are all just type aliases across actor versions. In the future, that might change
|
// These are all just type aliases across actor versions. In the future, that might change
|
||||||
// and we might need to do something fancier.
|
// and we might need to do something fancier.
|
||||||
type SectorInfo = proof{{.latestVersion}}.SectorInfo
|
type SectorInfo = proof{{.latestVersion}}.SectorInfo
|
||||||
|
type ExtendedSectorInfo = proof{{.latestVersion}}.ExtendedSectorInfo
|
||||||
type PoStProof = proof{{.latestVersion}}.PoStProof
|
type PoStProof = proof{{.latestVersion}}.PoStProof
|
||||||
type FilterEstimate = smoothing0.FilterEstimate
|
type FilterEstimate = smoothing0.FilterEstimate
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ import (
|
|||||||
builtin4 "github.com/filecoin-project/specs-actors/v4/actors/builtin"
|
builtin4 "github.com/filecoin-project/specs-actors/v4/actors/builtin"
|
||||||
|
|
||||||
builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin"
|
builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin"
|
||||||
|
|
||||||
|
builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin"
|
||||||
|
|
||||||
|
builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin"
|
||||||
)
|
)
|
||||||
|
|
||||||
func MakeState(store adt.Store, av actors.Version) (State, error) {
|
func MakeState(store adt.Store, av actors.Version) (State, error) {
|
||||||
@@ -35,6 +39,12 @@ func MakeState(store adt.Store, av actors.Version) (State, error) {
|
|||||||
case actors.Version5:
|
case actors.Version5:
|
||||||
return make5(store)
|
return make5(store)
|
||||||
|
|
||||||
|
case actors.Version6:
|
||||||
|
return make6(store)
|
||||||
|
|
||||||
|
case actors.Version7:
|
||||||
|
return make7(store)
|
||||||
|
|
||||||
}
|
}
|
||||||
return nil, xerrors.Errorf("unknown actor version %d", av)
|
return nil, xerrors.Errorf("unknown actor version %d", av)
|
||||||
}
|
}
|
||||||
@@ -57,14 +67,20 @@ func GetActorCodeID(av actors.Version) (cid.Cid, error) {
|
|||||||
case actors.Version5:
|
case actors.Version5:
|
||||||
return builtin5.CronActorCodeID, nil
|
return builtin5.CronActorCodeID, nil
|
||||||
|
|
||||||
|
case actors.Version6:
|
||||||
|
return builtin6.CronActorCodeID, nil
|
||||||
|
|
||||||
|
case actors.Version7:
|
||||||
|
return builtin7.CronActorCodeID, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return cid.Undef, xerrors.Errorf("unknown actor version %d", av)
|
return cid.Undef, xerrors.Errorf("unknown actor version %d", av)
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
Address = builtin5.CronActorAddr
|
Address = builtin7.CronActorAddr
|
||||||
Methods = builtin5.MethodsCron
|
Methods = builtin7.MethodsCron
|
||||||
)
|
)
|
||||||
|
|
||||||
type State interface {
|
type State interface {
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package cron
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/ipfs/go-cid"
|
||||||
|
|
||||||
|
"github.com/filecoin-project/lotus/chain/actors/adt"
|
||||||
|
|
||||||
|
cron6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/cron"
|
||||||
|
)
|
||||||
|
|
||||||
|
var _ State = (*state6)(nil)
|
||||||
|
|
||||||
|
func load6(store adt.Store, root cid.Cid) (State, error) {
|
||||||
|
out := state6{store: store}
|
||||||
|
err := store.Get(store.Context(), root, &out)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func make6(store adt.Store) (State, error) {
|
||||||
|
out := state6{store: store}
|
||||||
|
out.State = *cron6.ConstructState(cron6.BuiltInEntries())
|
||||||
|
return &out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type state6 struct {
|
||||||
|
cron6.State
|
||||||
|
store adt.Store
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) GetState() interface{} {
|
||||||
|
return &s.State
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package cron
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/ipfs/go-cid"
|
||||||
|
|
||||||
|
"github.com/filecoin-project/lotus/chain/actors/adt"
|
||||||
|
|
||||||
|
cron7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/cron"
|
||||||
|
)
|
||||||
|
|
||||||
|
var _ State = (*state7)(nil)
|
||||||
|
|
||||||
|
func load7(store adt.Store, root cid.Cid) (State, error) {
|
||||||
|
out := state7{store: store}
|
||||||
|
err := store.Get(store.Context(), root, &out)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func make7(store adt.Store) (State, error) {
|
||||||
|
out := state7{store: store}
|
||||||
|
out.State = *cron7.ConstructState(cron7.BuiltInEntries())
|
||||||
|
return &out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type state7 struct {
|
||||||
|
cron7.State
|
||||||
|
store adt.Store
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) GetState() interface{} {
|
||||||
|
return &s.State
|
||||||
|
}
|
||||||
@@ -23,6 +23,10 @@ import (
|
|||||||
builtin4 "github.com/filecoin-project/specs-actors/v4/actors/builtin"
|
builtin4 "github.com/filecoin-project/specs-actors/v4/actors/builtin"
|
||||||
|
|
||||||
builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin"
|
builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin"
|
||||||
|
|
||||||
|
builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin"
|
||||||
|
|
||||||
|
builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -46,11 +50,19 @@ func init() {
|
|||||||
builtin.RegisterActorState(builtin5.InitActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) {
|
builtin.RegisterActorState(builtin5.InitActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) {
|
||||||
return load5(store, root)
|
return load5(store, root)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
builtin.RegisterActorState(builtin6.InitActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) {
|
||||||
|
return load6(store, root)
|
||||||
|
})
|
||||||
|
|
||||||
|
builtin.RegisterActorState(builtin7.InitActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) {
|
||||||
|
return load7(store, root)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
Address = builtin5.InitActorAddr
|
Address = builtin7.InitActorAddr
|
||||||
Methods = builtin5.MethodsInit
|
Methods = builtin7.MethodsInit
|
||||||
)
|
)
|
||||||
|
|
||||||
func Load(store adt.Store, act *types.Actor) (State, error) {
|
func Load(store adt.Store, act *types.Actor) (State, error) {
|
||||||
@@ -71,6 +83,12 @@ func Load(store adt.Store, act *types.Actor) (State, error) {
|
|||||||
case builtin5.InitActorCodeID:
|
case builtin5.InitActorCodeID:
|
||||||
return load5(store, act.Head)
|
return load5(store, act.Head)
|
||||||
|
|
||||||
|
case builtin6.InitActorCodeID:
|
||||||
|
return load6(store, act.Head)
|
||||||
|
|
||||||
|
case builtin7.InitActorCodeID:
|
||||||
|
return load7(store, act.Head)
|
||||||
|
|
||||||
}
|
}
|
||||||
return nil, xerrors.Errorf("unknown actor code %s", act.Code)
|
return nil, xerrors.Errorf("unknown actor code %s", act.Code)
|
||||||
}
|
}
|
||||||
@@ -93,6 +111,12 @@ func MakeState(store adt.Store, av actors.Version, networkName string) (State, e
|
|||||||
case actors.Version5:
|
case actors.Version5:
|
||||||
return make5(store, networkName)
|
return make5(store, networkName)
|
||||||
|
|
||||||
|
case actors.Version6:
|
||||||
|
return make6(store, networkName)
|
||||||
|
|
||||||
|
case actors.Version7:
|
||||||
|
return make7(store, networkName)
|
||||||
|
|
||||||
}
|
}
|
||||||
return nil, xerrors.Errorf("unknown actor version %d", av)
|
return nil, xerrors.Errorf("unknown actor version %d", av)
|
||||||
}
|
}
|
||||||
@@ -115,6 +139,12 @@ func GetActorCodeID(av actors.Version) (cid.Cid, error) {
|
|||||||
case actors.Version5:
|
case actors.Version5:
|
||||||
return builtin5.InitActorCodeID, nil
|
return builtin5.InitActorCodeID, nil
|
||||||
|
|
||||||
|
case actors.Version6:
|
||||||
|
return builtin6.InitActorCodeID, nil
|
||||||
|
|
||||||
|
case actors.Version7:
|
||||||
|
return builtin7.InitActorCodeID, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return cid.Undef, xerrors.Errorf("unknown actor version %d", av)
|
return cid.Undef, xerrors.Errorf("unknown actor version %d", av)
|
||||||
|
|||||||
@@ -0,0 +1,114 @@
|
|||||||
|
package init
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/filecoin-project/go-address"
|
||||||
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
|
"github.com/ipfs/go-cid"
|
||||||
|
cbg "github.com/whyrusleeping/cbor-gen"
|
||||||
|
"golang.org/x/xerrors"
|
||||||
|
|
||||||
|
"github.com/filecoin-project/lotus/chain/actors/adt"
|
||||||
|
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
||||||
|
|
||||||
|
builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin"
|
||||||
|
|
||||||
|
init6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/init"
|
||||||
|
adt6 "github.com/filecoin-project/specs-actors/v6/actors/util/adt"
|
||||||
|
)
|
||||||
|
|
||||||
|
var _ State = (*state6)(nil)
|
||||||
|
|
||||||
|
func load6(store adt.Store, root cid.Cid) (State, error) {
|
||||||
|
out := state6{store: store}
|
||||||
|
err := store.Get(store.Context(), root, &out)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func make6(store adt.Store, networkName string) (State, error) {
|
||||||
|
out := state6{store: store}
|
||||||
|
|
||||||
|
s, err := init6.ConstructState(store, networkName)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
out.State = *s
|
||||||
|
|
||||||
|
return &out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type state6 struct {
|
||||||
|
init6.State
|
||||||
|
store adt.Store
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) ResolveAddress(address address.Address) (address.Address, bool, error) {
|
||||||
|
return s.State.ResolveAddress(s.store, address)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) MapAddressToNewID(address address.Address) (address.Address, error) {
|
||||||
|
return s.State.MapAddressToNewID(s.store, address)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) ForEachActor(cb func(id abi.ActorID, address address.Address) error) error {
|
||||||
|
addrs, err := adt6.AsMap(s.store, s.State.AddressMap, builtin6.DefaultHamtBitwidth)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var actorID cbg.CborInt
|
||||||
|
return addrs.ForEach(&actorID, func(key string) error {
|
||||||
|
addr, err := address.NewFromBytes([]byte(key))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return cb(abi.ActorID(actorID), addr)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) NetworkName() (dtypes.NetworkName, error) {
|
||||||
|
return dtypes.NetworkName(s.State.NetworkName), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) SetNetworkName(name string) error {
|
||||||
|
s.State.NetworkName = name
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) SetNextID(id abi.ActorID) error {
|
||||||
|
s.State.NextID = id
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) Remove(addrs ...address.Address) (err error) {
|
||||||
|
m, err := adt6.AsMap(s.store, s.State.AddressMap, builtin6.DefaultHamtBitwidth)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
for _, addr := range addrs {
|
||||||
|
if err = m.Delete(abi.AddrKey(addr)); err != nil {
|
||||||
|
return xerrors.Errorf("failed to delete entry for address: %s; err: %w", addr, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
amr, err := m.Root()
|
||||||
|
if err != nil {
|
||||||
|
return xerrors.Errorf("failed to get address map root: %w", err)
|
||||||
|
}
|
||||||
|
s.State.AddressMap = amr
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) SetAddressMap(mcid cid.Cid) error {
|
||||||
|
s.State.AddressMap = mcid
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) AddressMap() (adt.Map, error) {
|
||||||
|
return adt6.AsMap(s.store, s.State.AddressMap, builtin6.DefaultHamtBitwidth)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) GetState() interface{} {
|
||||||
|
return &s.State
|
||||||
|
}
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
package init
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/filecoin-project/go-address"
|
||||||
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
|
"github.com/ipfs/go-cid"
|
||||||
|
cbg "github.com/whyrusleeping/cbor-gen"
|
||||||
|
"golang.org/x/xerrors"
|
||||||
|
|
||||||
|
"github.com/filecoin-project/lotus/chain/actors/adt"
|
||||||
|
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
||||||
|
|
||||||
|
builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin"
|
||||||
|
|
||||||
|
init7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/init"
|
||||||
|
adt7 "github.com/filecoin-project/specs-actors/v7/actors/util/adt"
|
||||||
|
)
|
||||||
|
|
||||||
|
var _ State = (*state7)(nil)
|
||||||
|
|
||||||
|
func load7(store adt.Store, root cid.Cid) (State, error) {
|
||||||
|
out := state7{store: store}
|
||||||
|
err := store.Get(store.Context(), root, &out)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func make7(store adt.Store, networkName string) (State, error) {
|
||||||
|
out := state7{store: store}
|
||||||
|
|
||||||
|
s, err := init7.ConstructState(store, networkName)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
out.State = *s
|
||||||
|
|
||||||
|
return &out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type state7 struct {
|
||||||
|
init7.State
|
||||||
|
store adt.Store
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) ResolveAddress(address address.Address) (address.Address, bool, error) {
|
||||||
|
return s.State.ResolveAddress(s.store, address)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) MapAddressToNewID(address address.Address) (address.Address, error) {
|
||||||
|
return s.State.MapAddressToNewID(s.store, address)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) ForEachActor(cb func(id abi.ActorID, address address.Address) error) error {
|
||||||
|
addrs, err := adt7.AsMap(s.store, s.State.AddressMap, builtin7.DefaultHamtBitwidth)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var actorID cbg.CborInt
|
||||||
|
return addrs.ForEach(&actorID, func(key string) error {
|
||||||
|
addr, err := address.NewFromBytes([]byte(key))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return cb(abi.ActorID(actorID), addr)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) NetworkName() (dtypes.NetworkName, error) {
|
||||||
|
return dtypes.NetworkName(s.State.NetworkName), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) SetNetworkName(name string) error {
|
||||||
|
s.State.NetworkName = name
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) SetNextID(id abi.ActorID) error {
|
||||||
|
s.State.NextID = id
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) Remove(addrs ...address.Address) (err error) {
|
||||||
|
m, err := adt7.AsMap(s.store, s.State.AddressMap, builtin7.DefaultHamtBitwidth)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
for _, addr := range addrs {
|
||||||
|
if err = m.Delete(abi.AddrKey(addr)); err != nil {
|
||||||
|
return xerrors.Errorf("failed to delete entry for address: %s; err: %w", addr, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
amr, err := m.Root()
|
||||||
|
if err != nil {
|
||||||
|
return xerrors.Errorf("failed to get address map root: %w", err)
|
||||||
|
}
|
||||||
|
s.State.AddressMap = amr
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) SetAddressMap(mcid cid.Cid) error {
|
||||||
|
s.State.AddressMap = mcid
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) AddressMap() (adt.Map, error) {
|
||||||
|
return adt7.AsMap(s.store, s.State.AddressMap, builtin7.DefaultHamtBitwidth)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) GetState() interface{} {
|
||||||
|
return &s.State
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package market
|
package market
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/filecoin-project/go-state-types/network"
|
||||||
"golang.org/x/xerrors"
|
"golang.org/x/xerrors"
|
||||||
|
|
||||||
"github.com/filecoin-project/go-address"
|
"github.com/filecoin-project/go-address"
|
||||||
@@ -103,7 +104,28 @@ type DealProposals interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type PublishStorageDealsParams = market0.PublishStorageDealsParams
|
type PublishStorageDealsParams = market0.PublishStorageDealsParams
|
||||||
type PublishStorageDealsReturn = market0.PublishStorageDealsReturn
|
|
||||||
|
type PublishStorageDealsReturn interface {
|
||||||
|
DealIDs() ([]abi.DealID, error)
|
||||||
|
// Note that this index is based on the batch of deals that were published, NOT the DealID
|
||||||
|
IsDealValid(index uint64) (bool, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
func DecodePublishStorageDealsReturn(b []byte, nv network.Version) (PublishStorageDealsReturn, error) {
|
||||||
|
av, err := actors.VersionForNetwork(nv)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch av {
|
||||||
|
{{range .versions}}
|
||||||
|
case actors.Version{{.}}:
|
||||||
|
return decodePublishStorageDealsReturn{{.}}(b)
|
||||||
|
{{end}}
|
||||||
|
}
|
||||||
|
return nil, xerrors.Errorf("unknown actor version %d", av)
|
||||||
|
}
|
||||||
|
|
||||||
type VerifyDealsForActivationParams = market0.VerifyDealsForActivationParams
|
type VerifyDealsForActivationParams = market0.VerifyDealsForActivationParams
|
||||||
type WithdrawBalanceParams = market0.WithdrawBalanceParams
|
type WithdrawBalanceParams = market0.WithdrawBalanceParams
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package market
|
package market
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/filecoin-project/go-state-types/network"
|
||||||
"golang.org/x/xerrors"
|
"golang.org/x/xerrors"
|
||||||
|
|
||||||
"github.com/filecoin-project/go-address"
|
"github.com/filecoin-project/go-address"
|
||||||
@@ -22,6 +23,10 @@ import (
|
|||||||
|
|
||||||
builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin"
|
builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin"
|
||||||
|
|
||||||
|
builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin"
|
||||||
|
|
||||||
|
builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin"
|
||||||
|
|
||||||
"github.com/filecoin-project/lotus/chain/actors"
|
"github.com/filecoin-project/lotus/chain/actors"
|
||||||
"github.com/filecoin-project/lotus/chain/actors/adt"
|
"github.com/filecoin-project/lotus/chain/actors/adt"
|
||||||
"github.com/filecoin-project/lotus/chain/actors/builtin"
|
"github.com/filecoin-project/lotus/chain/actors/builtin"
|
||||||
@@ -49,11 +54,19 @@ func init() {
|
|||||||
builtin.RegisterActorState(builtin5.StorageMarketActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) {
|
builtin.RegisterActorState(builtin5.StorageMarketActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) {
|
||||||
return load5(store, root)
|
return load5(store, root)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
builtin.RegisterActorState(builtin6.StorageMarketActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) {
|
||||||
|
return load6(store, root)
|
||||||
|
})
|
||||||
|
|
||||||
|
builtin.RegisterActorState(builtin7.StorageMarketActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) {
|
||||||
|
return load7(store, root)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
Address = builtin5.StorageMarketActorAddr
|
Address = builtin7.StorageMarketActorAddr
|
||||||
Methods = builtin5.MethodsMarket
|
Methods = builtin7.MethodsMarket
|
||||||
)
|
)
|
||||||
|
|
||||||
func Load(store adt.Store, act *types.Actor) (State, error) {
|
func Load(store adt.Store, act *types.Actor) (State, error) {
|
||||||
@@ -74,6 +87,12 @@ func Load(store adt.Store, act *types.Actor) (State, error) {
|
|||||||
case builtin5.StorageMarketActorCodeID:
|
case builtin5.StorageMarketActorCodeID:
|
||||||
return load5(store, act.Head)
|
return load5(store, act.Head)
|
||||||
|
|
||||||
|
case builtin6.StorageMarketActorCodeID:
|
||||||
|
return load6(store, act.Head)
|
||||||
|
|
||||||
|
case builtin7.StorageMarketActorCodeID:
|
||||||
|
return load7(store, act.Head)
|
||||||
|
|
||||||
}
|
}
|
||||||
return nil, xerrors.Errorf("unknown actor code %s", act.Code)
|
return nil, xerrors.Errorf("unknown actor code %s", act.Code)
|
||||||
}
|
}
|
||||||
@@ -96,6 +115,12 @@ func MakeState(store adt.Store, av actors.Version) (State, error) {
|
|||||||
case actors.Version5:
|
case actors.Version5:
|
||||||
return make5(store)
|
return make5(store)
|
||||||
|
|
||||||
|
case actors.Version6:
|
||||||
|
return make6(store)
|
||||||
|
|
||||||
|
case actors.Version7:
|
||||||
|
return make7(store)
|
||||||
|
|
||||||
}
|
}
|
||||||
return nil, xerrors.Errorf("unknown actor version %d", av)
|
return nil, xerrors.Errorf("unknown actor version %d", av)
|
||||||
}
|
}
|
||||||
@@ -118,6 +143,12 @@ func GetActorCodeID(av actors.Version) (cid.Cid, error) {
|
|||||||
case actors.Version5:
|
case actors.Version5:
|
||||||
return builtin5.StorageMarketActorCodeID, nil
|
return builtin5.StorageMarketActorCodeID, nil
|
||||||
|
|
||||||
|
case actors.Version6:
|
||||||
|
return builtin6.StorageMarketActorCodeID, nil
|
||||||
|
|
||||||
|
case actors.Version7:
|
||||||
|
return builtin7.StorageMarketActorCodeID, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return cid.Undef, xerrors.Errorf("unknown actor version %d", av)
|
return cid.Undef, xerrors.Errorf("unknown actor version %d", av)
|
||||||
@@ -162,7 +193,46 @@ type DealProposals interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type PublishStorageDealsParams = market0.PublishStorageDealsParams
|
type PublishStorageDealsParams = market0.PublishStorageDealsParams
|
||||||
type PublishStorageDealsReturn = market0.PublishStorageDealsReturn
|
|
||||||
|
type PublishStorageDealsReturn interface {
|
||||||
|
DealIDs() ([]abi.DealID, error)
|
||||||
|
// Note that this index is based on the batch of deals that were published, NOT the DealID
|
||||||
|
IsDealValid(index uint64) (bool, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
func DecodePublishStorageDealsReturn(b []byte, nv network.Version) (PublishStorageDealsReturn, error) {
|
||||||
|
av, err := actors.VersionForNetwork(nv)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch av {
|
||||||
|
|
||||||
|
case actors.Version0:
|
||||||
|
return decodePublishStorageDealsReturn0(b)
|
||||||
|
|
||||||
|
case actors.Version2:
|
||||||
|
return decodePublishStorageDealsReturn2(b)
|
||||||
|
|
||||||
|
case actors.Version3:
|
||||||
|
return decodePublishStorageDealsReturn3(b)
|
||||||
|
|
||||||
|
case actors.Version4:
|
||||||
|
return decodePublishStorageDealsReturn4(b)
|
||||||
|
|
||||||
|
case actors.Version5:
|
||||||
|
return decodePublishStorageDealsReturn5(b)
|
||||||
|
|
||||||
|
case actors.Version6:
|
||||||
|
return decodePublishStorageDealsReturn6(b)
|
||||||
|
|
||||||
|
case actors.Version7:
|
||||||
|
return decodePublishStorageDealsReturn7(b)
|
||||||
|
|
||||||
|
}
|
||||||
|
return nil, xerrors.Errorf("unknown actor version %d", av)
|
||||||
|
}
|
||||||
|
|
||||||
type VerifyDealsForActivationParams = market0.VerifyDealsForActivationParams
|
type VerifyDealsForActivationParams = market0.VerifyDealsForActivationParams
|
||||||
type WithdrawBalanceParams = market0.WithdrawBalanceParams
|
type WithdrawBalanceParams = market0.WithdrawBalanceParams
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import (
|
|||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
cbg "github.com/whyrusleeping/cbor-gen"
|
cbg "github.com/whyrusleeping/cbor-gen"
|
||||||
|
"golang.org/x/xerrors"
|
||||||
|
|
||||||
"github.com/filecoin-project/lotus/chain/actors/adt"
|
"github.com/filecoin-project/lotus/chain/actors/adt"
|
||||||
"github.com/filecoin-project/lotus/chain/types"
|
"github.com/filecoin-project/lotus/chain/types"
|
||||||
@@ -236,3 +237,31 @@ func fromV{{.v}}DealProposal(v{{.v}} market{{.v}}.DealProposal) DealProposal {
|
|||||||
func (s *state{{.v}}) GetState() interface{} {
|
func (s *state{{.v}}) GetState() interface{} {
|
||||||
return &s.State
|
return &s.State
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var _ PublishStorageDealsReturn = (*publishStorageDealsReturn{{.v}})(nil)
|
||||||
|
|
||||||
|
func decodePublishStorageDealsReturn{{.v}}(b []byte) (PublishStorageDealsReturn, error) {
|
||||||
|
var retval market{{.v}}.PublishStorageDealsReturn
|
||||||
|
if err := retval.UnmarshalCBOR(bytes.NewReader(b)); err != nil {
|
||||||
|
return nil, xerrors.Errorf("failed to unmarshal PublishStorageDealsReturn: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return &publishStorageDealsReturn{{.v}}{retval}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type publishStorageDealsReturn{{.v}} struct {
|
||||||
|
market{{.v}}.PublishStorageDealsReturn
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *publishStorageDealsReturn{{.v}}) IsDealValid(index uint64) (bool, error) {
|
||||||
|
{{if (ge .v 6)}}
|
||||||
|
return r.ValidDeals.IsSet(index)
|
||||||
|
{{else}}
|
||||||
|
// PublishStorageDeals only succeeded if all deals were valid in this version of actors
|
||||||
|
return true, nil
|
||||||
|
{{end}}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *publishStorageDealsReturn{{.v}}) DealIDs() ([]abi.DealID, error) {
|
||||||
|
return r.IDs, nil
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import (
|
|||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
cbg "github.com/whyrusleeping/cbor-gen"
|
cbg "github.com/whyrusleeping/cbor-gen"
|
||||||
|
"golang.org/x/xerrors"
|
||||||
|
|
||||||
"github.com/filecoin-project/lotus/chain/actors/adt"
|
"github.com/filecoin-project/lotus/chain/actors/adt"
|
||||||
"github.com/filecoin-project/lotus/chain/types"
|
"github.com/filecoin-project/lotus/chain/types"
|
||||||
@@ -229,3 +230,29 @@ func fromV0DealProposal(v0 market0.DealProposal) DealProposal {
|
|||||||
func (s *state0) GetState() interface{} {
|
func (s *state0) GetState() interface{} {
|
||||||
return &s.State
|
return &s.State
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var _ PublishStorageDealsReturn = (*publishStorageDealsReturn0)(nil)
|
||||||
|
|
||||||
|
func decodePublishStorageDealsReturn0(b []byte) (PublishStorageDealsReturn, error) {
|
||||||
|
var retval market0.PublishStorageDealsReturn
|
||||||
|
if err := retval.UnmarshalCBOR(bytes.NewReader(b)); err != nil {
|
||||||
|
return nil, xerrors.Errorf("failed to unmarshal PublishStorageDealsReturn: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return &publishStorageDealsReturn0{retval}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type publishStorageDealsReturn0 struct {
|
||||||
|
market0.PublishStorageDealsReturn
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *publishStorageDealsReturn0) IsDealValid(index uint64) (bool, error) {
|
||||||
|
|
||||||
|
// PublishStorageDeals only succeeded if all deals were valid in this version of actors
|
||||||
|
return true, nil
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *publishStorageDealsReturn0) DealIDs() ([]abi.DealID, error) {
|
||||||
|
return r.IDs, nil
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import (
|
|||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
cbg "github.com/whyrusleeping/cbor-gen"
|
cbg "github.com/whyrusleeping/cbor-gen"
|
||||||
|
"golang.org/x/xerrors"
|
||||||
|
|
||||||
"github.com/filecoin-project/lotus/chain/actors/adt"
|
"github.com/filecoin-project/lotus/chain/actors/adt"
|
||||||
"github.com/filecoin-project/lotus/chain/types"
|
"github.com/filecoin-project/lotus/chain/types"
|
||||||
@@ -229,3 +230,29 @@ func fromV2DealProposal(v2 market2.DealProposal) DealProposal {
|
|||||||
func (s *state2) GetState() interface{} {
|
func (s *state2) GetState() interface{} {
|
||||||
return &s.State
|
return &s.State
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var _ PublishStorageDealsReturn = (*publishStorageDealsReturn2)(nil)
|
||||||
|
|
||||||
|
func decodePublishStorageDealsReturn2(b []byte) (PublishStorageDealsReturn, error) {
|
||||||
|
var retval market2.PublishStorageDealsReturn
|
||||||
|
if err := retval.UnmarshalCBOR(bytes.NewReader(b)); err != nil {
|
||||||
|
return nil, xerrors.Errorf("failed to unmarshal PublishStorageDealsReturn: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return &publishStorageDealsReturn2{retval}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type publishStorageDealsReturn2 struct {
|
||||||
|
market2.PublishStorageDealsReturn
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *publishStorageDealsReturn2) IsDealValid(index uint64) (bool, error) {
|
||||||
|
|
||||||
|
// PublishStorageDeals only succeeded if all deals were valid in this version of actors
|
||||||
|
return true, nil
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *publishStorageDealsReturn2) DealIDs() ([]abi.DealID, error) {
|
||||||
|
return r.IDs, nil
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import (
|
|||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
cbg "github.com/whyrusleeping/cbor-gen"
|
cbg "github.com/whyrusleeping/cbor-gen"
|
||||||
|
"golang.org/x/xerrors"
|
||||||
|
|
||||||
"github.com/filecoin-project/lotus/chain/actors/adt"
|
"github.com/filecoin-project/lotus/chain/actors/adt"
|
||||||
"github.com/filecoin-project/lotus/chain/types"
|
"github.com/filecoin-project/lotus/chain/types"
|
||||||
@@ -224,3 +225,29 @@ func fromV3DealProposal(v3 market3.DealProposal) DealProposal {
|
|||||||
func (s *state3) GetState() interface{} {
|
func (s *state3) GetState() interface{} {
|
||||||
return &s.State
|
return &s.State
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var _ PublishStorageDealsReturn = (*publishStorageDealsReturn3)(nil)
|
||||||
|
|
||||||
|
func decodePublishStorageDealsReturn3(b []byte) (PublishStorageDealsReturn, error) {
|
||||||
|
var retval market3.PublishStorageDealsReturn
|
||||||
|
if err := retval.UnmarshalCBOR(bytes.NewReader(b)); err != nil {
|
||||||
|
return nil, xerrors.Errorf("failed to unmarshal PublishStorageDealsReturn: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return &publishStorageDealsReturn3{retval}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type publishStorageDealsReturn3 struct {
|
||||||
|
market3.PublishStorageDealsReturn
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *publishStorageDealsReturn3) IsDealValid(index uint64) (bool, error) {
|
||||||
|
|
||||||
|
// PublishStorageDeals only succeeded if all deals were valid in this version of actors
|
||||||
|
return true, nil
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *publishStorageDealsReturn3) DealIDs() ([]abi.DealID, error) {
|
||||||
|
return r.IDs, nil
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import (
|
|||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
cbg "github.com/whyrusleeping/cbor-gen"
|
cbg "github.com/whyrusleeping/cbor-gen"
|
||||||
|
"golang.org/x/xerrors"
|
||||||
|
|
||||||
"github.com/filecoin-project/lotus/chain/actors/adt"
|
"github.com/filecoin-project/lotus/chain/actors/adt"
|
||||||
"github.com/filecoin-project/lotus/chain/types"
|
"github.com/filecoin-project/lotus/chain/types"
|
||||||
@@ -224,3 +225,29 @@ func fromV4DealProposal(v4 market4.DealProposal) DealProposal {
|
|||||||
func (s *state4) GetState() interface{} {
|
func (s *state4) GetState() interface{} {
|
||||||
return &s.State
|
return &s.State
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var _ PublishStorageDealsReturn = (*publishStorageDealsReturn4)(nil)
|
||||||
|
|
||||||
|
func decodePublishStorageDealsReturn4(b []byte) (PublishStorageDealsReturn, error) {
|
||||||
|
var retval market4.PublishStorageDealsReturn
|
||||||
|
if err := retval.UnmarshalCBOR(bytes.NewReader(b)); err != nil {
|
||||||
|
return nil, xerrors.Errorf("failed to unmarshal PublishStorageDealsReturn: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return &publishStorageDealsReturn4{retval}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type publishStorageDealsReturn4 struct {
|
||||||
|
market4.PublishStorageDealsReturn
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *publishStorageDealsReturn4) IsDealValid(index uint64) (bool, error) {
|
||||||
|
|
||||||
|
// PublishStorageDeals only succeeded if all deals were valid in this version of actors
|
||||||
|
return true, nil
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *publishStorageDealsReturn4) DealIDs() ([]abi.DealID, error) {
|
||||||
|
return r.IDs, nil
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import (
|
|||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
cbg "github.com/whyrusleeping/cbor-gen"
|
cbg "github.com/whyrusleeping/cbor-gen"
|
||||||
|
"golang.org/x/xerrors"
|
||||||
|
|
||||||
"github.com/filecoin-project/lotus/chain/actors/adt"
|
"github.com/filecoin-project/lotus/chain/actors/adt"
|
||||||
"github.com/filecoin-project/lotus/chain/types"
|
"github.com/filecoin-project/lotus/chain/types"
|
||||||
@@ -224,3 +225,29 @@ func fromV5DealProposal(v5 market5.DealProposal) DealProposal {
|
|||||||
func (s *state5) GetState() interface{} {
|
func (s *state5) GetState() interface{} {
|
||||||
return &s.State
|
return &s.State
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var _ PublishStorageDealsReturn = (*publishStorageDealsReturn5)(nil)
|
||||||
|
|
||||||
|
func decodePublishStorageDealsReturn5(b []byte) (PublishStorageDealsReturn, error) {
|
||||||
|
var retval market5.PublishStorageDealsReturn
|
||||||
|
if err := retval.UnmarshalCBOR(bytes.NewReader(b)); err != nil {
|
||||||
|
return nil, xerrors.Errorf("failed to unmarshal PublishStorageDealsReturn: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return &publishStorageDealsReturn5{retval}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type publishStorageDealsReturn5 struct {
|
||||||
|
market5.PublishStorageDealsReturn
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *publishStorageDealsReturn5) IsDealValid(index uint64) (bool, error) {
|
||||||
|
|
||||||
|
// PublishStorageDeals only succeeded if all deals were valid in this version of actors
|
||||||
|
return true, nil
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *publishStorageDealsReturn5) DealIDs() ([]abi.DealID, error) {
|
||||||
|
return r.IDs, nil
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,252 @@
|
|||||||
|
package market
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
|
||||||
|
"github.com/filecoin-project/go-address"
|
||||||
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
|
"github.com/ipfs/go-cid"
|
||||||
|
cbg "github.com/whyrusleeping/cbor-gen"
|
||||||
|
"golang.org/x/xerrors"
|
||||||
|
|
||||||
|
"github.com/filecoin-project/lotus/chain/actors/adt"
|
||||||
|
"github.com/filecoin-project/lotus/chain/types"
|
||||||
|
|
||||||
|
market6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/market"
|
||||||
|
adt6 "github.com/filecoin-project/specs-actors/v6/actors/util/adt"
|
||||||
|
)
|
||||||
|
|
||||||
|
var _ State = (*state6)(nil)
|
||||||
|
|
||||||
|
func load6(store adt.Store, root cid.Cid) (State, error) {
|
||||||
|
out := state6{store: store}
|
||||||
|
err := store.Get(store.Context(), root, &out)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func make6(store adt.Store) (State, error) {
|
||||||
|
out := state6{store: store}
|
||||||
|
|
||||||
|
s, err := market6.ConstructState(store)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
out.State = *s
|
||||||
|
|
||||||
|
return &out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type state6 struct {
|
||||||
|
market6.State
|
||||||
|
store adt.Store
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) TotalLocked() (abi.TokenAmount, error) {
|
||||||
|
fml := types.BigAdd(s.TotalClientLockedCollateral, s.TotalProviderLockedCollateral)
|
||||||
|
fml = types.BigAdd(fml, s.TotalClientStorageFee)
|
||||||
|
return fml, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) BalancesChanged(otherState State) (bool, error) {
|
||||||
|
otherState6, ok := otherState.(*state6)
|
||||||
|
if !ok {
|
||||||
|
// there's no way to compare different versions of the state, so let's
|
||||||
|
// just say that means the state of balances has changed
|
||||||
|
return true, nil
|
||||||
|
}
|
||||||
|
return !s.State.EscrowTable.Equals(otherState6.State.EscrowTable) || !s.State.LockedTable.Equals(otherState6.State.LockedTable), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) StatesChanged(otherState State) (bool, error) {
|
||||||
|
otherState6, ok := otherState.(*state6)
|
||||||
|
if !ok {
|
||||||
|
// there's no way to compare different versions of the state, so let's
|
||||||
|
// just say that means the state of balances has changed
|
||||||
|
return true, nil
|
||||||
|
}
|
||||||
|
return !s.State.States.Equals(otherState6.State.States), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) States() (DealStates, error) {
|
||||||
|
stateArray, err := adt6.AsArray(s.store, s.State.States, market6.StatesAmtBitwidth)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &dealStates6{stateArray}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) ProposalsChanged(otherState State) (bool, error) {
|
||||||
|
otherState6, ok := otherState.(*state6)
|
||||||
|
if !ok {
|
||||||
|
// there's no way to compare different versions of the state, so let's
|
||||||
|
// just say that means the state of balances has changed
|
||||||
|
return true, nil
|
||||||
|
}
|
||||||
|
return !s.State.Proposals.Equals(otherState6.State.Proposals), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) Proposals() (DealProposals, error) {
|
||||||
|
proposalArray, err := adt6.AsArray(s.store, s.State.Proposals, market6.ProposalsAmtBitwidth)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &dealProposals6{proposalArray}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) EscrowTable() (BalanceTable, error) {
|
||||||
|
bt, err := adt6.AsBalanceTable(s.store, s.State.EscrowTable)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &balanceTable6{bt}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) LockedTable() (BalanceTable, error) {
|
||||||
|
bt, err := adt6.AsBalanceTable(s.store, s.State.LockedTable)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &balanceTable6{bt}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) VerifyDealsForActivation(
|
||||||
|
minerAddr address.Address, deals []abi.DealID, currEpoch, sectorExpiry abi.ChainEpoch,
|
||||||
|
) (weight, verifiedWeight abi.DealWeight, err error) {
|
||||||
|
w, vw, _, err := market6.ValidateDealsForActivation(&s.State, s.store, deals, minerAddr, sectorExpiry, currEpoch)
|
||||||
|
return w, vw, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) NextID() (abi.DealID, error) {
|
||||||
|
return s.State.NextID, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type balanceTable6 struct {
|
||||||
|
*adt6.BalanceTable
|
||||||
|
}
|
||||||
|
|
||||||
|
func (bt *balanceTable6) ForEach(cb func(address.Address, abi.TokenAmount) error) error {
|
||||||
|
asMap := (*adt6.Map)(bt.BalanceTable)
|
||||||
|
var ta abi.TokenAmount
|
||||||
|
return asMap.ForEach(&ta, func(key string) error {
|
||||||
|
a, err := address.NewFromBytes([]byte(key))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return cb(a, ta)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
type dealStates6 struct {
|
||||||
|
adt.Array
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *dealStates6) Get(dealID abi.DealID) (*DealState, bool, error) {
|
||||||
|
var deal6 market6.DealState
|
||||||
|
found, err := s.Array.Get(uint64(dealID), &deal6)
|
||||||
|
if err != nil {
|
||||||
|
return nil, false, err
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
return nil, false, nil
|
||||||
|
}
|
||||||
|
deal := fromV6DealState(deal6)
|
||||||
|
return &deal, true, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *dealStates6) ForEach(cb func(dealID abi.DealID, ds DealState) error) error {
|
||||||
|
var ds6 market6.DealState
|
||||||
|
return s.Array.ForEach(&ds6, func(idx int64) error {
|
||||||
|
return cb(abi.DealID(idx), fromV6DealState(ds6))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *dealStates6) decode(val *cbg.Deferred) (*DealState, error) {
|
||||||
|
var ds6 market6.DealState
|
||||||
|
if err := ds6.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
ds := fromV6DealState(ds6)
|
||||||
|
return &ds, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *dealStates6) array() adt.Array {
|
||||||
|
return s.Array
|
||||||
|
}
|
||||||
|
|
||||||
|
func fromV6DealState(v6 market6.DealState) DealState {
|
||||||
|
return (DealState)(v6)
|
||||||
|
}
|
||||||
|
|
||||||
|
type dealProposals6 struct {
|
||||||
|
adt.Array
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *dealProposals6) Get(dealID abi.DealID) (*DealProposal, bool, error) {
|
||||||
|
var proposal6 market6.DealProposal
|
||||||
|
found, err := s.Array.Get(uint64(dealID), &proposal6)
|
||||||
|
if err != nil {
|
||||||
|
return nil, false, err
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
return nil, false, nil
|
||||||
|
}
|
||||||
|
proposal := fromV6DealProposal(proposal6)
|
||||||
|
return &proposal, true, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *dealProposals6) ForEach(cb func(dealID abi.DealID, dp DealProposal) error) error {
|
||||||
|
var dp6 market6.DealProposal
|
||||||
|
return s.Array.ForEach(&dp6, func(idx int64) error {
|
||||||
|
return cb(abi.DealID(idx), fromV6DealProposal(dp6))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *dealProposals6) decode(val *cbg.Deferred) (*DealProposal, error) {
|
||||||
|
var dp6 market6.DealProposal
|
||||||
|
if err := dp6.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
dp := fromV6DealProposal(dp6)
|
||||||
|
return &dp, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *dealProposals6) array() adt.Array {
|
||||||
|
return s.Array
|
||||||
|
}
|
||||||
|
|
||||||
|
func fromV6DealProposal(v6 market6.DealProposal) DealProposal {
|
||||||
|
return (DealProposal)(v6)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state6) GetState() interface{} {
|
||||||
|
return &s.State
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ PublishStorageDealsReturn = (*publishStorageDealsReturn6)(nil)
|
||||||
|
|
||||||
|
func decodePublishStorageDealsReturn6(b []byte) (PublishStorageDealsReturn, error) {
|
||||||
|
var retval market6.PublishStorageDealsReturn
|
||||||
|
if err := retval.UnmarshalCBOR(bytes.NewReader(b)); err != nil {
|
||||||
|
return nil, xerrors.Errorf("failed to unmarshal PublishStorageDealsReturn: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return &publishStorageDealsReturn6{retval}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type publishStorageDealsReturn6 struct {
|
||||||
|
market6.PublishStorageDealsReturn
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *publishStorageDealsReturn6) IsDealValid(index uint64) (bool, error) {
|
||||||
|
|
||||||
|
return r.ValidDeals.IsSet(index)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *publishStorageDealsReturn6) DealIDs() ([]abi.DealID, error) {
|
||||||
|
return r.IDs, nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,252 @@
|
|||||||
|
package market
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
|
||||||
|
"github.com/filecoin-project/go-address"
|
||||||
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
|
"github.com/ipfs/go-cid"
|
||||||
|
cbg "github.com/whyrusleeping/cbor-gen"
|
||||||
|
"golang.org/x/xerrors"
|
||||||
|
|
||||||
|
"github.com/filecoin-project/lotus/chain/actors/adt"
|
||||||
|
"github.com/filecoin-project/lotus/chain/types"
|
||||||
|
|
||||||
|
market7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/market"
|
||||||
|
adt7 "github.com/filecoin-project/specs-actors/v7/actors/util/adt"
|
||||||
|
)
|
||||||
|
|
||||||
|
var _ State = (*state7)(nil)
|
||||||
|
|
||||||
|
func load7(store adt.Store, root cid.Cid) (State, error) {
|
||||||
|
out := state7{store: store}
|
||||||
|
err := store.Get(store.Context(), root, &out)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func make7(store adt.Store) (State, error) {
|
||||||
|
out := state7{store: store}
|
||||||
|
|
||||||
|
s, err := market7.ConstructState(store)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
out.State = *s
|
||||||
|
|
||||||
|
return &out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type state7 struct {
|
||||||
|
market7.State
|
||||||
|
store adt.Store
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) TotalLocked() (abi.TokenAmount, error) {
|
||||||
|
fml := types.BigAdd(s.TotalClientLockedCollateral, s.TotalProviderLockedCollateral)
|
||||||
|
fml = types.BigAdd(fml, s.TotalClientStorageFee)
|
||||||
|
return fml, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) BalancesChanged(otherState State) (bool, error) {
|
||||||
|
otherState7, ok := otherState.(*state7)
|
||||||
|
if !ok {
|
||||||
|
// there's no way to compare different versions of the state, so let's
|
||||||
|
// just say that means the state of balances has changed
|
||||||
|
return true, nil
|
||||||
|
}
|
||||||
|
return !s.State.EscrowTable.Equals(otherState7.State.EscrowTable) || !s.State.LockedTable.Equals(otherState7.State.LockedTable), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) StatesChanged(otherState State) (bool, error) {
|
||||||
|
otherState7, ok := otherState.(*state7)
|
||||||
|
if !ok {
|
||||||
|
// there's no way to compare different versions of the state, so let's
|
||||||
|
// just say that means the state of balances has changed
|
||||||
|
return true, nil
|
||||||
|
}
|
||||||
|
return !s.State.States.Equals(otherState7.State.States), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) States() (DealStates, error) {
|
||||||
|
stateArray, err := adt7.AsArray(s.store, s.State.States, market7.StatesAmtBitwidth)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &dealStates7{stateArray}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) ProposalsChanged(otherState State) (bool, error) {
|
||||||
|
otherState7, ok := otherState.(*state7)
|
||||||
|
if !ok {
|
||||||
|
// there's no way to compare different versions of the state, so let's
|
||||||
|
// just say that means the state of balances has changed
|
||||||
|
return true, nil
|
||||||
|
}
|
||||||
|
return !s.State.Proposals.Equals(otherState7.State.Proposals), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) Proposals() (DealProposals, error) {
|
||||||
|
proposalArray, err := adt7.AsArray(s.store, s.State.Proposals, market7.ProposalsAmtBitwidth)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &dealProposals7{proposalArray}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) EscrowTable() (BalanceTable, error) {
|
||||||
|
bt, err := adt7.AsBalanceTable(s.store, s.State.EscrowTable)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &balanceTable7{bt}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) LockedTable() (BalanceTable, error) {
|
||||||
|
bt, err := adt7.AsBalanceTable(s.store, s.State.LockedTable)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &balanceTable7{bt}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) VerifyDealsForActivation(
|
||||||
|
minerAddr address.Address, deals []abi.DealID, currEpoch, sectorExpiry abi.ChainEpoch,
|
||||||
|
) (weight, verifiedWeight abi.DealWeight, err error) {
|
||||||
|
w, vw, _, err := market7.ValidateDealsForActivation(&s.State, s.store, deals, minerAddr, sectorExpiry, currEpoch)
|
||||||
|
return w, vw, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) NextID() (abi.DealID, error) {
|
||||||
|
return s.State.NextID, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type balanceTable7 struct {
|
||||||
|
*adt7.BalanceTable
|
||||||
|
}
|
||||||
|
|
||||||
|
func (bt *balanceTable7) ForEach(cb func(address.Address, abi.TokenAmount) error) error {
|
||||||
|
asMap := (*adt7.Map)(bt.BalanceTable)
|
||||||
|
var ta abi.TokenAmount
|
||||||
|
return asMap.ForEach(&ta, func(key string) error {
|
||||||
|
a, err := address.NewFromBytes([]byte(key))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return cb(a, ta)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
type dealStates7 struct {
|
||||||
|
adt.Array
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *dealStates7) Get(dealID abi.DealID) (*DealState, bool, error) {
|
||||||
|
var deal7 market7.DealState
|
||||||
|
found, err := s.Array.Get(uint64(dealID), &deal7)
|
||||||
|
if err != nil {
|
||||||
|
return nil, false, err
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
return nil, false, nil
|
||||||
|
}
|
||||||
|
deal := fromV7DealState(deal7)
|
||||||
|
return &deal, true, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *dealStates7) ForEach(cb func(dealID abi.DealID, ds DealState) error) error {
|
||||||
|
var ds7 market7.DealState
|
||||||
|
return s.Array.ForEach(&ds7, func(idx int64) error {
|
||||||
|
return cb(abi.DealID(idx), fromV7DealState(ds7))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *dealStates7) decode(val *cbg.Deferred) (*DealState, error) {
|
||||||
|
var ds7 market7.DealState
|
||||||
|
if err := ds7.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
ds := fromV7DealState(ds7)
|
||||||
|
return &ds, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *dealStates7) array() adt.Array {
|
||||||
|
return s.Array
|
||||||
|
}
|
||||||
|
|
||||||
|
func fromV7DealState(v7 market7.DealState) DealState {
|
||||||
|
return (DealState)(v7)
|
||||||
|
}
|
||||||
|
|
||||||
|
type dealProposals7 struct {
|
||||||
|
adt.Array
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *dealProposals7) Get(dealID abi.DealID) (*DealProposal, bool, error) {
|
||||||
|
var proposal7 market7.DealProposal
|
||||||
|
found, err := s.Array.Get(uint64(dealID), &proposal7)
|
||||||
|
if err != nil {
|
||||||
|
return nil, false, err
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
return nil, false, nil
|
||||||
|
}
|
||||||
|
proposal := fromV7DealProposal(proposal7)
|
||||||
|
return &proposal, true, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *dealProposals7) ForEach(cb func(dealID abi.DealID, dp DealProposal) error) error {
|
||||||
|
var dp7 market7.DealProposal
|
||||||
|
return s.Array.ForEach(&dp7, func(idx int64) error {
|
||||||
|
return cb(abi.DealID(idx), fromV7DealProposal(dp7))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *dealProposals7) decode(val *cbg.Deferred) (*DealProposal, error) {
|
||||||
|
var dp7 market7.DealProposal
|
||||||
|
if err := dp7.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
dp := fromV7DealProposal(dp7)
|
||||||
|
return &dp, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *dealProposals7) array() adt.Array {
|
||||||
|
return s.Array
|
||||||
|
}
|
||||||
|
|
||||||
|
func fromV7DealProposal(v7 market7.DealProposal) DealProposal {
|
||||||
|
return (DealProposal)(v7)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *state7) GetState() interface{} {
|
||||||
|
return &s.State
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ PublishStorageDealsReturn = (*publishStorageDealsReturn7)(nil)
|
||||||
|
|
||||||
|
func decodePublishStorageDealsReturn7(b []byte) (PublishStorageDealsReturn, error) {
|
||||||
|
var retval market7.PublishStorageDealsReturn
|
||||||
|
if err := retval.UnmarshalCBOR(bytes.NewReader(b)); err != nil {
|
||||||
|
return nil, xerrors.Errorf("failed to unmarshal PublishStorageDealsReturn: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return &publishStorageDealsReturn7{retval}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type publishStorageDealsReturn7 struct {
|
||||||
|
market7.PublishStorageDealsReturn
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *publishStorageDealsReturn7) IsDealValid(index uint64) (bool, error) {
|
||||||
|
|
||||||
|
return r.ValidDeals.IsSet(index)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *publishStorageDealsReturn7) DealIDs() ([]abi.DealID, error) {
|
||||||
|
return r.IDs, nil
|
||||||
|
}
|
||||||
@@ -23,6 +23,7 @@ import (
|
|||||||
miner2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/miner"
|
miner2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/miner"
|
||||||
miner3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/miner"
|
miner3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/miner"
|
||||||
miner5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/miner"
|
miner5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/miner"
|
||||||
|
miner7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/miner"
|
||||||
{{range .versions}}
|
{{range .versions}}
|
||||||
builtin{{.}} "github.com/filecoin-project/specs-actors{{import .}}actors/builtin"
|
builtin{{.}} "github.com/filecoin-project/specs-actors{{import .}}actors/builtin"
|
||||||
{{end}}
|
{{end}}
|
||||||
@@ -38,7 +39,7 @@ func init() {
|
|||||||
|
|
||||||
var Methods = builtin{{.latestVersion}}.MethodsMiner
|
var Methods = builtin{{.latestVersion}}.MethodsMiner
|
||||||
|
|
||||||
// Unchanged between v0, v2, v3, and v4 actors
|
// Unchanged between v0, v2, v3, v4, and v5 actors
|
||||||
var WPoStProvingPeriod = miner0.WPoStProvingPeriod
|
var WPoStProvingPeriod = miner0.WPoStProvingPeriod
|
||||||
var WPoStPeriodDeadlines = miner0.WPoStPeriodDeadlines
|
var WPoStPeriodDeadlines = miner0.WPoStPeriodDeadlines
|
||||||
var WPoStChallengeWindow = miner0.WPoStChallengeWindow
|
var WPoStChallengeWindow = miner0.WPoStChallengeWindow
|
||||||
@@ -141,11 +142,28 @@ type Deadline interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Partition interface {
|
type Partition interface {
|
||||||
|
// AllSectors returns all sector numbers in this partition, including faulty, unproven, and terminated sectors
|
||||||
AllSectors() (bitfield.BitField, error)
|
AllSectors() (bitfield.BitField, error)
|
||||||
|
|
||||||
|
// Subset of sectors detected/declared faulty and not yet recovered (excl. from PoSt).
|
||||||
|
// Faults ∩ Terminated = ∅
|
||||||
FaultySectors() (bitfield.BitField, error)
|
FaultySectors() (bitfield.BitField, error)
|
||||||
|
|
||||||
|
// Subset of faulty sectors expected to recover on next PoSt
|
||||||
|
// Recoveries ∩ Terminated = ∅
|
||||||
RecoveringSectors() (bitfield.BitField, error)
|
RecoveringSectors() (bitfield.BitField, error)
|
||||||
|
|
||||||
|
// Live sectors are those that are not terminated (but may be faulty).
|
||||||
LiveSectors() (bitfield.BitField, error)
|
LiveSectors() (bitfield.BitField, error)
|
||||||
|
|
||||||
|
// Active sectors are those that are neither terminated nor faulty nor unproven, i.e. actively contributing power.
|
||||||
ActiveSectors() (bitfield.BitField, error)
|
ActiveSectors() (bitfield.BitField, error)
|
||||||
|
|
||||||
|
// Unproven sectors in this partition. This bitfield will be cleared on
|
||||||
|
// a successful window post (or at the end of the partition's next
|
||||||
|
// deadline). At that time, any still unproven sectors will be added to
|
||||||
|
// the faulty sector bitfield.
|
||||||
|
UnprovenSectors() (bitfield.BitField, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type SectorOnChainInfo struct {
|
type SectorOnChainInfo struct {
|
||||||
@@ -160,6 +178,7 @@ type SectorOnChainInfo struct {
|
|||||||
InitialPledge abi.TokenAmount
|
InitialPledge abi.TokenAmount
|
||||||
ExpectedDayReward abi.TokenAmount
|
ExpectedDayReward abi.TokenAmount
|
||||||
ExpectedStoragePledge abi.TokenAmount
|
ExpectedStoragePledge abi.TokenAmount
|
||||||
|
SectorKeyCID *cid.Cid
|
||||||
}
|
}
|
||||||
|
|
||||||
type SectorPreCommitInfo = miner0.SectorPreCommitInfo
|
type SectorPreCommitInfo = miner0.SectorPreCommitInfo
|
||||||
@@ -175,6 +194,7 @@ type SectorPreCommitOnChainInfo struct {
|
|||||||
type PoStPartition = miner0.PoStPartition
|
type PoStPartition = miner0.PoStPartition
|
||||||
type RecoveryDeclaration = miner0.RecoveryDeclaration
|
type RecoveryDeclaration = miner0.RecoveryDeclaration
|
||||||
type FaultDeclaration = miner0.FaultDeclaration
|
type FaultDeclaration = miner0.FaultDeclaration
|
||||||
|
type ReplicaUpdate = miner7.ReplicaUpdate
|
||||||
|
|
||||||
// Params
|
// Params
|
||||||
type DeclareFaultsParams = miner0.DeclareFaultsParams
|
type DeclareFaultsParams = miner0.DeclareFaultsParams
|
||||||
@@ -183,6 +203,7 @@ type SubmitWindowedPoStParams = miner0.SubmitWindowedPoStParams
|
|||||||
type ProveCommitSectorParams = miner0.ProveCommitSectorParams
|
type ProveCommitSectorParams = miner0.ProveCommitSectorParams
|
||||||
type DisputeWindowedPoStParams = miner3.DisputeWindowedPoStParams
|
type DisputeWindowedPoStParams = miner3.DisputeWindowedPoStParams
|
||||||
type ProveCommitAggregateParams = miner5.ProveCommitAggregateParams
|
type ProveCommitAggregateParams = miner5.ProveCommitAggregateParams
|
||||||
|
type ProveReplicaUpdatesParams = miner7.ProveReplicaUpdatesParams
|
||||||
|
|
||||||
func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.RegisteredPoStProof) (abi.RegisteredSealProof, error) {
|
func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.RegisteredPoStProof) (abi.RegisteredSealProof, error) {
|
||||||
// We added support for the new proofs in network version 7, and removed support for the old
|
// We added support for the new proofs in network version 7, and removed support for the old
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import (
|
|||||||
miner2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/miner"
|
miner2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/miner"
|
||||||
miner3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/miner"
|
miner3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/miner"
|
||||||
miner5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/miner"
|
miner5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/miner"
|
||||||
|
miner7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/miner"
|
||||||
|
|
||||||
builtin0 "github.com/filecoin-project/specs-actors/actors/builtin"
|
builtin0 "github.com/filecoin-project/specs-actors/actors/builtin"
|
||||||
|
|
||||||
@@ -33,6 +34,10 @@ import (
|
|||||||
builtin4 "github.com/filecoin-project/specs-actors/v4/actors/builtin"
|
builtin4 "github.com/filecoin-project/specs-actors/v4/actors/builtin"
|
||||||
|
|
||||||
builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin"
|
builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin"
|
||||||
|
|
||||||
|
builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin"
|
||||||
|
|
||||||
|
builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -57,11 +62,19 @@ func init() {
|
|||||||
return load5(store, root)
|
return load5(store, root)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
builtin.RegisterActorState(builtin6.StorageMinerActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) {
|
||||||
|
return load6(store, root)
|
||||||
|
})
|
||||||
|
|
||||||
|
builtin.RegisterActorState(builtin7.StorageMinerActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) {
|
||||||
|
return load7(store, root)
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var Methods = builtin5.MethodsMiner
|
var Methods = builtin7.MethodsMiner
|
||||||
|
|
||||||
// Unchanged between v0, v2, v3, and v4 actors
|
// Unchanged between v0, v2, v3, v4, and v5 actors
|
||||||
var WPoStProvingPeriod = miner0.WPoStProvingPeriod
|
var WPoStProvingPeriod = miner0.WPoStProvingPeriod
|
||||||
var WPoStPeriodDeadlines = miner0.WPoStPeriodDeadlines
|
var WPoStPeriodDeadlines = miner0.WPoStPeriodDeadlines
|
||||||
var WPoStChallengeWindow = miner0.WPoStChallengeWindow
|
var WPoStChallengeWindow = miner0.WPoStChallengeWindow
|
||||||
@@ -93,6 +106,12 @@ func Load(store adt.Store, act *types.Actor) (State, error) {
|
|||||||
case builtin5.StorageMinerActorCodeID:
|
case builtin5.StorageMinerActorCodeID:
|
||||||
return load5(store, act.Head)
|
return load5(store, act.Head)
|
||||||
|
|
||||||
|
case builtin6.StorageMinerActorCodeID:
|
||||||
|
return load6(store, act.Head)
|
||||||
|
|
||||||
|
case builtin7.StorageMinerActorCodeID:
|
||||||
|
return load7(store, act.Head)
|
||||||
|
|
||||||
}
|
}
|
||||||
return nil, xerrors.Errorf("unknown actor code %s", act.Code)
|
return nil, xerrors.Errorf("unknown actor code %s", act.Code)
|
||||||
}
|
}
|
||||||
@@ -115,6 +134,12 @@ func MakeState(store adt.Store, av actors.Version) (State, error) {
|
|||||||
case actors.Version5:
|
case actors.Version5:
|
||||||
return make5(store)
|
return make5(store)
|
||||||
|
|
||||||
|
case actors.Version6:
|
||||||
|
return make6(store)
|
||||||
|
|
||||||
|
case actors.Version7:
|
||||||
|
return make7(store)
|
||||||
|
|
||||||
}
|
}
|
||||||
return nil, xerrors.Errorf("unknown actor version %d", av)
|
return nil, xerrors.Errorf("unknown actor version %d", av)
|
||||||
}
|
}
|
||||||
@@ -137,6 +162,12 @@ func GetActorCodeID(av actors.Version) (cid.Cid, error) {
|
|||||||
case actors.Version5:
|
case actors.Version5:
|
||||||
return builtin5.StorageMinerActorCodeID, nil
|
return builtin5.StorageMinerActorCodeID, nil
|
||||||
|
|
||||||
|
case actors.Version6:
|
||||||
|
return builtin6.StorageMinerActorCodeID, nil
|
||||||
|
|
||||||
|
case actors.Version7:
|
||||||
|
return builtin7.StorageMinerActorCodeID, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return cid.Undef, xerrors.Errorf("unknown actor version %d", av)
|
return cid.Undef, xerrors.Errorf("unknown actor version %d", av)
|
||||||
@@ -200,11 +231,28 @@ type Deadline interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Partition interface {
|
type Partition interface {
|
||||||
|
// AllSectors returns all sector numbers in this partition, including faulty, unproven, and terminated sectors
|
||||||
AllSectors() (bitfield.BitField, error)
|
AllSectors() (bitfield.BitField, error)
|
||||||
|
|
||||||
|
// Subset of sectors detected/declared faulty and not yet recovered (excl. from PoSt).
|
||||||
|
// Faults ∩ Terminated = ∅
|
||||||
FaultySectors() (bitfield.BitField, error)
|
FaultySectors() (bitfield.BitField, error)
|
||||||
|
|
||||||
|
// Subset of faulty sectors expected to recover on next PoSt
|
||||||
|
// Recoveries ∩ Terminated = ∅
|
||||||
RecoveringSectors() (bitfield.BitField, error)
|
RecoveringSectors() (bitfield.BitField, error)
|
||||||
|
|
||||||
|
// Live sectors are those that are not terminated (but may be faulty).
|
||||||
LiveSectors() (bitfield.BitField, error)
|
LiveSectors() (bitfield.BitField, error)
|
||||||
|
|
||||||
|
// Active sectors are those that are neither terminated nor faulty nor unproven, i.e. actively contributing power.
|
||||||
ActiveSectors() (bitfield.BitField, error)
|
ActiveSectors() (bitfield.BitField, error)
|
||||||
|
|
||||||
|
// Unproven sectors in this partition. This bitfield will be cleared on
|
||||||
|
// a successful window post (or at the end of the partition's next
|
||||||
|
// deadline). At that time, any still unproven sectors will be added to
|
||||||
|
// the faulty sector bitfield.
|
||||||
|
UnprovenSectors() (bitfield.BitField, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type SectorOnChainInfo struct {
|
type SectorOnChainInfo struct {
|
||||||
@@ -219,6 +267,7 @@ type SectorOnChainInfo struct {
|
|||||||
InitialPledge abi.TokenAmount
|
InitialPledge abi.TokenAmount
|
||||||
ExpectedDayReward abi.TokenAmount
|
ExpectedDayReward abi.TokenAmount
|
||||||
ExpectedStoragePledge abi.TokenAmount
|
ExpectedStoragePledge abi.TokenAmount
|
||||||
|
SectorKeyCID *cid.Cid
|
||||||
}
|
}
|
||||||
|
|
||||||
type SectorPreCommitInfo = miner0.SectorPreCommitInfo
|
type SectorPreCommitInfo = miner0.SectorPreCommitInfo
|
||||||
@@ -234,6 +283,7 @@ type SectorPreCommitOnChainInfo struct {
|
|||||||
type PoStPartition = miner0.PoStPartition
|
type PoStPartition = miner0.PoStPartition
|
||||||
type RecoveryDeclaration = miner0.RecoveryDeclaration
|
type RecoveryDeclaration = miner0.RecoveryDeclaration
|
||||||
type FaultDeclaration = miner0.FaultDeclaration
|
type FaultDeclaration = miner0.FaultDeclaration
|
||||||
|
type ReplicaUpdate = miner7.ReplicaUpdate
|
||||||
|
|
||||||
// Params
|
// Params
|
||||||
type DeclareFaultsParams = miner0.DeclareFaultsParams
|
type DeclareFaultsParams = miner0.DeclareFaultsParams
|
||||||
@@ -242,6 +292,7 @@ type SubmitWindowedPoStParams = miner0.SubmitWindowedPoStParams
|
|||||||
type ProveCommitSectorParams = miner0.ProveCommitSectorParams
|
type ProveCommitSectorParams = miner0.ProveCommitSectorParams
|
||||||
type DisputeWindowedPoStParams = miner3.DisputeWindowedPoStParams
|
type DisputeWindowedPoStParams = miner3.DisputeWindowedPoStParams
|
||||||
type ProveCommitAggregateParams = miner5.ProveCommitAggregateParams
|
type ProveCommitAggregateParams = miner5.ProveCommitAggregateParams
|
||||||
|
type ProveReplicaUpdatesParams = miner7.ProveReplicaUpdatesParams
|
||||||
|
|
||||||
func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.RegisteredPoStProof) (abi.RegisteredSealProof, error) {
|
func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.RegisteredPoStProof) (abi.RegisteredSealProof, error) {
|
||||||
// We added support for the new proofs in network version 7, and removed support for the old
|
// We added support for the new proofs in network version 7, and removed support for the old
|
||||||
|
|||||||
@@ -138,11 +138,22 @@ func (s *state{{.v}}) GetSectorExpiration(num abi.SectorNumber) (*SectorExpirati
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
// NOTE: this can be optimized significantly.
|
// NOTE: this can be optimized significantly.
|
||||||
// 1. If the sector is non-faulty, it will either expire on-time (can be
|
{{if (ge .v 7) -}}
|
||||||
|
// 1. If the sector is non-faulty, it will expire on-time (can be
|
||||||
|
// learned from the sector info).
|
||||||
|
{{- else -}}
|
||||||
|
// 1. If the sector is non-faulty, it will either expire on-time (can be
|
||||||
// learned from the sector info), or in the next quantized expiration
|
// learned from the sector info), or in the next quantized expiration
|
||||||
// epoch (i.e., the first element in the partition's expiration queue.
|
// epoch (i.e., the first element in the partition's expiration queue.
|
||||||
|
{{- end}}
|
||||||
|
{{if (ge .v 6) -}}
|
||||||
|
// 2. If it's faulty, it will expire early within the first 42 entries
|
||||||
|
// of the expiration queue.
|
||||||
|
{{- else -}}
|
||||||
// 2. If it's faulty, it will expire early within the first 14 entries
|
// 2. If it's faulty, it will expire early within the first 14 entries
|
||||||
// of the expiration queue.
|
// of the expiration queue.
|
||||||
|
{{- end}}
|
||||||
|
|
||||||
stopErr := errors.New("stop")
|
stopErr := errors.New("stop")
|
||||||
out := SectorExpiration{}
|
out := SectorExpiration{}
|
||||||
err = dls.ForEach(s.store, func(dlIdx uint64, dl *miner{{.v}}.Deadline) error {
|
err = dls.ForEach(s.store, func(dlIdx uint64, dl *miner{{.v}}.Deadline) error {
|
||||||
@@ -479,12 +490,15 @@ func (s *state{{.v}}) EraseAllUnproven() error {
|
|||||||
|
|
||||||
return dls.UpdateDeadline(s.store, dindx, dl)
|
return dls.UpdateDeadline(s.store, dindx, dl)
|
||||||
})
|
})
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
return s.State.SaveDeadlines(s.store, dls)
|
return s.State.SaveDeadlines(s.store, dls)
|
||||||
{{else}}
|
{{else}}
|
||||||
// field doesn't exist until v2
|
// field doesn't exist until v2
|
||||||
|
return nil
|
||||||
{{end}}
|
{{end}}
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *deadline{{.v}}) LoadPartition(idx uint64) (Partition, error) {
|
func (d *deadline{{.v}}) LoadPartition(idx uint64) (Partition, error) {
|
||||||
@@ -546,9 +560,12 @@ func (p *partition{{.v}}) RecoveringSectors() (bitfield.BitField, error) {
|
|||||||
return p.Partition.Recoveries, nil
|
return p.Partition.Recoveries, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (p *partition{{.v}}) UnprovenSectors() (bitfield.BitField, error) {
|
||||||
|
return {{if (ge .v 2)}}p.Partition.Unproven{{else}}bitfield.New(){{end}}, nil
|
||||||
|
}
|
||||||
|
|
||||||
func fromV{{.v}}SectorOnChainInfo(v{{.v}} miner{{.v}}.SectorOnChainInfo) SectorOnChainInfo {
|
func fromV{{.v}}SectorOnChainInfo(v{{.v}} miner{{.v}}.SectorOnChainInfo) SectorOnChainInfo {
|
||||||
{{if (ge .v 2)}}
|
info := SectorOnChainInfo{
|
||||||
return SectorOnChainInfo{
|
|
||||||
SectorNumber: v{{.v}}.SectorNumber,
|
SectorNumber: v{{.v}}.SectorNumber,
|
||||||
SealProof: v{{.v}}.SealProof,
|
SealProof: v{{.v}}.SealProof,
|
||||||
SealedCID: v{{.v}}.SealedCID,
|
SealedCID: v{{.v}}.SealedCID,
|
||||||
@@ -560,10 +577,11 @@ func fromV{{.v}}SectorOnChainInfo(v{{.v}} miner{{.v}}.SectorOnChainInfo) SectorO
|
|||||||
InitialPledge: v{{.v}}.InitialPledge,
|
InitialPledge: v{{.v}}.InitialPledge,
|
||||||
ExpectedDayReward: v{{.v}}.ExpectedDayReward,
|
ExpectedDayReward: v{{.v}}.ExpectedDayReward,
|
||||||
ExpectedStoragePledge: v{{.v}}.ExpectedStoragePledge,
|
ExpectedStoragePledge: v{{.v}}.ExpectedStoragePledge,
|
||||||
|
{{if (ge .v 7)}}
|
||||||
|
SectorKeyCID: v{{.v}}.SectorKeyCID,
|
||||||
|
{{end}}
|
||||||
}
|
}
|
||||||
{{else}}
|
return info
|
||||||
return (SectorOnChainInfo)(v0)
|
|
||||||
{{end}}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func fromV{{.v}}SectorPreCommitOnChainInfo(v{{.v}} miner{{.v}}.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo {
|
func fromV{{.v}}SectorPreCommitOnChainInfo(v{{.v}} miner{{.v}}.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo {
|
||||||
|
|||||||
@@ -67,3 +67,22 @@ func SealProofTypeFromSectorSize(ssize abi.SectorSize, nv network.Version) (abi.
|
|||||||
|
|
||||||
return 0, xerrors.Errorf("unsupported network version")
|
return 0, xerrors.Errorf("unsupported network version")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WindowPoStProofTypeFromSectorSize returns preferred post proof type for creating
|
||||||
|
// new miner actors and new sectors
|
||||||
|
func WindowPoStProofTypeFromSectorSize(ssize abi.SectorSize) (abi.RegisteredPoStProof, error) {
|
||||||
|
switch ssize {
|
||||||
|
case 2 << 10:
|
||||||
|
return abi.RegisteredPoStProof_StackedDrgWindow2KiBV1, nil
|
||||||
|
case 8 << 20:
|
||||||
|
return abi.RegisteredPoStProof_StackedDrgWindow8MiBV1, nil
|
||||||
|
case 512 << 20:
|
||||||
|
return abi.RegisteredPoStProof_StackedDrgWindow512MiBV1, nil
|
||||||
|
case 32 << 30:
|
||||||
|
return abi.RegisteredPoStProof_StackedDrgWindow32GiBV1, nil
|
||||||
|
case 64 << 30:
|
||||||
|
return abi.RegisteredPoStProof_StackedDrgWindow64GiBV1, nil
|
||||||
|
default:
|
||||||
|
return 0, xerrors.Errorf("unsupported sector size for miner: %v", ssize)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ func (s *state0) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, e
|
|||||||
// epoch (i.e., the first element in the partition's expiration queue.
|
// epoch (i.e., the first element in the partition's expiration queue.
|
||||||
// 2. If it's faulty, it will expire early within the first 14 entries
|
// 2. If it's faulty, it will expire early within the first 14 entries
|
||||||
// of the expiration queue.
|
// of the expiration queue.
|
||||||
|
|
||||||
stopErr := errors.New("stop")
|
stopErr := errors.New("stop")
|
||||||
out := SectorExpiration{}
|
out := SectorExpiration{}
|
||||||
err = dls.ForEach(s.store, func(dlIdx uint64, dl *miner0.Deadline) error {
|
err = dls.ForEach(s.store, func(dlIdx uint64, dl *miner0.Deadline) error {
|
||||||
@@ -444,8 +445,8 @@ func (s *state0) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreC
|
|||||||
func (s *state0) EraseAllUnproven() error {
|
func (s *state0) EraseAllUnproven() error {
|
||||||
|
|
||||||
// field doesn't exist until v2
|
// field doesn't exist until v2
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *deadline0) LoadPartition(idx uint64) (Partition, error) {
|
func (d *deadline0) LoadPartition(idx uint64) (Partition, error) {
|
||||||
@@ -500,10 +501,25 @@ func (p *partition0) RecoveringSectors() (bitfield.BitField, error) {
|
|||||||
return p.Partition.Recoveries, nil
|
return p.Partition.Recoveries, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (p *partition0) UnprovenSectors() (bitfield.BitField, error) {
|
||||||
|
return bitfield.New(), nil
|
||||||
|
}
|
||||||
|
|
||||||
func fromV0SectorOnChainInfo(v0 miner0.SectorOnChainInfo) SectorOnChainInfo {
|
func fromV0SectorOnChainInfo(v0 miner0.SectorOnChainInfo) SectorOnChainInfo {
|
||||||
|
info := SectorOnChainInfo{
|
||||||
return (SectorOnChainInfo)(v0)
|
SectorNumber: v0.SectorNumber,
|
||||||
|
SealProof: v0.SealProof,
|
||||||
|
SealedCID: v0.SealedCID,
|
||||||
|
DealIDs: v0.DealIDs,
|
||||||
|
Activation: v0.Activation,
|
||||||
|
Expiration: v0.Expiration,
|
||||||
|
DealWeight: v0.DealWeight,
|
||||||
|
VerifiedDealWeight: v0.VerifiedDealWeight,
|
||||||
|
InitialPledge: v0.InitialPledge,
|
||||||
|
ExpectedDayReward: v0.ExpectedDayReward,
|
||||||
|
ExpectedStoragePledge: v0.ExpectedStoragePledge,
|
||||||
|
}
|
||||||
|
return info
|
||||||
}
|
}
|
||||||
|
|
||||||
func fromV0SectorPreCommitOnChainInfo(v0 miner0.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo {
|
func fromV0SectorPreCommitOnChainInfo(v0 miner0.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo {
|
||||||
|
|||||||
@@ -138,6 +138,7 @@ func (s *state2) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, e
|
|||||||
// epoch (i.e., the first element in the partition's expiration queue.
|
// epoch (i.e., the first element in the partition's expiration queue.
|
||||||
// 2. If it's faulty, it will expire early within the first 14 entries
|
// 2. If it's faulty, it will expire early within the first 14 entries
|
||||||
// of the expiration queue.
|
// of the expiration queue.
|
||||||
|
|
||||||
stopErr := errors.New("stop")
|
stopErr := errors.New("stop")
|
||||||
out := SectorExpiration{}
|
out := SectorExpiration{}
|
||||||
err = dls.ForEach(s.store, func(dlIdx uint64, dl *miner2.Deadline) error {
|
err = dls.ForEach(s.store, func(dlIdx uint64, dl *miner2.Deadline) error {
|
||||||
@@ -470,10 +471,12 @@ func (s *state2) EraseAllUnproven() error {
|
|||||||
|
|
||||||
return dls.UpdateDeadline(s.store, dindx, dl)
|
return dls.UpdateDeadline(s.store, dindx, dl)
|
||||||
})
|
})
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
return s.State.SaveDeadlines(s.store, dls)
|
return s.State.SaveDeadlines(s.store, dls)
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *deadline2) LoadPartition(idx uint64) (Partition, error) {
|
func (d *deadline2) LoadPartition(idx uint64) (Partition, error) {
|
||||||
@@ -528,9 +531,12 @@ func (p *partition2) RecoveringSectors() (bitfield.BitField, error) {
|
|||||||
return p.Partition.Recoveries, nil
|
return p.Partition.Recoveries, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func fromV2SectorOnChainInfo(v2 miner2.SectorOnChainInfo) SectorOnChainInfo {
|
func (p *partition2) UnprovenSectors() (bitfield.BitField, error) {
|
||||||
|
return p.Partition.Unproven, nil
|
||||||
|
}
|
||||||
|
|
||||||
return SectorOnChainInfo{
|
func fromV2SectorOnChainInfo(v2 miner2.SectorOnChainInfo) SectorOnChainInfo {
|
||||||
|
info := SectorOnChainInfo{
|
||||||
SectorNumber: v2.SectorNumber,
|
SectorNumber: v2.SectorNumber,
|
||||||
SealProof: v2.SealProof,
|
SealProof: v2.SealProof,
|
||||||
SealedCID: v2.SealedCID,
|
SealedCID: v2.SealedCID,
|
||||||
@@ -543,7 +549,7 @@ func fromV2SectorOnChainInfo(v2 miner2.SectorOnChainInfo) SectorOnChainInfo {
|
|||||||
ExpectedDayReward: v2.ExpectedDayReward,
|
ExpectedDayReward: v2.ExpectedDayReward,
|
||||||
ExpectedStoragePledge: v2.ExpectedStoragePledge,
|
ExpectedStoragePledge: v2.ExpectedStoragePledge,
|
||||||
}
|
}
|
||||||
|
return info
|
||||||
}
|
}
|
||||||
|
|
||||||
func fromV2SectorPreCommitOnChainInfo(v2 miner2.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo {
|
func fromV2SectorPreCommitOnChainInfo(v2 miner2.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo {
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ func (s *state3) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, e
|
|||||||
// epoch (i.e., the first element in the partition's expiration queue.
|
// epoch (i.e., the first element in the partition's expiration queue.
|
||||||
// 2. If it's faulty, it will expire early within the first 14 entries
|
// 2. If it's faulty, it will expire early within the first 14 entries
|
||||||
// of the expiration queue.
|
// of the expiration queue.
|
||||||
|
|
||||||
stopErr := errors.New("stop")
|
stopErr := errors.New("stop")
|
||||||
out := SectorExpiration{}
|
out := SectorExpiration{}
|
||||||
err = dls.ForEach(s.store, func(dlIdx uint64, dl *miner3.Deadline) error {
|
err = dls.ForEach(s.store, func(dlIdx uint64, dl *miner3.Deadline) error {
|
||||||
@@ -467,10 +468,12 @@ func (s *state3) EraseAllUnproven() error {
|
|||||||
|
|
||||||
return dls.UpdateDeadline(s.store, dindx, dl)
|
return dls.UpdateDeadline(s.store, dindx, dl)
|
||||||
})
|
})
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
return s.State.SaveDeadlines(s.store, dls)
|
return s.State.SaveDeadlines(s.store, dls)
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *deadline3) LoadPartition(idx uint64) (Partition, error) {
|
func (d *deadline3) LoadPartition(idx uint64) (Partition, error) {
|
||||||
@@ -529,9 +532,12 @@ func (p *partition3) RecoveringSectors() (bitfield.BitField, error) {
|
|||||||
return p.Partition.Recoveries, nil
|
return p.Partition.Recoveries, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func fromV3SectorOnChainInfo(v3 miner3.SectorOnChainInfo) SectorOnChainInfo {
|
func (p *partition3) UnprovenSectors() (bitfield.BitField, error) {
|
||||||
|
return p.Partition.Unproven, nil
|
||||||
|
}
|
||||||
|
|
||||||
return SectorOnChainInfo{
|
func fromV3SectorOnChainInfo(v3 miner3.SectorOnChainInfo) SectorOnChainInfo {
|
||||||
|
info := SectorOnChainInfo{
|
||||||
SectorNumber: v3.SectorNumber,
|
SectorNumber: v3.SectorNumber,
|
||||||
SealProof: v3.SealProof,
|
SealProof: v3.SealProof,
|
||||||
SealedCID: v3.SealedCID,
|
SealedCID: v3.SealedCID,
|
||||||
@@ -544,7 +550,7 @@ func fromV3SectorOnChainInfo(v3 miner3.SectorOnChainInfo) SectorOnChainInfo {
|
|||||||
ExpectedDayReward: v3.ExpectedDayReward,
|
ExpectedDayReward: v3.ExpectedDayReward,
|
||||||
ExpectedStoragePledge: v3.ExpectedStoragePledge,
|
ExpectedStoragePledge: v3.ExpectedStoragePledge,
|
||||||
}
|
}
|
||||||
|
return info
|
||||||
}
|
}
|
||||||
|
|
||||||
func fromV3SectorPreCommitOnChainInfo(v3 miner3.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo {
|
func fromV3SectorPreCommitOnChainInfo(v3 miner3.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user