From aed3aeab1a75a5c98ad6122dab3a45a3c9911643 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Fri, 5 Aug 2022 15:20:51 -0400 Subject: [PATCH] Better input type for chain prune --- api/api_full.go | 7 +++- api/mocks/mock_full.go | 2 +- api/proxy_gen.go | 6 ++-- blockstore/splitstore/splitstore_prune.go | 36 +++----------------- build/openrpc/full.json.gz | Bin 28130 -> 28164 bytes cli/chain.go | 9 +++-- documentation/en/api-v1-unstable-methods.md | 3 +- itests/splitstore_test.go | 3 +- 8 files changed, 21 insertions(+), 45 deletions(-) diff --git a/api/api_full.go b/api/api_full.go index c8c60dd6fea..697d87e63f4 100644 --- a/api/api_full.go +++ b/api/api_full.go @@ -171,7 +171,7 @@ type FullNode interface { // ChainPrune prunes the stored chain state and garbage collects; only supported if you // are using the splitstore - ChainPrune(ctx context.Context, opts map[string]interface{}) error //perm:admin + ChainPrune(ctx context.Context, opts PruneOpts) error //perm:admin // ChainCheckBlockstore performs an (asynchronous) health check on the chain/state blockstore // if supported by the underlying implementation. @@ -1223,3 +1223,8 @@ type MsigTransaction struct { Approved []address.Address } + +type PruneOpts struct { + MovingGC bool + RetainState int64 +} diff --git a/api/mocks/mock_full.go b/api/mocks/mock_full.go index adf34224a58..5aa152c85e2 100644 --- a/api/mocks/mock_full.go +++ b/api/mocks/mock_full.go @@ -378,7 +378,7 @@ func (mr *MockFullNodeMockRecorder) ChainNotify(arg0 interface{}) *gomock.Call { } // ChainPrune mocks base method. -func (m *MockFullNode) ChainPrune(arg0 context.Context, arg1 map[string]interface{}) error { +func (m *MockFullNode) ChainPrune(arg0 context.Context, arg1 api.PruneOpts) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ChainPrune", arg0, arg1) ret0, _ := ret[0].(error) diff --git a/api/proxy_gen.go b/api/proxy_gen.go index 92820a92812..5de9caae22b 100644 --- a/api/proxy_gen.go +++ b/api/proxy_gen.go @@ -145,7 +145,7 @@ type FullNodeStruct struct { ChainNotify func(p0 context.Context) (<-chan []*HeadChange, error) `perm:"read"` - ChainPrune func(p0 context.Context, p1 map[string]interface{}) error `perm:"admin"` + ChainPrune func(p0 context.Context, p1 PruneOpts) error `perm:"admin"` ChainPutObj func(p0 context.Context, p1 blocks.Block) error `perm:"admin"` @@ -1342,14 +1342,14 @@ func (s *FullNodeStub) ChainNotify(p0 context.Context) (<-chan []*HeadChange, er return nil, ErrNotSupported } -func (s *FullNodeStruct) ChainPrune(p0 context.Context, p1 map[string]interface{}) error { +func (s *FullNodeStruct) ChainPrune(p0 context.Context, p1 PruneOpts) error { if s.Internal.ChainPrune == nil { return ErrNotSupported } return s.Internal.ChainPrune(p0, p1) } -func (s *FullNodeStub) ChainPrune(p0 context.Context, p1 map[string]interface{}) error { +func (s *FullNodeStub) ChainPrune(p0 context.Context, p1 PruneOpts) error { return ErrNotSupported } diff --git a/blockstore/splitstore/splitstore_prune.go b/blockstore/splitstore/splitstore_prune.go index ba7a68e3f8b..c997c075b94 100644 --- a/blockstore/splitstore/splitstore_prune.go +++ b/blockstore/splitstore/splitstore_prune.go @@ -14,6 +14,7 @@ import ( "go.opencensus.io/stats" "golang.org/x/xerrors" + "github.com/filecoin-project/lotus/api" bstore "github.com/filecoin-project/lotus/blockstore" "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/chain/types" @@ -44,40 +45,11 @@ var ( // PruneChain instructs the SplitStore to prune chain state in the coldstore, according to the // options specified. -func (s *SplitStore) PruneChain(opts map[string]interface{}) error { - // options - var onlineGC, movingGC bool - var retainState int64 = -1 - - for k, v := range opts { - switch k { - case PruneOnlineGC: - onlineGC = true - case PruneRetainState: - retaini64, ok := v.(int64) - if !ok { - // deal with json-rpc types... - retainf64, ok := v.(float64) - if !ok { - return xerrors.Errorf("bad state retention specification; expected int64 or float64 but got %T", v) - } - retainState = int64(retainf64) - } else { - retainState = retaini64 - } - default: - return xerrors.Errorf("unrecognized option %s", k) - } - } +func (s *SplitStore) PruneChain(opts api.PruneOpts) error { + retainState := opts.RetainState - if onlineGC && movingGC { - return xerrors.Errorf("at most one of online, moving GC can be specified") - } - if !onlineGC && !movingGC { - onlineGC = true - } var gcOpts []bstore.BlockstoreGCOption - if movingGC { + if opts.MovingGC { gcOpts = append(gcOpts, bstore.WithFullGC(true)) } doGC := func() error { return s.gcBlockstore(s.cold, gcOpts) } diff --git a/build/openrpc/full.json.gz b/build/openrpc/full.json.gz index 2e1a976aae739ac5c6cd03c118dd4c4a1a4d9921..29959a5d145f8723ab2c68fea101bfe477767239 100644 GIT binary patch delta 4449 zcmV-n5uWbi+W~~!0kBIAf91$_@U_xiqm?6j)>wMDlra78g{D_`L(-+_INjRWZSsvje~Wo%xU1^c?PLWC zRmy^en_0Hh&u&hLTC|;2mtiacp~AOnZ2?R;HFI+Gx+%?RvD=sR8&9l6w-0Rh!HXu} z*>eQ_&Kp5jw(*l4&G}-#B;8)4Uy^93y+cw)>4NQ%kf4Hv;4tuIRx4%~Ekw%1E0XDj zQZlAKv+x!O@|n{Xe;=&2s1|62dyIZ;acQvRJld7Mb!A9;Dhnf0xjarcCCLW5%(^j5NuU z2!_)F==g<>{`y57-~BRz4E-X{v;symC?dTql!-dM9wXXMqu)c|(y9p!KKeje|Wl>E!cZQt0#weazYkML9>enQE0Z=ULF?4u>kVsNb=|`jKw~`RlmnH zDrnnXqSiXB+Yihw~UaF6maZr)%k4c-9bDQ977H-BS_e|0-@XTj$%V~OvHyAa$RO4 zDSUD)b@C9QXhZ(J14fhvO$N4_ZkIN;)ek38%>{YQET=@2Cm#vjLku4zsB^UR z`N^?V7((PFWH~Fn@uZsRUzv04&Pp6(^+K^@t&^fsHGkc0<{8;LKgsLM*%(i^cDL(X z%#1C1j(CL84GfMEEYD6G#+PfUj`KxHp&5*>5#JDHPmV2lT&{;cnOu?d#ek|zPRia0 zpkzV?kVyv%d{JTq8S()oKn=P#c2+&7E8}J_x^gqOCr`I_cj_GDoB-~*5AC$O}=9~_kvHqc& zgpGArn&A998_n+w&I1a4r9-_Q4&)k56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z4ZJ0c<6Tk9C|<(Zso;;ddhfmb_sG$s&U|%nHmcNo@U*+qu}+iQ ziZ_vG6LvB&$AN%ZC5wFE0eKJ_tEFwEE>!zsAU r3%Iu>gYNOUMLUOr_1@1uE7Fzp-an*Avfuv&00960oP^G^6nO;z+C{r% diff --git a/cli/chain.go b/cli/chain.go index 80b3ffa61ec..48fbb849ddc 100644 --- a/cli/chain.go +++ b/cli/chain.go @@ -35,7 +35,6 @@ import ( "github.com/filecoin-project/lotus/api" lapi "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api/v0api" - "github.com/filecoin-project/lotus/blockstore/splitstore" "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/consensus/filcns" @@ -1497,14 +1496,14 @@ var ChainPruneCmd = &cli.Command{ defer closer() ctx := ReqContext(cctx) - opts := make(map[string]interface{}) + opts := lapi.PruneOpts{} if cctx.Bool("online-gc") { - opts[splitstore.PruneOnlineGC] = true + opts.MovingGC = false } if cctx.Bool("moving-gc") { - opts[splitstore.PruneMovingGC] = cctx.String("move-to") + opts.MovingGC = true } - opts[splitstore.PruneRetainState] = int64(cctx.Int("retention")) + opts.RetainState = int64(cctx.Int("retention")) return api.ChainPrune(ctx, opts) }, diff --git a/documentation/en/api-v1-unstable-methods.md b/documentation/en/api-v1-unstable-methods.md index 76aae58e340..a0015a51e68 100644 --- a/documentation/en/api-v1-unstable-methods.md +++ b/documentation/en/api-v1-unstable-methods.md @@ -974,7 +974,8 @@ Inputs: ```json [ { - "abc": 123 + "MovingGC": true, + "RetainState": 9 } ] ``` diff --git a/itests/splitstore_test.go b/itests/splitstore_test.go index 618a71aee65..2bb188598fa 100644 --- a/itests/splitstore_test.go +++ b/itests/splitstore_test.go @@ -161,8 +161,7 @@ func TestColdStorePrune(t *testing.T) { break } } - pruneOpts := make(map[string]interface{}) - pruneOpts[splitstore.PruneRetainState] = int64(0) // Prune from compaction boundary + pruneOpts := api.PruneOpts{RetainState: int64(0), MovingGC: false} require.NoError(t, full.ChainPrune(ctx, pruneOpts)) bm.Restart() waitForPrune(ctx, t, 1, full)