Merge pull request #9712 from filecoin-project/id/update-go-version
_build_: Update to Go Version 1.18.8
This commit is contained in:
commit
b1045c39ed
@ -6,7 +6,7 @@ executors:
|
|||||||
golang:
|
golang:
|
||||||
docker:
|
docker:
|
||||||
# Must match GO_VERSION_MIN in project root
|
# Must match GO_VERSION_MIN in project root
|
||||||
- image: cimg/go:1.18.1
|
- image: cimg/go:1.18.8
|
||||||
resource_class: 2xlarge
|
resource_class: 2xlarge
|
||||||
ubuntu:
|
ubuntu:
|
||||||
docker:
|
docker:
|
||||||
|
@ -6,7 +6,7 @@ executors:
|
|||||||
golang:
|
golang:
|
||||||
docker:
|
docker:
|
||||||
# Must match GO_VERSION_MIN in project root
|
# Must match GO_VERSION_MIN in project root
|
||||||
- image: cimg/go:1.18.1
|
- image: cimg/go:1.18.8
|
||||||
resource_class: 2xlarge
|
resource_class: 2xlarge
|
||||||
ubuntu:
|
ubuntu:
|
||||||
docker:
|
docker:
|
||||||
|
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
@ -37,7 +37,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/setup-go@v1
|
- uses: actions/setup-go@v1
|
||||||
with:
|
with:
|
||||||
go-version: '1.18.1'
|
go-version: '1.18.8'
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM golang:1.18.1-buster AS builder-deps
|
FROM golang:1.18.8-buster AS builder-deps
|
||||||
MAINTAINER Lotus Development Team
|
MAINTAINER Lotus Development Team
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y ca-certificates build-essential clang ocl-icd-opencl-dev ocl-icd-libopencl1 jq libhwloc-dev
|
RUN apt-get update && apt-get install -y ca-certificates build-essential clang ocl-icd-opencl-dev ocl-icd-libopencl1 jq libhwloc-dev
|
||||||
|
@ -1 +1 @@
|
|||||||
1.18.1
|
1.18.8
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<a href="https://circleci.com/gh/filecoin-project/lotus"><img src="https://circleci.com/gh/filecoin-project/lotus.svg?style=svg"></a>
|
<a href="https://circleci.com/gh/filecoin-project/lotus"><img src="https://circleci.com/gh/filecoin-project/lotus.svg?style=svg"></a>
|
||||||
<a href="https://codecov.io/gh/filecoin-project/lotus"><img src="https://codecov.io/gh/filecoin-project/lotus/branch/master/graph/badge.svg"></a>
|
<a href="https://codecov.io/gh/filecoin-project/lotus"><img src="https://codecov.io/gh/filecoin-project/lotus/branch/master/graph/badge.svg"></a>
|
||||||
<a href="https://goreportcard.com/report/github.com/filecoin-project/lotus"><img src="https://goreportcard.com/badge/github.com/filecoin-project/lotus" /></a>
|
<a href="https://goreportcard.com/report/github.com/filecoin-project/lotus"><img src="https://goreportcard.com/badge/github.com/filecoin-project/lotus" /></a>
|
||||||
<a href=""><img src="https://img.shields.io/badge/golang-%3E%3D1.18.1-blue.svg" /></a>
|
<a href=""><img src="https://img.shields.io/badge/golang-%3E%3D1.18.8-blue.svg" /></a>
|
||||||
<br>
|
<br>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@ -71,10 +71,10 @@ For other distributions you can find the required dependencies [here.](https://l
|
|||||||
|
|
||||||
#### Go
|
#### Go
|
||||||
|
|
||||||
To build Lotus, you need a working installation of [Go 1.18.1 or higher](https://golang.org/dl/):
|
To build Lotus, you need a working installation of [Go 1.18.8 or higher](https://golang.org/dl/):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
wget -c https://golang.org/dl/go1.18.1.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local
|
wget -c https://golang.org/dl/go1.18.8.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local
|
||||||
```
|
```
|
||||||
|
|
||||||
**TIP:**
|
**TIP:**
|
||||||
|
@ -24,6 +24,8 @@ import (
|
|||||||
"github.com/libp2p/go-libp2p/core/peer"
|
"github.com/libp2p/go-libp2p/core/peer"
|
||||||
"github.com/libp2p/go-libp2p/core/protocol"
|
"github.com/libp2p/go-libp2p/core/protocol"
|
||||||
"github.com/multiformats/go-multiaddr"
|
"github.com/multiformats/go-multiaddr"
|
||||||
|
"golang.org/x/text/cases"
|
||||||
|
"golang.org/x/text/language"
|
||||||
|
|
||||||
"github.com/filecoin-project/go-address"
|
"github.com/filecoin-project/go-address"
|
||||||
"github.com/filecoin-project/go-bitfield"
|
"github.com/filecoin-project/go-bitfield"
|
||||||
@ -456,7 +458,8 @@ func exampleStruct(method string, t, parent reflect.Type) interface{} {
|
|||||||
if f.Type == parent {
|
if f.Type == parent {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if strings.Title(f.Name) == f.Name {
|
caser := cases.Title(language.English)
|
||||||
|
if caser.String(f.Name) == f.Name {
|
||||||
ns.Elem().Field(i).Set(reflect.ValueOf(ExampleValue(method, f.Type, t)))
|
ns.Elem().Field(i).Set(reflect.ValueOf(ExampleValue(method, f.Type, t)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -29,7 +29,7 @@ func Weight(ctx context.Context, stateBs bstore.Blockstore, ts *types.TipSet) (t
|
|||||||
|
|
||||||
// >>> wFunction(totalPowerAtTipset(ts)) * 2^8 <<< + (wFunction(totalPowerAtTipset(ts)) * sum(ts.blocks[].ElectionProof.WinCount) * wRatio_num * 2^8) / (e * wRatio_den)
|
// >>> wFunction(totalPowerAtTipset(ts)) * 2^8 <<< + (wFunction(totalPowerAtTipset(ts)) * sum(ts.blocks[].ElectionProof.WinCount) * wRatio_num * 2^8) / (e * wRatio_den)
|
||||||
|
|
||||||
tpow := big2.Zero()
|
var tpow big2.Int
|
||||||
{
|
{
|
||||||
cst := cbor.NewCborStore(stateBs)
|
cst := cbor.NewCborStore(stateBs)
|
||||||
state, err := state.LoadStateTree(cst, ts.ParentState())
|
state, err := state.LoadStateTree(cst, ts.ParentState())
|
||||||
|
@ -105,7 +105,7 @@ func TestFundManagerBasic(t *testing.T) {
|
|||||||
// Note: Expect failure because there is no available balance to withdraw:
|
// Note: Expect failure because there is no available balance to withdraw:
|
||||||
// balance - reserved = 16 - 16 = 0
|
// balance - reserved = 16 - 16 = 0
|
||||||
amt = abi.NewTokenAmount(1)
|
amt = abi.NewTokenAmount(1)
|
||||||
sentinel, err = s.fm.Withdraw(s.ctx, s.walletAddr, s.acctAddr, amt)
|
_, err = s.fm.Withdraw(s.ctx, s.walletAddr, s.acctAddr, amt)
|
||||||
require.Error(t, err)
|
require.Error(t, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ func ParseFIL(s string) (FIL, error) {
|
|||||||
return FIL{}, fmt.Errorf("string length too large: %d", len(s))
|
return FIL{}, fmt.Errorf("string length too large: %d", len(s))
|
||||||
}
|
}
|
||||||
|
|
||||||
r, ok := new(big.Rat).SetString(s)
|
r, ok := new(big.Rat).SetString(s) //nolint:gosec
|
||||||
if !ok {
|
if !ok {
|
||||||
return FIL{}, fmt.Errorf("failed to parse %q as a decimal number", s)
|
return FIL{}, fmt.Errorf("failed to parse %q as a decimal number", s)
|
||||||
}
|
}
|
||||||
|
@ -274,7 +274,7 @@ func FullNodeProxy[T api.FullNode](ins []T, outstr *api.FullNodeStruct) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
total := len(rins)
|
total := len(rins)
|
||||||
result, err := retry.Retry(ctx, 5, initialBackoff, errorsToRetry, func() (results []reflect.Value, err2 error) {
|
result, _ := retry.Retry(ctx, 5, initialBackoff, errorsToRetry, func() ([]reflect.Value, error) {
|
||||||
curr = (curr + 1) % total
|
curr = (curr + 1) % total
|
||||||
|
|
||||||
result := fns[curr].Call(args)
|
result := fns[curr].Call(args)
|
||||||
|
@ -149,7 +149,7 @@ var importBenchCmd = &cli.Command{
|
|||||||
|
|
||||||
http.Handle("/debug/metrics", exporter)
|
http.Handle("/debug/metrics", exporter)
|
||||||
|
|
||||||
http.ListenAndServe("localhost:6060", nil) //nolint:errcheck
|
_ = http.ListenAndServe("localhost:6060", nil)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
var tdir string
|
var tdir string
|
||||||
@ -771,7 +771,7 @@ var importAnalyzeCmd = &cli.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
http.ListenAndServe("localhost:6060", nil) //nolint:errcheck
|
_ = http.ListenAndServe("localhost:6060", nil)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
fi, err := os.Open(cctx.Args().First())
|
fi, err := os.Open(cctx.Args().First())
|
||||||
|
@ -74,6 +74,10 @@ var runCmd = &cli.Command{
|
|||||||
Name: "captcha-threshold",
|
Name: "captcha-threshold",
|
||||||
Value: 0.5,
|
Value: 0.5,
|
||||||
},
|
},
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "http-server-timeout",
|
||||||
|
Value: "30s",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
sendPerRequest, err := types.ParseFIL(cctx.String("amount"))
|
sendPerRequest, err := types.ParseFIL(cctx.String("amount"))
|
||||||
@ -127,7 +131,17 @@ var runCmd = &cli.Command{
|
|||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
return http.ListenAndServe(cctx.String("front"), nil)
|
timeout, err := time.ParseDuration(cctx.String("http-server-timeout"))
|
||||||
|
if err != nil {
|
||||||
|
return xerrors.Errorf("invalid time string %s: %x", cctx.String("http-server-timeout"), err)
|
||||||
|
}
|
||||||
|
|
||||||
|
server := &http.Server{
|
||||||
|
Addr: cctx.String("front"),
|
||||||
|
ReadHeaderTimeout: timeout,
|
||||||
|
}
|
||||||
|
|
||||||
|
return server.ListenAndServe()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -418,10 +418,24 @@ var runCmd = &cli.Command{
|
|||||||
Usage: "messages with a prove cap larger than this will be skipped when processing pre commit messages",
|
Usage: "messages with a prove cap larger than this will be skipped when processing pre commit messages",
|
||||||
Value: "0.000000001",
|
Value: "0.000000001",
|
||||||
},
|
},
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "http-server-timeout",
|
||||||
|
Value: "30s",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
|
timeout, err := time.ParseDuration(cctx.String("http-timeout"))
|
||||||
|
if err != nil {
|
||||||
|
return xerrors.Errorf("invalid time string %s: %x", cctx.String("http-timeout"), err)
|
||||||
|
}
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
http.ListenAndServe(":6060", nil) //nolint:errcheck
|
server := &http.Server{
|
||||||
|
Addr: ":6060",
|
||||||
|
ReadHeaderTimeout: timeout,
|
||||||
|
}
|
||||||
|
|
||||||
|
_ = server.ListenAndServe()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@ -898,7 +912,7 @@ func (r *refunder) EnsureMinerMinimums(ctx context.Context, tipset *types.TipSet
|
|||||||
func (r *refunder) processTipsetStorageMarketActor(ctx context.Context, tipset *types.TipSet, msg api.Message, recp *types.MessageReceipt) (bool, string, types.BigInt, error) {
|
func (r *refunder) processTipsetStorageMarketActor(ctx context.Context, tipset *types.TipSet, msg api.Message, recp *types.MessageReceipt) (bool, string, types.BigInt, error) {
|
||||||
|
|
||||||
m := msg.Message
|
m := msg.Message
|
||||||
refundValue := types.NewInt(0)
|
var refundValue types.BigInt
|
||||||
var messageMethod string
|
var messageMethod string
|
||||||
|
|
||||||
switch m.Method {
|
switch m.Method {
|
||||||
@ -925,7 +939,7 @@ func (r *refunder) processTipsetStorageMarketActor(ctx context.Context, tipset *
|
|||||||
func (r *refunder) processTipsetStorageMinerActor(ctx context.Context, tipset *types.TipSet, msg api.Message, recp *types.MessageReceipt) (bool, string, types.BigInt, error) {
|
func (r *refunder) processTipsetStorageMinerActor(ctx context.Context, tipset *types.TipSet, msg api.Message, recp *types.MessageReceipt) (bool, string, types.BigInt, error) {
|
||||||
|
|
||||||
m := msg.Message
|
m := msg.Message
|
||||||
refundValue := types.NewInt(0)
|
var refundValue types.BigInt
|
||||||
var messageMethod string
|
var messageMethod string
|
||||||
|
|
||||||
if _, found := r.blockmap[m.To]; found {
|
if _, found := r.blockmap[m.To]; found {
|
||||||
|
@ -36,7 +36,7 @@ type Option uint64
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
Approve Option = 49
|
Approve Option = 49
|
||||||
Reject = 50
|
Reject Option = 50
|
||||||
)
|
)
|
||||||
|
|
||||||
type Vote struct {
|
type Vote struct {
|
||||||
@ -148,7 +148,7 @@ var finalResultCmd = &cli.Command{
|
|||||||
}
|
}
|
||||||
votes, err := getVotesMap(vj)
|
votes, err := getVotesMap(vj)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("failed to get voters: ", err)
|
return xerrors.Errorf("failed to get voters: %w\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
type minerBriefInfo struct {
|
type minerBriefInfo struct {
|
||||||
@ -160,23 +160,23 @@ var finalResultCmd = &cli.Command{
|
|||||||
// power actor
|
// power actor
|
||||||
pa, err := st.GetActor(power.Address)
|
pa, err := st.GetActor(power.Address)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("failed to get power actor: \n", err)
|
return xerrors.Errorf("failed to get power actor: %w\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
powerState, err := power.Load(store, pa)
|
powerState, err := power.Load(store, pa)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("failed to get power state: \n", err)
|
return xerrors.Errorf("failed to get power state: %w\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
//market actor
|
//market actor
|
||||||
ma, err := st.GetActor(market.Address)
|
ma, err := st.GetActor(market.Address)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("fail to get market actor: ", err)
|
return xerrors.Errorf("fail to get market actor: %w\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
marketState, err := market.Load(store, ma)
|
marketState, err := market.Load(store, ma)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("fail to load market state: ", err)
|
return xerrors.Errorf("fail to load market state: %w\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
lookupId := func(addr address.Address) address.Address {
|
lookupId := func(addr address.Address) address.Address {
|
||||||
@ -219,7 +219,7 @@ var finalResultCmd = &cli.Command{
|
|||||||
// TODO: Confirm that these are always ID addresses
|
// TODO: Confirm that these are always ID addresses
|
||||||
signers, err := ms.Signers()
|
signers, err := ms.Signers()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("fail to get msig signers", err)
|
return xerrors.Errorf("fail to get msig signers: %w", err)
|
||||||
}
|
}
|
||||||
for _, s := range signers {
|
for _, s := range signers {
|
||||||
signerId := lookupId(s)
|
signerId := lookupId(s)
|
||||||
@ -244,12 +244,12 @@ var finalResultCmd = &cli.Command{
|
|||||||
if builtin.IsStorageMinerActor(act.Code) {
|
if builtin.IsStorageMinerActor(act.Code) {
|
||||||
m, err := miner.Load(store, act)
|
m, err := miner.Load(store, act)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("fail to load miner actor: \n", err)
|
return xerrors.Errorf("fail to load miner actor: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
info, err := m.Info()
|
info, err := m.Info()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("fail to get miner info: \n", err)
|
return xerrors.Errorf("fail to get miner info: %w\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
ownerId := lookupId(info.Owner)
|
ownerId := lookupId(info.Owner)
|
||||||
@ -353,7 +353,7 @@ var finalResultCmd = &cli.Command{
|
|||||||
//process votes for regular accounts
|
//process votes for regular accounts
|
||||||
accountActor, err := st.GetActor(signerId)
|
accountActor, err := st.GetActor(signerId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("fail to get account account for signer: ", err)
|
return xerrors.Errorf("fail to get account account for signer: %w\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
clientBytes, ok := clientToDealStorage[signerId]
|
clientBytes, ok := clientToDealStorage[signerId]
|
||||||
|
@ -234,6 +234,9 @@ var replayOfflineCmd = &cli.Command{
|
|||||||
return xerrors.Errorf("could not find message within the last %d epochs", lookbackLimit)
|
return xerrors.Errorf("could not find message within the last %d epochs", lookbackLimit)
|
||||||
}
|
}
|
||||||
executionTs, err := cs.GetTipsetByHeight(ctx, ts.Height()-2, ts, true)
|
executionTs, err := cs.GetTipsetByHeight(ctx, ts.Height()-2, ts, true)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
tw := tabwriter.NewWriter(os.Stdout, 8, 2, 2, ' ', tabwriter.AlignRight)
|
tw := tabwriter.NewWriter(os.Stdout, 8, 2, 2, ' ', tabwriter.AlignRight)
|
||||||
res, err := sm.CallWithGas(ctx, msg, []types.ChainMsg{}, executionTs)
|
res, err := sm.CallWithGas(ctx, msg, []types.ChainMsg{}, executionTs)
|
||||||
|
@ -98,6 +98,9 @@ var invariantsCmd = &cli.Command{
|
|||||||
fmt.Println("Network Version ", nv)
|
fmt.Println("Network Version ", nv)
|
||||||
|
|
||||||
av, err := actorstypes.VersionForNetwork(nv)
|
av, err := actorstypes.VersionForNetwork(nv)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
fmt.Println("Actors Version ", av)
|
fmt.Println("Actors Version ", av)
|
||||||
|
|
||||||
actorCodeCids, err := actors.GetActorCodeIDs(av)
|
actorCodeCids, err := actors.GetActorCodeIDs(av)
|
||||||
@ -114,6 +117,9 @@ var invariantsCmd = &cli.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
actorTree, err := builtin.LoadTree(actorStore, stateRoot.Actors)
|
actorTree, err := builtin.LoadTree(actorStore, stateRoot.Actors)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
startTime := time.Now()
|
startTime := time.Now()
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ import (
|
|||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/chzyer/readline"
|
"github.com/chzyer/readline"
|
||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
@ -25,6 +26,10 @@ var itestdCmd = &cli.Command{
|
|||||||
Name: "listen",
|
Name: "listen",
|
||||||
Value: "127.0.0.1:5674",
|
Value: "127.0.0.1:5674",
|
||||||
},
|
},
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "http-server-timeout",
|
||||||
|
Value: "30s",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
var nodes []kit.ItestdNotif
|
var nodes []kit.ItestdNotif
|
||||||
@ -44,9 +49,14 @@ var itestdCmd = &cli.Command{
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("net listen: %w", err)
|
return xerrors.Errorf("net listen: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
timeout, err := time.ParseDuration(cctx.String("http-server-timeout"))
|
||||||
|
if err != nil {
|
||||||
|
return xerrors.Errorf("invalid time string %s: %x", cctx.String("http-server-timeout"), err)
|
||||||
|
}
|
||||||
s := &httptest.Server{
|
s := &httptest.Server{
|
||||||
Listener: l,
|
Listener: l,
|
||||||
Config: &http.Server{Handler: m},
|
Config: &http.Server{Handler: m, ReadHeaderTimeout: timeout},
|
||||||
}
|
}
|
||||||
s.Start()
|
s.Start()
|
||||||
fmt.Printf("ITest env:\n\nLOTUS_ITESTD=%s\n\nSay 'sh' to spawn a shell connected to test nodes\n--- waiting for clients\n", s.URL)
|
fmt.Printf("ITest env:\n\nLOTUS_ITESTD=%s\n\nSay 'sh' to spawn a shell connected to test nodes\n--- waiting for clients\n", s.URL)
|
||||||
|
@ -13,6 +13,7 @@ import (
|
|||||||
"go.opencensus.io/stats"
|
"go.opencensus.io/stats"
|
||||||
"go.opencensus.io/stats/view"
|
"go.opencensus.io/stats/view"
|
||||||
"go.opencensus.io/tag"
|
"go.opencensus.io/tag"
|
||||||
|
"golang.org/x/xerrors"
|
||||||
|
|
||||||
"github.com/filecoin-project/go-address"
|
"github.com/filecoin-project/go-address"
|
||||||
"github.com/filecoin-project/go-state-types/builtin"
|
"github.com/filecoin-project/go-state-types/builtin"
|
||||||
@ -76,8 +77,14 @@ type msgInfo struct {
|
|||||||
|
|
||||||
var mpoolStatsCmd = &cli.Command{
|
var mpoolStatsCmd = &cli.Command{
|
||||||
Name: "mpool-stats",
|
Name: "mpool-stats",
|
||||||
|
Flags: []cli.Flag{
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "http-server-timeout",
|
||||||
|
Value: "30s",
|
||||||
|
},
|
||||||
|
},
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
logging.SetLogLevel("rpc", "ERROR")
|
_ = logging.SetLogLevel("rpc", "ERROR")
|
||||||
|
|
||||||
if err := view.Register(AgeView, SizeView, InboundRate, InclusionRate, MsgWait); err != nil {
|
if err := view.Register(AgeView, SizeView, InboundRate, InclusionRate, MsgWait); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -92,8 +99,18 @@ var mpoolStatsCmd = &cli.Command{
|
|||||||
|
|
||||||
http.Handle("/debug/metrics", expo)
|
http.Handle("/debug/metrics", expo)
|
||||||
|
|
||||||
|
timeout, err := time.ParseDuration(cctx.String("http-server-timeout"))
|
||||||
|
if err != nil {
|
||||||
|
return xerrors.Errorf("invalid time string %s: %x", cctx.String("http-server-timeout"), err)
|
||||||
|
}
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
if err := http.ListenAndServe(":10555", nil); err != nil {
|
server := &http.Server{
|
||||||
|
Addr: ":10555",
|
||||||
|
ReadHeaderTimeout: timeout,
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := server.ListenAndServe(); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
@ -239,8 +239,10 @@ func checkMigrationInvariants(ctx context.Context, v8StateRootCid cid.Cid, v9Sta
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
v9actorTree, err := builtin.LoadTree(actorStore, v9stateRoot.Actors)
|
v9actorTree, err := builtin.LoadTree(actorStore, v9stateRoot.Actors)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
messages, err := v9.CheckStateInvariants(v9actorTree, epoch, actorCodeCids)
|
messages, err := v9.CheckStateInvariants(v9actorTree, epoch, actorCodeCids)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("checking state invariants: %w", err)
|
return xerrors.Errorf("checking state invariants: %w", err)
|
||||||
@ -465,7 +467,7 @@ func compareProposalToAllocation(prop market8.DealProposal, alloc verifreg9.Allo
|
|||||||
return xerrors.Errorf("couldnt get ID from address")
|
return xerrors.Errorf("couldnt get ID from address")
|
||||||
}
|
}
|
||||||
if proposalClientID != uint64(alloc.Client) {
|
if proposalClientID != uint64(alloc.Client) {
|
||||||
return xerrors.Errorf("client id mismatch between proposal and allocation: %s, %s", proposalClientID, alloc.Client)
|
return xerrors.Errorf("client id mismatch between proposal and allocation: %v, %v", proposalClientID, alloc.Client)
|
||||||
}
|
}
|
||||||
|
|
||||||
proposalProviderID, err := address.IDFromAddress(prop.Provider)
|
proposalProviderID, err := address.IDFromAddress(prop.Provider)
|
||||||
@ -473,11 +475,11 @@ func compareProposalToAllocation(prop market8.DealProposal, alloc verifreg9.Allo
|
|||||||
return xerrors.Errorf("couldnt get ID from address")
|
return xerrors.Errorf("couldnt get ID from address")
|
||||||
}
|
}
|
||||||
if proposalProviderID != uint64(alloc.Provider) {
|
if proposalProviderID != uint64(alloc.Provider) {
|
||||||
return xerrors.Errorf("provider id mismatch between proposal and allocation: %s, %s", proposalProviderID, alloc.Provider)
|
return xerrors.Errorf("provider id mismatch between proposal and allocation: %v, %v", proposalProviderID, alloc.Provider)
|
||||||
}
|
}
|
||||||
|
|
||||||
if prop.PieceSize != alloc.Size {
|
if prop.PieceSize != alloc.Size {
|
||||||
return xerrors.Errorf("piece size mismatch between proposal and allocation: %s, %s", prop.PieceSize, alloc.Size)
|
return xerrors.Errorf("piece size mismatch between proposal and allocation: %v, %v", prop.PieceSize, alloc.Size)
|
||||||
}
|
}
|
||||||
|
|
||||||
if alloc.TermMax != 540*builtin.EpochsInDay {
|
if alloc.TermMax != 540*builtin.EpochsInDay {
|
||||||
|
@ -121,6 +121,10 @@ var multisigGetAllCmd = &cli.Command{
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
out, err := json.MarshalIndent(msigActorsInfo, "", " ")
|
out, err := json.MarshalIndent(msigActorsInfo, "", " ")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -12,6 +12,7 @@ import (
|
|||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
"go.opencensus.io/stats"
|
"go.opencensus.io/stats"
|
||||||
"go.opencensus.io/stats/view"
|
"go.opencensus.io/stats/view"
|
||||||
|
"golang.org/x/xerrors"
|
||||||
|
|
||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
|
|
||||||
@ -128,6 +129,10 @@ var runCmd = &cli.Command{
|
|||||||
EnvVars: []string{"LOTUS_STATS_IPLD_STORE_CACHE_SIZE"},
|
EnvVars: []string{"LOTUS_STATS_IPLD_STORE_CACHE_SIZE"},
|
||||||
Value: 2 << 15,
|
Value: 2 << 15,
|
||||||
},
|
},
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "http-server-timeout",
|
||||||
|
Value: "30s",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@ -158,9 +163,18 @@ var runCmd = &cli.Command{
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
timeout, err := time.ParseDuration(cctx.String("http-server-timeout"))
|
||||||
|
if err != nil {
|
||||||
|
return xerrors.Errorf("invalid time string %s: %x", cctx.String("http-server-timeout"), err)
|
||||||
|
}
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
http.Handle("/metrics", exporter)
|
http.Handle("/metrics", exporter)
|
||||||
if err := http.ListenAndServe(":6688", nil); err != nil {
|
server := &http.Server{
|
||||||
|
Addr: ":6688",
|
||||||
|
ReadHeaderTimeout: timeout,
|
||||||
|
}
|
||||||
|
if err := server.ListenAndServe(); err != nil {
|
||||||
log.Errorw("failed to start http server", "err", err)
|
log.Errorw("failed to start http server", "err", err)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
@ -6,6 +6,7 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/gbrlsnchs/jwt/v3"
|
"github.com/gbrlsnchs/jwt/v3"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
@ -142,6 +143,10 @@ var runCmd = &cli.Command{
|
|||||||
Usage: "(insecure) disable api auth",
|
Usage: "(insecure) disable api auth",
|
||||||
Hidden: true,
|
Hidden: true,
|
||||||
},
|
},
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "http-server-timeout",
|
||||||
|
Value: "30s",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Description: "Needs FULLNODE_API_INFO env-var to be set before running (see lotus-wallet --help for setup instructions)",
|
Description: "Needs FULLNODE_API_INFO env-var to be set before running (see lotus-wallet --help for setup instructions)",
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
@ -239,8 +244,14 @@ var runCmd = &cli.Command{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
timeout, err := time.ParseDuration(cctx.String("http-server-timeout"))
|
||||||
|
if err != nil {
|
||||||
|
return xerrors.Errorf("invalid time string %s: %x", cctx.String("http-server-timeout"), err)
|
||||||
|
}
|
||||||
|
|
||||||
srv := &http.Server{
|
srv := &http.Server{
|
||||||
Handler: handler,
|
Handler: handler,
|
||||||
|
ReadHeaderTimeout: timeout,
|
||||||
BaseContext: func(listener net.Listener) context.Context {
|
BaseContext: func(listener net.Listener) context.Context {
|
||||||
ctx, _ := tag.New(context.Background(), tag.Upsert(metrics.APIInterface, "lotus-wallet"))
|
ctx, _ := tag.New(context.Background(), tag.Upsert(metrics.APIInterface, "lotus-wallet"))
|
||||||
return ctx
|
return ctx
|
||||||
|
@ -272,6 +272,10 @@ var runCmd = &cli.Command{
|
|||||||
Value: "30m",
|
Value: "30m",
|
||||||
EnvVars: []string{"LOTUS_WORKER_TIMEOUT"},
|
EnvVars: []string{"LOTUS_WORKER_TIMEOUT"},
|
||||||
},
|
},
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "http-server-timeout",
|
||||||
|
Value: "30s",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Before: func(cctx *cli.Context) error {
|
Before: func(cctx *cli.Context) error {
|
||||||
if cctx.IsSet("address") {
|
if cctx.IsSet("address") {
|
||||||
@ -562,8 +566,14 @@ var runCmd = &cli.Command{
|
|||||||
|
|
||||||
log.Info("Setting up control endpoint at " + address)
|
log.Info("Setting up control endpoint at " + address)
|
||||||
|
|
||||||
|
timeout, err := time.ParseDuration(cctx.String("http-server-timeout"))
|
||||||
|
if err != nil {
|
||||||
|
return xerrors.Errorf("invalid time string %s: %x", cctx.String("http-server-timeout"), err)
|
||||||
|
}
|
||||||
|
|
||||||
srv := &http.Server{
|
srv := &http.Server{
|
||||||
Handler: sealworker.WorkerHandler(nodeApi.AuthVerify, remoteHandler, workerApi, true),
|
Handler: sealworker.WorkerHandler(nodeApi.AuthVerify, remoteHandler, workerApi, true),
|
||||||
|
ReadHeaderTimeout: timeout,
|
||||||
BaseContext: func(listener net.Listener) context.Context {
|
BaseContext: func(listener net.Listener) context.Context {
|
||||||
ctx, _ := tag.New(context.Background(), tag.Upsert(metrics.APIInterface, "lotus-worker"))
|
ctx, _ := tag.New(context.Background(), tag.Upsert(metrics.APIInterface, "lotus-worker"))
|
||||||
return ctx
|
return ctx
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -75,10 +75,10 @@ Inputs:
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"ID": {
|
"ID": {
|
||||||
"Miner": 1000,
|
"Miner": 0,
|
||||||
"Number": 9
|
"Number": 0
|
||||||
},
|
},
|
||||||
"ProofType": 8
|
"ProofType": 0
|
||||||
},
|
},
|
||||||
1,
|
1,
|
||||||
"sealing",
|
"sealing",
|
||||||
@ -93,7 +93,7 @@ Response:
|
|||||||
"Miner": 1000,
|
"Miner": 1000,
|
||||||
"Number": 9
|
"Number": 9
|
||||||
},
|
},
|
||||||
"ID": "07070707-0707-0707-0707-070707070707"
|
"ID": "00000000-0000-0000-0000-000000000000"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -108,16 +108,14 @@ Response:
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"Hostname": "string value",
|
"Hostname": "string value",
|
||||||
"IgnoreResources": true,
|
"IgnoreResources": false,
|
||||||
"Resources": {
|
"Resources": {
|
||||||
"MemPhysical": 42,
|
"MemPhysical": 0,
|
||||||
"MemUsed": 42,
|
"MemUsed": 0,
|
||||||
"MemSwap": 42,
|
"MemSwap": 0,
|
||||||
"MemSwapUsed": 42,
|
"MemSwapUsed": 0,
|
||||||
"CPUs": 42,
|
"CPUs": 0,
|
||||||
"GPUs": [
|
"GPUs": null,
|
||||||
"string value"
|
|
||||||
],
|
|
||||||
"Resources": {
|
"Resources": {
|
||||||
"post/v0/windowproof": {
|
"post/v0/windowproof": {
|
||||||
"0": {
|
"0": {
|
||||||
@ -1423,11 +1421,11 @@ Response:
|
|||||||
```json
|
```json
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"ID": "76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8",
|
"ID": "",
|
||||||
"Weight": 42,
|
"Weight": 42,
|
||||||
"LocalPath": "string value",
|
"LocalPath": "",
|
||||||
"CanSeal": true,
|
"CanSeal": false,
|
||||||
"CanStore": true
|
"CanStore": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
@ -1492,10 +1490,10 @@ Inputs:
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"ID": {
|
"ID": {
|
||||||
"Miner": 1000,
|
"Miner": 0,
|
||||||
"Number": 9
|
"Number": 0
|
||||||
},
|
},
|
||||||
"ProofType": 8
|
"ProofType": 0
|
||||||
},
|
},
|
||||||
[
|
[
|
||||||
1024
|
1024
|
||||||
@ -1512,7 +1510,7 @@ Response:
|
|||||||
"Miner": 1000,
|
"Miner": 1000,
|
||||||
"Number": 9
|
"Number": 9
|
||||||
},
|
},
|
||||||
"ID": "07070707-0707-0707-0707-070707070707"
|
"ID": "00000000-0000-0000-0000-000000000000"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -1540,7 +1538,7 @@ Response:
|
|||||||
"Miner": 1000,
|
"Miner": 1000,
|
||||||
"Number": 9
|
"Number": 9
|
||||||
},
|
},
|
||||||
"ID": "07070707-0707-0707-0707-070707070707"
|
"ID": "00000000-0000-0000-0000-000000000000"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -1557,10 +1555,10 @@ Inputs:
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"ID": {
|
"ID": {
|
||||||
"Miner": 1000,
|
"Miner": 0,
|
||||||
"Number": 9
|
"Number": 0
|
||||||
},
|
},
|
||||||
"ProofType": 8
|
"ProofType": 0
|
||||||
},
|
},
|
||||||
true,
|
true,
|
||||||
{
|
{
|
||||||
@ -1580,7 +1578,7 @@ Response:
|
|||||||
"Miner": 1000,
|
"Miner": 1000,
|
||||||
"Number": 9
|
"Number": 9
|
||||||
},
|
},
|
||||||
"ID": "07070707-0707-0707-0707-070707070707"
|
"ID": "00000000-0000-0000-0000-000000000000"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -1597,10 +1595,10 @@ Inputs:
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"ID": {
|
"ID": {
|
||||||
"Miner": 1000,
|
"Miner": 0,
|
||||||
"Number": 9
|
"Number": 0
|
||||||
},
|
},
|
||||||
"ProofType": 8
|
"ProofType": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
@ -1612,7 +1610,7 @@ Response:
|
|||||||
"Miner": 1000,
|
"Miner": 1000,
|
||||||
"Number": 9
|
"Number": 9
|
||||||
},
|
},
|
||||||
"ID": "07070707-0707-0707-0707-070707070707"
|
"ID": "00000000-0000-0000-0000-000000000000"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -1626,10 +1624,10 @@ Inputs:
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"ID": {
|
"ID": {
|
||||||
"Miner": 1000,
|
"Miner": 0,
|
||||||
"Number": 9
|
"Number": 0
|
||||||
},
|
},
|
||||||
"ProofType": 8
|
"ProofType": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
@ -1641,7 +1639,7 @@ Response:
|
|||||||
"Miner": 1000,
|
"Miner": 1000,
|
||||||
"Number": 9
|
"Number": 9
|
||||||
},
|
},
|
||||||
"ID": "07070707-0707-0707-0707-070707070707"
|
"ID": "00000000-0000-0000-0000-000000000000"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -1658,10 +1656,10 @@ Inputs:
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"ID": {
|
"ID": {
|
||||||
"Miner": 1000,
|
"Miner": 0,
|
||||||
"Number": 9
|
"Number": 0
|
||||||
},
|
},
|
||||||
"ProofType": 8
|
"ProofType": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
||||||
@ -1676,7 +1674,7 @@ Response:
|
|||||||
"Miner": 1000,
|
"Miner": 1000,
|
||||||
"Number": 9
|
"Number": 9
|
||||||
},
|
},
|
||||||
"ID": "07070707-0707-0707-0707-070707070707"
|
"ID": "00000000-0000-0000-0000-000000000000"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -1692,11 +1690,9 @@ Inputs:
|
|||||||
1000,
|
1000,
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"SealProof": 8,
|
"SealProof": 0,
|
||||||
"SectorNumber": 9,
|
"SectorNumber": 0,
|
||||||
"SealedCID": {
|
"SealedCID": null,
|
||||||
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
|
||||||
},
|
|
||||||
"Challenge": [
|
"Challenge": [
|
||||||
42
|
42
|
||||||
],
|
],
|
||||||
@ -1712,8 +1708,8 @@ Response:
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"PoStProofs": {
|
"PoStProofs": {
|
||||||
"PoStProof": 8,
|
"PoStProof": 0,
|
||||||
"ProofBytes": "Ynl0ZSBhcnJheQ=="
|
"ProofBytes": null
|
||||||
},
|
},
|
||||||
"Skipped": [
|
"Skipped": [
|
||||||
{
|
{
|
||||||
@ -1736,11 +1732,9 @@ Inputs:
|
|||||||
1000,
|
1000,
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"SealProof": 8,
|
"SealProof": 0,
|
||||||
"SectorNumber": 9,
|
"SectorNumber": 0,
|
||||||
"SealedCID": {
|
"SealedCID": null,
|
||||||
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
|
||||||
},
|
|
||||||
"Challenge": [
|
"Challenge": [
|
||||||
42
|
42
|
||||||
],
|
],
|
||||||
@ -1755,8 +1749,8 @@ Response:
|
|||||||
```json
|
```json
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"PoStProof": 8,
|
"PoStProof": 0,
|
||||||
"ProofBytes": "Ynl0ZSBhcnJheQ=="
|
"ProofBytes": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
@ -1774,10 +1768,10 @@ Inputs:
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"ID": {
|
"ID": {
|
||||||
"Miner": 1000,
|
"Miner": 0,
|
||||||
"Number": 9
|
"Number": 0
|
||||||
},
|
},
|
||||||
"ProofType": 8
|
"ProofType": 0
|
||||||
},
|
},
|
||||||
1
|
1
|
||||||
]
|
]
|
||||||
@ -1790,7 +1784,7 @@ Response:
|
|||||||
"Miner": 1000,
|
"Miner": 1000,
|
||||||
"Number": 9
|
"Number": 9
|
||||||
},
|
},
|
||||||
"ID": "07070707-0707-0707-0707-070707070707"
|
"ID": "00000000-0000-0000-0000-000000000000"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -1821,10 +1815,10 @@ Inputs:
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"ID": {
|
"ID": {
|
||||||
"Miner": 1000,
|
"Miner": 0,
|
||||||
"Number": 9
|
"Number": 0
|
||||||
},
|
},
|
||||||
"ProofType": 8
|
"ProofType": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
||||||
@ -1845,7 +1839,7 @@ Response:
|
|||||||
"Miner": 1000,
|
"Miner": 1000,
|
||||||
"Number": 9
|
"Number": 9
|
||||||
},
|
},
|
||||||
"ID": "07070707-0707-0707-0707-070707070707"
|
"ID": "00000000-0000-0000-0000-000000000000"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -1859,10 +1853,10 @@ Inputs:
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"ID": {
|
"ID": {
|
||||||
"Miner": 1000,
|
"Miner": 0,
|
||||||
"Number": 9
|
"Number": 0
|
||||||
},
|
},
|
||||||
"ProofType": 8
|
"ProofType": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
||||||
@ -1886,7 +1880,7 @@ Response:
|
|||||||
"Miner": 1000,
|
"Miner": 1000,
|
||||||
"Number": 9
|
"Number": 9
|
||||||
},
|
},
|
||||||
"ID": "07070707-0707-0707-0707-070707070707"
|
"ID": "00000000-0000-0000-0000-000000000000"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -1903,10 +1897,10 @@ Inputs:
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"ID": {
|
"ID": {
|
||||||
"Miner": 1000,
|
"Miner": 0,
|
||||||
"Number": 9
|
"Number": 0
|
||||||
},
|
},
|
||||||
"ProofType": 8
|
"ProofType": 0
|
||||||
},
|
},
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@ -1924,7 +1918,7 @@ Response:
|
|||||||
"Miner": 1000,
|
"Miner": 1000,
|
||||||
"Number": 9
|
"Number": 9
|
||||||
},
|
},
|
||||||
"ID": "07070707-0707-0707-0707-070707070707"
|
"ID": "00000000-0000-0000-0000-000000000000"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -1941,17 +1935,15 @@ Inputs:
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"ID": {
|
"ID": {
|
||||||
"Miner": 1000,
|
"Miner": 0,
|
||||||
"Number": 9
|
"Number": 0
|
||||||
},
|
},
|
||||||
"ProofType": 8
|
"ProofType": 0
|
||||||
},
|
},
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Size": 1032,
|
"Size": 1032,
|
||||||
"PieceCID": {
|
"PieceCID": null
|
||||||
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
@ -1964,7 +1956,7 @@ Response:
|
|||||||
"Miner": 1000,
|
"Miner": 1000,
|
||||||
"Number": 9
|
"Number": 9
|
||||||
},
|
},
|
||||||
"ID": "07070707-0707-0707-0707-070707070707"
|
"ID": "00000000-0000-0000-0000-000000000000"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -1981,19 +1973,17 @@ Inputs:
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"ID": {
|
"ID": {
|
||||||
"Miner": 1000,
|
"Miner": 0,
|
||||||
"Number": 9
|
"Number": 0
|
||||||
},
|
},
|
||||||
"ProofType": 8
|
"ProofType": 0
|
||||||
},
|
},
|
||||||
"Bw==",
|
"Bw==",
|
||||||
"Bw==",
|
"Bw==",
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Size": 1032,
|
"Size": 1032,
|
||||||
"PieceCID": {
|
"PieceCID": null
|
||||||
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
{
|
{
|
||||||
@ -2014,7 +2004,7 @@ Response:
|
|||||||
"Miner": 1000,
|
"Miner": 1000,
|
||||||
"Number": 9
|
"Number": 9
|
||||||
},
|
},
|
||||||
"ID": "07070707-0707-0707-0707-070707070707"
|
"ID": "00000000-0000-0000-0000-000000000000"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -2028,10 +2018,10 @@ Inputs:
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"ID": {
|
"ID": {
|
||||||
"Miner": 1000,
|
"Miner": 0,
|
||||||
"Number": 9
|
"Number": 0
|
||||||
},
|
},
|
||||||
"ProofType": 8
|
"ProofType": 0
|
||||||
},
|
},
|
||||||
"Bw=="
|
"Bw=="
|
||||||
]
|
]
|
||||||
@ -2044,7 +2034,7 @@ Response:
|
|||||||
"Miner": 1000,
|
"Miner": 1000,
|
||||||
"Number": 9
|
"Number": 9
|
||||||
},
|
},
|
||||||
"ID": "07070707-0707-0707-0707-070707070707"
|
"ID": "00000000-0000-0000-0000-000000000000"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -2058,18 +2048,16 @@ Inputs:
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"ID": {
|
"ID": {
|
||||||
"Miner": 1000,
|
"Miner": 0,
|
||||||
"Number": 9
|
"Number": 0
|
||||||
},
|
},
|
||||||
"ProofType": 8
|
"ProofType": 0
|
||||||
},
|
},
|
||||||
"Bw==",
|
"Bw==",
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Size": 1032,
|
"Size": 1032,
|
||||||
"PieceCID": {
|
"PieceCID": null
|
||||||
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
@ -2082,7 +2070,7 @@ Response:
|
|||||||
"Miner": 1000,
|
"Miner": 1000,
|
||||||
"Number": 9
|
"Number": 9
|
||||||
},
|
},
|
||||||
"ID": "07070707-0707-0707-0707-070707070707"
|
"ID": "00000000-0000-0000-0000-000000000000"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -2096,10 +2084,10 @@ Inputs:
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"ID": {
|
"ID": {
|
||||||
"Miner": 1000,
|
"Miner": 0,
|
||||||
"Number": 9
|
"Number": 0
|
||||||
},
|
},
|
||||||
"ProofType": 8
|
"ProofType": 0
|
||||||
},
|
},
|
||||||
"Bw=="
|
"Bw=="
|
||||||
]
|
]
|
||||||
@ -2112,7 +2100,7 @@ Response:
|
|||||||
"Miner": 1000,
|
"Miner": 1000,
|
||||||
"Number": 9
|
"Number": 9
|
||||||
},
|
},
|
||||||
"ID": "07070707-0707-0707-0707-070707070707"
|
"ID": "00000000-0000-0000-0000-000000000000"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -2263,10 +2251,10 @@ Inputs:
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"ID": {
|
"ID": {
|
||||||
"Miner": 1000,
|
"Miner": 0,
|
||||||
"Number": 9
|
"Number": 0
|
||||||
},
|
},
|
||||||
"ProofType": 8
|
"ProofType": 0
|
||||||
},
|
},
|
||||||
1040384,
|
1040384,
|
||||||
1024,
|
1024,
|
||||||
@ -2284,7 +2272,7 @@ Response:
|
|||||||
"Miner": 1000,
|
"Miner": 1000,
|
||||||
"Number": 9
|
"Number": 9
|
||||||
},
|
},
|
||||||
"ID": "07070707-0707-0707-0707-070707070707"
|
"ID": "00000000-0000-0000-0000-000000000000"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -40,6 +40,7 @@ USAGE:
|
|||||||
OPTIONS:
|
OPTIONS:
|
||||||
--addpiece enable addpiece (default: true) [$LOTUS_WORKER_ADDPIECE]
|
--addpiece enable addpiece (default: true) [$LOTUS_WORKER_ADDPIECE]
|
||||||
--commit enable commit (32G sectors: all cores or GPUs, 128GiB Memory + 64GiB swap) (default: true) [$LOTUS_WORKER_COMMIT]
|
--commit enable commit (32G sectors: all cores or GPUs, 128GiB Memory + 64GiB swap) (default: true) [$LOTUS_WORKER_COMMIT]
|
||||||
|
--http-server-timeout value (default: "30s")
|
||||||
--listen value host address and port the worker api will listen on (default: "0.0.0.0:3456") [$LOTUS_WORKER_LISTEN]
|
--listen value host address and port the worker api will listen on (default: "0.0.0.0:3456") [$LOTUS_WORKER_LISTEN]
|
||||||
--name value custom worker name (default: hostname) [$LOTUS_WORKER_NAME]
|
--name value custom worker name (default: hostname) [$LOTUS_WORKER_NAME]
|
||||||
--no-default disable all default compute tasks, use the worker for storage/fetching only (default: false) [$LOTUS_WORKER_NO_DEFAULT]
|
--no-default disable all default compute tasks, use the worker for storage/fetching only (default: false) [$LOTUS_WORKER_NO_DEFAULT]
|
||||||
|
4
go.mod
4
go.mod
@ -115,7 +115,6 @@ require (
|
|||||||
github.com/libp2p/go-libp2p-consensus v0.0.1
|
github.com/libp2p/go-libp2p-consensus v0.0.1
|
||||||
github.com/libp2p/go-libp2p-gorpc v0.4.0
|
github.com/libp2p/go-libp2p-gorpc v0.4.0
|
||||||
github.com/libp2p/go-libp2p-kad-dht v0.18.0
|
github.com/libp2p/go-libp2p-kad-dht v0.18.0
|
||||||
github.com/libp2p/go-libp2p-peerstore v0.8.0
|
|
||||||
github.com/libp2p/go-libp2p-pubsub v0.8.1
|
github.com/libp2p/go-libp2p-pubsub v0.8.1
|
||||||
github.com/libp2p/go-libp2p-raft v0.1.8
|
github.com/libp2p/go-libp2p-raft v0.1.8
|
||||||
github.com/libp2p/go-libp2p-record v0.2.0
|
github.com/libp2p/go-libp2p-record v0.2.0
|
||||||
@ -156,6 +155,7 @@ require (
|
|||||||
golang.org/x/net v0.0.0-20220920183852-bf014ff85ad5
|
golang.org/x/net v0.0.0-20220920183852-bf014ff85ad5
|
||||||
golang.org/x/sync v0.0.0-20220907140024-f12130a52804
|
golang.org/x/sync v0.0.0-20220907140024-f12130a52804
|
||||||
golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8
|
golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8
|
||||||
|
golang.org/x/text v0.3.7
|
||||||
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9
|
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9
|
||||||
golang.org/x/tools v0.1.12
|
golang.org/x/tools v0.1.12
|
||||||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2
|
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2
|
||||||
@ -265,6 +265,7 @@ require (
|
|||||||
github.com/libp2p/go-libp2p-gostream v0.5.0 // indirect
|
github.com/libp2p/go-libp2p-gostream v0.5.0 // indirect
|
||||||
github.com/libp2p/go-libp2p-kbucket v0.5.0 // indirect
|
github.com/libp2p/go-libp2p-kbucket v0.5.0 // indirect
|
||||||
github.com/libp2p/go-libp2p-noise v0.5.0 // indirect
|
github.com/libp2p/go-libp2p-noise v0.5.0 // indirect
|
||||||
|
github.com/libp2p/go-libp2p-peerstore v0.8.0 // indirect
|
||||||
github.com/libp2p/go-libp2p-tls v0.5.0 // indirect
|
github.com/libp2p/go-libp2p-tls v0.5.0 // indirect
|
||||||
github.com/libp2p/go-nat v0.1.0 // indirect
|
github.com/libp2p/go-nat v0.1.0 // indirect
|
||||||
github.com/libp2p/go-netroute v0.2.0 // indirect
|
github.com/libp2p/go-netroute v0.2.0 // indirect
|
||||||
@ -333,7 +334,6 @@ require (
|
|||||||
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect
|
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
|
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
|
||||||
golang.org/x/text v0.3.7 // indirect
|
|
||||||
google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4 // indirect
|
google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4 // indirect
|
||||||
google.golang.org/grpc v1.45.0 // indirect
|
google.golang.org/grpc v1.45.0 // indirect
|
||||||
google.golang.org/protobuf v1.28.1 // indirect
|
google.golang.org/protobuf v1.28.1 // indirect
|
||||||
|
@ -7,6 +7,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/multiformats/go-multiaddr"
|
"github.com/multiformats/go-multiaddr"
|
||||||
manet "github.com/multiformats/go-multiaddr/net"
|
manet "github.com/multiformats/go-multiaddr/net"
|
||||||
@ -22,7 +23,10 @@ type Closer func()
|
|||||||
func CreateRPCServer(t *testing.T, handler http.Handler, listener net.Listener) (*httptest.Server, multiaddr.Multiaddr, Closer) {
|
func CreateRPCServer(t *testing.T, handler http.Handler, listener net.Listener) (*httptest.Server, multiaddr.Multiaddr, Closer) {
|
||||||
testServ := &httptest.Server{
|
testServ := &httptest.Server{
|
||||||
Listener: listener,
|
Listener: listener,
|
||||||
Config: &http.Server{Handler: handler},
|
Config: &http.Server{
|
||||||
|
Handler: handler,
|
||||||
|
ReadHeaderTimeout: 30 * time.Second,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
testServ.Start()
|
testServ.Start()
|
||||||
|
|
||||||
|
@ -38,8 +38,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestMigrationNV17(t *testing.T) {
|
func TestMigrationNV17(t *testing.T) {
|
||||||
ctx := context.Background()
|
|
||||||
|
|
||||||
kit.QuietMiningLogs()
|
kit.QuietMiningLogs()
|
||||||
|
|
||||||
rootKey, err := key.GenerateKey(types.KTSecp256k1)
|
rootKey, err := key.GenerateKey(types.KTSecp256k1)
|
||||||
@ -201,6 +199,7 @@ func TestMigrationNV17(t *testing.T) {
|
|||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
sig, err := clientApi.WalletSign(ctx, verifiedClientAddr, serializedProposal.Bytes())
|
sig, err := clientApi.WalletSign(ctx, verifiedClientAddr, serializedProposal.Bytes())
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
publishDealParams := markettypes.PublishStorageDealsParams{
|
publishDealParams := markettypes.PublishStorageDealsParams{
|
||||||
Deals: []markettypes.ClientDealProposal{{
|
Deals: []markettypes.ClientDealProposal{{
|
||||||
@ -407,6 +406,7 @@ func TestMigrationNV17(t *testing.T) {
|
|||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
sig, err = clientApi.WalletSign(ctx, verifiedClientAddr, serializedProposal.Bytes())
|
sig, err = clientApi.WalletSign(ctx, verifiedClientAddr, serializedProposal.Bytes())
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
publishDealParams = markettypes.PublishStorageDealsParams{
|
publishDealParams = markettypes.PublishStorageDealsParams{
|
||||||
Deals: []markettypes.ClientDealProposal{{
|
Deals: []markettypes.ClientDealProposal{{
|
||||||
|
@ -31,8 +31,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestGetAllocationForPendingDeal(t *testing.T) {
|
func TestGetAllocationForPendingDeal(t *testing.T) {
|
||||||
ctx := context.Background()
|
|
||||||
|
|
||||||
rootKey, err := key.GenerateKey(types.KTSecp256k1)
|
rootKey, err := key.GenerateKey(types.KTSecp256k1)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
@ -146,6 +144,7 @@ func TestGetAllocationForPendingDeal(t *testing.T) {
|
|||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
sig, err := api.WalletSign(ctx, verifiedClientAddr, serializedProposal.Bytes())
|
sig, err := api.WalletSign(ctx, verifiedClientAddr, serializedProposal.Bytes())
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
publishDealParams := markettypes.PublishStorageDealsParams{
|
publishDealParams := markettypes.PublishStorageDealsParams{
|
||||||
Deals: []markettypes.ClientDealProposal{{
|
Deals: []markettypes.ClientDealProposal{{
|
||||||
@ -196,5 +195,6 @@ func TestGetAllocationForPendingDeal(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
marketDeal, err := api.StateMarketStorageDeal(ctx, dealIds[0], types.EmptyTSK)
|
marketDeal, err := api.StateMarketStorageDeal(ctx, dealIds[0], types.EmptyTSK)
|
||||||
|
require.NoError(t, err)
|
||||||
require.Equal(t, marketDeal.State.SectorStartEpoch, abi.ChainEpoch(-1))
|
require.Equal(t, marketDeal.State.SectorStartEpoch, abi.ChainEpoch(-1))
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,6 @@ func setup(ctx context.Context, t *testing.T, node0 *kit.TestFullNode, node1 *ki
|
|||||||
node.Override(node.GoRPCServer, modules.NewRPCServer),
|
node.Override(node.GoRPCServer, modules.NewRPCServer),
|
||||||
)
|
)
|
||||||
//raftOps := kit.ConstructorOpts()
|
//raftOps := kit.ConstructorOpts()
|
||||||
kit.ThroughRPC()
|
|
||||||
|
|
||||||
ens := kit.NewEnsemble(t).FullNode(node0, raftOps, kit.ThroughRPC()).FullNode(node1, raftOps, kit.ThroughRPC()).FullNode(node2, raftOps, kit.ThroughRPC())
|
ens := kit.NewEnsemble(t).FullNode(node0, raftOps, kit.ThroughRPC()).FullNode(node1, raftOps, kit.ThroughRPC()).FullNode(node2, raftOps, kit.ThroughRPC())
|
||||||
node0.AssignPrivKey(pkey0)
|
node0.AssignPrivKey(pkey0)
|
||||||
@ -527,7 +526,6 @@ func TestGoRPCAuth(t *testing.T) {
|
|||||||
node.Override(node.GoRPCServer, modules.NewRPCServer),
|
node.Override(node.GoRPCServer, modules.NewRPCServer),
|
||||||
)
|
)
|
||||||
//raftOps := kit.ConstructorOpts()
|
//raftOps := kit.ConstructorOpts()
|
||||||
kit.ThroughRPC()
|
|
||||||
|
|
||||||
ens := kit.NewEnsemble(t).FullNode(&node0, raftOps, kit.ThroughRPC()).FullNode(&node1, raftOps, kit.ThroughRPC()).FullNode(&node2, raftOps, kit.ThroughRPC()).FullNode(&node3, raftOps)
|
ens := kit.NewEnsemble(t).FullNode(&node0, raftOps, kit.ThroughRPC()).FullNode(&node1, raftOps, kit.ThroughRPC()).FullNode(&node2, raftOps, kit.ThroughRPC()).FullNode(&node3, raftOps)
|
||||||
node0.AssignPrivKey(pkey0)
|
node0.AssignPrivKey(pkey0)
|
||||||
|
@ -29,8 +29,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestNoRemoveDatacapFromVerifreg(t *testing.T) {
|
func TestNoRemoveDatacapFromVerifreg(t *testing.T) {
|
||||||
ctx := context.Background()
|
|
||||||
|
|
||||||
kit.QuietMiningLogs()
|
kit.QuietMiningLogs()
|
||||||
|
|
||||||
rootKey, err := key.GenerateKey(types.KTSecp256k1)
|
rootKey, err := key.GenerateKey(types.KTSecp256k1)
|
||||||
@ -185,6 +183,7 @@ func TestNoRemoveDatacapFromVerifreg(t *testing.T) {
|
|||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
sig, err := clientApi.WalletSign(ctx, verifiedClientAddr, serializedProposal.Bytes())
|
sig, err := clientApi.WalletSign(ctx, verifiedClientAddr, serializedProposal.Bytes())
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
publishDealParams := markettypes.PublishStorageDealsParams{
|
publishDealParams := markettypes.PublishStorageDealsParams{
|
||||||
Deals: []markettypes.ClientDealProposal{{
|
Deals: []markettypes.ClientDealProposal{{
|
||||||
@ -276,6 +275,7 @@ func TestNoRemoveDatacapFromVerifreg(t *testing.T) {
|
|||||||
Params: params,
|
Params: params,
|
||||||
Value: big.Zero(),
|
Value: big.Zero(),
|
||||||
}, types.EmptyTSK)
|
}, types.EmptyTSK)
|
||||||
|
require.Error(t, err)
|
||||||
require.False(t, callResult.MsgRct.ExitCode.IsSuccess())
|
require.False(t, callResult.MsgRct.ExitCode.IsSuccess())
|
||||||
|
|
||||||
verifregDatacapAfter, err := clientApi.StateVerifiedClientStatus(ctx, builtin.VerifiedRegistryActorAddr, types.EmptyTSK)
|
verifregDatacapAfter, err := clientApi.StateVerifiedClientStatus(ctx, builtin.VerifiedRegistryActorAddr, types.EmptyTSK)
|
||||||
|
@ -152,6 +152,12 @@ func NewConsensus(host host.Host, cfg *ClusterRaftConfig, mpool *messagepool.Mes
|
|||||||
|
|
||||||
peers := []peer.ID{}
|
peers := []peer.ID{}
|
||||||
addrInfos, err := addrutil.ParseAddresses(ctx, cfg.InitPeerset)
|
addrInfos, err := addrutil.ParseAddresses(ctx, cfg.InitPeerset)
|
||||||
|
if err != nil {
|
||||||
|
logger.Error("error parsing addresses: ", err)
|
||||||
|
cancel()
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
for _, addrInfo := range addrInfos {
|
for _, addrInfo := range addrInfos {
|
||||||
peers = append(peers, addrInfo.ID)
|
peers = append(peers, addrInfo.ID)
|
||||||
|
|
||||||
@ -422,7 +428,7 @@ func (cc *Consensus) RmPeer(ctx context.Context, pid peer.ID) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Being here means we are the leader and can commit
|
// Being here means we are the leader and can commit
|
||||||
finalErr = cc.raft.RemovePeer(ctx, peer.Encode(pid))
|
finalErr = cc.raft.RemovePeer(ctx, pid.String())
|
||||||
if finalErr != nil {
|
if finalErr != nil {
|
||||||
time.Sleep(cc.config.CommitRetryDelay)
|
time.Sleep(cc.config.CommitRetryDelay)
|
||||||
continue
|
continue
|
||||||
|
@ -80,7 +80,7 @@ func newRaftWrapper(
|
|||||||
raftW.staging = staging
|
raftW.staging = staging
|
||||||
raftW.repo = repo
|
raftW.repo = repo
|
||||||
// Set correct LocalID
|
// Set correct LocalID
|
||||||
cfg.RaftConfig.LocalID = hraft.ServerID(peer.Encode(host.ID()))
|
cfg.RaftConfig.LocalID = hraft.ServerID(host.ID().String())
|
||||||
|
|
||||||
df := cfg.GetDataFolder(repo)
|
df := cfg.GetDataFolder(repo)
|
||||||
err := makeDataFolder(df)
|
err := makeDataFolder(df)
|
||||||
@ -248,7 +248,7 @@ func makeServerConf(peers []peer.ID) hraft.Configuration {
|
|||||||
|
|
||||||
// Servers are peers + self. We avoid duplicate entries below
|
// Servers are peers + self. We avoid duplicate entries below
|
||||||
for _, pid := range peers {
|
for _, pid := range peers {
|
||||||
p := peer.Encode(pid)
|
p := pid.String()
|
||||||
_, ok := sm[p]
|
_, ok := sm[p]
|
||||||
if !ok { // avoid dups
|
if !ok { // avoid dups
|
||||||
sm[p] = struct{}{}
|
sm[p] = struct{}{}
|
||||||
@ -284,7 +284,7 @@ func (rw *raftWrapper) WaitForLeader(ctx context.Context) (string, error) {
|
|||||||
func (rw *raftWrapper) WaitForVoter(ctx context.Context) error {
|
func (rw *raftWrapper) WaitForVoter(ctx context.Context) error {
|
||||||
logger.Debug("waiting until we are promoted to a voter")
|
logger.Debug("waiting until we are promoted to a voter")
|
||||||
|
|
||||||
pid := hraft.ServerID(peer.Encode(rw.host.ID()))
|
pid := hraft.ServerID(rw.host.ID().String())
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
|
@ -7,11 +7,11 @@ import (
|
|||||||
nilrouting "github.com/ipfs/go-ipfs-routing/none"
|
nilrouting "github.com/ipfs/go-ipfs-routing/none"
|
||||||
"github.com/libp2p/go-libp2p"
|
"github.com/libp2p/go-libp2p"
|
||||||
dht "github.com/libp2p/go-libp2p-kad-dht"
|
dht "github.com/libp2p/go-libp2p-kad-dht"
|
||||||
"github.com/libp2p/go-libp2p-peerstore/pstoremem"
|
|
||||||
record "github.com/libp2p/go-libp2p-record"
|
record "github.com/libp2p/go-libp2p-record"
|
||||||
"github.com/libp2p/go-libp2p/core/host"
|
"github.com/libp2p/go-libp2p/core/host"
|
||||||
"github.com/libp2p/go-libp2p/core/peer"
|
"github.com/libp2p/go-libp2p/core/peer"
|
||||||
"github.com/libp2p/go-libp2p/core/peerstore"
|
"github.com/libp2p/go-libp2p/core/peerstore"
|
||||||
|
"github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem"
|
||||||
routedhost "github.com/libp2p/go-libp2p/p2p/host/routed"
|
routedhost "github.com/libp2p/go-libp2p/p2p/host/routed"
|
||||||
mocknet "github.com/libp2p/go-libp2p/p2p/net/mock"
|
mocknet "github.com/libp2p/go-libp2p/p2p/net/mock"
|
||||||
"go.uber.org/fx"
|
"go.uber.org/fx"
|
||||||
|
@ -9,6 +9,7 @@ import (
|
|||||||
_ "net/http/pprof"
|
_ "net/http/pprof"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
@ -51,7 +52,8 @@ func ServeRPC(h http.Handler, id string, addr multiaddr.Multiaddr) (StopFunc, er
|
|||||||
|
|
||||||
// Instantiate the server and start listening.
|
// Instantiate the server and start listening.
|
||||||
srv := &http.Server{
|
srv := &http.Server{
|
||||||
Handler: h,
|
Handler: h,
|
||||||
|
ReadHeaderTimeout: 30 * time.Second,
|
||||||
BaseContext: func(listener net.Listener) context.Context {
|
BaseContext: func(listener net.Listener) context.Context {
|
||||||
ctx, _ := tag.New(context.Background(), tag.Upsert(metrics.APIInterface, id))
|
ctx, _ := tag.New(context.Background(), tag.Upsert(metrics.APIInterface, id))
|
||||||
return ctx
|
return ctx
|
||||||
|
@ -90,7 +90,7 @@ func ExtractTar(body io.Reader, dir string, buf []byte) (int64, error) {
|
|||||||
|
|
||||||
sz, found := CacheFileConstraints[header.Name]
|
sz, found := CacheFileConstraints[header.Name]
|
||||||
if !found {
|
if !found {
|
||||||
return read, xerrors.Errorf("tar file %#v isn't expected")
|
return read, xerrors.Errorf("tar file %#v isn't expected", header.Name)
|
||||||
}
|
}
|
||||||
if header.Size > sz {
|
if header.Size > sz {
|
||||||
return read, xerrors.Errorf("tar file %#v is bigger than expected: %d > %d", header.Name, header.Size, sz)
|
return read, xerrors.Errorf("tar file %#v is bigger than expected: %d > %d", header.Name, header.Size, sz)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM golang:1.18.1-buster as tg-build
|
FROM golang:1.18.8-buster as tg-build
|
||||||
|
|
||||||
ARG TESTGROUND_REF="oni"
|
ARG TESTGROUND_REF="oni"
|
||||||
WORKDIR /usr/src
|
WORKDIR /usr/src
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
ARG GO_VERSION=1.18.1
|
ARG GO_VERSION=1.18.8
|
||||||
|
|
||||||
FROM golang:${GO_VERSION}-buster
|
FROM golang:${GO_VERSION}-buster
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
ARG GO_VERSION=1.18.1
|
ARG GO_VERSION=1.18.8
|
||||||
|
|
||||||
FROM golang:${GO_VERSION}-buster as downloader
|
FROM golang:${GO_VERSION}-buster as downloader
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
ARG GO_VERSION=1.18.1
|
ARG GO_VERSION=1.18.8
|
||||||
|
|
||||||
FROM golang:${GO_VERSION}-buster as downloader
|
FROM golang:${GO_VERSION}-buster as downloader
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ func startFullNodeAPIServer(t *TestEnvironment, repo repo.Repo, napi api.FullNod
|
|||||||
Next: mux.ServeHTTP,
|
Next: mux.ServeHTTP,
|
||||||
}
|
}
|
||||||
|
|
||||||
srv := &http.Server{Handler: ah}
|
srv := &http.Server{Handler: ah, ReadHeaderTimeout: 30 * time.Second}
|
||||||
|
|
||||||
endpoint, err := repo.APIEndpoint()
|
endpoint, err := repo.APIEndpoint()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -638,7 +638,7 @@ func startStorageMinerAPIServer(t *TestEnvironment, repo repo.Repo, minerApi api
|
|||||||
return nil, fmt.Errorf("no API endpoint in repo: %w", err)
|
return nil, fmt.Errorf("no API endpoint in repo: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
srv := &http.Server{Handler: ah}
|
srv := &http.Server{Handler: ah, ReadHeaderTimeout: 30 * time.Second}
|
||||||
|
|
||||||
listenAddr, err := startServer(endpoint, srv)
|
listenAddr, err := startServer(endpoint, srv)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user