This commit is contained in:
Łukasz Magiera 2020-03-06 20:01:28 +01:00
parent 3d1a5f4bf3
commit 3cab8bd5d1
10 changed files with 74 additions and 75 deletions

View File

@ -87,7 +87,7 @@ func (k *KeyManager) newBLSKey() *wallet.Key {
//sk := ffi.PrivateKeyGenerate(s.blsSeed)
// s.blsSeed++
sk := [32]byte{}
sk[0] = uint8(k.blsSeed+1) // hack to keep gas values determinist
sk[0] = uint8(k.blsSeed + 1) // hack to keep gas values determinist
key, err := wallet.NewKey(types.KeyInfo{
Type: wallet.KTBLS,
PrivateKey: sk[:],

View File

@ -35,8 +35,8 @@ var clientCmd = &cli.Command{
}
var clientImportCmd = &cli.Command{
Name: "import",
Usage: "Import data",
Name: "import",
Usage: "Import data",
ArgsUsage: "[inputPath]",
Action: func(cctx *cli.Context) error {
api, closer, err := GetFullNodeAPI(cctx)
@ -82,8 +82,8 @@ var clientLocalCmd = &cli.Command{
}
var clientDealCmd = &cli.Command{
Name: "deal",
Usage: "Initialize storage deal with a miner",
Name: "deal",
Usage: "Initialize storage deal with a miner",
ArgsUsage: "[dataCid miner price duration]",
Flags: []cli.Flag{
&cli.BoolFlag{
@ -193,8 +193,8 @@ var clientDealCmd = &cli.Command{
}
var clientFindCmd = &cli.Command{
Name: "find",
Usage: "find data in the network",
Name: "find",
Usage: "find data in the network",
ArgsUsage: "[dataCid]",
Action: func(cctx *cli.Context) error {
if !cctx.Args().Present() {
@ -243,8 +243,8 @@ var clientFindCmd = &cli.Command{
}
var clientRetrieveCmd = &cli.Command{
Name: "retrieve",
Usage: "retrieve data from network",
Name: "retrieve",
Usage: "retrieve data from network",
ArgsUsage: "[dataCid outputPath]",
Flags: []cli.Flag{
&cli.StringFlag{
@ -314,8 +314,8 @@ var clientRetrieveCmd = &cli.Command{
}
var clientQueryAskCmd = &cli.Command{
Name: "query-ask",
Usage: "find a miners ask",
Name: "query-ask",
Usage: "find a miners ask",
ArgsUsage: "[minerAddress]",
Flags: []cli.Flag{
&cli.StringFlag{

View File

@ -47,8 +47,8 @@ var multisigCmd = &cli.Command{
}
var msigCreateCmd = &cli.Command{
Name: "create",
Usage: "Create a new multisig wallet",
Name: "create",
Usage: "Create a new multisig wallet",
ArgsUsage: "[address1 address2 ...]",
Flags: []cli.Flag{
&cli.Int64Flag{
@ -158,10 +158,10 @@ var msigCreateCmd = &cli.Command{
}
var msigInspectCmd = &cli.Command{
Name: "inspect",
Usage: "Inspect a multisig wallet",
Name: "inspect",
Usage: "Inspect a multisig wallet",
ArgsUsage: "[address]",
Flags: []cli.Flag{},
Flags: []cli.Flag{},
Action: func(cctx *cli.Context) error {
api, closer, err := GetFullNodeAPI(cctx)
if err != nil {
@ -271,10 +271,10 @@ func state(tx *samsig.Transaction) string {
}
var msigProposeCmd = &cli.Command{
Name: "propose",
Usage: "Propose a multisig transaction",
Name: "propose",
Usage: "Propose a multisig transaction",
ArgsUsage: "[multisigAddress destinationAddress value <methodName methodParams> (optional)]",
Flags: []cli.Flag{},
Flags: []cli.Flag{},
Action: func(cctx *cli.Context) error {
api, closer, err := GetFullNodeAPI(cctx)
if err != nil {
@ -385,10 +385,10 @@ var msigProposeCmd = &cli.Command{
}
var msigApproveCmd = &cli.Command{
Name: "approve",
Usage: "Approve a multisig message",
Name: "approve",
Usage: "Approve a multisig message",
ArgsUsage: "[multisigAddress messageId]",
Flags: []cli.Flag{},
Flags: []cli.Flag{},
Action: func(cctx *cli.Context) error {
api, closer, err := GetFullNodeAPI(cctx)
if err != nil {

View File

@ -23,8 +23,8 @@ var paychCmd = &cli.Command{
}
var paychGetCmd = &cli.Command{
Name: "get",
Usage: "Create a new payment channel or get existing one",
Name: "get",
Usage: "Create a new payment channel or get existing one",
ArgsUsage: "[fromAddress toAddress amount]",
Action: func(cctx *cli.Context) error {
if cctx.Args().Len() != 3 {
@ -102,8 +102,8 @@ var paychVoucherCmd = &cli.Command{
}
var paychVoucherCreateCmd = &cli.Command{
Name: "create",
Usage: "Create a signed payment channel voucher",
Name: "create",
Usage: "Create a signed payment channel voucher",
ArgsUsage: "[channelAddress amount]",
Flags: []cli.Flag{
&cli.IntFlag{
@ -153,8 +153,8 @@ var paychVoucherCreateCmd = &cli.Command{
}
var paychVoucherCheckCmd = &cli.Command{
Name: "check",
Usage: "Check validity of payment channel voucher",
Name: "check",
Usage: "Check validity of payment channel voucher",
ArgsUsage: "[channelAddress voucher]",
Action: func(cctx *cli.Context) error {
if cctx.Args().Len() != 2 {
@ -189,8 +189,8 @@ var paychVoucherCheckCmd = &cli.Command{
}
var paychVoucherAddCmd = &cli.Command{
Name: "add",
Usage: "Add payment channel voucher to local datastore",
Name: "add",
Usage: "Add payment channel voucher to local datastore",
ArgsUsage: "[channelAddress voucher]",
Action: func(cctx *cli.Context) error {
if cctx.Args().Len() != 2 {
@ -225,8 +225,8 @@ var paychVoucherAddCmd = &cli.Command{
}
var paychVoucherListCmd = &cli.Command{
Name: "list",
Usage: "List stored vouchers for a given payment channel",
Name: "list",
Usage: "List stored vouchers for a given payment channel",
ArgsUsage: "[channelAddress]",
Flags: []cli.Flag{
&cli.BoolFlag{
@ -275,8 +275,8 @@ var paychVoucherListCmd = &cli.Command{
}
var paychVoucherBestSpendableCmd = &cli.Command{
Name: "best-spendable",
Usage: "Print voucher with highest value that is currently spendable",
Name: "best-spendable",
Usage: "Print voucher with highest value that is currently spendable",
ArgsUsage: "[channelAddress]",
Action: func(cctx *cli.Context) error {
if cctx.Args().Len() != 1 {
@ -330,8 +330,8 @@ var paychVoucherBestSpendableCmd = &cli.Command{
}
var paychVoucherSubmitCmd = &cli.Command{
Name: "submit",
Usage: "Submit voucher to chain to update payment channel state",
Name: "submit",
Usage: "Submit voucher to chain to update payment channel state",
ArgsUsage: "[channelAddress voucher]",
Action: func(cctx *cli.Context) error {
if cctx.Args().Len() != 2 {

View File

@ -61,8 +61,8 @@ var stateCmd = &cli.Command{
}
var stateMinerInfo = &cli.Command{
Name: "miner-info",
Usage: "Retrieve miner information",
Name: "miner-info",
Usage: "Retrieve miner information",
ArgsUsage: "[minerAddress]",
Action: func(cctx *cli.Context) error {
api, closer, err := GetFullNodeAPI(cctx)
@ -153,8 +153,8 @@ func loadTipSet(ctx context.Context, cctx *cli.Context, api api.FullNode) (*type
}
var statePowerCmd = &cli.Command{
Name: "power",
Usage: "Query network or miner power",
Name: "power",
Usage: "Query network or miner power",
ArgsUsage: "[<minerAddress> (optional)]",
Action: func(cctx *cli.Context) error {
api, closer, err := GetFullNodeAPI(cctx)
@ -197,8 +197,8 @@ var statePowerCmd = &cli.Command{
}
var stateSectorsCmd = &cli.Command{
Name: "sectors",
Usage: "Query the sector set of a miner",
Name: "sectors",
Usage: "Query the sector set of a miner",
ArgsUsage: "[minerAddress]",
Action: func(cctx *cli.Context) error {
api, closer, err := GetFullNodeAPI(cctx)
@ -237,8 +237,8 @@ var stateSectorsCmd = &cli.Command{
}
var stateProvingSetCmd = &cli.Command{
Name: "proving",
Usage: "Query the proving set of a miner",
Name: "proving",
Usage: "Query the proving set of a miner",
ArgsUsage: "[minerAddress]",
Action: func(cctx *cli.Context) error {
api, closer, err := GetFullNodeAPI(cctx)
@ -277,8 +277,8 @@ var stateProvingSetCmd = &cli.Command{
}
var stateReplaySetCmd = &cli.Command{
Name: "replay",
Usage: "Replay a particular message within a tipset",
Name: "replay",
Usage: "Replay a particular message within a tipset",
ArgsUsage: "[tipsetKey messageCid]",
Action: func(cctx *cli.Context) error {
if cctx.Args().Len() < 1 {
@ -384,8 +384,8 @@ var statePledgeCollateralCmd = &cli.Command{
}
var stateGetDealSetCmd = &cli.Command{
Name: "get-deal",
Usage: "View on-chain deal info",
Name: "get-deal",
Usage: "View on-chain deal info",
ArgsUsage: "[dealId]",
Action: func(cctx *cli.Context) error {
api, closer, err := GetFullNodeAPI(cctx)
@ -486,8 +486,8 @@ var stateListActorsCmd = &cli.Command{
}
var stateGetActorCmd = &cli.Command{
Name: "get-actor",
Usage: "Print actor information",
Name: "get-actor",
Usage: "Print actor information",
ArgsUsage: "[actorrAddress]",
Action: func(cctx *cli.Context) error {
api, closer, err := GetFullNodeAPI(cctx)
@ -528,8 +528,8 @@ var stateGetActorCmd = &cli.Command{
}
var stateLookupIDCmd = &cli.Command{
Name: "lookup",
Usage: "Find corresponding ID address",
Name: "lookup",
Usage: "Find corresponding ID address",
ArgsUsage: "[address]",
Action: func(cctx *cli.Context) error {
api, closer, err := GetFullNodeAPI(cctx)
@ -566,8 +566,8 @@ var stateLookupIDCmd = &cli.Command{
}
var stateSectorSizeCmd = &cli.Command{
Name: "sector-size",
Usage: "Look up miners sector size",
Name: "sector-size",
Usage: "Look up miners sector size",
ArgsUsage: "[minerAddress]",
Action: func(cctx *cli.Context) error {
api, closer, err := GetFullNodeAPI(cctx)
@ -603,8 +603,8 @@ var stateSectorSizeCmd = &cli.Command{
}
var stateReadStateCmd = &cli.Command{
Name: "read-state",
Usage: "View a json representation of an actors state",
Name: "read-state",
Usage: "View a json representation of an actors state",
ArgsUsage: "[actorAddress]",
Action: func(cctx *cli.Context) error {
api, closer, err := GetFullNodeAPI(cctx)
@ -796,8 +796,8 @@ var stateComputeStateCmd = &cli.Command{
}
var stateWaitMsgCmd = &cli.Command{
Name: "wait-msg",
Usage: "Wait for a message to appear on chain",
Name: "wait-msg",
Usage: "Wait for a message to appear on chain",
ArgsUsage: "[messageCid]",
Flags: []cli.Flag{
&cli.StringFlag{
@ -837,8 +837,8 @@ var stateWaitMsgCmd = &cli.Command{
}
var stateCallCmd = &cli.Command{
Name: "call",
Usage: "Invoke a method on an actor locally",
Name: "call",
Usage: "Invoke a method on an actor locally",
ArgsUsage: "[toAddress methodId <param1 param2 ...> (optional)]",
Flags: []cli.Flag{
&cli.StringFlag{

View File

@ -94,8 +94,8 @@ var syncWaitCmd = &cli.Command{
}
var syncMarkBadCmd = &cli.Command{
Name: "mark-bad",
Usage: "Mark the given block as bad, will prevent syncing to a chain that contains it",
Name: "mark-bad",
Usage: "Mark the given block as bad, will prevent syncing to a chain that contains it",
ArgsUsage: "[blockCid]",
Action: func(cctx *cli.Context) error {
napi, closer, err := GetFullNodeAPI(cctx)
@ -119,8 +119,8 @@ var syncMarkBadCmd = &cli.Command{
}
var syncCheckBadCmd = &cli.Command{
Name: "check-bad",
Usage: "check if the given block was marked bad, and for what reason",
Name: "check-bad",
Usage: "check if the given block was marked bad, and for what reason",
ArgsUsage: "[blockCid]",
Action: func(cctx *cli.Context) error {
napi, closer, err := GetFullNodeAPI(cctx)

View File

@ -135,8 +135,8 @@ var walletGetDefault = &cli.Command{
}
var walletSetDefault = &cli.Command{
Name: "set-default",
Usage: "Set default wallet address",
Name: "set-default",
Usage: "Set default wallet address",
ArgsUsage: "[address]",
Action: func(cctx *cli.Context) error {
api, closer, err := GetFullNodeAPI(cctx)
@ -160,8 +160,8 @@ var walletSetDefault = &cli.Command{
}
var walletExport = &cli.Command{
Name: "export",
Usage: "export keys",
Name: "export",
Usage: "export keys",
ArgsUsage: "[address]",
Action: func(cctx *cli.Context) error {
api, closer, err := GetFullNodeAPI(cctx)
@ -196,8 +196,8 @@ var walletExport = &cli.Command{
}
var walletImport = &cli.Command{
Name: "import",
Usage: "import keys",
Name: "import",
Usage: "import keys",
ArgsUsage: "[<path> (optional, will read from stdin if omitted)]",
Action: func(cctx *cli.Context) error {
api, closer, err := GetFullNodeAPI(cctx)

View File

@ -179,8 +179,8 @@ func main() {
}
sbfs := &fs.Basic{
Miner: maddr,
Root: sbdir,
Miner: maddr,
Root: sbdir,
}
sb, err := sectorbuilder.New(sbfs, cfg)

View File

@ -55,8 +55,8 @@ func PreSeal(maddr address.Address, pt abi.RegisteredProof, offset abi.SectorNum
next := offset
sbfs := &fs.Basic{
Miner: maddr,
Root: sbroot,
Miner: maddr,
Root: sbroot,
}
sb, err := sectorbuilder.New(sbfs, cfg)

1
go.mod
View File

@ -85,7 +85,6 @@ require (
github.com/multiformats/go-multiaddr-dns v0.2.0
github.com/multiformats/go-multiaddr-net v0.1.2
github.com/multiformats/go-multihash v0.0.13
github.com/multiformats/go-varint v0.0.5
github.com/opentracing/opentracing-go v1.1.0
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829
github.com/prometheus/common v0.4.0