diff --git a/build/actors/v14.tar.zst b/build/actors/v14.tar.zst index 19b023f1c84..7d08c7a9d0c 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 8107e1d5405..b9a01994835 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: "v13.0.0", - ManifestCid: MustParseCid("bafy2bzacec75zk7ufzwx6tg5avls5fxdjx5asaqmd2bfqdvkqrkzoxgyflosu"), + BundleGitTag: "v14.0.0-dev.0", + ManifestCid: MustParseCid("bafy2bzacecxc54wswbcnq4otm25vq63gzaj2wso7dqezkekj4uepakqn7k7w4"), Actors: map[string]cid.Cid{ - "account": MustParseCid("bafk2bzacedl533kwbzouqxibejpwp6syfdekvmzy4vmmno6j4iaydbdmv4xek"), - "cron": MustParseCid("bafk2bzacecimv5xnuwyoqgxk26qt4xqpgntleret475pnh35s3vvhqtdct4ow"), - "datacap": MustParseCid("bafk2bzacebpdd4ctavhs7wkcykfahpifct3p4hbptgtf4jfrqcp2trtlygvow"), - "eam": MustParseCid("bafk2bzaceahw5rrgj7prgbnmn237di7ymjz2ssea32wr525jydpfrwpuhs67m"), - "ethaccount": MustParseCid("bafk2bzacebrslcbew5mq3le2zsn36xqxd4gt5hryeoslxnuqwgw3rhuwh6ygu"), - "evm": MustParseCid("bafk2bzaced5smz4lhpem4mbr7igcskv3e5qopbdp7dqshww2qs4ahacgzjzo4"), - "init": MustParseCid("bafk2bzacedgj6hawhdw2ot2ufisci374o2bq6bfkvlvdt6q7s3uoe5ffyv43k"), - "multisig": MustParseCid("bafk2bzacectnnnpwyqiccaymy3h6ghu74ghjrqyhtqv5odfd4opivzebjj6to"), - "paymentchannel": MustParseCid("bafk2bzaceckhx44jawhzhkz6k23gfnv2gcutgb4j4ekhonj2plwaent4b2tpk"), + "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"), "placeholder": MustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), - "reward": MustParseCid("bafk2bzacebbs3rlg7y3wbvxrj4wgbsqmasw4ksbbr3lyqbkaxj2t25qz6zzuy"), - "storagemarket": MustParseCid("bafk2bzaced3zmxsmlhp2nsiwkxcp2ugonbsebcd53t7htzo2jcoidvu464xmm"), - "storageminer": MustParseCid("bafk2bzacebedx7iaa2ruspxvghkg46ez7un5b7oiijjtnvddq2aot5wk7p7ry"), - "storagepower": MustParseCid("bafk2bzacebvne7m2l3hxxw4xa6oujol75x35yqpnlqiwx74jilyrop4cs7cse"), - "system": MustParseCid("bafk2bzaceacjmlxrvydlud77ilpzbscez46yedx6zjsj6olxsdeuv6d4x4cwe"), - "verifiedregistry": MustParseCid("bafk2bzacebs5muoq7ft2wgqojhjio7a4vltbyprqkmlr43ojlzbil4nwvj3jg"), + "reward": MustParseCid("bafk2bzaceckzhr65hlwpu7s7aybdsgu7hj3rc5iw3z6fuhnbye4fbmxunrbce"), + "storagemarket": MustParseCid("bafk2bzacecjuxvkejcbctlrgzik4gu2nwhemdg4hknhvo6zbvdyswjyt4p3co"), + "storageminer": MustParseCid("bafk2bzacedzqdtpcruryb6wlszumjxvqg433ny7jahomqaxfe64ermt4xjauq"), + "storagepower": MustParseCid("bafk2bzacebi44itgbn7ewtuk6lvhyltfk5feu2cvqm4sqa5wt6ejwmn7oec4m"), + "system": MustParseCid("bafk2bzacec2jtz4whdvgoqhn4vcfsycydjsyy3m243rfeczrm65jwpnmhd262"), + "verifiedregistry": MustParseCid("bafk2bzacedvr7gyx6umad2u35kly4d7ucwakga3h74pqus24mayatvg6ybo26"), }, }, { Network: "calibrationnet", @@ -295,25 +295,25 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{ }, { Network: "calibrationnet", Version: 14, - BundleGitTag: "v13.0.0", - ManifestCid: MustParseCid("bafy2bzacect4ktyujrwp6mjlsitnpvuw2pbuppz6w52sfljyo4agjevzm75qs"), + BundleGitTag: "v14.0.0-dev.0", + ManifestCid: MustParseCid("bafy2bzacediq4lylrthnpwshy33nsmixsc64ibw24j765aqtolnn4omys4wvi"), Actors: map[string]cid.Cid{ - "account": MustParseCid("bafk2bzaceb3j36ri5y5mfklgp5emlvrms6g4733ss2j3l7jismrxq6ng3tcc6"), - "cron": MustParseCid("bafk2bzaceaz6rocamdxehgpwcbku6wlapwpgzyyvkrploj66mlqptsulf52bs"), - "datacap": MustParseCid("bafk2bzacea22nv5g3yngpxvonqfj4r2nkfk64y6yw2malicm7odk77x7zuads"), - "eam": MustParseCid("bafk2bzaceatqtjzj7623i426noaslouvluhz6e3md3vvquqzku5qj3532uaxg"), - "ethaccount": MustParseCid("bafk2bzacean3hs7ga5csw6g3uu7watxfnqv5uvxviebn3ba6vg4sagwdur5pu"), - "evm": MustParseCid("bafk2bzacec5ibmbtzuzjgwjmksm2n6zfq3gkicxqywwu7tsscqgdzajpfctxk"), - "init": MustParseCid("bafk2bzaced5sq72oemz6qwi6yssxwlos2g54zfprslrx5qfhhx2vlgsbvdpcs"), - "multisig": MustParseCid("bafk2bzacedbgei6jkx36fwdgvoohce4aghvpohqdhoco7p4thszgssms7olv2"), - "paymentchannel": MustParseCid("bafk2bzaceasmgmfsi4mjanxlowsub65fmevhzky4toeqbtw4kp6tmu4kxjpgq"), + "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"), "placeholder": MustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), - "reward": MustParseCid("bafk2bzacedjyp6ll5ez27dfgldjj4tntxfvyp4pa5zkk7s5uhipzqjyx2gmuc"), - "storagemarket": MustParseCid("bafk2bzaceabolct6qdnefwcrtati2us3sxtxfghyqk6aamfhl6byyefmtssqi"), - "storageminer": MustParseCid("bafk2bzaceckzw3v7wqliyggvjvihz4wywchnnsie4frfvkm3fm5znb64mofri"), - "storagepower": MustParseCid("bafk2bzacea7t4wynzjajl442mpdqbnh3wusjusqtnzgpvefvweh4n2tgzgqhu"), - "system": MustParseCid("bafk2bzacedjnrb5glewazsxpcx6rwiuhl4kwrfcqolyprn6rrjtlzmthlhdq6"), - "verifiedregistry": MustParseCid("bafk2bzacebj2zdquagzy2xxn7up574oemg3w7ed3fe4aujkyhgdwj57voesn2"), + "reward": MustParseCid("bafk2bzacecy6zubpzawju7yr62ayy3fku6abt7vszkrvtil2pedaz6dbf5k3w"), + "storagemarket": MustParseCid("bafk2bzaceboxhtn2ugsl2ix7etkxqimvx76gmq6yez4vudmn5z3nmg2yaf23c"), + "storageminer": MustParseCid("bafk2bzaced67qu6iriktldwz4qzk32noo5dsgitbxahxhhaursejaj2645nbe"), + "storagepower": MustParseCid("bafk2bzacedbf3o6sfnl53uv5quih5qsfxcyutfkoc2jefce6axmw7pr5awmv4"), + "system": MustParseCid("bafk2bzacecwqfonrbl57oy274n2v5zh2uyemu3i3tvf724e73vcvxof3xdhv6"), + "verifiedregistry": MustParseCid("bafk2bzacebymu6kx2wot5h7ij7cwp5gyhoby6eddfope66iijj42e2tfckz2o"), }, }, { Network: "caterpillarnet", @@ -456,25 +456,25 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{ }, { Network: "caterpillarnet", Version: 14, - BundleGitTag: "v13.0.0", - ManifestCid: MustParseCid("bafy2bzacedu7kk2zngxp7y3lynhtaht6vgadgn5jzkxe5nuowtwzasnogx63w"), + BundleGitTag: "v14.0.0-dev.0", + ManifestCid: MustParseCid("bafy2bzacecqr6zzok3sujw76ijmiy36s25o7x2oabkxh2pbaqnzwyghme3kca"), Actors: map[string]cid.Cid{ - "account": MustParseCid("bafk2bzacecro3uo6ypqhfzwdhnamzcole5qmhrbkx7qny6t2qsrcpqxelt6s2"), - "cron": MustParseCid("bafk2bzaceam3kci46y4siltbw7f4itoap34kp7b7pvn2fco5s2bvnotomwdbe"), - "datacap": MustParseCid("bafk2bzacecmtdspcbqmmjtsaz4vucuqoqjqfsgxjonns7tom7eblkngbcm7bw"), - "eam": MustParseCid("bafk2bzaceaudqhrt7djewopqdnryvwxagfufyt7ja4gdvovrxbh6edh6evgrw"), - "ethaccount": MustParseCid("bafk2bzaced676ds3z6xe333wr7frwq3f2iq5kjwp4okl3te6rne3xf7kuqrwm"), - "evm": MustParseCid("bafk2bzacebeih4jt2s6mel6x4hje7xmnugh6twul2a5axx4iczu7fu4wcdi6k"), - "init": MustParseCid("bafk2bzaceba7vvuzzwj5wqnq2bvpbgtxup53mhr3qybezbllftnxvpqbfymxo"), - "multisig": MustParseCid("bafk2bzaceapkajhnqoczrgry5javqbl7uebgmsbpqqfemzc4yb5q2dqia2qog"), - "paymentchannel": MustParseCid("bafk2bzacebg7xq4ca22gafmdbkcq357x7v6slflib4h3fnj4amsovg6ulqg3o"), + "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"), "placeholder": MustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), - "reward": MustParseCid("bafk2bzaceajt4idf26ffnyipybcib55fykjxnek7oszkqzi7lu7mbgijmkgos"), - "storagemarket": MustParseCid("bafk2bzaceadfmay7pyl7osjsdmrireafasnjnoziacljy5ewrcsxpp56kzqbw"), - "storageminer": MustParseCid("bafk2bzaceardbn5a7aq5jxl7efr4btmsbl7txnxm4hrrd3llyhujuc2cr5vcs"), - "storagepower": MustParseCid("bafk2bzacear4563jznjqyseoy42xl6kenyqk6umv6xl3bp5bsjb3hbs6sp6bm"), - "system": MustParseCid("bafk2bzacecc5oavxivfnvirx2g7megpdf6lugooyoc2wijloju247xzjcdezy"), - "verifiedregistry": MustParseCid("bafk2bzacebnkdt42mpf5emypo6iroux3hszfh5yt54v2mmnnura3ketholly4"), + "reward": MustParseCid("bafk2bzacebkmk4f6dbcpvj4gier3xotxdqtxuk7rcnsmtakyfi2uohym7gsnu"), + "storagemarket": MustParseCid("bafk2bzacebpngynvtjx7qkbktums77errresd6vscjrp6foln2wc5uyyx2oio"), + "storageminer": MustParseCid("bafk2bzacedtrglopo5ttxrdbvjywzwirn62x53jfytwwcm3hgpebtcfqh3o5g"), + "storagepower": MustParseCid("bafk2bzacebwia7rbduem2hsitpj3q2g2mnbhgv34jqz76niyaexzpw2nzmxb6"), + "system": MustParseCid("bafk2bzacebzml3qklvtpcygwvz6qos6kueyf37trhww2np42harae3dhn75dm"), + "verifiedregistry": MustParseCid("bafk2bzacecnjpnq63wobtoomhnerck4mp7h6hz4qrvb5vuk5miopbsoonpp4k"), }, }, { Network: "devnet", @@ -608,25 +608,25 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{ }, { Network: "devnet", Version: 14, - BundleGitTag: "v13.0.0", - ManifestCid: MustParseCid("bafy2bzacecn7uxgehrqbcs462ktl2h23u23cmduy2etqj6xrd6tkkja56fna4"), + BundleGitTag: "v14.0.0-dev.0", + ManifestCid: MustParseCid("bafy2bzacea3goruyes5p6k5d6ymn2i3opgsdhe3oupo2ocwwa7kjg5jzsmu5m"), Actors: map[string]cid.Cid{ - "account": MustParseCid("bafk2bzacebev3fu5geeehpx577b3kvza4xsmmggmepjj7rlsnr27hpoq27q2i"), - "cron": MustParseCid("bafk2bzacedalzqahtuz2bmnf7uawbcujfhhe5xzv5ys5ufadu6ggs3tcu6lsy"), - "datacap": MustParseCid("bafk2bzaceb7ou2vn7ac4xidespoowq2q5w7ognr7s4ujy3xzzgiishajpe7le"), - "eam": MustParseCid("bafk2bzacedqic2qskattorj4svf6mbto2k76ej3ll3ugsyorqramrg7rpq3by"), - "ethaccount": MustParseCid("bafk2bzaceaoad7iknpywijigv2h3jyvkijff2oxvohzue533v5hby3iix5vdu"), - "evm": MustParseCid("bafk2bzacecjgiw26gagsn6a7tffkrgoor4zfgzfokp76u6cwervtmvjbopmwg"), - "init": MustParseCid("bafk2bzaced2obubqojxggeddr246cpwtyzi6knnq52jsvsc2fs3tuk2kh6dtg"), - "multisig": MustParseCid("bafk2bzacebquruzb6zho45orbdkku624t6w6jt4tudaqzraz4yh3li3jfstpg"), - "paymentchannel": MustParseCid("bafk2bzaceaydrilyxvflsuzr24hmw32qwz6sy4hgls73bhpveydcsqskdgpca"), + "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"), "placeholder": MustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), - "reward": MustParseCid("bafk2bzaceb74owpuzdddqoj2tson6ymbyuguqrnqefyiaxqvwm4ygitpabjrq"), - "storagemarket": MustParseCid("bafk2bzaceaw6dslv6pfqha4ynghq2imij5khnnjrie22kmfgtpie3bvxho6jq"), - "storageminer": MustParseCid("bafk2bzacecsputz6xygjfyrvx2d7bxkpp7b5v4icrmpckec7gnbabx2w377qs"), - "storagepower": MustParseCid("bafk2bzaceceyaa5yjwhxvvcqouob4l746zp5nesivr6enhtpimakdtby6kafi"), - "system": MustParseCid("bafk2bzaceaxg6k5vuozxlemfi5hv663m6jcawzu5puboo4znj73i36e3tsovs"), - "verifiedregistry": MustParseCid("bafk2bzacea2czkb4vt2iiiwdb6e57qfwqse4mk2pcyvwjmdl5ojbnla57oh2u"), + "reward": MustParseCid("bafk2bzacedxllnyrcy4mjq5itqknybhmohbvhjh45pig6yttxchg2v7ra662u"), + "storagemarket": MustParseCid("bafk2bzacecpte42dwwtsh7kcwllnfycqtl223logvt672nfzhgezhetwuw4cy"), + "storageminer": MustParseCid("bafk2bzacec43whuqv2uiotnz42fs7weom4yzfnrsmjkq3ntvtnurjbkvdhsfm"), + "storagepower": MustParseCid("bafk2bzacebn3du6fx7p5hnaia5wmgrpmh7fqxlm3s2v6vwm2b4ntdenzvk2zc"), + "system": MustParseCid("bafk2bzacedwtfvlnagutf5t4smbzd7gqquz4nyydsnbkmdmrza3hur2kukw3a"), + "verifiedregistry": MustParseCid("bafk2bzaceaexkmkl2hv572izcbqlirefya5afq36bj6gmee3bkybzkxkpvhcs"), }, }, { Network: "hyperspace", @@ -783,25 +783,25 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{ }, { Network: "mainnet", Version: 14, - BundleGitTag: "v13.0.0", - ManifestCid: MustParseCid("bafy2bzacecdhvfmtirtojwhw2tyciu4jkbpsbk5g53oe24br27oy62sn4dc4e"), + BundleGitTag: "v14.0.0-dev.0", + ManifestCid: MustParseCid("bafy2bzaceaamqu2y23htfrwqttlzbalzzxpon724evlf7zjwtopuky27fl6vg"), Actors: map[string]cid.Cid{ - "account": MustParseCid("bafk2bzacedxnbtlsqdk76fsfmnhyvsblwyfducerwwtp3mqtx2wbrvs5idl52"), - "cron": MustParseCid("bafk2bzacebbopddyn5csb3fsuhh2an4ttd23x6qnwixgohlirj5ahtcudphyc"), - "datacap": MustParseCid("bafk2bzaceah42tfnhd7xnztawgf46gbvc3m2gudoxshlba2ucmmo2vy67t7ci"), - "eam": MustParseCid("bafk2bzaceb23bhvvcjsth7cn7vp3gbaphrutsaz7v6hkls3ogotzs4bnhm4mk"), - "ethaccount": MustParseCid("bafk2bzaceautge6zhuy6jbj3uldwoxwhpywuon6z3xfvmdbzpbdribc6zzmei"), - "evm": MustParseCid("bafk2bzacedq6v2lyuhgywhlllwmudfj2zufzcauxcsvvd34m2ek5xr55mvh2q"), - "init": MustParseCid("bafk2bzacedr4xacm3fts4vilyeiacjr2hpmwzclyzulbdo24lrfxbtau2wbai"), - "multisig": MustParseCid("bafk2bzacecr5zqarfqak42xqcfeulsxlavcltawsx2fvc7zsjtby6ti4b3wqc"), - "paymentchannel": MustParseCid("bafk2bzacebntdhfmyc24e7tm52ggx5tnw4i3hrr3jmllsepv3mibez4hywsa2"), + "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"), "placeholder": MustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), - "reward": MustParseCid("bafk2bzacedq4q2kwkruu4xm7rkyygumlbw2yt4nimna2ivea4qarvtkohnuwu"), - "storagemarket": MustParseCid("bafk2bzacebjtoltdviyznpj34hh5qp6u257jnnbjole5rhqfixm7ug3epvrfu"), - "storageminer": MustParseCid("bafk2bzacebf4rrqyk7gcfggggul6nfpzay7f2ordnkwm7z2wcf4mq6r7i77t2"), - "storagepower": MustParseCid("bafk2bzacecjy4dkulvxppg3ocbmeixe2wgg6yxoyjxrm4ko2fm3uhpvfvam6e"), - "system": MustParseCid("bafk2bzacecyf523quuq2kdjfdvyty446z2ounmamtgtgeqnr3ynlu5cqrlt6e"), - "verifiedregistry": MustParseCid("bafk2bzacedkxehp7y7iyukbcje3wbpqcvufisos6exatkanyrbotoecdkrbta"), + "reward": MustParseCid("bafk2bzacea3fiurfqb4sg6ynsxcjnhnmarrb73eocipsjln2lu6do3qph5v56"), + "storagemarket": MustParseCid("bafk2bzaceajbtr32vli5rkpye6uo44ipylcv6n3trtj5ip4jdoavej7ph4id2"), + "storageminer": MustParseCid("bafk2bzaceaesp42foefqz5onml34n46rtbzeng7map2562zmmgbqt3hwya7kq"), + "storagepower": MustParseCid("bafk2bzacec77mx4fhv3e5j4musov4yslbv7hp7hskug4ha2yyhbjq2osi5f5s"), + "system": MustParseCid("bafk2bzacec26t7iwkp5crwgrj2d6eaao3mbn5moosdiygbcfhz2odiaid7byw"), + "verifiedregistry": MustParseCid("bafk2bzacebnmj2pm55mnq67bjhp7pmpranphx64lid36fn3nrykuppngtbjm2"), }, }, { Network: "testing", @@ -935,25 +935,25 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{ }, { Network: "testing", Version: 14, - BundleGitTag: "v13.0.0", - ManifestCid: MustParseCid("bafy2bzacedg47dqxmtgzjch6i42kth72esd7w23gujyd6c6oppg3n6auag5ou"), + BundleGitTag: "v14.0.0-dev.0", + ManifestCid: MustParseCid("bafy2bzaceb6pdf5kmxr54vdc6jtvfhhirghohrassvflzifdwzdx6tpeqr2wu"), Actors: map[string]cid.Cid{ - "account": MustParseCid("bafk2bzaceb3tncntgeqvzzr5fzhvpsc5ntv3tpqrsh4jst4irfyzpkdyigibc"), - "cron": MustParseCid("bafk2bzacecwwasmhixpgtshczm5cfspwciyawc25mrefknqhlxfrd6m57tqmc"), - "datacap": MustParseCid("bafk2bzaceckj66by6eohjrybazh5cymmovgl5bmikpvzki2q7huwk2fweoef2"), - "eam": MustParseCid("bafk2bzaceafzm65wvnaam3775homn4vzsv7odftn5tkifmn44wd2t6gupy63y"), - "ethaccount": MustParseCid("bafk2bzaced4q7m4mha2dsezhwub3ru64rgimkg52t25ul4gnekax6uq7hbkqu"), - "evm": MustParseCid("bafk2bzaceakpknw5cuizil3552jr5z35rs6ijaignjigciswtok67drhzdss6"), - "init": MustParseCid("bafk2bzacec7mbkemwugyg2p4oy2xgnovykk4dnsu5ym4wkreooujvxfsxbo3i"), - "multisig": MustParseCid("bafk2bzacebmftoql6dcyqf54xznwjg2bfgdsi67spqquwslpvvtvcx6qenhz2"), - "paymentchannel": MustParseCid("bafk2bzaceau57wpiiikea6pu5om4ryyqjrxjzfksfl4reqosnohydzv3pf4qq"), + "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"), "placeholder": MustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), - "reward": MustParseCid("bafk2bzacecvlcdgbqlk3dyfzkcjrywg2th5bmn7ilijifikulpxr4ffcrw23o"), - "storagemarket": MustParseCid("bafk2bzacecgj53dwqla7eiubs2uiza7cgxkxtefxkfpjontj5jxefl3a4i2nq"), - "storageminer": MustParseCid("bafk2bzaceailclue4dba2edjethfjw6ycufcwsx4qjjmgsh77xcyprmogdjvu"), - "storagepower": MustParseCid("bafk2bzaceaqw6dhdjlqovhk3p4lb4sb25i5d6mhln2ir5m7tj6m4fegkgkinw"), - "system": MustParseCid("bafk2bzaceby6aiiosnrtb5kzlmrvd4k3o27oo3idmbd6llydz2uqibbp23pzq"), - "verifiedregistry": MustParseCid("bafk2bzaceadw6mxuyb6ipaq3fhekk7u5osyyiis3c4wbkvysy2ut6qfsua5zs"), + "reward": MustParseCid("bafk2bzacebusgmned2reqfompgfeytknhki4nyzmdepb5rt4npybn5oesnwr6"), + "storagemarket": MustParseCid("bafk2bzacebfgyw3oo45jgc53ehku4qcazdtde2jo6becgk65kj4jpdg4fwuw4"), + "storageminer": MustParseCid("bafk2bzacebhwllgpb7tqnpjmddeascjidpqzwplcgzhfp3dbyuraaotmnhnbs"), + "storagepower": MustParseCid("bafk2bzacebd3oqegrcdzl7zzqtplh65guercjxxqszjleoqnzsqrdmyhaigz4"), + "system": MustParseCid("bafk2bzacebrbxcbfi7mqkeutrhk4b2crv3twmimyum4ims3pknw7vcp2q7ilu"), + "verifiedregistry": MustParseCid("bafk2bzacecyjmeml5xv25mrotfqugds2f2rsex3js3pfdwocoetkncxs2mkt2"), }, }, { Network: "testing-fake-proofs", @@ -1087,24 +1087,24 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{ }, { Network: "testing-fake-proofs", Version: 14, - BundleGitTag: "v13.0.0", - ManifestCid: MustParseCid("bafy2bzaceaf7fz33sp2i5ag5xg5ompn3dwppqlbwfacrwuvzaqdbqrtni7m5q"), + BundleGitTag: "v14.0.0-dev.0", + ManifestCid: MustParseCid("bafy2bzaceatqhifad25xgompl2lokqvh53cmqvqdg6bprcywf3w7dwprrq4mc"), Actors: map[string]cid.Cid{ - "account": MustParseCid("bafk2bzaceb3tncntgeqvzzr5fzhvpsc5ntv3tpqrsh4jst4irfyzpkdyigibc"), - "cron": MustParseCid("bafk2bzacecwwasmhixpgtshczm5cfspwciyawc25mrefknqhlxfrd6m57tqmc"), - "datacap": MustParseCid("bafk2bzaceckj66by6eohjrybazh5cymmovgl5bmikpvzki2q7huwk2fweoef2"), - "eam": MustParseCid("bafk2bzaceafzm65wvnaam3775homn4vzsv7odftn5tkifmn44wd2t6gupy63y"), - "ethaccount": MustParseCid("bafk2bzaced4q7m4mha2dsezhwub3ru64rgimkg52t25ul4gnekax6uq7hbkqu"), - "evm": MustParseCid("bafk2bzaceakpknw5cuizil3552jr5z35rs6ijaignjigciswtok67drhzdss6"), - "init": MustParseCid("bafk2bzacec7mbkemwugyg2p4oy2xgnovykk4dnsu5ym4wkreooujvxfsxbo3i"), - "multisig": MustParseCid("bafk2bzacedy4vldq4viv6bzzh4fueip3by3axsbgbh655lashddgumknc6pvs"), - "paymentchannel": MustParseCid("bafk2bzaceau57wpiiikea6pu5om4ryyqjrxjzfksfl4reqosnohydzv3pf4qq"), + "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"), "placeholder": MustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), - "reward": MustParseCid("bafk2bzacecvlcdgbqlk3dyfzkcjrywg2th5bmn7ilijifikulpxr4ffcrw23o"), - "storagemarket": MustParseCid("bafk2bzacecgj53dwqla7eiubs2uiza7cgxkxtefxkfpjontj5jxefl3a4i2nq"), - "storageminer": MustParseCid("bafk2bzaceb6atn3k6yhmskgmc3lgfiwpzpfmaxzacohtnb2hivme2oroycqr6"), - "storagepower": MustParseCid("bafk2bzacedameh56mp2g4y7nprhax5sddbzcmpk5p7l523l45rtn2wjc6ah4e"), - "system": MustParseCid("bafk2bzaceby6aiiosnrtb5kzlmrvd4k3o27oo3idmbd6llydz2uqibbp23pzq"), - "verifiedregistry": MustParseCid("bafk2bzaceadw6mxuyb6ipaq3fhekk7u5osyyiis3c4wbkvysy2ut6qfsua5zs"), + "reward": MustParseCid("bafk2bzacebusgmned2reqfompgfeytknhki4nyzmdepb5rt4npybn5oesnwr6"), + "storagemarket": MustParseCid("bafk2bzacebfgyw3oo45jgc53ehku4qcazdtde2jo6becgk65kj4jpdg4fwuw4"), + "storageminer": MustParseCid("bafk2bzacebvfbdfgin7yjrqcyfuss6yxssh3u4df4ulandmawkmxdryp5d5de"), + "storagepower": MustParseCid("bafk2bzacebd3oqegrcdzl7zzqtplh65guercjxxqszjleoqnzsqrdmyhaigz4"), + "system": MustParseCid("bafk2bzacebrbxcbfi7mqkeutrhk4b2crv3twmimyum4ims3pknw7vcp2q7ilu"), + "verifiedregistry": MustParseCid("bafk2bzacecyjmeml5xv25mrotfqugds2f2rsex3js3pfdwocoetkncxs2mkt2"), }, }} diff --git a/chain/gen/genesis/miners.go b/chain/gen/genesis/miners.go index 9ae39cf35cb..52b4d4a890e 100644 --- a/chain/gen/genesis/miners.go +++ b/chain/gen/genesis/miners.go @@ -18,6 +18,7 @@ import ( "github.com/filecoin-project/go-state-types/big" builtintypes "github.com/filecoin-project/go-state-types/builtin" power11 "github.com/filecoin-project/go-state-types/builtin/v11/power" + miner14 "github.com/filecoin-project/go-state-types/builtin/v14/miner" minertypes "github.com/filecoin-project/go-state-types/builtin/v8/miner" markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" miner9 "github.com/filecoin-project/go-state-types/builtin/v9/miner" @@ -41,6 +42,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors/builtin/miner" "github.com/filecoin-project/lotus/chain/actors/builtin/power" "github.com/filecoin-project/lotus/chain/actors/builtin/reward" + "github.com/filecoin-project/lotus/chain/actors/builtin/system" "github.com/filecoin-project/lotus/chain/actors/policy" "github.com/filecoin-project/lotus/chain/consensus" lrand "github.com/filecoin-project/lotus/chain/rand" @@ -491,7 +493,12 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal // Commit one-by-one, otherwise pledge math tends to explode var paramBytes []byte - if av >= actorstypes.Version6 { + if av >= actorstypes.Version14 { + confirmParams := &miner14.InternalSectorSetupForPresealParams{ + Sectors: []abi.SectorNumber{preseal.SectorID}, + } + paramBytes = mustEnc(confirmParams) + } else if av >= actorstypes.Version6 { // TODO: fixup confirmParams := &builtin6.ConfirmSectorProofsParams{ Sectors: []abi.SectorNumber{preseal.SectorID}, @@ -506,9 +513,17 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal paramBytes = mustEnc(confirmParams) } - _, err = doExecValue(ctx, genesisVm, minerInfos[i].maddr, power.Address, big.Zero(), builtintypes.MethodsMiner.ConfirmSectorProofsValid, paramBytes) - if err != nil { - return cid.Undef, xerrors.Errorf("failed to confirm presealed sectors: %w", err) + var csErr error + if nv >= network.Version23 { + _, csErr = doExecValue(ctx, genesisVm, minerInfos[i].maddr, system.Address, big.Zero(), builtintypes.MethodsMiner.InternalSectorSetupForPreseal, + paramBytes) + } else { + _, csErr = doExecValue(ctx, genesisVm, minerInfos[i].maddr, power.Address, big.Zero(), builtintypes.MethodsMiner.InternalSectorSetupForPreseal, + paramBytes) + } + + if csErr != nil { + return cid.Undef, xerrors.Errorf("failed to confirm presealed sectors: %w", csErr) } if av >= actorstypes.Version2 { diff --git a/gen/bundle/bundle.go b/gen/bundle/bundle.go index 64c13ec32c5..b3878d8ace3 100644 --- a/gen/bundle/bundle.go +++ b/gen/bundle/bundle.go @@ -18,7 +18,7 @@ import ( "github.com/ipfs/go-cid" ) -var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMetadata{ +var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{ {{- range . }} { Network: {{printf "%q" .Network}}, Version: {{.Version}}, diff --git a/go.mod b/go.mod index 350b7333a0e..3dc9f2f82df 100644 --- a/go.mod +++ b/go.mod @@ -46,7 +46,7 @@ require ( github.com/filecoin-project/go-jsonrpc v0.3.2 github.com/filecoin-project/go-padreader v0.0.1 github.com/filecoin-project/go-paramfetch v0.0.4 - github.com/filecoin-project/go-state-types v0.14.0-rc1 + github.com/filecoin-project/go-state-types v0.14.0-rc2 github.com/filecoin-project/go-statemachine v1.0.3 github.com/filecoin-project/go-statestore v0.2.0 github.com/filecoin-project/go-storedcounter v0.1.0 diff --git a/go.sum b/go.sum index c5c4e6f1811..e5a5dc9a5ca 100644 --- a/go.sum +++ b/go.sum @@ -291,8 +291,9 @@ github.com/filecoin-project/go-state-types v0.0.0-20201102161440-c8033295a1fc/go github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= -github.com/filecoin-project/go-state-types v0.14.0-rc1 h1:kWBGX/uqZmYotYMNmw+R/fIuot/k0KMcEtB7PKFy1SQ= github.com/filecoin-project/go-state-types v0.14.0-rc1/go.mod h1:cHpOPup9H1g2T29dKHAjC2sc7/Ef5ypjuW9A3I+e9yY= +github.com/filecoin-project/go-state-types v0.14.0-rc2 h1:jx+iOyy7un1G6ozkvKpIBVFhs6Rg23j6NAoiIjBmGTc= +github.com/filecoin-project/go-state-types v0.14.0-rc2/go.mod h1:cHpOPup9H1g2T29dKHAjC2sc7/Ef5ypjuW9A3I+e9yY= github.com/filecoin-project/go-statemachine v1.0.3 h1:N07o6alys+V1tNoSTi4WuuoeNC4erS/6jE74+NsgQuk= github.com/filecoin-project/go-statemachine v1.0.3/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI= diff --git a/itests/fevm_test.go b/itests/fevm_test.go index c2b5e2aa9bb..55f1f14fe69 100644 --- a/itests/fevm_test.go +++ b/itests/fevm_test.go @@ -51,50 +51,13 @@ func decodeOutputToUint64(output []byte) (uint64, error) { err := binary.Read(buf, binary.BigEndian, &result) return result, err } -func buildInputFromuint64(number uint64) []byte { +func buildInputFromUint64(number uint64) []byte { // Convert the number to a binary uint64 array binaryNumber := make([]byte, 8) binary.BigEndian.PutUint64(binaryNumber, number) return inputDataFromArray(binaryNumber) } -// recursive delegate calls that fail due to gas limits are currently getting to 229 iterations -// before running out of gas -func recursiveDelegatecallFail(ctx context.Context, t *testing.T, client *kit.TestFullNode, filename string, count uint64) { - expectedIterationsBeforeFailing := int(220) - fromAddr, idAddr := client.EVM().DeployContractFromFilename(ctx, filename) - t.Log("recursion count - ", count) - inputData := buildInputFromuint64(count) - _, _, err := client.EVM().InvokeContractByFuncName(ctx, fromAddr, idAddr, "recursiveCall(uint256)", inputData) - - require.NoError(t, err) - - result, _, err := client.EVM().InvokeContractByFuncName(ctx, fromAddr, idAddr, "totalCalls()", []byte{}) - require.NoError(t, err) - - resultUint, err := decodeOutputToUint64(result) - require.NoError(t, err) - - require.NotEqual(t, int(resultUint), int(count)) - require.Equal(t, expectedIterationsBeforeFailing, int(resultUint)) -} -func recursiveDelegatecallSuccess(ctx context.Context, t *testing.T, client *kit.TestFullNode, filename string, count uint64) { - t.Log("Count - ", count) - - fromAddr, idAddr := client.EVM().DeployContractFromFilename(ctx, filename) - inputData := buildInputFromuint64(count) - _, _, err := client.EVM().InvokeContractByFuncName(ctx, fromAddr, idAddr, "recursiveCall(uint256)", inputData) - require.NoError(t, err) - - result, _, err := client.EVM().InvokeContractByFuncName(ctx, fromAddr, idAddr, "totalCalls()", []byte{}) - require.NoError(t, err) - - resultUint, err := decodeOutputToUint64(result) - require.NoError(t, err) - - require.Equal(t, int(count), int(resultUint)) -} - // TestFEVMRecursive does a basic fevm contract installation and invocation func TestFEVMRecursive(t *testing.T) { callCounts := []uint64{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, 230, 330} @@ -107,7 +70,7 @@ func TestFEVMRecursive(t *testing.T) { for _, callCount := range callCounts { callCount := callCount // linter unhappy unless callCount is local to loop t.Run(fmt.Sprintf("TestFEVMRecursive%d", callCount), func(t *testing.T) { - _, _, err := client.EVM().InvokeContractByFuncName(ctx, fromAddr, idAddr, "recursiveCall(uint256)", buildInputFromuint64(callCount)) + _, _, err := client.EVM().InvokeContractByFuncName(ctx, fromAddr, idAddr, "recursiveCall(uint256)", buildInputFromUint64(callCount)) require.NoError(t, err) }) } @@ -125,7 +88,7 @@ func TestFEVMRecursiveFail(t *testing.T) { for _, failCallCount := range failCallCounts { failCallCount := failCallCount // linter unhappy unless callCount is local to loop t.Run(fmt.Sprintf("TestFEVMRecursiveFail%d", failCallCount), func(t *testing.T) { - _, wait, err := client.EVM().InvokeContractByFuncName(ctx, fromAddr, idAddr, "recursiveCall(uint256)", buildInputFromuint64(failCallCount)) + _, wait, err := client.EVM().InvokeContractByFuncName(ctx, fromAddr, idAddr, "recursiveCall(uint256)", buildInputFromUint64(failCallCount)) require.Error(t, err) require.Equal(t, exitcode.ExitCode(37), wait.Receipt.ExitCode) }) @@ -156,23 +119,51 @@ func TestFEVMRecursive2(t *testing.T) { // TestFEVMRecursiveDelegatecallCount tests the maximum delegatecall recursion depth. func TestFEVMRecursiveDelegatecallCount(t *testing.T) { - ctx, cancel, client := kit.SetupFEVMTest(t) defer cancel() - highestSuccessCount := uint64(226) + // these depend on the actors bundle, may need to be adjusted with a network upgrade + const highestSuccessCount = 228 + const expectedIterationsBeforeFailing = 222 filename := "contracts/RecursiveDelegeatecall.hex" - recursiveDelegatecallSuccess(ctx, t, client, filename, uint64(1)) - recursiveDelegatecallSuccess(ctx, t, client, filename, uint64(2)) - recursiveDelegatecallSuccess(ctx, t, client, filename, uint64(10)) - recursiveDelegatecallSuccess(ctx, t, client, filename, uint64(100)) - recursiveDelegatecallSuccess(ctx, t, client, filename, highestSuccessCount) - recursiveDelegatecallFail(ctx, t, client, filename, highestSuccessCount+1) - recursiveDelegatecallFail(ctx, t, client, filename, uint64(1000)) - recursiveDelegatecallFail(ctx, t, client, filename, uint64(10000000)) + testCases := []struct { + recursionCount uint64 + expectSuccess bool + }{ + // success + {1, true}, + {2, true}, + {10, true}, + {100, true}, + {highestSuccessCount, true}, + // failure + {highestSuccessCount + 1, false}, + {1000, false}, + {10000000, false}, + } + for _, tc := range testCases { + t.Run(fmt.Sprintf("recursionCount=%d,expectSuccess=%t", tc.recursionCount, tc.expectSuccess), func(t *testing.T) { + fromAddr, idAddr := client.EVM().DeployContractFromFilename(ctx, filename) + inputData := buildInputFromUint64(tc.recursionCount) + _, _, err := client.EVM().InvokeContractByFuncName(ctx, fromAddr, idAddr, "recursiveCall(uint256)", inputData) + require.NoError(t, err) + + result, _, err := client.EVM().InvokeContractByFuncName(ctx, fromAddr, idAddr, "totalCalls()", []byte{}) + require.NoError(t, err) + + resultUint, err := decodeOutputToUint64(result) + require.NoError(t, err) + if tc.expectSuccess { + require.Equal(t, int(tc.recursionCount), int(resultUint)) + } else { + require.NotEqual(t, int(resultUint), int(tc.recursionCount), "unexpected recursion count, if the actors bundle has changed, this test may need to be adjusted") + require.Equal(t, int(expectedIterationsBeforeFailing), int(resultUint)) + } + }) + } } // TestFEVMBasic does a basic fevm contract installation and invocation @@ -585,44 +576,52 @@ func TestFEVMRecursiveActorCall(t *testing.T) { filenameActor := "contracts/RecCall.hex" fromAddr, actorAddr := client.EVM().DeployContractFromFilename(ctx, filenameActor) - testN := func(n, r int, ex exitcode.ExitCode) func(t *testing.T) { - return func(t *testing.T) { + exitCodeStackOverflow := exitcode.ExitCode(37) + exitCodeTransactionReverted := exitcode.ExitCode(33) + + testCases := []struct { + stackDepth int + recursionLimit int + exitCode exitcode.ExitCode + }{ + {0, 1, exitcode.Ok}, + {1, 1, exitcode.Ok}, + {20, 1, exitcode.Ok}, + {200, 1, exitcode.Ok}, + {251, 1, exitcode.Ok}, + {252, 1, exitCodeStackOverflow}, + {0, 10, exitcode.Ok}, + {1, 10, exitcode.Ok}, + {20, 10, exitcode.Ok}, + {200, 10, exitcode.Ok}, + {251, 10, exitcode.Ok}, + {252, 10, exitCodeStackOverflow}, + {0, 32, exitcode.Ok}, + {1, 32, exitcode.Ok}, + {20, 32, exitcode.Ok}, + {200, 32, exitcode.Ok}, + {251, 32, exitcode.Ok}, + {252, 32, exitCodeStackOverflow}, + // the following are actors bundle dependent and may need to be tweaked with a network upgrade + {0, 255, exitcode.Ok}, + {251, 164, exitcode.Ok}, + {0, 261, exitCodeTransactionReverted}, + {251, 173, exitCodeTransactionReverted}, + } + for _, tc := range testCases { + var fail string + if tc.exitCode != exitcode.Ok { + fail = "-fails" + } + t.Run(fmt.Sprintf("stackDepth=%d,recursionLimit=%d%s", tc.stackDepth, tc.recursionLimit, fail), func(t *testing.T) { inputData := make([]byte, 32*3) - binary.BigEndian.PutUint64(inputData[24:], uint64(n)) - binary.BigEndian.PutUint64(inputData[32+24:], uint64(n)) - binary.BigEndian.PutUint64(inputData[32+32+24:], uint64(r)) + binary.BigEndian.PutUint64(inputData[24:], uint64(tc.stackDepth)) + binary.BigEndian.PutUint64(inputData[32+24:], uint64(tc.stackDepth)) + binary.BigEndian.PutUint64(inputData[32+32+24:], uint64(tc.recursionLimit)) - client.EVM().InvokeContractByFuncNameExpectExit(ctx, fromAddr, actorAddr, "exec1(uint256,uint256,uint256)", inputData, ex) - } + client.EVM().InvokeContractByFuncNameExpectExit(ctx, fromAddr, actorAddr, "exec1(uint256,uint256,uint256)", inputData, tc.exitCode) + }) } - - t.Run("n=0,r=1", testN(0, 1, exitcode.Ok)) - t.Run("n=1,r=1", testN(1, 1, exitcode.Ok)) - t.Run("n=20,r=1", testN(20, 1, exitcode.Ok)) - t.Run("n=200,r=1", testN(200, 1, exitcode.Ok)) - t.Run("n=251,r=1", testN(251, 1, exitcode.Ok)) - - t.Run("n=252,r=1-fails", testN(252, 1, exitcode.ExitCode(37))) // 37 means stack overflow - - t.Run("n=0,r=10", testN(0, 10, exitcode.Ok)) - t.Run("n=1,r=10", testN(1, 10, exitcode.Ok)) - t.Run("n=20,r=10", testN(20, 10, exitcode.Ok)) - t.Run("n=200,r=10", testN(200, 10, exitcode.Ok)) - t.Run("n=251,r=10", testN(251, 10, exitcode.Ok)) - - t.Run("n=252,r=10-fails", testN(252, 10, exitcode.ExitCode(37))) - - t.Run("n=0,r=32", testN(0, 32, exitcode.Ok)) - t.Run("n=1,r=32", testN(1, 32, exitcode.Ok)) - t.Run("n=20,r=32", testN(20, 32, exitcode.Ok)) - t.Run("n=200,r=32", testN(200, 32, exitcode.Ok)) - t.Run("n=251,r=32", testN(251, 32, exitcode.Ok)) - - t.Run("n=0,r=252", testN(0, 252, exitcode.Ok)) - t.Run("n=251,r=164", testN(251, 164, exitcode.Ok)) - - t.Run("n=0,r=255-fails", testN(0, 255, exitcode.ExitCode(33))) // 33 means transaction reverted - t.Run("n=251,r=167-fails", testN(251, 167, exitcode.ExitCode(33))) } // TestFEVMRecursiveActorCallEstimate