Skip to content

Commit 610c984

Browse files
authored
chore: types: remove more items forgotten after markets (#12095)
* chore: cleanup: remove more items forgotten after markets * .gz somehow reappeared after #11625
1 parent 496ea6d commit 610c984

File tree

19 files changed

+13
-291
lines changed

19 files changed

+13
-291
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Before you mark the PR ready for review, please make sure that:
1515
- [ ] PR title is in the form of of `<PR type>: <area>: <change being made>`
1616
- example: ` fix: mempool: Introduce a cache for valid signatures`
1717
- `PR type`: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test
18-
- `area`, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
18+
- `area`, e.g. api, chain, state, mempool, multisig, networking, paych, proving, sealing, wallet, deps
1919
- [ ] If the PR affects users (e.g., new feature, bug fix, system requirements change), update the CHANGELOG.md and add details to the UNRELEASED section.
2020
- [ ] New features have usage guidelines and / or documentation updates in
2121
- [ ] [Lotus Documentation](https://lotus.filecoin.io)

api/api_full.go

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"fmt"
77
"time"
88

9-
"github.com/google/uuid"
109
blocks "github.com/ipfs/go-block-format"
1110
"github.com/ipfs/go-cid"
1211

@@ -1052,8 +1051,6 @@ type MarketDeal struct {
10521051
State MarketDealState
10531052
}
10541053

1055-
type RemoteStoreID = uuid.UUID
1056-
10571054
type InvocResult struct {
10581055
MsgCid cid.Cid
10591056
Msg *types.Message
@@ -1064,11 +1061,6 @@ type InvocResult struct {
10641061
Duration time.Duration
10651062
}
10661063

1067-
type MethodCall struct {
1068-
types.MessageReceipt
1069-
Error string
1070-
}
1071-
10721064
type IpldObject struct {
10731065
Cid cid.Cid
10741066
Obj interface{}
@@ -1180,21 +1172,6 @@ type BlockTemplate struct {
11801172
WinningPoStProof []builtin.PoStProof
11811173
}
11821174

1183-
type DataSize struct {
1184-
PayloadSize int64
1185-
PieceSize abi.PaddedPieceSize
1186-
}
1187-
1188-
type DataCIDSize struct {
1189-
PayloadSize int64
1190-
PieceSize abi.PaddedPieceSize
1191-
PieceCID cid.Cid
1192-
}
1193-
1194-
type CommPRet struct {
1195-
Root cid.Cid
1196-
Size abi.UnpaddedPieceSize
1197-
}
11981175
type HeadChange struct {
11991176
Type string
12001177
Val *types.TipSet

api/docgen/docgen.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"github.com/google/uuid"
1717
blocks "github.com/ipfs/go-block-format"
1818
"github.com/ipfs/go-cid"
19-
textselector "github.com/ipld/go-ipld-selector-text-lite"
2019
pubsub "github.com/libp2p/go-libp2p-pubsub"
2120
"github.com/libp2p/go-libp2p/core/metrics"
2221
"github.com/libp2p/go-libp2p/core/network"
@@ -91,9 +90,6 @@ func init() {
9190
addExample(pid)
9291
addExample(&pid)
9392

94-
textSelExample := textselector.Expression("Links/21/Hash/Links/42/Hash")
95-
apiSelExample := api.Selector("Links/21/Hash/Links/42/Hash")
96-
9793
block := blocks.Block(&blocks.BasicBlock{})
9894
ExampleValues[reflect.TypeOf(&block).Elem()] = block
9995

@@ -124,8 +120,6 @@ func init() {
124120
addExample(api.PCHInbound)
125121
addExample(time.Minute)
126122

127-
addExample(&textSelExample)
128-
addExample(&apiSelExample)
129123
addExample(network.ReachabilityPublic)
130124
addExample(build.TestNetworkVersion)
131125
allocationId := verifreg.AllocationId(0)

api/types.go

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
package api
22

33
import (
4-
"encoding/json"
54
"time"
65

76
"github.com/google/uuid"
87
"github.com/ipfs/go-cid"
98
pubsub "github.com/libp2p/go-libp2p-pubsub"
109
"github.com/libp2p/go-libp2p/core/network"
1110
"github.com/libp2p/go-libp2p/core/peer"
12-
ma "github.com/multiformats/go-multiaddr"
1311

1412
"github.com/filecoin-project/go-address"
1513
"github.com/filecoin-project/go-state-types/abi"
@@ -19,27 +17,6 @@ import (
1917
"github.com/filecoin-project/lotus/node/modules/dtypes"
2018
)
2119

22-
type MultiaddrSlice []ma.Multiaddr
23-
24-
func (m *MultiaddrSlice) UnmarshalJSON(raw []byte) (err error) {
25-
var temp []string
26-
if err := json.Unmarshal(raw, &temp); err != nil {
27-
return err
28-
}
29-
30-
res := make([]ma.Multiaddr, len(temp))
31-
for i, str := range temp {
32-
res[i], err = ma.NewMultiaddr(str)
33-
if err != nil {
34-
return err
35-
}
36-
}
37-
*m = res
38-
return nil
39-
}
40-
41-
var _ json.Unmarshaler = new(MultiaddrSlice)
42-
4320
type ObjStat struct {
4421
Size uint64
4522
Links uint64
@@ -158,13 +135,6 @@ type MessagePrototype struct {
158135
ValidNonce bool
159136
}
160137

161-
// Selector specifies ipld selector string
162-
// - if the string starts with '{', it's interpreted as json selector string
163-
// see https://ipld.io/specs/selectors/ and https://ipld.io/specs/selectors/fixtures/selector-fixtures-1/
164-
// - otherwise the string is interpreted as ipld-selector-text-lite (simple ipld path)
165-
// see https://github.com/ipld/go-ipld-selector-text-lite
166-
type Selector string
167-
168138
type MinerInfo struct {
169139
Owner address.Address // Must be an ID-address.
170140
Worker address.Address // Must be an ID-address.

build/openrpc/full.json.gz

-35.1 KB
Binary file not shown.

build/openrpc/gateway.json.gz

-12 KB
Binary file not shown.

build/openrpc/miner.json.gz

-16.1 KB
Binary file not shown.

build/openrpc/worker.json.gz

-5.91 KB
Binary file not shown.

cmd/lotus-miner/main.go

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ import (
2323
var log = logging.Logger("main")
2424

2525
const (
26-
FlagMinerRepo = "miner-repo"
27-
FlagMarketsRepo = "markets-repo"
26+
FlagMinerRepo = "miner-repo"
2827
)
2928

3029
// TODO remove after deprecation period
@@ -77,21 +76,6 @@ func main() {
7776
}
7877
}
7978

80-
// adapt the Net* commands to always hit the node running the markets
81-
// subsystem, as that is the only one that runs a libp2p node.
82-
netCmd := *lcli.NetCmd // make a copy.
83-
netCmd.Hidden = true
84-
prev := netCmd.Before
85-
netCmd.Before = func(c *cli.Context) error {
86-
if prev != nil {
87-
if err := prev(c); err != nil {
88-
return err
89-
}
90-
}
91-
c.App.Metadata["repoType"] = repo.Markets
92-
return nil
93-
}
94-
9579
app := &cli.App{
9680
Name: "lotus-miner",
9781
Usage: "Filecoin decentralized storage network miner",
@@ -129,27 +113,9 @@ func main() {
129113
Value: "~/.lotusminer", // TODO: Consider XDG_DATA_HOME
130114
Usage: fmt.Sprintf("Specify miner repo path. flag(%s) and env(LOTUS_STORAGE_PATH) are DEPRECATION, will REMOVE SOON", FlagMinerRepoDeprecation),
131115
},
132-
&cli.StringFlag{
133-
Name: FlagMarketsRepo,
134-
EnvVars: []string{"LOTUS_MARKETS_PATH"},
135-
Hidden: true,
136-
},
137-
&cli.BoolFlag{
138-
Name: "call-on-markets",
139-
Usage: "(experimental; may be removed) call this command against a markets node; use only with common commands like net, auth, pprof, etc. whose target may be ambiguous",
140-
Hidden: true,
141-
},
142116
cliutil.FlagVeryVerbose,
143117
},
144-
Commands: append(local, append(lcli.CommonCommands, &netCmd)...),
145-
Before: func(c *cli.Context) error {
146-
// this command is explicitly called on markets, inform
147-
// common commands by overriding the repoType.
148-
if c.Bool("call-on-markets") {
149-
c.App.Metadata["repoType"] = repo.Markets
150-
}
151-
return nil
152-
},
118+
Commands: append(local, lcli.CommonCommands...),
153119
After: func(c *cli.Context) error {
154120
if r := recover(); r != nil {
155121
// Generate report in LOTUS_PATH and re-raise panic

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ require (
9696
github.com/ipld/go-car v0.6.2
9797
github.com/ipld/go-car/v2 v2.13.1
9898
github.com/ipld/go-ipld-prime v0.21.0
99-
github.com/ipld/go-ipld-selector-text-lite v0.0.1
10099
github.com/ipni/go-libipni v0.0.8
101100
github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438
102101
github.com/kelseyhightower/envconfig v1.4.0

0 commit comments

Comments
 (0)