Merge pull request #7405 from filecoin-project/feat/update-graphsync-0.10.0
Update to graphsync to v0.10.0, enable seperate storage and retrieval transfer limits
This commit is contained in:
+16
-2
@@ -2,6 +2,8 @@ package config
|
||||
|
||||
import (
|
||||
"encoding"
|
||||
"os"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/go-cid"
|
||||
@@ -24,6 +26,16 @@ const (
|
||||
RetrievalPricingExternalMode = "external"
|
||||
)
|
||||
|
||||
// MaxTraversalLinks configures the maximum number of links to traverse in a DAG while calculating
|
||||
// CommP and traversing a DAG with graphsync; invokes a budget on DAG depth and density.
|
||||
var MaxTraversalLinks uint64 = 32 * (1 << 20)
|
||||
|
||||
func init() {
|
||||
if envMaxTraversal, err := strconv.ParseUint(os.Getenv("LOTUS_MAX_TRAVERSAL_LINKS"), 10, 64); err == nil {
|
||||
MaxTraversalLinks = envMaxTraversal
|
||||
}
|
||||
}
|
||||
|
||||
func (b *BatchFeeConfig) FeeForSectors(nSectors int) abi.TokenAmount {
|
||||
return big.Add(big.Int(b.Base), big.Mul(big.NewInt(int64(nSectors)), big.Int(b.PerSector)))
|
||||
}
|
||||
@@ -65,7 +77,8 @@ func DefaultFullNode() *FullNode {
|
||||
DefaultMaxFee: DefaultDefaultMaxFee,
|
||||
},
|
||||
Client: Client{
|
||||
SimultaneousTransfers: DefaultSimultaneousTransfers,
|
||||
SimultaneousTransfersForStorage: DefaultSimultaneousTransfers,
|
||||
SimultaneousTransfersForRetrieval: DefaultSimultaneousTransfers,
|
||||
},
|
||||
Chainstore: Chainstore{
|
||||
EnableSplitstore: false,
|
||||
@@ -147,7 +160,8 @@ func DefaultStorageMiner() *StorageMiner {
|
||||
MaxDealsPerPublishMsg: 8,
|
||||
MaxProviderCollateralMultiplier: 2,
|
||||
|
||||
SimultaneousTransfers: DefaultSimultaneousTransfers,
|
||||
SimultaneousTransfersForStorage: DefaultSimultaneousTransfers,
|
||||
SimultaneousTransfersForRetrieval: DefaultSimultaneousTransfers,
|
||||
|
||||
StartEpochSealingBuffer: 480, // 480 epochs buffer == 4 hours from adding deal to sector to sector being sealed
|
||||
|
||||
|
||||
+17
-4
@@ -92,11 +92,18 @@ your node if metadata log is disabled`,
|
||||
Comment: ``,
|
||||
},
|
||||
{
|
||||
Name: "SimultaneousTransfers",
|
||||
Name: "SimultaneousTransfersForStorage",
|
||||
Type: "uint64",
|
||||
|
||||
Comment: `The maximum number of simultaneous data transfers between the client
|
||||
and storage providers`,
|
||||
and storage providers for storage deals`,
|
||||
},
|
||||
{
|
||||
Name: "SimultaneousTransfersForRetrieval",
|
||||
Type: "uint64",
|
||||
|
||||
Comment: `The maximum number of simultaneous data transfers between the client
|
||||
and storage providers for retrieval deals`,
|
||||
},
|
||||
},
|
||||
"Common": []DocField{
|
||||
@@ -260,10 +267,16 @@ as a multiplier of the minimum collateral bound`,
|
||||
passed to the sealing node by the markets service. 0 is unlimited.`,
|
||||
},
|
||||
{
|
||||
Name: "SimultaneousTransfers",
|
||||
Name: "SimultaneousTransfersForStorage",
|
||||
Type: "uint64",
|
||||
|
||||
Comment: `The maximum number of parallel online data transfers (storage+retrieval)`,
|
||||
Comment: `The maximum number of parallel online data transfers for storage deals`,
|
||||
},
|
||||
{
|
||||
Name: "SimultaneousTransfersForRetrieval",
|
||||
Type: "uint64",
|
||||
|
||||
Comment: `The maximum number of parallel online data transfers for retrieval deals`,
|
||||
},
|
||||
{
|
||||
Name: "StartEpochSealingBuffer",
|
||||
|
||||
@@ -129,8 +129,10 @@ type DealmakingConfig struct {
|
||||
// The maximum allowed disk usage size in bytes of staging deals not yet
|
||||
// passed to the sealing node by the markets service. 0 is unlimited.
|
||||
MaxStagingDealsBytes int64
|
||||
// The maximum number of parallel online data transfers (storage+retrieval)
|
||||
SimultaneousTransfers uint64
|
||||
// The maximum number of parallel online data transfers for storage deals
|
||||
SimultaneousTransfersForStorage uint64
|
||||
// The maximum number of parallel online data transfers for retrieval deals
|
||||
SimultaneousTransfersForRetrieval uint64
|
||||
// Minimum start epoch buffer to give time for sealing of sector with deal.
|
||||
StartEpochSealingBuffer uint64
|
||||
|
||||
@@ -364,8 +366,11 @@ type Client struct {
|
||||
IpfsMAddr string
|
||||
IpfsUseForRetrieval bool
|
||||
// The maximum number of simultaneous data transfers between the client
|
||||
// and storage providers
|
||||
SimultaneousTransfers uint64
|
||||
// and storage providers for storage deals
|
||||
SimultaneousTransfersForStorage uint64
|
||||
// The maximum number of simultaneous data transfers between the client
|
||||
// and storage providers for retrieval deals
|
||||
SimultaneousTransfersForRetrieval uint64
|
||||
}
|
||||
|
||||
type Wallet struct {
|
||||
|
||||
Reference in New Issue
Block a user