Merge remote-tracking branch 'origin/master' into feat/merge-master
This commit is contained in:
commit
70c8f7b1ee
@ -45,7 +45,7 @@ commands:
|
|||||||
- 'v25-2k-lotus-params'
|
- 'v25-2k-lotus-params'
|
||||||
paths:
|
paths:
|
||||||
- /var/tmp/filecoin-proof-parameters/
|
- /var/tmp/filecoin-proof-parameters/
|
||||||
- run: ./lotus fetch-params --proving-params 2048
|
- run: ./lotus fetch-params 2048
|
||||||
- save_cache:
|
- save_cache:
|
||||||
name: Save parameters cache
|
name: Save parameters cache
|
||||||
key: 'v25-2k-lotus-params'
|
key: 'v25-2k-lotus-params'
|
||||||
|
13
README.md
13
README.md
@ -4,14 +4,19 @@
|
|||||||
|
|
||||||
Lotus is an implementation of the Filecoin Distributed Storage Network. For more details about Filecoin, check out the [Filecoin Spec](https://github.com/filecoin-project/specs).
|
Lotus is an implementation of the Filecoin Distributed Storage Network. For more details about Filecoin, check out the [Filecoin Spec](https://github.com/filecoin-project/specs).
|
||||||
|
|
||||||
## Development
|
|
||||||
|
|
||||||
All work is tracked via issues. An attempt at keeping an up-to-date view on remaining work is in the [lotus testnet github project board](https://github.com/filecoin-project/lotus/projects/1).
|
|
||||||
|
|
||||||
## Building & Documentation
|
## Building & Documentation
|
||||||
|
|
||||||
For instructions on how to build lotus from source, please visit [https://docs.lotu.sh](https://docs.lotu.sh) or read the source [here](https://github.com/filecoin-project/lotus/tree/master/documentation).
|
For instructions on how to build lotus from source, please visit [https://docs.lotu.sh](https://docs.lotu.sh) or read the source [here](https://github.com/filecoin-project/lotus/tree/master/documentation).
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
All work is tracked via issues. An attempt at keeping an up-to-date view on remaining work is in the [lotus testnet github project board](https://github.com/filecoin-project/lotus/projects/1).
|
||||||
|
|
||||||
|
The main branches under development at the moment are:
|
||||||
|
* [`master`](https://github.com/filecoin-project/lotus): current testnet.
|
||||||
|
* [`next`](https://github.com/filecoin-project/lotus/tree/next): working branch with chain-breaking changes.
|
||||||
|
* [`interopnet`](https://github.com/filecoin-project/lotus/tree/interopnet): devnet running one of `next` commits.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Dual-licensed under [MIT](https://github.com/filecoin-project/lotus/blob/master/LICENSE-MIT) + [Apache 2.0](https://github.com/filecoin-project/lotus/blob/master/LICENSE-APACHE)
|
Dual-licensed under [MIT](https://github.com/filecoin-project/lotus/blob/master/LICENSE-MIT) + [Apache 2.0](https://github.com/filecoin-project/lotus/blob/master/LICENSE-APACHE)
|
||||||
|
@ -242,6 +242,9 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sroot cid.Cid
|
|||||||
st.TotalQualityAdjPower = big.Sub(st.TotalQualityAdjPower, big.NewInt(1))
|
st.TotalQualityAdjPower = big.Sub(st.TotalQualityAdjPower, big.NewInt(1))
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
if err != nil {
|
||||||
|
return cid.Undef, xerrors.Errorf("mutating state: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
c, err := vm.Flush(ctx)
|
c, err := vm.Flush(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -221,6 +221,9 @@ var chainStatObjCmd = &cli.Command{
|
|||||||
base := cid.Undef
|
base := cid.Undef
|
||||||
if cctx.IsSet("base") {
|
if cctx.IsSet("base") {
|
||||||
base, err = cid.Decode(cctx.String("base"))
|
base, err = cid.Decode(cctx.String("base"))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stats, err := api.ChainStatObj(ctx, obj, base)
|
stats, err := api.ChainStatObj(ctx, obj, base)
|
||||||
|
@ -10,18 +10,16 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var fetchParamCmd = &cli.Command{
|
var fetchParamCmd = &cli.Command{
|
||||||
Name: "fetch-params",
|
Name: "fetch-params",
|
||||||
Usage: "Fetch proving parameters",
|
Usage: "Fetch proving parameters",
|
||||||
Flags: []cli.Flag{
|
ArgsUsage: "[sectorSize]",
|
||||||
&cli.StringFlag{
|
|
||||||
Name: "proving-params",
|
|
||||||
Usage: "download params used creating proofs for given size, i.e. 32GiB",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
sectorSizeInt, err := units.RAMInBytes(cctx.String("proving-params"))
|
if !cctx.Args().Present() {
|
||||||
|
return xerrors.Errorf("must pass sector size to fetch params for (specify as \"32GiB\", for instance)")
|
||||||
|
}
|
||||||
|
sectorSizeInt, err := units.RAMInBytes(cctx.Args().First())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return xerrors.Errorf("error parsing sector size (specify as \"32GiB\", for instance): %w", err)
|
||||||
}
|
}
|
||||||
sectorSize := uint64(sectorSizeInt)
|
sectorSize := uint64(sectorSizeInt)
|
||||||
|
|
||||||
|
11
cli/state.go
11
cli/state.go
@ -348,7 +348,7 @@ var stateReplaySetCmd = &cli.Command{
|
|||||||
return fmt.Errorf("message cid was invalid: %s", err)
|
return fmt.Errorf("message cid was invalid: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
api, closer, err := GetFullNodeAPI(cctx)
|
fapi, closer, err := GetFullNodeAPI(cctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -370,7 +370,7 @@ var stateReplaySetCmd = &cli.Command{
|
|||||||
if len(tscids) > 0 {
|
if len(tscids) > 0 {
|
||||||
var headers []*types.BlockHeader
|
var headers []*types.BlockHeader
|
||||||
for _, c := range tscids {
|
for _, c := range tscids {
|
||||||
h, err := api.ChainGetBlock(ctx, c)
|
h, err := fapi.ChainGetBlock(ctx, c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -380,12 +380,13 @@ var stateReplaySetCmd = &cli.Command{
|
|||||||
|
|
||||||
ts, err = types.NewTipSet(headers)
|
ts, err = types.NewTipSet(headers)
|
||||||
} else {
|
} else {
|
||||||
r, err := api.StateWaitMsg(ctx, mcid, build.MessageConfidence)
|
var r *api.MsgLookup
|
||||||
|
r, err = fapi.StateWaitMsg(ctx, mcid, build.MessageConfidence)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("finding message in chain: %w", err)
|
return xerrors.Errorf("finding message in chain: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
ts, err = api.ChainGetTipSet(ctx, r.TipSet.Parents())
|
ts, err = fapi.ChainGetTipSet(ctx, r.TipSet.Parents())
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -393,7 +394,7 @@ var stateReplaySetCmd = &cli.Command{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
res, err := api.StateReplay(ctx, ts.Key(), mcid)
|
res, err := fapi.StateReplay(ctx, ts.Key(), mcid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("replay call failed: %w", err)
|
return xerrors.Errorf("replay call failed: %w", err)
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var provingCmd = &cli.Command{
|
var provingCmd = &cli.Command{
|
||||||
Name: "proving",
|
Name: "proving",
|
||||||
|
Usage: "View proving information",
|
||||||
Subcommands: []*cli.Command{
|
Subcommands: []*cli.Command{
|
||||||
provingInfoCmd,
|
provingInfoCmd,
|
||||||
provingDeadlinesCmd,
|
provingDeadlinesCmd,
|
||||||
@ -29,7 +30,8 @@ var provingCmd = &cli.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
var provingInfoCmd = &cli.Command{
|
var provingInfoCmd = &cli.Command{
|
||||||
Name: "info",
|
Name: "info",
|
||||||
|
Usage: "View current state information",
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
nodeApi, closer, err := lcli.GetStorageMinerAPI(cctx)
|
nodeApi, closer, err := lcli.GetStorageMinerAPI(cctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -151,7 +153,8 @@ func epochTime(curr, e abi.ChainEpoch) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var provingDeadlinesCmd = &cli.Command{
|
var provingDeadlinesCmd = &cli.Command{
|
||||||
Name: "deadlines",
|
Name: "deadlines",
|
||||||
|
Usage: "View the current proving period deadlines information",
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
nodeApi, closer, err := lcli.GetStorageMinerAPI(cctx)
|
nodeApi, closer, err := lcli.GetStorageMinerAPI(cctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -8,7 +8,7 @@ make 2k
|
|||||||
|
|
||||||
Download the 2048 byte parameters:
|
Download the 2048 byte parameters:
|
||||||
```sh
|
```sh
|
||||||
./lotus fetch-params --proving-params 2048
|
./lotus fetch-params 2048
|
||||||
```
|
```
|
||||||
|
|
||||||
Pre-seal some sectors:
|
Pre-seal some sectors:
|
||||||
|
Loading…
Reference in New Issue
Block a user