Skip to content

Commit abb7d7e

Browse files
committed
undo config
1 parent 2ac458f commit abb7d7e

File tree

14 files changed

+2
-122
lines changed

14 files changed

+2
-122
lines changed

gql/resolver_ipni.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,3 @@ func (r *resolver) IpniDistanceFromLatestAd(ctx context.Context, args struct {
229229

230230
return count, nil
231231
}
232-
233-
func (r *resolver) IpniRemovedAllAdsStatus(ctx context.Context) (bool, error) {
234-
return r.idxProvWrapper.RemoveAllStatus(ctx), nil
235-
}

gql/schema.graphql

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -652,9 +652,6 @@ type RootQuery {
652652

653653
"""Get the latest IPNI advertisemen"""
654654
ipniDistanceFromLatestAd(LatestAdcid: String!, Adcid: String!): Int!
655-
656-
"""Get the IPNI Remove All Status"""
657-
ipniRemovedAllAdsStatus: Boolean!
658655
}
659656

660657
type RootMutation {

indexprovider/wrapper.go

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"fmt"
88
"net/url"
99
"os"
10-
"time"
1110

1211
"github.com/filecoin-project/boost/lib/legacy"
1312
"github.com/filecoin-project/boost/storagemarket/types/legacytypes"
@@ -72,7 +71,6 @@ type Wrapper struct {
7271
bitswapEnabled bool
7372
httpEnabled bool
7473
stop context.CancelFunc
75-
removeAllAds bool
7674
}
7775

7876
func NewWrapper(provAddr address.Address, cfg *config.Boost) func(lc fx.Lifecycle, h host.Host, r repo.LockedRepo, directDealsDB *db.DirectDealsDB, dealsDB *db.DealsDB,
@@ -129,11 +127,7 @@ func (w *Wrapper) Start(_ context.Context) {
129127

130128
log.Info("starting index provider")
131129

132-
if w.cfg.CurioMigration.Enable {
133-
go w.tryAnnounceRemoveAll(runCtx)
134-
} else {
135-
go w.checkForUpdates(runCtx)
136-
}
130+
go w.checkForUpdates(runCtx)
137131
}
138132

139133
func (w *Wrapper) checkForUpdates(ctx context.Context) {
@@ -922,30 +916,3 @@ func (w *Wrapper) AnnounceRemoveAll(ctx context.Context) ([]cid.Cid, error) {
922916
return newAds, nil
923917

924918
}
925-
926-
func (w *Wrapper) tryAnnounceRemoveAll(ctx context.Context) {
927-
ticker := time.NewTicker(time.Minute)
928-
929-
for {
930-
select {
931-
case <-ticker.C:
932-
out, err := w.AnnounceRemoveAll(ctx)
933-
if err != nil {
934-
log.Errorw("error while announcing remove all", "err", err)
935-
continue
936-
}
937-
if len(out) > 0 {
938-
continue
939-
}
940-
log.Debugw("Cleaned up all the IPNI ads")
941-
w.removeAllAds = true
942-
return
943-
case <-ctx.Done():
944-
return
945-
}
946-
}
947-
}
948-
949-
func (w *Wrapper) RemoveAllStatus(ctx context.Context) bool {
950-
return w.removeAllAds
951-
}

node/config/def.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,6 @@ func DefaultBoost() *Boost {
170170
MaxDealsPerPublishMsg: 8,
171171
MaxPublishDealsFee: types.MustParseFIL("0.05"),
172172
},
173-
CurioMigration: CurioMigration{
174-
Enable: false,
175-
},
176173
}
177174
return cfg
178175
}

node/config/doc_gen.go

Lines changed: 0 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node/config/migrate.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var log = logging.Logger("cfg")
1515

1616
// CurrentVersion is the config version expected by Boost.
1717
// We need to migrate the config file to this version.
18-
const CurrentVersion = 7
18+
const CurrentVersion = 6
1919

2020
type migrateUpFn = func(cfgPath string) (string, error)
2121

@@ -26,7 +26,6 @@ var migrations = []migrateUpFn{
2626
v3Tov4, // index 3 => version 4
2727
v4Tov5, // index 4 => version 5
2828
v5Tov6, // index 5 => version 6
29-
v6Tov7, // index 6 => version 7
3029
}
3130

3231
// This struct is used to get the config file version

node/config/types.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ type Boost struct {
5151
HttpDownload HttpDownloadConfig
5252
Retrievals RetrievalConfig
5353
IndexProvider IndexProviderConfig
54-
CurioMigration CurioMigration
5554
}
5655

5756
type WalletsConfig struct {
@@ -400,8 +399,3 @@ type DealPublishConfig struct {
400399
// The maximum fee to pay when sending the PublishStorageDeals message
401400
MaxPublishDealsFee types.FIL
402401
}
403-
404-
type CurioMigration struct {
405-
// Enable limits the Boost functionality to prepare for the migration
406-
Enable bool
407-
}

node/config/v6_to_v7.go

Lines changed: 0 additions & 28 deletions
This file was deleted.

node/modules/directdeals.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ func NewDirectDealsProvider(provAddr address.Address, cfg *config.Boost) func(lc
3434
ddpCfg := storagemarket.DDPConfig{
3535
StartEpochSealingBuffer: abi.ChainEpoch(cfg.Dealmaking.StartEpochSealingBuffer),
3636
RemoteCommp: cfg.Dealmaking.RemoteCommp,
37-
CurioMigration: cfg.CurioMigration.Enable,
3837
}
3938

4039
prov := storagemarket.NewDirectDealsProvider(ddpCfg, provAddr, fullnodeApi, secb, commpc, commpt, sps, directDealsDB, dl, piecedirectory, ip)

node/modules/storageminer.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,6 @@ func NewStorageMarketProvider(provAddr address.Address, cfg *config.Boost) func(
486486
DealLogDurationDays: cfg.Dealmaking.DealLogDurationDays,
487487
StorageFilter: cfg.Dealmaking.Filter,
488488
SealingPipelineCacheTimeout: time.Duration(cfg.Dealmaking.SealingPipelineCacheTimeout),
489-
CurioMigration: cfg.CurioMigration.Enable,
490489
}
491490
dl := logs.NewDealLogger(logsDB)
492491
tspt := httptransport.New(h, dl, httptransport.NChunksOpt(cfg.HttpDownload.NChunks), httptransport.AllowPrivateIPsOpt(cfg.HttpDownload.AllowPrivateIPs))

0 commit comments

Comments
 (0)