Skip to content

Commit

Permalink
Merge pull request #110 from application-research/anjor/boost-throttl…
Browse files Browse the repository at this point in the history
…er-2

throttler second attempt
  • Loading branch information
anjor authored Nov 24, 2022
2 parents 9fc1b8b + d660447 commit 56a8546
Show file tree
Hide file tree
Showing 8 changed files with 231 additions and 875 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18

- name: Set up Rust
uses: actions-rs/toolchain@v1
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
build/.*
build/.*

.idea
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SHELL=/usr/bin/env bash

GO_BUILD_IMAGE?=golang:1.16
GO_BUILD_IMAGE?=golang:1.18
COMMIT := $(shell git rev-parse --short=8 HEAD)

# GITVERSION is the nearest tag plus number of commits and short form of most recent commit since the tag, if any
Expand Down
4 changes: 2 additions & 2 deletions filc/disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/application-research/filclient"
"github.com/application-research/filclient/keystore"
"github.com/filecoin-project/go-state-types/builtin/v8/market"
"github.com/filecoin-project/go-state-types/builtin/v9/market"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/wallet"
lcli "github.com/filecoin-project/lotus/cli"
Expand Down Expand Up @@ -190,7 +190,7 @@ func setup(ctx context.Context, cfgdir string) (*Node, error) {
Blockstore: bstore,
DHT: dht,
Datastore: ds,
Bitswap: bswap.(*bitswap.Bitswap),
Bitswap: bswap,
Wallet: wallet,
}, nil
}
Expand Down
3 changes: 2 additions & 1 deletion filclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ import (
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/builtin"
"github.com/filecoin-project/go-state-types/builtin/v8/market"
"github.com/filecoin-project/go-state-types/builtin/v8/paych"
"github.com/filecoin-project/go-state-types/builtin/v9/market"
"github.com/filecoin-project/lotus/api"
rpcstmgr "github.com/filecoin-project/lotus/chain/stmgr/rpc"
"github.com/filecoin-project/lotus/chain/types"
Expand Down Expand Up @@ -170,6 +170,7 @@ func NewClient(h host.Host, api api.Gateway, w *wallet.LocalWallet, addr address
// of a transfer, or there is a request for the same payload
// soon after
BlockInfoCacheManager: boostcar.NewDelayedUnrefBICM(time.Minute),
ThrottleLimit: uint(10),
},
// Wait up to 24 hours for the transfer to complete (including
// after a connection bounce) before erroring out the deal
Expand Down
2 changes: 2 additions & 0 deletions filclient_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ func initEnsemble(t *testing.T, cctx *cli.Context) (*kit.TestFullNode, *kit.Test
kit.ThroughRPC(), // so filclient can talk to it
kit.MockProofs(), // we don't care about proper sealing/proofs
kit.SectorSize(512<<20), // 512MiB sectors
kit.GenesisNetworkVersion(15),
kit.DisableLibp2p(),
)
ensemble.InterconnectAll().BeginMining(50 * time.Millisecond)

Expand Down
141 changes: 69 additions & 72 deletions go.mod

Large diffs are not rendered by default.

948 changes: 151 additions & 797 deletions go.sum

Large diffs are not rendered by default.

0 comments on commit 56a8546

Please sign in to comment.