diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 63929f3159e..b2a1551b70d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -61,6 +61,7 @@ jobs: # to support resource intensive jobs. runners: | { + "itest-niporep_manual": ["self-hosted", "linux", "x64", "4xlarge"], "itest-sector_pledge": ["self-hosted", "linux", "x64", "4xlarge"], "itest-worker": ["self-hosted", "linux", "x64", "4xlarge"], "itest-manual_onboarding": ["self-hosted", "linux", "x64", "4xlarge"], @@ -118,6 +119,7 @@ jobs: "itest-direct_data_onboard_verified", "itest-direct_data_onboard", "itest-manual_onboarding", + "itest-niporep_manual", "itest-net", "itest-path_detach_redeclare", "itest-sealing_resources", diff --git a/build/actors/v14.tar.zst b/build/actors/v14.tar.zst index 7d08c7a9d0c..5407fb52982 100644 Binary files a/build/actors/v14.tar.zst and b/build/actors/v14.tar.zst differ diff --git a/build/builtin_actors_gen.go b/build/builtin_actors_gen.go index b9a01994835..b78774aed7d 100644 --- a/build/builtin_actors_gen.go +++ b/build/builtin_actors_gen.go @@ -143,25 +143,25 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{ }, { Network: "butterflynet", Version: 14, - BundleGitTag: "v14.0.0-dev.0", - ManifestCid: MustParseCid("bafy2bzacecxc54wswbcnq4otm25vq63gzaj2wso7dqezkekj4uepakqn7k7w4"), + BundleGitTag: "v14.0.0-rc.1", + ManifestCid: MustParseCid("bafy2bzacecmkqezl3a5klkzz7z4ou4jwqk4zzd3nvz727l4qh44ngsxtxdblu"), Actors: map[string]cid.Cid{ - "account": MustParseCid("bafk2bzacedqpbnmdlobmm53jo6lsuf2aa3xdpk4oiglncr2lam6dpkdludou2"), - "cron": MustParseCid("bafk2bzacecswzkfbqnsry2k4kv4jbmz3vnvtt7gj3nvevvgej6qfgypswiixg"), - "datacap": MustParseCid("bafk2bzacecwrqrtnwonivbhwv6lvrq2k2lbn2rlkh772vd5mkcn4pyi4ttbxu"), - "eam": MustParseCid("bafk2bzacec3pepsnal6vhrdkuumjkqvapdkcwmihjg2xk5ww7v3nikbiuvjmw"), - "ethaccount": MustParseCid("bafk2bzacecarcpy2fpzlhwwcuyxrhknkby4zeh2kxqtgcdnouaiw4eusezxqk"), - "evm": MustParseCid("bafk2bzaceai3uysgts5nsld76narp2hi6n43rx3ce6ebgpxj7ig2acudzrohk"), - "init": MustParseCid("bafk2bzaced6irghxjdna2yhco6eb4hobhhk64kgr3ppma6k3bi25ihxxjegda"), - "multisig": MustParseCid("bafk2bzacecwr4uruh5l7i7pjfpzcrrz6dqubryyrtvokcptaudtgcz37yk6m4"), - "paymentchannel": MustParseCid("bafk2bzacedxta2aayp6sgfwag5kfgysddzfu6b3bxcxdechhwtxhzib7maggs"), + "account": MustParseCid("bafk2bzaceazutruyfvvqxgp5qoneq36uv6yethps2bonil5psy2vivl5j2hks"), + "cron": MustParseCid("bafk2bzacecsiz2nzjieposnkz2kqvjjnqyu5zwk6ccm4dbptx26v3qirm6zni"), + "datacap": MustParseCid("bafk2bzaceaavii766hmiawhw2fjvtoy5kvbukou3zejf6gtwu7xi4jxt4uidk"), + "eam": MustParseCid("bafk2bzacebkzhnamn5ohtsvn76opprsi3ao3ujgytjr3c6kdcvhmhg4ze5xxm"), + "ethaccount": MustParseCid("bafk2bzacebvvri25rmgt6yy5qtdrikcsestk6z52aebynwd53s2rm2l3ukn7g"), + "evm": MustParseCid("bafk2bzacebta2jkyxknvwnr6ldcimmwpzenhtdwqbuifzk6g2wktzqf3vj33a"), + "init": MustParseCid("bafk2bzaceblybzwnn55uiivbsjae6l7haz5iocexnynfcz2yjg5spciimxdme"), + "multisig": MustParseCid("bafk2bzaceb54rbdcfdcdtzwbohshn64opgsqf5vhqh3xqb37iignsm3plrtpa"), + "paymentchannel": MustParseCid("bafk2bzacebyyn42ie7jekdytacqpqfll7xctsfpza3tb2sonzsjdeltxqgmdo"), "placeholder": MustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), - "reward": MustParseCid("bafk2bzaceckzhr65hlwpu7s7aybdsgu7hj3rc5iw3z6fuhnbye4fbmxunrbce"), - "storagemarket": MustParseCid("bafk2bzacecjuxvkejcbctlrgzik4gu2nwhemdg4hknhvo6zbvdyswjyt4p3co"), - "storageminer": MustParseCid("bafk2bzacedzqdtpcruryb6wlszumjxvqg433ny7jahomqaxfe64ermt4xjauq"), - "storagepower": MustParseCid("bafk2bzacebi44itgbn7ewtuk6lvhyltfk5feu2cvqm4sqa5wt6ejwmn7oec4m"), - "system": MustParseCid("bafk2bzacec2jtz4whdvgoqhn4vcfsycydjsyy3m243rfeczrm65jwpnmhd262"), - "verifiedregistry": MustParseCid("bafk2bzacedvr7gyx6umad2u35kly4d7ucwakga3h74pqus24mayatvg6ybo26"), + "reward": MustParseCid("bafk2bzaceczaoglexx6w3m744s4emfmjkeizpl4ofdkh4xzhevjtd6zift5iu"), + "storagemarket": MustParseCid("bafk2bzaceceaqmhkxuerleq2dpju35mcsdiklpkisglzlj5xkf32hbyqn7sam"), + "storageminer": MustParseCid("bafk2bzacebkiqu5pclx5zze4ugcsn3lvumihyathpcrjfq36b3hgmd7jqe2bk"), + "storagepower": MustParseCid("bafk2bzacebcxydq2iampltz5zoo3oojka45hjkd62vz46xtpl6qilhkkjdeaq"), + "system": MustParseCid("bafk2bzacebbrs3dzgxwj43ztup7twz25xkbhhtmcbjjbscjvpsrpbwux3b32g"), + "verifiedregistry": MustParseCid("bafk2bzacebj3znhdpxqjgvztrv3petqwdkvrefg4j6lrp3n7wfrkdoan4os42"), }, }, { Network: "calibrationnet", @@ -295,25 +295,25 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{ }, { Network: "calibrationnet", Version: 14, - BundleGitTag: "v14.0.0-dev.0", - ManifestCid: MustParseCid("bafy2bzacediq4lylrthnpwshy33nsmixsc64ibw24j765aqtolnn4omys4wvi"), + BundleGitTag: "v14.0.0-rc.1", + ManifestCid: MustParseCid("bafy2bzacebq3hncszqpojglh2dkwekybq4zn6qpc4gceqbx36wndps5qehtau"), Actors: map[string]cid.Cid{ - "account": MustParseCid("bafk2bzacecsnxsyykou4e42rq7sfjfilap3gietzu7osfink4fuve4dg3ke7o"), - "cron": MustParseCid("bafk2bzaceaor5hablmuhgukcgwbzanybp7lal72o2qh3owq6aorxf7whp57ic"), - "datacap": MustParseCid("bafk2bzacecbh7phbwubcumayi42jdn32fu5adfqcvho5qyqm57oloeqqmsyjq"), - "eam": MustParseCid("bafk2bzacea2ot2vrpn6rqwk7fslqk5nxao7ual4frlrb2mrswpbphp5w6tnmm"), - "ethaccount": MustParseCid("bafk2bzacedoeqhslckow3imaxpwph7kw3sbz5pqr577xo3duqekpsfimun54m"), - "evm": MustParseCid("bafk2bzacec7fmzg4es6tgh4gvtmy23rnvqs66kwtzv7wkzuocckzv53rjhevk"), - "init": MustParseCid("bafk2bzacece3jfqstnipsiz5jqbmu6ezze6f5whxerb4mc6nn32vuc75i672e"), - "multisig": MustParseCid("bafk2bzacedjzpynfpcjwfxd6bdyl7zt6mepm2gdeb2moiopz7yjnrn3pjgkzc"), - "paymentchannel": MustParseCid("bafk2bzacecyhtrdyztcj7drmr3sdgjrzdiy3frc3txp2hs2of5cbwz22q7jqc"), + "account": MustParseCid("bafk2bzaced5ecfm56dvtw26q56j4d32yoccyd7ggxn3qdki2enxpqqav45ths"), + "cron": MustParseCid("bafk2bzacedpbtttpyvtjncqoyobr63mhqqtlrygbnudhxyp2vha56f626dkfs"), + "datacap": MustParseCid("bafk2bzacecded3lcvo7ndsk66samyecw2trnhrgzi7jxsary3sqgopxlk6rku"), + "eam": MustParseCid("bafk2bzacecsda4uw7dcu76a27gnrrdcm73tgms7wrte6jbou63vloktkqc5ne"), + "ethaccount": MustParseCid("bafk2bzacebu2lcxfmohomjj3umslnylwugf5gssywdq3575tjarta7o227dls"), + "evm": MustParseCid("bafk2bzacea4xnekruhfmdnzvzeo6cbf7jsfgco6x5wje2ckwc2ui2ojzcrlgu"), + "init": MustParseCid("bafk2bzacedfmsdlewihdcrkdepnfata26nj7akbvexzs3chicujhjf2uxsazc"), + "multisig": MustParseCid("bafk2bzacedwx4svscsp6wqqu2vlcunjihvvm4u2jnsqjkwutjhir7dwtl7z6m"), + "paymentchannel": MustParseCid("bafk2bzacedbit7oo6lryhbo64uikvtjtfcth6oxwy3eebxerenu2h7rj44n24"), "placeholder": MustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), - "reward": MustParseCid("bafk2bzacecy6zubpzawju7yr62ayy3fku6abt7vszkrvtil2pedaz6dbf5k3w"), - "storagemarket": MustParseCid("bafk2bzaceboxhtn2ugsl2ix7etkxqimvx76gmq6yez4vudmn5z3nmg2yaf23c"), - "storageminer": MustParseCid("bafk2bzaced67qu6iriktldwz4qzk32noo5dsgitbxahxhhaursejaj2645nbe"), - "storagepower": MustParseCid("bafk2bzacedbf3o6sfnl53uv5quih5qsfxcyutfkoc2jefce6axmw7pr5awmv4"), - "system": MustParseCid("bafk2bzacecwqfonrbl57oy274n2v5zh2uyemu3i3tvf724e73vcvxof3xdhv6"), - "verifiedregistry": MustParseCid("bafk2bzacebymu6kx2wot5h7ij7cwp5gyhoby6eddfope66iijj42e2tfckz2o"), + "reward": MustParseCid("bafk2bzaced5rlycj7fzpscfc7p3wwxarngwqylqshj7te3uffey5tevunz4we"), + "storagemarket": MustParseCid("bafk2bzaceatwbyrec2nnwggxc2alpqve7rl52fmbhqflebuxmmnvg3qckjb7c"), + "storageminer": MustParseCid("bafk2bzacecr7ozkdz7l2pq3ig5qxae2ysivbnojhsn4gw3o57ov4mhksma7me"), + "storagepower": MustParseCid("bafk2bzacedgeolvjtnw7fkji5kqmx322abv6uls2v34fuml6nw36dvfcw4mtu"), + "system": MustParseCid("bafk2bzacederl6tlpieldsn6mkndqwd4wj5orfoqgab6p2klswfn3cjagxwla"), + "verifiedregistry": MustParseCid("bafk2bzaceczw2kp6gjjdcjbso7mewp7guik7gr525pal6dotdja2lrct6ok3c"), }, }, { Network: "caterpillarnet", @@ -456,25 +456,25 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{ }, { Network: "caterpillarnet", Version: 14, - BundleGitTag: "v14.0.0-dev.0", - ManifestCid: MustParseCid("bafy2bzacecqr6zzok3sujw76ijmiy36s25o7x2oabkxh2pbaqnzwyghme3kca"), + BundleGitTag: "v14.0.0-rc.1", + ManifestCid: MustParseCid("bafy2bzacecr6g2co4zkdvrsbz2z7wh44o6hrl3rpbgnlhe52772hhjs43vxge"), Actors: map[string]cid.Cid{ - "account": MustParseCid("bafk2bzaceb2q2noa4o3rqdfuz6y3pq6cl5t3gpijwffpuu7nwwxth2pujcwcy"), - "cron": MustParseCid("bafk2bzacedygausscsfzjdsh2czeifsw2xxcgt2kghtobuf6gamy5izaahy3y"), - "datacap": MustParseCid("bafk2bzacedfnunfyasdyl2w3wkjljmkqr2zw5ohupo4puwuc4qaikjjtwp3dc"), - "eam": MustParseCid("bafk2bzacebsroyhcg4iytb4niifsl7l4lmmwwacj256r22d5qd35lv3omtii2"), - "ethaccount": MustParseCid("bafk2bzacecvvceublcb6dfcjwt2f6excfw3jejxswfwcndyqrvpbnbec64754"), - "evm": MustParseCid("bafk2bzacedbctoblb2zb3x4iu7xrjdpsjewru4wrxekojrrjkv42j4sycx5lk"), - "init": MustParseCid("bafk2bzacebsoxfbgih25h2ohupmmidmyeip5hgiiolteoiiqfzuxmjkodbonu"), - "multisig": MustParseCid("bafk2bzacedkjf2b4mclsltdrtpgwx4lrszauecc3f6rskcicenu7v2343fynw"), - "paymentchannel": MustParseCid("bafk2bzacebchgd3ayr55pu4v2b6rhzbp6b6qr6lzspp2mkchvcrzqg6oecafi"), + "account": MustParseCid("bafk2bzacecaoykugysdikvzptp5jc6qzhfxv3tsy7eggoabfk34jc6ozr3nju"), + "cron": MustParseCid("bafk2bzacede6xljkkb6qww47hdho2dfs75bfxjwmxspldwclekd2ntdvcapj6"), + "datacap": MustParseCid("bafk2bzacedjwq3frxklkkejk4payjpjwgdj352izzcmymtzib6xzgrrtczeuw"), + "eam": MustParseCid("bafk2bzaceana2fkgcjhtr56rrqngvilybjpavfgfwf3kuqed6qxa4lfdjmkac"), + "ethaccount": MustParseCid("bafk2bzacedg7tcqwoykjd57dkettxxato4yufxlyzy6hgsggc7jhf6v7zqgas"), + "evm": MustParseCid("bafk2bzacedwqu6pi4csjod4c5677pgsr6g4ekhqnqgdnsiodyqczmcsj3sspk"), + "init": MustParseCid("bafk2bzaceakukvex4wjcrmwp5msp4d2dhe4qlftqxgolxx5sbtshah3fxoepy"), + "multisig": MustParseCid("bafk2bzaceamp2c2qfgnl7z6vz5majhcm64ml72kbg5kea4xgdnfcyqanynfks"), + "paymentchannel": MustParseCid("bafk2bzacebs44wqfedfx3o23q7tkza5cm3q54gevreqzetsei2bvhsmqdwz3i"), "placeholder": MustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), - "reward": MustParseCid("bafk2bzacebkmk4f6dbcpvj4gier3xotxdqtxuk7rcnsmtakyfi2uohym7gsnu"), - "storagemarket": MustParseCid("bafk2bzacebpngynvtjx7qkbktums77errresd6vscjrp6foln2wc5uyyx2oio"), - "storageminer": MustParseCid("bafk2bzacedtrglopo5ttxrdbvjywzwirn62x53jfytwwcm3hgpebtcfqh3o5g"), - "storagepower": MustParseCid("bafk2bzacebwia7rbduem2hsitpj3q2g2mnbhgv34jqz76niyaexzpw2nzmxb6"), - "system": MustParseCid("bafk2bzacebzml3qklvtpcygwvz6qos6kueyf37trhww2np42harae3dhn75dm"), - "verifiedregistry": MustParseCid("bafk2bzacecnjpnq63wobtoomhnerck4mp7h6hz4qrvb5vuk5miopbsoonpp4k"), + "reward": MustParseCid("bafk2bzacedyckhwkkmcoc2n6byzw6vxi3lqyp3zjs3b7flfqj2wybprwxkw2m"), + "storagemarket": MustParseCid("bafk2bzacebx7ky74ry222rvi56wav3dbal4rqooeuafiakg7r6ksxh2uahbju"), + "storageminer": MustParseCid("bafk2bzacecwfsmi6xxbwkddunjt2zs6qn2g4hvrwury7g36vqvafmok7gs642"), + "storagepower": MustParseCid("bafk2bzacecqcvllpsttt3nqcso4ng2z4cjjn5sr36is7yze74ihqnol2dst2u"), + "system": MustParseCid("bafk2bzacea75k6agtdmjxdfnwbctzstc6pozdblpdevc5ixjevvuzcqwwuzrc"), + "verifiedregistry": MustParseCid("bafk2bzacedxwgmgffeapq4nffplapb5mixkrm2vosmc2i3fxcye5dookiqubu"), }, }, { Network: "devnet", @@ -608,25 +608,25 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{ }, { Network: "devnet", Version: 14, - BundleGitTag: "v14.0.0-dev.0", - ManifestCid: MustParseCid("bafy2bzacea3goruyes5p6k5d6ymn2i3opgsdhe3oupo2ocwwa7kjg5jzsmu5m"), + BundleGitTag: "v14.0.0-rc.1", + ManifestCid: MustParseCid("bafy2bzacebwn7ymtozv5yz3x5hnxl4bds2grlgsk5kncyxjak3hqyhslb534m"), Actors: map[string]cid.Cid{ - "account": MustParseCid("bafk2bzacec55twcyr2vequmfigec2lyqqjqghr3c62erkmdd36x3wptie7aqm"), - "cron": MustParseCid("bafk2bzacec6nd4rueh4zbbfifjzgnkqmydethnym3srbkp43sjamllc5lae4m"), - "datacap": MustParseCid("bafk2bzacece44a5fnpwruoq53rya54zr7yyjjb74cbjdmjzcr6cqhxnqdelvy"), - "eam": MustParseCid("bafk2bzaceb332smduwby3doyrsiqs53el2xcidg7warn2nbfordmkanyt6zg2"), - "ethaccount": MustParseCid("bafk2bzacebvuw6h2wfe5lnfzlisbn4ppxmmjciylktbyt3plkxpmmlpnvzpgq"), - "evm": MustParseCid("bafk2bzacebogm6mcjfuyb5ibkc4akqabsdh4qbjewctbla7buep3nqacdndi6"), - "init": MustParseCid("bafk2bzaceasi72oatcm67piursgqolwhwc74rnqymutc5343utpr2tubxqxta"), - "multisig": MustParseCid("bafk2bzacea6uoyyzqxqwg3mg2vkee533ldnkjy74uwp2ajq5wr3kzpdxhyqgk"), - "paymentchannel": MustParseCid("bafk2bzacec47kpymlqljeilggisz5m7b6eoypulbebkmin2sgdumwj7kot4ga"), + "account": MustParseCid("bafk2bzacecqyi3xhyrze7hlo73zzyzz5jw5e6eqqyesmnbef4xr7br5amqsm2"), + "cron": MustParseCid("bafk2bzacebmeovn3fehscsm2ejcd2vejgqmuqidzx3ytlvp4osa6fes3w73yy"), + "datacap": MustParseCid("bafk2bzaceasqdluegec5qllzjhu66jsyvb74dix6wjztpiaxvha74in7h4eek"), + "eam": MustParseCid("bafk2bzaced4shnjesuxk44ufllcywjbaixerx6hkcyj5rqqopjuic725fymx2"), + "ethaccount": MustParseCid("bafk2bzacebbw6hg766y4ouycqlr3llur7sxkgj7hnu7jq4xlwtycp3ovpqjee"), + "evm": MustParseCid("bafk2bzaceafzevk77d6zhjbrw7grm5p3es2pzuklpvcthedjv6ejh7alvxqoc"), + "init": MustParseCid("bafk2bzacebaywpmwlfhhog6vey3dkz25hjrlwnhacsjryq3ujymyttolglats"), + "multisig": MustParseCid("bafk2bzacedm52r4h7upic7ynukzwjkadefbjeq7w7ozdonsbdumgoabk7xass"), + "paymentchannel": MustParseCid("bafk2bzacecsvfy77loubouoyqwl2ke574zpg3x5f2qon6ougjzfjna6eadwxg"), "placeholder": MustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), - "reward": MustParseCid("bafk2bzacedxllnyrcy4mjq5itqknybhmohbvhjh45pig6yttxchg2v7ra662u"), - "storagemarket": MustParseCid("bafk2bzacecpte42dwwtsh7kcwllnfycqtl223logvt672nfzhgezhetwuw4cy"), - "storageminer": MustParseCid("bafk2bzacec43whuqv2uiotnz42fs7weom4yzfnrsmjkq3ntvtnurjbkvdhsfm"), - "storagepower": MustParseCid("bafk2bzacebn3du6fx7p5hnaia5wmgrpmh7fqxlm3s2v6vwm2b4ntdenzvk2zc"), - "system": MustParseCid("bafk2bzacedwtfvlnagutf5t4smbzd7gqquz4nyydsnbkmdmrza3hur2kukw3a"), - "verifiedregistry": MustParseCid("bafk2bzaceaexkmkl2hv572izcbqlirefya5afq36bj6gmee3bkybzkxkpvhcs"), + "reward": MustParseCid("bafk2bzacecvc7v5d2krwxqeyklfg2xb5qc3kalu66265smcbmwepjmj643uqu"), + "storagemarket": MustParseCid("bafk2bzacecegzksfqu35xlcc6ymxae3vqpkntbajx4jtahugszvb77fnr37ii"), + "storageminer": MustParseCid("bafk2bzacedoimzimltyfzbabwuam2bqw32nqwo2twjq73q7mklwtvqi2evsw2"), + "storagepower": MustParseCid("bafk2bzacebszcfmepyvssrg2tbbqgpqm2cnrl5ub4n6cfy7eie2wwseyloxvs"), + "system": MustParseCid("bafk2bzacea4rh5i36ucj23zb4mid4tw5ym2wqlfap4ejjaynvobengeuby4ja"), + "verifiedregistry": MustParseCid("bafk2bzaceapbsihfuk3munfpcoevtxlwuenxeiiv7dp7v3t2yjs26hcpypexi"), }, }, { Network: "hyperspace", @@ -783,25 +783,25 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{ }, { Network: "mainnet", Version: 14, - BundleGitTag: "v14.0.0-dev.0", - ManifestCid: MustParseCid("bafy2bzaceaamqu2y23htfrwqttlzbalzzxpon724evlf7zjwtopuky27fl6vg"), + BundleGitTag: "v14.0.0-rc.1", + ManifestCid: MustParseCid("bafy2bzacecbueuzsropvqawsri27owo7isa5gp2qtluhrfsto2qg7wpgxnkba"), Actors: map[string]cid.Cid{ - "account": MustParseCid("bafk2bzaceam4gw35hzxzbwz5boory4f2khoqae2eiu2ckjyrav4tvy5tptptc"), - "cron": MustParseCid("bafk2bzacea37wdmar3dbqg4af6c4y7tv2ksd4wmomqy6qbn3umrl43ahanbtg"), - "datacap": MustParseCid("bafk2bzaceb2ycqvq3e22ylkoz3po2qw4d4wdci5vsp65qdu6scnwbxquu2ss4"), - "eam": MustParseCid("bafk2bzacebp35fwkf3ceewkhfn2mfj5d5oz2emptysymnglkt54vxvy7j4vim"), - "ethaccount": MustParseCid("bafk2bzacecscrn7jpqidtff6ttamgyai7z7ilo27tlox3vncipiirym5qnup2"), - "evm": MustParseCid("bafk2bzaced5dxny57hsx3noyjmht6a2563fgxaktgwijbaghiyt357znnwtfy"), - "init": MustParseCid("bafk2bzaceduzpluorgzls3anc3qcn25qwzykzuyvn6cnv6w7xl3rewvfttbte"), - "multisig": MustParseCid("bafk2bzacea4wy63qmllfk4v6ahnb5yet6sdvmljfvyg6weadbyv2buksltyio"), - "paymentchannel": MustParseCid("bafk2bzacecuycms3rge7hny4l3yrd5xvafqrmiu4awnvlrojacf6un2gmo3wi"), + "account": MustParseCid("bafk2bzacebr7ik7lng7vysm754mu5x7sakphwm4soqi6zwbox4ukpd6ndwvqy"), + "cron": MustParseCid("bafk2bzacecwn6eiwa7ysimmk6i57i5whj4cqzwijx3xdlxwb5canmweaez6xc"), + "datacap": MustParseCid("bafk2bzacecidw7ajvtjhmygqs2yxhmuybyvtwp25dxpblvdxxo7u4gqfzirjg"), + "eam": MustParseCid("bafk2bzaced2cxnfwngpcubg63h7zk4y5hjwwuhfjxrh43xozax2u6u2woweju"), + "ethaccount": MustParseCid("bafk2bzacechu4u7asol5mpcsr6fo6jeaeltvayj5bllupyiux7tcynsxby7ko"), + "evm": MustParseCid("bafk2bzacedupohbgwrcw5ztbbsvrpqyybnokr4ylegmk7hrbt3ueeykua6zxw"), + "init": MustParseCid("bafk2bzacecbbcshenkb6z2v4irsudv7tyklfgphhizhghix6ke5gpl4r5f2b6"), + "multisig": MustParseCid("bafk2bzaceajcmsngu3f2chk2y7nanlen5xlftzatytzm6hxwiiw5i5nz36bfc"), + "paymentchannel": MustParseCid("bafk2bzaceavslp27u3f4zwjq45rlg6assj6cqod7r5f6wfwkptlpi6j4qkmne"), "placeholder": MustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), - "reward": MustParseCid("bafk2bzacea3fiurfqb4sg6ynsxcjnhnmarrb73eocipsjln2lu6do3qph5v56"), - "storagemarket": MustParseCid("bafk2bzaceajbtr32vli5rkpye6uo44ipylcv6n3trtj5ip4jdoavej7ph4id2"), - "storageminer": MustParseCid("bafk2bzaceaesp42foefqz5onml34n46rtbzeng7map2562zmmgbqt3hwya7kq"), - "storagepower": MustParseCid("bafk2bzacec77mx4fhv3e5j4musov4yslbv7hp7hskug4ha2yyhbjq2osi5f5s"), - "system": MustParseCid("bafk2bzacec26t7iwkp5crwgrj2d6eaao3mbn5moosdiygbcfhz2odiaid7byw"), - "verifiedregistry": MustParseCid("bafk2bzacebnmj2pm55mnq67bjhp7pmpranphx64lid36fn3nrykuppngtbjm2"), + "reward": MustParseCid("bafk2bzacedvfnjittwrkhoar6n5xrykowg2e6rpur4poh2m572f7m7evyx4lc"), + "storagemarket": MustParseCid("bafk2bzaceaju5wobednmornvdqcyi6khkvdttkru4dqduqicrdmohlwfddwhg"), + "storageminer": MustParseCid("bafk2bzacea3f43rxzemmakjpktq2ukayngean3oo2de5cdxlg2wsyn53wmepc"), + "storagepower": MustParseCid("bafk2bzacedo6scxizooytn53wjwg2ooiawnj4fsoylcadnp7mhgzluuckjl42"), + "system": MustParseCid("bafk2bzacecak4ow7tmauku42s3u2yydonk4hx6ov6ov542hy7lcbji3nhrrhs"), + "verifiedregistry": MustParseCid("bafk2bzacebvyzjzmvmjvpypphqsumpy6rzxuugnehgum7grc6sv3yqxzrshb4"), }, }, { Network: "testing", @@ -935,25 +935,25 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{ }, { Network: "testing", Version: 14, - BundleGitTag: "v14.0.0-dev.0", - ManifestCid: MustParseCid("bafy2bzaceb6pdf5kmxr54vdc6jtvfhhirghohrassvflzifdwzdx6tpeqr2wu"), + BundleGitTag: "v14.0.0-rc.1", + ManifestCid: MustParseCid("bafy2bzacebgc3zha33w7wggshqjeeomjnxfsqdezpt6e5w4tcqnfp42hvhqyy"), Actors: map[string]cid.Cid{ - "account": MustParseCid("bafk2bzacebdoowyt7gdnzoktwlh62f5ksrjjc2u2wvbga45g6efleenoyimdq"), - "cron": MustParseCid("bafk2bzacecptyreigc6gvhwi44t5o3i4nkvkdeq5f3d7rkimitv5xrdaphuj6"), - "datacap": MustParseCid("bafk2bzacedsj6ibgggwhpexu3kp46s43kjdyvqdqmhlmk6o3bqfzxnygn6yzk"), - "eam": MustParseCid("bafk2bzacedjvtsdck3ciu45hqlkbure5ehxkezssdeahyo3xryv54qccl5fmk"), - "ethaccount": MustParseCid("bafk2bzacedndoafbomp3cqbbqyfze73nxw6smyqo5gbrsird2r7jh3fh4ocqe"), - "evm": MustParseCid("bafk2bzacedlgeigp5cxsovf5qqeexljvpavc7yaudoklatact4su6ppcgmn7q"), - "init": MustParseCid("bafk2bzacedxsbjw4mqph2ey4vzjx5bqbwkjzjbzths7j7zsbuexwywlfg7kho"), - "multisig": MustParseCid("bafk2bzacecr5aktvubaacg2z2zidiwi5zu2wrdi4yvytykakiy4rzjhofqpby"), - "paymentchannel": MustParseCid("bafk2bzacec7s7srq7jaykutjizgfdqggpal77rnzhtdhgusyn6u6zf3l2f3iw"), + "account": MustParseCid("bafk2bzacedz5ko33xyknznoj5mcwnijhggapvn7hzmec3ix3vlqjg6uuwownm"), + "cron": MustParseCid("bafk2bzacebifywvakusxpvnzn33qneqm46g3trnqvuvaw5cgslfg5cl7prtwa"), + "datacap": MustParseCid("bafk2bzacedx4zxq5ae6qbucm6elokqhhmlwbtas7mbqm6rnigwkmorrtfzo66"), + "eam": MustParseCid("bafk2bzaceavilsrvq7kdyqelapjabixsgmhf6caufc4hdyviccmerf3sawzdk"), + "ethaccount": MustParseCid("bafk2bzaceavutdrzkspoiz6a5m46m2qzqbsmdb33s62xnkpevuwjrhxm6trn2"), + "evm": MustParseCid("bafk2bzacedovnz466nuqdp5pzs6sztcqofsy5zet7k2gybnbelpwuxpmfphwo"), + "init": MustParseCid("bafk2bzaceajnftptl2tdbrudshriqcg3caw5mqublmd6i5dm3qug3j5qo7g4q"), + "multisig": MustParseCid("bafk2bzacebagezdbubvu4g3norwxaomzpk3mxyzfal3rsvvppdbt46y6h74yc"), + "paymentchannel": MustParseCid("bafk2bzacebmtufrtdxo757c6c5ndmsk3wlnzzuzqp4yzbtltqjutnlgh7awus"), "placeholder": MustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), - "reward": MustParseCid("bafk2bzacebusgmned2reqfompgfeytknhki4nyzmdepb5rt4npybn5oesnwr6"), - "storagemarket": MustParseCid("bafk2bzacebfgyw3oo45jgc53ehku4qcazdtde2jo6becgk65kj4jpdg4fwuw4"), - "storageminer": MustParseCid("bafk2bzacebhwllgpb7tqnpjmddeascjidpqzwplcgzhfp3dbyuraaotmnhnbs"), - "storagepower": MustParseCid("bafk2bzacebd3oqegrcdzl7zzqtplh65guercjxxqszjleoqnzsqrdmyhaigz4"), - "system": MustParseCid("bafk2bzacebrbxcbfi7mqkeutrhk4b2crv3twmimyum4ims3pknw7vcp2q7ilu"), - "verifiedregistry": MustParseCid("bafk2bzacecyjmeml5xv25mrotfqugds2f2rsex3js3pfdwocoetkncxs2mkt2"), + "reward": MustParseCid("bafk2bzacebtnflocubjjrtvzba4tmrn32tlx2klfgmjreqeo234lqdzu4ovna"), + "storagemarket": MustParseCid("bafk2bzacec6tovj5vh6lyor3m67uhahhldrixnqg7e5246pce5gcwkqwmbvxo"), + "storageminer": MustParseCid("bafk2bzacedcwqwswnkbb22eoajke4t72qvxrp3rpqaotymbqsnlqkz5ovde6m"), + "storagepower": MustParseCid("bafk2bzacea4c3h6gnhgfcjf6lxhzcmp5qq7kgrcym7wv4vcnmd4whegpjdwuq"), + "system": MustParseCid("bafk2bzacechwe3ehay6h7x7tecaajgsxrvvmzcdul6omejfvzf4mpbzkuryhm"), + "verifiedregistry": MustParseCid("bafk2bzacec66mmy7sj6qy5urqplwhbem7wbjrzna7mxh6qbdljdawhu3g5rao"), }, }, { Network: "testing-fake-proofs", @@ -1087,24 +1087,24 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{ }, { Network: "testing-fake-proofs", Version: 14, - BundleGitTag: "v14.0.0-dev.0", - ManifestCid: MustParseCid("bafy2bzaceatqhifad25xgompl2lokqvh53cmqvqdg6bprcywf3w7dwprrq4mc"), + BundleGitTag: "v14.0.0-rc.1", + ManifestCid: MustParseCid("bafy2bzacebca2c7r6m47fv5ojbzfgqxw74zxyzphlkxigj75q7vobbe6vm4x4"), Actors: map[string]cid.Cid{ - "account": MustParseCid("bafk2bzacebdoowyt7gdnzoktwlh62f5ksrjjc2u2wvbga45g6efleenoyimdq"), - "cron": MustParseCid("bafk2bzacecptyreigc6gvhwi44t5o3i4nkvkdeq5f3d7rkimitv5xrdaphuj6"), - "datacap": MustParseCid("bafk2bzacedsj6ibgggwhpexu3kp46s43kjdyvqdqmhlmk6o3bqfzxnygn6yzk"), - "eam": MustParseCid("bafk2bzacedjvtsdck3ciu45hqlkbure5ehxkezssdeahyo3xryv54qccl5fmk"), - "ethaccount": MustParseCid("bafk2bzacedndoafbomp3cqbbqyfze73nxw6smyqo5gbrsird2r7jh3fh4ocqe"), - "evm": MustParseCid("bafk2bzacedlgeigp5cxsovf5qqeexljvpavc7yaudoklatact4su6ppcgmn7q"), - "init": MustParseCid("bafk2bzacedxsbjw4mqph2ey4vzjx5bqbwkjzjbzths7j7zsbuexwywlfg7kho"), - "multisig": MustParseCid("bafk2bzacecals4thqi2aua5mh6saq5lqjozxusrwrn7zq5yeu63ofs2av7ulw"), - "paymentchannel": MustParseCid("bafk2bzacec7s7srq7jaykutjizgfdqggpal77rnzhtdhgusyn6u6zf3l2f3iw"), + "account": MustParseCid("bafk2bzacedz5ko33xyknznoj5mcwnijhggapvn7hzmec3ix3vlqjg6uuwownm"), + "cron": MustParseCid("bafk2bzacebifywvakusxpvnzn33qneqm46g3trnqvuvaw5cgslfg5cl7prtwa"), + "datacap": MustParseCid("bafk2bzacedx4zxq5ae6qbucm6elokqhhmlwbtas7mbqm6rnigwkmorrtfzo66"), + "eam": MustParseCid("bafk2bzaceavilsrvq7kdyqelapjabixsgmhf6caufc4hdyviccmerf3sawzdk"), + "ethaccount": MustParseCid("bafk2bzaceavutdrzkspoiz6a5m46m2qzqbsmdb33s62xnkpevuwjrhxm6trn2"), + "evm": MustParseCid("bafk2bzacedovnz466nuqdp5pzs6sztcqofsy5zet7k2gybnbelpwuxpmfphwo"), + "init": MustParseCid("bafk2bzaceajnftptl2tdbrudshriqcg3caw5mqublmd6i5dm3qug3j5qo7g4q"), + "multisig": MustParseCid("bafk2bzacecaioywepaxgtrpkmr7k2bjlwcpj6mu3r7ctk77a3sqwrb72wn4ra"), + "paymentchannel": MustParseCid("bafk2bzacebmtufrtdxo757c6c5ndmsk3wlnzzuzqp4yzbtltqjutnlgh7awus"), "placeholder": MustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), - "reward": MustParseCid("bafk2bzacebusgmned2reqfompgfeytknhki4nyzmdepb5rt4npybn5oesnwr6"), - "storagemarket": MustParseCid("bafk2bzacebfgyw3oo45jgc53ehku4qcazdtde2jo6becgk65kj4jpdg4fwuw4"), - "storageminer": MustParseCid("bafk2bzacebvfbdfgin7yjrqcyfuss6yxssh3u4df4ulandmawkmxdryp5d5de"), - "storagepower": MustParseCid("bafk2bzacebd3oqegrcdzl7zzqtplh65guercjxxqszjleoqnzsqrdmyhaigz4"), - "system": MustParseCid("bafk2bzacebrbxcbfi7mqkeutrhk4b2crv3twmimyum4ims3pknw7vcp2q7ilu"), - "verifiedregistry": MustParseCid("bafk2bzacecyjmeml5xv25mrotfqugds2f2rsex3js3pfdwocoetkncxs2mkt2"), + "reward": MustParseCid("bafk2bzacebtnflocubjjrtvzba4tmrn32tlx2klfgmjreqeo234lqdzu4ovna"), + "storagemarket": MustParseCid("bafk2bzacec6tovj5vh6lyor3m67uhahhldrixnqg7e5246pce5gcwkqwmbvxo"), + "storageminer": MustParseCid("bafk2bzacecgckzurejgtbw2xfmys5talfq5sloia2mrjcdsl5xolbwkolkrss"), + "storagepower": MustParseCid("bafk2bzacea4c3h6gnhgfcjf6lxhzcmp5qq7kgrcym7wv4vcnmd4whegpjdwuq"), + "system": MustParseCid("bafk2bzacechwe3ehay6h7x7tecaajgsxrvvmzcdul6omejfvzf4mpbzkuryhm"), + "verifiedregistry": MustParseCid("bafk2bzacec66mmy7sj6qy5urqplwhbem7wbjrzna7mxh6qbdljdawhu3g5rao"), }, }} diff --git a/itests/kit/node_unmanaged.go b/itests/kit/node_unmanaged.go index 2cab930713d..53ccb342bea 100644 --- a/itests/kit/node_unmanaged.go +++ b/itests/kit/node_unmanaged.go @@ -455,7 +455,7 @@ func (tm *TestUnmanagedMiner) SubmitProveCommit( tm.t.Log("Submitting ProveCommitSector ...") var provingDeadline uint64 = 7 - if tm.IsUmmutableDeadline(ctx, provingDeadline) { + if tm.IsImmutableDeadline(ctx, provingDeadline) { // avoid immutable deadlines provingDeadline = 5 } @@ -1144,7 +1144,7 @@ func (tm *TestUnmanagedMiner) AssertDisputeFails(ctx context.Context, sector abi require.Contains(tm.t, err.Error(), "(RetCode=16)") } -func (tm *TestUnmanagedMiner) IsUmmutableDeadline(ctx context.Context, deadlineIndex uint64) bool { +func (tm *TestUnmanagedMiner) IsImmutableDeadline(ctx context.Context, deadlineIndex uint64) bool { di, err := tm.FullNode.StateMinerProvingDeadline(ctx, tm.ActorAddr, types.EmptyTSK) require.NoError(tm.t, err) // don't rely on di.Index because if we haven't enrolled in cron it won't be ticking diff --git a/itests/kit/run.go b/itests/kit/run.go index 713efa3b831..6903258cb70 100644 --- a/itests/kit/run.go +++ b/itests/kit/run.go @@ -9,6 +9,12 @@ import ( // and set to value "1" to enable running expensive tests outside of CI. const EnvRunExpensiveTests = "LOTUS_RUN_EXPENSIVE_TESTS" +// EnvRunVeryExpensiveTests is the environment variable that needs to be present +// and set to value "1" to enable running very expensive tests outside of CI. +// A "very expensive" test is one that is expected to take too long to run in +// a standard CI setup, and should be skipped unless explicitly enabled. +const EnvRunVeryExpensiveTests = "LOTUS_RUN_VERY_EXPENSIVE_TESTS" + // Expensive marks a test as expensive, skipping it immediately if not running an func Expensive(t *testing.T) { switch { @@ -18,3 +24,10 @@ func Expensive(t *testing.T) { t.Skipf("skipping expensive test outside of CI; enable by setting env var %s=1", EnvRunExpensiveTests) } } + +// Expensive marks a test as expensive, skipping it immediately if not running an +func VeryExpensive(t *testing.T) { + if os.Getenv(EnvRunVeryExpensiveTests) != "1" { + t.Skipf("skipping VERY expensive test outside of CI; enable by setting env var %s=1", EnvRunVeryExpensiveTests) + } +} diff --git a/itests/niporep_manual_test.go b/itests/niporep_manual_test.go new file mode 100644 index 00000000000..76ea1f9696b --- /dev/null +++ b/itests/niporep_manual_test.go @@ -0,0 +1,260 @@ +package itests + +import ( + "context" + "fmt" + "math" + "testing" + "time" + + "github.com/ipfs/go-cid" + "github.com/ipld/go-ipld-prime" + "github.com/ipld/go-ipld-prime/codec/dagcbor" + "github.com/ipld/go-ipld-prime/datamodel" + cidlink "github.com/ipld/go-ipld-prime/linking/cid" + "github.com/ipld/go-ipld-prime/node/basicnode" + "github.com/multiformats/go-multicodec" + "github.com/stretchr/testify/require" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/builtin" + miner14 "github.com/filecoin-project/go-state-types/builtin/v14/miner" + "github.com/filecoin-project/go-state-types/network" + + "github.com/filecoin-project/lotus/build" + "github.com/filecoin-project/lotus/chain/actors/builtin/miner" + "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/lotus/itests/kit" + "github.com/filecoin-project/lotus/lib/must" +) + +func TestManualNISectorOnboarding(t *testing.T) { + req := require.New(t) + + const defaultSectorSize = abi.SectorSize(2 << 10) // 2KiB + sealProofType, err := miner.SealProofTypeFromSectorSize(defaultSectorSize, network.Version23, miner.SealProofVariant_NonInteractive) + req.NoError(err) + + for _, withMockProofs := range []bool{true, false} { + testName := "WithRealProofs" + if withMockProofs { + testName = "WithMockProofs" + } + t.Run(testName, func(t *testing.T) { + if !withMockProofs { + kit.VeryExpensive(t) + } + kit.QuietMiningLogs() + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + var ( + // need to pick a balance value so that the test is not racy on CI by running through it's WindowPostDeadlines too fast + blocktime = 2 * time.Millisecond + client kit.TestFullNode + minerA kit.TestMiner // A is a standard genesis miner + ) + + // Setup and begin mining with a single miner (A) + // Miner A will only be a genesis Miner with power allocated in the genesis block and will not onboard any sectors from here on + ens := kit.NewEnsemble(t, kit.MockProofs(withMockProofs)). + FullNode(&client, kit.SectorSize(defaultSectorSize)). + // preseal more than the default number of sectors to ensure that the genesis miner has power + // because our unmanaged miners won't produce blocks so we may get null rounds + Miner(&minerA, &client, kit.PresealSectors(5), kit.SectorSize(defaultSectorSize), kit.WithAllSubsystems()). + Start(). + InterconnectAll() + blockMiners := ens.BeginMiningMustPost(blocktime) + req.Len(blockMiners, 1) + blockMiner := blockMiners[0] + + // Instantiate MinerB to manually handle sector onboarding and power acquisition through sector activation. + // Unlike other miners managed by the Lotus Miner storage infrastructure, MinerB operates independently, + // performing all related tasks manually. Managed by the TestKit, MinerB has the capability to utilize actual proofs + // for the processes of sector onboarding and activation. + nodeOpts := []kit.NodeOpt{kit.SectorSize(defaultSectorSize), kit.OwnerAddr(client.DefaultKey)} + minerB, ens := ens.UnmanagedMiner(&client, nodeOpts...) + + ens.Start() + + build.Clock.Sleep(time.Second) + + t.Log("Checking initial power ...") + + // Miner A should have power as it has already onboarded sectors in the genesis block + head, err := client.ChainHead(ctx) + req.NoError(err) + p, err := client.StateMinerPower(ctx, minerA.ActorAddr, head.Key()) + req.NoError(err) + t.Logf("MinerA RBP: %v, QaP: %v", p.MinerPower.QualityAdjPower.String(), p.MinerPower.RawBytePower.String()) + + // Miner B should have no power as it has yet to onboard and activate any sectors + minerB.AssertNoPower(ctx) + + // Verify that ProveCommitSectorsNI rejects messages with invalid parameters + verifyProveCommitSectorsNIErrorConditions(ctx, t, minerB, sealProofType) + + // ---- Miner B onboards a CC sector + var bSectorNum abi.SectorNumber + var bRespCh chan kit.WindowPostResp + var bWdPostCancelF context.CancelFunc + + // Onboard a CC sector with Miner B using NI-PoRep + bSectorNum, bRespCh, bWdPostCancelF = minerB.OnboardCCSector(ctx, sealProofType) + // Miner B should still not have power as power can only be gained after sector is activated i.e. the first WindowPost is submitted for it + minerB.AssertNoPower(ctx) + + // Check that the sector-activated event was emitted + { + expectedEntries := []types.EventEntry{ + {Flags: 0x03, Codec: uint64(multicodec.Cbor), Key: "$type", Value: must.One(ipld.Encode(basicnode.NewString("sector-activated"), dagcbor.Encode))}, + {Flags: 0x03, Codec: uint64(multicodec.Cbor), Key: "sector", Value: must.One(ipld.Encode(basicnode.NewInt(int64(bSectorNum)), dagcbor.Encode))}, + {Flags: 0x03, Codec: uint64(multicodec.Cbor), Key: "unsealed-cid", Value: must.One(ipld.Encode(datamodel.Null, dagcbor.Encode))}, + } + from := head.Height() + recentEvents, err := client.FullNode.GetActorEventsRaw(ctx, &types.ActorEventFilter{FromHeight: &from}) + req.NoError(err) + req.Len(recentEvents, 1) + req.Equal(expectedEntries, recentEvents[0].Entries) + } + + // Ensure that the block miner checks for and waits for posts during the appropriate proving window from our new miner with a sector + blockMiner.WatchMinerForPost(minerB.ActorAddr) + + // Wait till both miners' sectors have had their first post and are activated and check that this is reflected in miner power + minerB.WaitTillActivatedAndAssertPower(ctx, bRespCh, bSectorNum) + + head, err = client.ChainHead(ctx) + req.NoError(err) + + // Miner B has activated the CC sector -> upgrade it with snapdeals + snapPieces := minerB.SnapDeal(ctx, kit.TestSpt, bSectorNum) + // cancel the WdPost for the CC sector as the corresponding CommR is no longer valid + bWdPostCancelF() + + // Check "sector-updated" event happned after snap + { + expectedEntries := []types.EventEntry{ + {Flags: 0x03, Codec: uint64(multicodec.Cbor), Key: "$type", Value: must.One(ipld.Encode(basicnode.NewString("sector-updated"), dagcbor.Encode))}, + {Flags: 0x03, Codec: uint64(multicodec.Cbor), Key: "sector", Value: must.One(ipld.Encode(basicnode.NewInt(int64(bSectorNum)), dagcbor.Encode))}, + {Flags: 0x03, Codec: uint64(multicodec.Cbor), Key: "unsealed-cid", Value: must.One(ipld.Encode(basicnode.NewLink(cidlink.Link{Cid: snapPieces[0].PieceCID}), dagcbor.Encode))}, + {Flags: 0x03, Codec: uint64(multicodec.Cbor), Key: "piece-cid", Value: must.One(ipld.Encode(basicnode.NewLink(cidlink.Link{Cid: snapPieces[0].PieceCID}), dagcbor.Encode))}, + {Flags: 0x01, Codec: uint64(multicodec.Cbor), Key: "piece-size", Value: must.One(ipld.Encode(basicnode.NewInt(int64(snapPieces[0].Size)), dagcbor.Encode))}, + } + from := head.Height() + recentEvents, err := client.FullNode.GetActorEventsRaw(ctx, &types.ActorEventFilter{FromHeight: &from}) + req.NoError(err) + req.Len(recentEvents, 1) + req.Equal(expectedEntries, recentEvents[0].Entries) + } + }) + } +} + +func verifyProveCommitSectorsNIErrorConditions(ctx context.Context, t *testing.T, miner *kit.TestUnmanagedMiner, sealProofType abi.RegisteredSealProof) { + req := require.New(t) + + head, err := miner.FullNode.ChainHead(ctx) + req.NoError(err) + + actorIdNum, err := address.IDFromAddress(miner.ActorAddr) + req.NoError(err) + actorId := abi.ActorID(actorIdNum) + + var provingDeadline uint64 = 7 + if miner.IsImmutableDeadline(ctx, provingDeadline) { + // avoid immutable deadlines + provingDeadline = 5 + } + + submitAndFail := func(params *miner14.ProveCommitSectorsNIParams, errMsg string, errCode int) { + t.Helper() + r, err := miner.SubmitMessage(ctx, params, 1, builtin.MethodsMiner.ProveCommitSectorsNI) + req.Error(err) + req.Contains(err.Error(), errMsg) + if errCode > 0 { + req.Contains(err.Error(), fmt.Sprintf("(RetCode=%d)", errCode)) + } + req.Nil(r) + } + + sn := abi.SectorNumber(5000) + mkSai := func() miner14.SectorNIActivationInfo { + sn++ + return miner14.SectorNIActivationInfo{ + SealingNumber: sn, + SealerID: actorId, + SealedCID: cid.MustParse("bagboea4b5abcatlxechwbp7kjpjguna6r6q7ejrhe6mdp3lf34pmswn27pkkiekz"), + SectorNumber: sn, + SealRandEpoch: head.Height() - 10, + Expiration: 2880 * 300, + } + } + mkParams := func() miner14.ProveCommitSectorsNIParams { + return miner14.ProveCommitSectorsNIParams{ + Sectors: []miner14.SectorNIActivationInfo{mkSai(), mkSai()}, + AggregateProof: []byte{0xca, 0xfe, 0xbe, 0xef}, + SealProofType: sealProofType, + AggregateProofType: abi.RegisteredAggregationProof_SnarkPackV2, + ProvingDeadline: provingDeadline, + RequireActivationSuccess: true, + } + } + + // Test message rejection on no sectors + params := mkParams() + params.Sectors = []miner14.SectorNIActivationInfo{} + submitAndFail(¶ms, "too few sectors", 16) + + // Test message rejection on too many sectors + sectorInfos := make([]miner14.SectorNIActivationInfo, 66) + for i := range sectorInfos { + sectorInfos[i] = mkSai() + } + params = mkParams() + params.Sectors = sectorInfos + submitAndFail(¶ms, "too many sectors", 16) + + // Test bad aggregation proof type + params = mkParams() + params.AggregateProofType = abi.RegisteredAggregationProof_SnarkPackV1 + submitAndFail(¶ms, "aggregate proof type", 16) + + // Test bad SealerID + params = mkParams() + params.Sectors[1].SealerID = 1234 + submitAndFail(¶ms, "invalid NI commit 1 while requiring activation success", 16) + + // Test bad SealingNumber + params = mkParams() + params.Sectors[1].SealingNumber = 1234 + submitAndFail(¶ms, "invalid NI commit 1 while requiring activation success", 16) + + // Test bad SealedCID + params = mkParams() + params.Sectors[1].SealedCID = cid.MustParse("baga6ea4seaqjtovkwk4myyzj56eztkh5pzsk5upksan6f5outesy62bsvl4dsha") + submitAndFail(¶ms, "invalid NI commit 1 while requiring activation success", 16) + + // Test bad SealRandEpoch + head, err = miner.FullNode.ChainHead(ctx) + req.NoError(err) + params = mkParams() + params.Sectors[1].SealRandEpoch = head.Height() + builtin.EpochsInDay + submitAndFail(¶ms, fmt.Sprintf("seal challenge epoch %d must be before now", params.Sectors[1].SealRandEpoch), 16) + params.Sectors[1].SealRandEpoch = head.Height() - 190*builtin.EpochsInDay + submitAndFail(¶ms, "invalid NI commit 1 while requiring activation success", 16) + + // Immutable/bad deadlines + di, err := miner.FullNode.StateMinerProvingDeadline(ctx, miner.ActorAddr, head.Key()) + req.NoError(err) + currentDeadlineIdx := uint64(math.Abs(float64((di.CurrentEpoch - di.PeriodStart) / di.WPoStChallengeWindow))) + req.Less(currentDeadlineIdx, di.WPoStPeriodDeadlines) + params = mkParams() + params.ProvingDeadline = currentDeadlineIdx + submitAndFail(¶ms, fmt.Sprintf("proving deadline %d must not be the current or next deadline", currentDeadlineIdx), 18) + params.ProvingDeadline = currentDeadlineIdx + 1 + submitAndFail(¶ms, fmt.Sprintf("proving deadline %d must not be the current or next deadline", currentDeadlineIdx+1), 18) + params.ProvingDeadline = di.WPoStPeriodDeadlines // too big + submitAndFail(¶ms, fmt.Sprintf("proving deadline index %d invalid", di.WPoStPeriodDeadlines), 16) +}