lotus/gen/main.go

148 lines
3.3 KiB
Go
Raw Permalink Normal View History

2019-08-21 17:15:28 +00:00
package main
import (
"fmt"
"os"
2019-10-22 10:20:43 +00:00
gen "github.com/whyrusleeping/cbor-gen"
"github.com/filecoin-project/lotus/api"
2022-10-28 11:03:39 +00:00
"github.com/filecoin-project/lotus/blockstore"
"github.com/filecoin-project/lotus/chain/exchange"
2021-03-09 21:33:01 +00:00
"github.com/filecoin-project/lotus/chain/market"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/cmd/lotus-shed/shedgen"
2020-02-21 19:25:57 +00:00
"github.com/filecoin-project/lotus/node/hello"
"github.com/filecoin-project/lotus/paychmgr"
feat: sealing: Support nv22 DDO features in the sealing pipeline (#11226) * Initial work supporting DDO pieces in lotus-miner * sealing: Update pipeline input to operate on UniversalPiece * sealing: Update pipeline checks/sealing states to operate on UniversalPiece * sealing: Make pipeline build with UniversalPiece * move PieceDealInfo out of api * make gen * make sealing pipeline unit tests pass * fix itest ensemble build * don't panic in SectorsStatus with deals * stop linter from complaining about checkPieces * fix sector import tests * mod tidy * sealing: Add logic for (pre)committing DDO sectors * sealing: state-types with method defs * DDO non-snap pipeline works(?), DDO Itests * DDO support in snapdeals pipeline * make gen * update actor bundles * update the gst market fix * fix: chain: use PreCommitSectorsBatch2 when setting up genesis * some bug fixes * integration working changes * update actor bundles * Make TestOnboardRawPieceSnap pass * Appease the linter * Make deadlines test pass with v12 actors * Update go-state-types, abstract market DealState * make gen * mod tidy, lint fixes * Fix some more tests * Bump version in master Bump version in master * Make gen Make gen * fix sender * fix: lotus-provider: Fix winning PoSt * fix: sql Scan cannot write to an object * Actually show miner-addrs in info-log Actually show miner-addrs in lotus-provider info-log * [WIP] feat: Add nv22 skeleton Addition of Network Version 22 skeleton * update FFI * ddo is now nv22 * make gen * temp actor bundle with ddo * use working go-state-types * gst with v13 market migration * update bundle, builtin.MethodsMiner.ProveCommitSectors2 -> 3 * actually working v13 migration, v13 migration itest * Address review * sealing: Correct DDO snap pledge math * itests: Mixed ddo itest * pipeline: Fix sectorWeight * sealing: convert market deals into PAMs in mixed sectors * sealing: make market to ddo conversion work * fix lint * update gst * Update actors and GST to lastest integ branch * commit batcher: Update ProveCommitSectors3Params builder logic * make gen * use builtin-actors master * ddo: address review * itests: Add commd assertions to ddo tests * make gen * gst with fixed types * config knobs for RequireActivationSuccess * storage: Drop obsolete flaky tasts --------- Co-authored-by: Jennifer Wang <jiayingw703@gmail.com> Co-authored-by: Aayush <arajasek94@gmail.com> Co-authored-by: Shrenuj Bansal <shrenuj.bansal@protocol.ai> Co-authored-by: Phi <orjan.roren@gmail.com> Co-authored-by: Andrew Jackson (Ajax) <snadrus@gmail.com> Co-authored-by: TippyFlits <james.bluett@protocol.ai>
2024-01-25 14:15:55 +00:00
"github.com/filecoin-project/lotus/storage/pipeline/piece"
sectorstorage "github.com/filecoin-project/lotus/storage/sealer"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
2019-08-21 17:15:28 +00:00
)
func main() {
2019-09-10 02:05:24 +00:00
err := gen.WriteTupleEncodersToFile("./chain/types/cbor_gen.go", "types",
types.BlockHeader{},
types.Ticket{},
types.ElectionProof{},
2019-09-10 02:05:24 +00:00
types.Message{},
types.SignedMessage{},
types.MsgMeta{},
2022-11-09 08:44:51 +00:00
types.ActorV4{},
types.ActorV5{},
// types.MessageReceipt{}, // Custom serde to deal with versioning.
types.BlockMsg{},
2019-11-01 13:58:48 +00:00
types.ExpTipSet{},
types.BeaconEntry{},
2020-09-14 22:43:12 +00:00
types.StateRoot{},
types.StateInfo0{},
types.Event{},
types.EventEntry{},
// Tracing
types.GasTrace{},
types.ActorTrace{},
types.MessageTrace{},
types.ReturnTrace{},
types.ExecutionTrace{},
2022-03-13 21:24:13 +00:00
)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
err = gen.WriteMapEncodersToFile("./paychmgr/cbor_gen.go", "paychmgr",
paychmgr.VoucherInfo{},
paychmgr.ChannelInfo{},
2020-07-28 23:16:47 +00:00
paychmgr.MsgInfo{},
2019-11-04 19:03:11 +00:00
)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
2019-12-09 16:40:15 +00:00
err = gen.WriteMapEncodersToFile("./api/cbor_gen.go", "api",
api.PaymentInfo{},
2019-11-06 12:22:08 +00:00
api.SealedRef{},
api.SealedRefs{},
2020-02-27 23:34:48 +00:00
api.SealTicket{},
api.SealSeed{},
2022-08-26 00:37:36 +00:00
api.SectorPiece{},
)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
err = gen.WriteTupleEncodersToFile("./node/hello/cbor_gen.go", "hello",
hello.HelloMessage{},
hello.LatencyMessage{},
)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
2020-11-05 16:50:40 +00:00
err = gen.WriteTupleEncodersToFile("./chain/market/cbor_gen.go", "market",
market.FundedAddressState{},
)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
err = gen.WriteTupleEncodersToFile("./chain/exchange/cbor_gen.go", "exchange",
exchange.Request{},
exchange.Response{},
exchange.CompactedMessagesCBOR{},
exchange.BSTipSet{},
2019-11-09 23:00:22 +00:00
)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
2019-09-09 17:22:40 +00:00
2022-06-14 18:08:10 +00:00
err = gen.WriteMapEncodersToFile("./storage/sealer/storiface/cbor_gen.go", "storiface",
storiface.CallID{},
2022-09-02 15:12:58 +00:00
storiface.SecDataHttpHeader{},
2022-09-16 21:45:23 +00:00
storiface.SectorLocation{},
)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
feat: sealing: Support nv22 DDO features in the sealing pipeline (#11226) * Initial work supporting DDO pieces in lotus-miner * sealing: Update pipeline input to operate on UniversalPiece * sealing: Update pipeline checks/sealing states to operate on UniversalPiece * sealing: Make pipeline build with UniversalPiece * move PieceDealInfo out of api * make gen * make sealing pipeline unit tests pass * fix itest ensemble build * don't panic in SectorsStatus with deals * stop linter from complaining about checkPieces * fix sector import tests * mod tidy * sealing: Add logic for (pre)committing DDO sectors * sealing: state-types with method defs * DDO non-snap pipeline works(?), DDO Itests * DDO support in snapdeals pipeline * make gen * update actor bundles * update the gst market fix * fix: chain: use PreCommitSectorsBatch2 when setting up genesis * some bug fixes * integration working changes * update actor bundles * Make TestOnboardRawPieceSnap pass * Appease the linter * Make deadlines test pass with v12 actors * Update go-state-types, abstract market DealState * make gen * mod tidy, lint fixes * Fix some more tests * Bump version in master Bump version in master * Make gen Make gen * fix sender * fix: lotus-provider: Fix winning PoSt * fix: sql Scan cannot write to an object * Actually show miner-addrs in info-log Actually show miner-addrs in lotus-provider info-log * [WIP] feat: Add nv22 skeleton Addition of Network Version 22 skeleton * update FFI * ddo is now nv22 * make gen * temp actor bundle with ddo * use working go-state-types * gst with v13 market migration * update bundle, builtin.MethodsMiner.ProveCommitSectors2 -> 3 * actually working v13 migration, v13 migration itest * Address review * sealing: Correct DDO snap pledge math * itests: Mixed ddo itest * pipeline: Fix sectorWeight * sealing: convert market deals into PAMs in mixed sectors * sealing: make market to ddo conversion work * fix lint * update gst * Update actors and GST to lastest integ branch * commit batcher: Update ProveCommitSectors3Params builder logic * make gen * use builtin-actors master * ddo: address review * itests: Add commd assertions to ddo tests * make gen * gst with fixed types * config knobs for RequireActivationSuccess * storage: Drop obsolete flaky tasts --------- Co-authored-by: Jennifer Wang <jiayingw703@gmail.com> Co-authored-by: Aayush <arajasek94@gmail.com> Co-authored-by: Shrenuj Bansal <shrenuj.bansal@protocol.ai> Co-authored-by: Phi <orjan.roren@gmail.com> Co-authored-by: Andrew Jackson (Ajax) <snadrus@gmail.com> Co-authored-by: TippyFlits <james.bluett@protocol.ai>
2024-01-25 14:15:55 +00:00
err = gen.WriteMapEncodersToFile("./storage/pipeline/piece/cbor_gen.go", "piece",
piece.PieceDealInfo{},
piece.DealSchedule{},
)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
2022-06-14 18:08:10 +00:00
err = gen.WriteMapEncodersToFile("./storage/sealer/cbor_gen.go", "sealer",
2020-09-14 07:44:55 +00:00
sectorstorage.Call{},
sectorstorage.WorkState{},
sectorstorage.WorkID{},
2020-09-14 07:44:55 +00:00
)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
err = gen.WriteMapEncodersToFile("./cmd/lotus-shed/shedgen/cbor_gen.go", "shedgen",
shedgen.CarbNode{},
)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
2022-10-28 11:03:39 +00:00
err = gen.WriteTupleEncodersToFile("./blockstore/cbor_gen.go", "blockstore",
blockstore.NetRpcReq{},
blockstore.NetRpcResp{},
blockstore.NetRpcErr{},
)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
2019-08-21 17:15:28 +00:00
}