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"
|
|
|
|
|
2019-11-05 03:42:13 +00:00
|
|
|
"github.com/filecoin-project/lotus/api"
|
2019-10-18 04:47:41 +00:00
|
|
|
"github.com/filecoin-project/lotus/chain/actors"
|
2019-11-09 23:00:22 +00:00
|
|
|
"github.com/filecoin-project/lotus/chain/blocksync"
|
2019-10-22 10:20:43 +00:00
|
|
|
"github.com/filecoin-project/lotus/chain/deals"
|
2019-10-18 04:47:41 +00:00
|
|
|
"github.com/filecoin-project/lotus/chain/types"
|
2019-11-04 19:03:11 +00:00
|
|
|
"github.com/filecoin-project/lotus/paych"
|
2019-11-05 03:42:13 +00:00
|
|
|
"github.com/filecoin-project/lotus/retrieval"
|
2019-11-01 13:58:48 +00:00
|
|
|
"github.com/filecoin-project/lotus/storage"
|
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.Message{},
|
|
|
|
types.SignedMessage{},
|
|
|
|
types.MsgMeta{},
|
|
|
|
types.SignedVoucher{},
|
|
|
|
types.ModVerifyParams{},
|
|
|
|
types.Merge{},
|
2019-09-17 01:56:37 +00:00
|
|
|
types.Actor{},
|
|
|
|
types.MessageReceipt{},
|
2019-09-18 02:50:03 +00:00
|
|
|
types.BlockMsg{},
|
2019-10-22 10:20:43 +00:00
|
|
|
types.SignedStorageAsk{},
|
|
|
|
types.StorageAsk{},
|
2019-11-01 13:58:48 +00:00
|
|
|
types.ExpTipSet{},
|
2019-09-10 02:05:24 +00:00
|
|
|
)
|
|
|
|
if err != nil {
|
|
|
|
fmt.Println(err)
|
|
|
|
os.Exit(1)
|
2019-08-21 17:15:28 +00:00
|
|
|
}
|
|
|
|
|
2019-11-04 19:03:11 +00:00
|
|
|
err = gen.WriteTupleEncodersToFile("./paych/cbor_gen.go", "paych",
|
|
|
|
paych.VoucherInfo{},
|
|
|
|
paych.ChannelInfo{},
|
|
|
|
)
|
|
|
|
if err != nil {
|
|
|
|
fmt.Println(err)
|
|
|
|
os.Exit(1)
|
2019-11-05 03:42:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
err = gen.WriteTupleEncodersToFile("./api/cbor_gen.go", "api",
|
|
|
|
api.PaymentInfo{},
|
2019-11-06 12:22:08 +00:00
|
|
|
api.SealedRef{},
|
|
|
|
api.SealedRefs{},
|
2019-11-05 03:42:13 +00:00
|
|
|
)
|
|
|
|
if err != nil {
|
|
|
|
fmt.Println(err)
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
err = gen.WriteTupleEncodersToFile("./retrieval/cbor_gen.go", "retrieval",
|
|
|
|
retrieval.RetParams{},
|
|
|
|
|
|
|
|
retrieval.Query{},
|
|
|
|
retrieval.QueryResponse{},
|
|
|
|
retrieval.Unixfs0Offer{},
|
|
|
|
retrieval.DealProposal{},
|
|
|
|
retrieval.DealResponse{},
|
|
|
|
retrieval.Block{},
|
|
|
|
)
|
|
|
|
if err != nil {
|
|
|
|
fmt.Println(err)
|
|
|
|
os.Exit(1)
|
2019-08-21 17:15:28 +00:00
|
|
|
}
|
|
|
|
|
2019-11-09 23:00:22 +00:00
|
|
|
err = gen.WriteTupleEncodersToFile("./chain/blocksync/cbor_gen.go", "blocksync",
|
|
|
|
blocksync.BlockSyncRequest{},
|
|
|
|
blocksync.BlockSyncResponse{},
|
|
|
|
blocksync.BSTipSet{},
|
|
|
|
)
|
|
|
|
if err != nil {
|
|
|
|
fmt.Println(err)
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
2019-09-09 17:22:40 +00:00
|
|
|
|
2019-09-10 02:05:24 +00:00
|
|
|
err = gen.WriteTupleEncodersToFile("./chain/actors/cbor_gen.go", "actors",
|
|
|
|
actors.InitActorState{},
|
|
|
|
actors.ExecParams{},
|
|
|
|
actors.AccountActorState{},
|
|
|
|
actors.StorageMinerActorState{},
|
|
|
|
actors.StorageMinerConstructorParams{},
|
2019-10-30 15:55:55 +00:00
|
|
|
actors.SectorPreCommitInfo{},
|
2019-11-07 12:03:18 +00:00
|
|
|
actors.PreCommittedSector{},
|
2019-09-10 02:05:24 +00:00
|
|
|
actors.MinerInfo{},
|
|
|
|
actors.SubmitPoStParams{},
|
|
|
|
actors.PaymentVerifyParams{},
|
|
|
|
actors.UpdatePeerIDParams{},
|
|
|
|
actors.MultiSigActorState{},
|
|
|
|
actors.MultiSigConstructorParams{},
|
|
|
|
actors.MultiSigProposeParams{},
|
|
|
|
actors.MultiSigTxID{},
|
|
|
|
actors.MultiSigSwapSignerParams{},
|
|
|
|
actors.MultiSigChangeReqParams{},
|
|
|
|
actors.MTransaction{},
|
|
|
|
actors.MultiSigRemoveSignerParam{},
|
|
|
|
actors.MultiSigAddSignerParam{},
|
|
|
|
actors.PaymentChannelActorState{},
|
|
|
|
actors.PCAConstructorParams{},
|
|
|
|
actors.LaneState{},
|
|
|
|
actors.PCAUpdateChannelStateParams{},
|
|
|
|
actors.PaymentInfo{},
|
2019-10-11 22:59:36 +00:00
|
|
|
actors.StoragePowerState{},
|
2019-09-10 02:05:24 +00:00
|
|
|
actors.CreateStorageMinerParams{},
|
|
|
|
actors.IsMinerParam{},
|
|
|
|
actors.PowerLookupParams{},
|
|
|
|
actors.UpdateStorageParams{},
|
2019-09-13 01:06:06 +00:00
|
|
|
actors.ArbitrateConsensusFaultParams{},
|
2019-09-12 04:12:35 +00:00
|
|
|
actors.PledgeCollateralParams{},
|
2019-09-12 23:48:03 +00:00
|
|
|
actors.MinerSlashConsensusFault{},
|
2019-10-18 06:16:59 +00:00
|
|
|
actors.StorageParticipantBalance{},
|
|
|
|
actors.StorageMarketState{},
|
|
|
|
actors.WithdrawBalanceParams{},
|
2019-10-19 04:54:22 +00:00
|
|
|
actors.StorageDealProposal{},
|
|
|
|
actors.StorageDeal{},
|
|
|
|
actors.PublishStorageDealsParams{},
|
|
|
|
actors.PublishStorageDealResponse{},
|
2019-10-19 10:20:33 +00:00
|
|
|
actors.ActivateStorageDealsParams{},
|
|
|
|
actors.ProcessStorageDealsPaymentParams{},
|
2019-10-22 19:29:05 +00:00
|
|
|
actors.OnChainDeal{},
|
2019-10-31 01:22:50 +00:00
|
|
|
actors.ComputeDataCommitmentParams{},
|
2019-11-01 23:43:54 +00:00
|
|
|
actors.SectorProveCommitInfo{},
|
2019-09-10 02:05:24 +00:00
|
|
|
)
|
|
|
|
if err != nil {
|
|
|
|
fmt.Println(err)
|
|
|
|
os.Exit(1)
|
2019-09-09 17:22:40 +00:00
|
|
|
}
|
2019-10-22 10:20:43 +00:00
|
|
|
|
|
|
|
err = gen.WriteTupleEncodersToFile("./chain/deals/cbor_gen.go", "deals",
|
|
|
|
deals.AskRequest{},
|
|
|
|
deals.AskResponse{},
|
|
|
|
deals.Proposal{},
|
|
|
|
deals.Response{},
|
|
|
|
deals.SignedResponse{},
|
|
|
|
deals.ClientDealProposal{},
|
|
|
|
deals.ClientDeal{},
|
|
|
|
deals.MinerDeal{},
|
|
|
|
)
|
|
|
|
if err != nil {
|
|
|
|
fmt.Println(err)
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
2019-11-01 13:58:48 +00:00
|
|
|
|
|
|
|
err = gen.WriteTupleEncodersToFile("./storage/cbor_gen.go", "storage",
|
|
|
|
storage.SealTicket{},
|
2019-11-08 18:15:13 +00:00
|
|
|
storage.SealSeed{},
|
2019-11-07 18:22:59 +00:00
|
|
|
storage.Piece{},
|
2019-11-01 13:58:48 +00:00
|
|
|
storage.SectorInfo{},
|
|
|
|
)
|
|
|
|
if err != nil {
|
|
|
|
fmt.Println(err)
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
2019-08-21 17:15:28 +00:00
|
|
|
}
|