Merge remote-tracking branch 'origin/next' into feat/actors-miner-refactor
This commit is contained in:
@@ -409,26 +409,8 @@ func (a *API) ClientRetrieve(ctx context.Context, order api.RetrievalOrder, ref
|
||||
retrievalResult <- xerrors.Errorf("Retrieval Proposal Rejected: %s", state.Message)
|
||||
case
|
||||
rm.DealStatusDealNotFound,
|
||||
rm.DealStatusErrored,
|
||||
rm.DealStatusFailed:
|
||||
rm.DealStatusErrored:
|
||||
retrievalResult <- xerrors.Errorf("Retrieval Error: %s", state.Message)
|
||||
case
|
||||
rm.DealStatusAccepted,
|
||||
rm.DealStatusAwaitingAcceptance,
|
||||
rm.DealStatusBlocksComplete,
|
||||
rm.DealStatusFinalizing,
|
||||
rm.DealStatusFundsNeeded,
|
||||
rm.DealStatusFundsNeededLastPayment,
|
||||
rm.DealStatusNew,
|
||||
rm.DealStatusOngoing,
|
||||
rm.DealStatusPaymentChannelAddingFunds,
|
||||
rm.DealStatusPaymentChannelAllocatingLane,
|
||||
rm.DealStatusPaymentChannelCreating,
|
||||
rm.DealStatusPaymentChannelReady,
|
||||
rm.DealStatusVerified:
|
||||
return
|
||||
default:
|
||||
retrievalResult <- xerrors.Errorf("Unhandled Retrieval Status: %+v", state.Status)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -11,7 +11,6 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/filecoin-project/go-amt-ipld/v2"
|
||||
commcid "github.com/filecoin-project/go-fil-commcid"
|
||||
"github.com/filecoin-project/specs-actors/actors/abi"
|
||||
"github.com/filecoin-project/specs-actors/actors/crypto"
|
||||
"github.com/filecoin-project/specs-actors/actors/util/adt"
|
||||
@@ -206,7 +205,7 @@ func (a *ChainAPI) ChainStatObj(ctx context.Context, obj cid.Cid, base cid.Cid)
|
||||
var collect = true
|
||||
|
||||
walker := func(ctx context.Context, c cid.Cid) ([]*ipld.Link, error) {
|
||||
if c.Prefix().MhType == uint64(commcid.FC_SEALED_V1) || c.Prefix().MhType == uint64(commcid.FC_UNSEALED_V1) {
|
||||
if c.Prefix().Codec == cid.FilCommitmentSealed || c.Prefix().Codec == cid.FilCommitmentUnsealed {
|
||||
return []*ipld.Link{}, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -90,6 +90,12 @@ func (a *MpoolAPI) MpoolPushMessage(ctx context.Context, msg *types.Message) (*t
|
||||
if msg.Nonce != 0 {
|
||||
return nil, xerrors.Errorf("MpoolPushMessage expects message nonce to be 0, was %d", msg.Nonce)
|
||||
}
|
||||
if msg.GasLimit == 0 {
|
||||
msg.GasLimit = 100_000_000 // TODO: gas limit estimation
|
||||
}
|
||||
if types.BigCmp(msg.GasPrice, types.NewInt(0)) == 0 {
|
||||
msg.GasPrice = types.NewInt(1) // TODO: gas price estimation
|
||||
}
|
||||
|
||||
return a.Mpool.PushWithNonce(ctx, msg.From, func(from address.Address, nonce uint64) (*types.SignedMessage, error) {
|
||||
msg.Nonce = nonce
|
||||
|
||||
@@ -76,7 +76,7 @@ func (a *MsigAPI) MsigCreate(ctx context.Context, req uint64, addrs []address.Ad
|
||||
Method: builtin.MethodsInit.Exec,
|
||||
Params: enc,
|
||||
GasPrice: gp,
|
||||
GasLimit: 1000000,
|
||||
GasLimit: 100_000_000,
|
||||
Value: val,
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ func (a *MsigAPI) MsigPropose(ctx context.Context, msig address.Address, to addr
|
||||
Value: types.NewInt(0),
|
||||
Method: builtin.MethodsMultisig.Propose,
|
||||
Params: enc,
|
||||
GasLimit: 100000,
|
||||
GasLimit: 100_000_000,
|
||||
GasPrice: types.NewInt(1),
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ func (a *MsigAPI) msigApproveOrCancel(ctx context.Context, operation api.MsigPro
|
||||
Value: types.NewInt(0),
|
||||
Method: msigResponseMethod,
|
||||
Params: enc,
|
||||
GasLimit: 100000,
|
||||
GasLimit: 100_000_000,
|
||||
GasPrice: types.NewInt(1),
|
||||
}
|
||||
|
||||
|
||||
@@ -897,7 +897,7 @@ func (a *StateAPI) StateMinerInitialPledgeCollateral(ctx context.Context, maddr
|
||||
From: maddr,
|
||||
To: builtin.StorageMarketActorAddr,
|
||||
Method: builtin.MethodsMarket.VerifyDealsForActivation,
|
||||
GasLimit: 100000000000,
|
||||
GasLimit: 100_000_000,
|
||||
GasPrice: types.NewInt(0),
|
||||
Params: params,
|
||||
}, ts)
|
||||
@@ -969,7 +969,7 @@ func (a *StateAPI) StateVerifiedClientStatus(ctx context.Context, addr address.A
|
||||
return nil, err
|
||||
}
|
||||
|
||||
vh, err := hamt.LoadNode(ctx, cst, st.VerifiedClients)
|
||||
vh, err := hamt.LoadNode(ctx, cst, st.VerifiedClients, hamt.UseTreeBitWidth(5))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ func (a *PaychAPI) PaychClose(ctx context.Context, addr address.Address) (cid.Ci
|
||||
Method: builtin.MethodsPaych.Settle,
|
||||
Nonce: nonce,
|
||||
|
||||
GasLimit: 10000,
|
||||
GasLimit: 100_000_000,
|
||||
GasPrice: types.NewInt(0),
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ func (a *PaychAPI) PaychVoucherSubmit(ctx context.Context, ch address.Address, s
|
||||
Nonce: nonce,
|
||||
Method: builtin.MethodsPaych.UpdateChannelState,
|
||||
Params: enc,
|
||||
GasLimit: 100000,
|
||||
GasLimit: 100_000_000,
|
||||
GasPrice: types.NewInt(0),
|
||||
}
|
||||
|
||||
|
||||
@@ -56,6 +56,8 @@ type StorageMinerAPI struct {
|
||||
SetConsiderOfflineRetrievalDealsConfigFunc dtypes.SetConsiderOfflineRetrievalDealsConfigFunc
|
||||
SetSealingDelayFunc dtypes.SetSealingDelayFunc
|
||||
GetSealingDelayFunc dtypes.GetSealingDelayFunc
|
||||
GetExpectedSealDurationFunc dtypes.GetExpectedSealDurationFunc
|
||||
SetExpectedSealDurationFunc dtypes.SetExpectedSealDurationFunc
|
||||
}
|
||||
|
||||
func (sm *StorageMinerAPI) ServeRemote(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -192,6 +194,14 @@ func (sm *StorageMinerAPI) SectorGetSealDelay(ctx context.Context) (time.Duratio
|
||||
return sm.GetSealingDelayFunc()
|
||||
}
|
||||
|
||||
func (sm *StorageMinerAPI) SectorSetExpectedSealDuration(ctx context.Context, delay time.Duration) error {
|
||||
return sm.SetExpectedSealDurationFunc(delay)
|
||||
}
|
||||
|
||||
func (sm *StorageMinerAPI) SectorGetExpectedSealDuration(ctx context.Context) (time.Duration, error) {
|
||||
return sm.GetExpectedSealDurationFunc()
|
||||
}
|
||||
|
||||
func (sm *StorageMinerAPI) SectorsUpdate(ctx context.Context, id abi.SectorNumber, state api.SectorState) error {
|
||||
return sm.Miner.ForceSectorState(ctx, id, sealing.SectorState(state))
|
||||
}
|
||||
@@ -282,6 +292,14 @@ func (sm *StorageMinerAPI) DealsSetConsiderOfflineRetrievalDeals(ctx context.Con
|
||||
return sm.SetConsiderOfflineRetrievalDealsConfigFunc(b)
|
||||
}
|
||||
|
||||
func (sm *StorageMinerAPI) DealsGetExpectedSealDurationFunc(ctx context.Context) (time.Duration, error) {
|
||||
return sm.GetExpectedSealDurationFunc()
|
||||
}
|
||||
|
||||
func (sm *StorageMinerAPI) DealsSetExpectedSealDurationFunc(ctx context.Context, d time.Duration) error {
|
||||
return sm.SetExpectedSealDurationFunc(d)
|
||||
}
|
||||
|
||||
func (sm *StorageMinerAPI) DealsImportData(ctx context.Context, deal cid.Cid, fname string) error {
|
||||
fi, err := os.Open(fname)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user