WIP: Able to make call
WIP: further improve CHANGELOG Go mod switch dependency
This commit is contained in:
parent
0d240d1c58
commit
0a25e90dc8
@ -2,6 +2,14 @@
|
|||||||
|
|
||||||
# UNRELEASED
|
# UNRELEASED
|
||||||
|
|
||||||
|
## New features
|
||||||
|
- feat: Added new tracing API (**HIGHLY EXPERIMENTAL**) supporting two RPC methods: `trace_block` and `trace_replayBlockTransactions` ([filecoin-project/lotus#11100](https://github.com/filecoin-project/lotus/pull/11100))
|
||||||
|
- feat: Add move-partition command ([filecoin-project/lotus#11290](https://github.com/filecoin-project/lotus/pull/11290))
|
||||||
|
- chore: Auto remove local chain data when importing chain file or snapshot ([filecoin-project/lotus#11277](https://github.com/filecoin-project/lotus/pull/11277))
|
||||||
|
|
||||||
|
## Improvements
|
||||||
|
- fix: Add time slicing to splitstore purging step during compaction to reduce lock congestion [filecoin-project/lotus#11269](https://github.com/filecoin-project/lotus/pull/11269)
|
||||||
|
|
||||||
# v1.23.3 / 2023-08-01
|
# v1.23.3 / 2023-08-01
|
||||||
|
|
||||||
This feature release of Lotus includes numerous improvements and enhancements for node operators, ETH RPC-providers and storage providers.
|
This feature release of Lotus includes numerous improvements and enhancements for node operators, ETH RPC-providers and storage providers.
|
||||||
|
@ -21,6 +21,7 @@ import (
|
|||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
"github.com/filecoin-project/go-state-types/big"
|
"github.com/filecoin-project/go-state-types/big"
|
||||||
"github.com/filecoin-project/go-state-types/builtin"
|
"github.com/filecoin-project/go-state-types/builtin"
|
||||||
|
minerV12 "github.com/filecoin-project/go-state-types/builtin/v12/miner"
|
||||||
"github.com/filecoin-project/go-state-types/builtin/v9/miner"
|
"github.com/filecoin-project/go-state-types/builtin/v9/miner"
|
||||||
"github.com/filecoin-project/go-state-types/network"
|
"github.com/filecoin-project/go-state-types/network"
|
||||||
|
|
||||||
@ -49,6 +50,7 @@ var actorCmd = &cli.Command{
|
|||||||
actorProposeChangeWorker,
|
actorProposeChangeWorker,
|
||||||
actorConfirmChangeWorker,
|
actorConfirmChangeWorker,
|
||||||
actorCompactAllocatedCmd,
|
actorCompactAllocatedCmd,
|
||||||
|
actorMovePartitionsCmd,
|
||||||
actorProposeChangeBeneficiary,
|
actorProposeChangeBeneficiary,
|
||||||
actorConfirmChangeBeneficiary,
|
actorConfirmChangeBeneficiary,
|
||||||
},
|
},
|
||||||
@ -1286,13 +1288,144 @@ var actorConfirmChangeBeneficiary = &cli.Command{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var actorMovePartitionsCmd = &cli.Command{
|
||||||
|
Name: "move-partitions",
|
||||||
|
Usage: "move deadline of specified partitions from one to another",
|
||||||
|
Flags: []cli.Flag{
|
||||||
|
&cli.Int64SliceFlag{
|
||||||
|
Name: "partition-indices",
|
||||||
|
Usage: "Indices of partitions to update, separated by comma",
|
||||||
|
},
|
||||||
|
&cli.Uint64Flag{
|
||||||
|
Name: "orig-deadline",
|
||||||
|
Usage: "Deadline to move partition from",
|
||||||
|
},
|
||||||
|
&cli.Uint64Flag{
|
||||||
|
Name: "dest-deadline",
|
||||||
|
Usage: "Deadline to move partition to",
|
||||||
|
},
|
||||||
|
&cli.BoolFlag{
|
||||||
|
Name: "really-do-it",
|
||||||
|
Usage: "Actually send transaction performing the action",
|
||||||
|
Value: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Action: func(cctx *cli.Context) error {
|
||||||
|
if cctx.Args().Present() {
|
||||||
|
return fmt.Errorf("please use flags to provide arguments")
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx := lcli.ReqContext(cctx)
|
||||||
|
|
||||||
|
minerApi, closer, err := lcli.GetStorageMinerAPI(cctx)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer closer()
|
||||||
|
|
||||||
|
maddr, err := minerApi.ActorAddress(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt.Printf("Miner: %s\n", color.BlueString("%s", maddr))
|
||||||
|
|
||||||
|
fullNodeApi, acloser, err := lcli.GetFullNodeAPI(cctx)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer acloser()
|
||||||
|
|
||||||
|
minfo, err := fullNodeApi.StateMinerInfo(ctx, maddr, types.EmptyTSK)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
origDeadline := cctx.Uint64("orig-deadline")
|
||||||
|
if origDeadline > miner.WPoStPeriodDeadlines {
|
||||||
|
return fmt.Errorf("orig-deadline %d out of range", origDeadline)
|
||||||
|
}
|
||||||
|
destDeadline := cctx.Uint64("dest-deadline")
|
||||||
|
if destDeadline > miner.WPoStPeriodDeadlines {
|
||||||
|
return fmt.Errorf("dest-deadline %d out of range", destDeadline)
|
||||||
|
}
|
||||||
|
if origDeadline == destDeadline {
|
||||||
|
return fmt.Errorf("dest-desdline cannot be the same as orig-deadline")
|
||||||
|
}
|
||||||
|
|
||||||
|
partitions := cctx.Int64Slice("partition-indices")
|
||||||
|
if len(partitions) == 0 {
|
||||||
|
return fmt.Errorf("must include at least one partition to move")
|
||||||
|
}
|
||||||
|
|
||||||
|
curPartitions, err := fullNodeApi.StateMinerPartitions(ctx, maddr, origDeadline, types.EmptyTSK)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("getting partitions for deadline %d: %w", origDeadline, err)
|
||||||
|
}
|
||||||
|
if len(partitions) > len(curPartitions) {
|
||||||
|
return fmt.Errorf("partition size(%d) cannot be bigger than current partition size(%d) for deadline %d", len(partitions), len(curPartitions), origDeadline)
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt.Printf("Moving %d paritions\n", len(partitions))
|
||||||
|
|
||||||
|
partitionsBf := bitfield.New()
|
||||||
|
for _, partition := range partitions {
|
||||||
|
if partition >= int64(len(curPartitions)) {
|
||||||
|
return fmt.Errorf("partition index(%d) doesn't exist", partition)
|
||||||
|
}
|
||||||
|
partitionsBf.Set(uint64(partition))
|
||||||
|
}
|
||||||
|
|
||||||
|
params := minerV12.MovePartitionsParams{
|
||||||
|
OrigDeadline: origDeadline,
|
||||||
|
DestDeadline: destDeadline,
|
||||||
|
Partitions: partitionsBf,
|
||||||
|
}
|
||||||
|
|
||||||
|
serializedParams, err := actors.SerializeParams(¶ms)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("serializing params: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
smsg, err := fullNodeApi.MpoolPushMessage(ctx, &types.Message{
|
||||||
|
From: minfo.Worker,
|
||||||
|
To: maddr,
|
||||||
|
Method: builtin.MethodsMiner.MovePartitions,
|
||||||
|
Value: big.Zero(),
|
||||||
|
Params: serializedParams,
|
||||||
|
}, nil)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("mpool push: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt.Println("MovePartitions Message CID:", smsg.Cid())
|
||||||
|
|
||||||
|
// wait for it to get mined into a block
|
||||||
|
fmt.Println("Waiting for block confirmation...")
|
||||||
|
wait, err := fullNodeApi.StateWaitMsg(ctx, smsg.Cid(), build.MessageConfidence)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// check it executed successfully
|
||||||
|
if wait.Receipt.ExitCode.IsError() {
|
||||||
|
fmt.Println("Moving partitions failed!")
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt.Println("Move partition confirmed")
|
||||||
|
|
||||||
|
return nil
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
var actorCompactAllocatedCmd = &cli.Command{
|
var actorCompactAllocatedCmd = &cli.Command{
|
||||||
Name: "compact-allocated",
|
Name: "compact-allocated",
|
||||||
Usage: "compact allocated sectors bitfield",
|
Usage: "compact allocated sectors bitfield",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.Uint64Flag{
|
&cli.Uint64Flag{
|
||||||
Name: "mask-last-offset",
|
Name: "mask-last-offset",
|
||||||
Usage: "Mask sector IDs from 0 to 'higest_allocated - offset'",
|
Usage: "Mask sector IDs from 0 to 'highest_allocated - offset'",
|
||||||
},
|
},
|
||||||
&cli.Uint64Flag{
|
&cli.Uint64Flag{
|
||||||
Name: "mask-upto-n",
|
Name: "mask-upto-n",
|
||||||
|
2
extern/filecoin-ffi
vendored
2
extern/filecoin-ffi
vendored
@ -1 +1 @@
|
|||||||
Subproject commit b53241344bcba6ad12e91a00aa0e61e20e85ef0a
|
Subproject commit bf5edd551d23901fa565aac4ce94433afe0c278e
|
2
go.mod
2
go.mod
@ -45,7 +45,7 @@ require (
|
|||||||
github.com/filecoin-project/go-jsonrpc v0.3.1
|
github.com/filecoin-project/go-jsonrpc v0.3.1
|
||||||
github.com/filecoin-project/go-padreader v0.0.1
|
github.com/filecoin-project/go-padreader v0.0.1
|
||||||
github.com/filecoin-project/go-paramfetch v0.0.4
|
github.com/filecoin-project/go-paramfetch v0.0.4
|
||||||
github.com/filecoin-project/go-state-types v0.12.3
|
github.com/filecoin-project/go-state-types v0.12.2-0.20230922160618-c7bfcda23a24
|
||||||
github.com/filecoin-project/go-statemachine v1.0.3
|
github.com/filecoin-project/go-statemachine v1.0.3
|
||||||
github.com/filecoin-project/go-statestore v0.2.0
|
github.com/filecoin-project/go-statestore v0.2.0
|
||||||
github.com/filecoin-project/go-storedcounter v0.1.0
|
github.com/filecoin-project/go-storedcounter v0.1.0
|
||||||
|
6
go.sum
6
go.sum
@ -337,9 +337,15 @@ github.com/filecoin-project/go-state-types v0.0.0-20201102161440-c8033295a1fc/go
|
|||||||
github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g=
|
github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g=
|
||||||
github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q=
|
github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q=
|
||||||
github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q=
|
github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q=
|
||||||
|
<<<<<<< HEAD
|
||||||
github.com/filecoin-project/go-state-types v0.11.2-0.20230712101859-8f37624fa540/go.mod h1:SyNPwTsU7I22gL2r0OAPcImvLoTVfgRwdK/Y5rR1zz8=
|
github.com/filecoin-project/go-state-types v0.11.2-0.20230712101859-8f37624fa540/go.mod h1:SyNPwTsU7I22gL2r0OAPcImvLoTVfgRwdK/Y5rR1zz8=
|
||||||
github.com/filecoin-project/go-state-types v0.12.3 h1:tPljjwrmLUT+b/H0R0yWZQVjVEso7ld9JBh4mpF6c8c=
|
github.com/filecoin-project/go-state-types v0.12.3 h1:tPljjwrmLUT+b/H0R0yWZQVjVEso7ld9JBh4mpF6c8c=
|
||||||
github.com/filecoin-project/go-state-types v0.12.3/go.mod h1:iJTqGdWDvzXhuVf64Lw0hzt4TIoitMo0VgHdxdjNDZI=
|
github.com/filecoin-project/go-state-types v0.12.3/go.mod h1:iJTqGdWDvzXhuVf64Lw0hzt4TIoitMo0VgHdxdjNDZI=
|
||||||
|
=======
|
||||||
|
github.com/filecoin-project/go-state-types v0.11.1/go.mod h1:SyNPwTsU7I22gL2r0OAPcImvLoTVfgRwdK/Y5rR1zz8=
|
||||||
|
github.com/filecoin-project/go-state-types v0.12.2-0.20230922160618-c7bfcda23a24 h1:6+no4ioAQoAUV7Rbfyek7kTk8OLiHYKrQ32elx35OcI=
|
||||||
|
github.com/filecoin-project/go-state-types v0.12.2-0.20230922160618-c7bfcda23a24/go.mod h1:KOBGyvCalT8uHBS7KSKOVbjsilD90bBZHgLAqrzz6gU=
|
||||||
|
>>>>>>> fe973ece3 (WIP: Able to make call)
|
||||||
github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig=
|
github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig=
|
||||||
github.com/filecoin-project/go-statemachine v1.0.3 h1:N07o6alys+V1tNoSTi4WuuoeNC4erS/6jE74+NsgQuk=
|
github.com/filecoin-project/go-statemachine v1.0.3 h1:N07o6alys+V1tNoSTi4WuuoeNC4erS/6jE74+NsgQuk=
|
||||||
github.com/filecoin-project/go-statemachine v1.0.3/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54=
|
github.com/filecoin-project/go-statemachine v1.0.3/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54=
|
||||||
|
Loading…
Reference in New Issue
Block a user