-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config for deal publishing control addresses #6697
Changes from 5 commits
8f5c0c6
ee97aa0
2dc27d6
d0e87a7
9bdea91
79b0bfb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,6 +132,17 @@ func GetMaxProveCommitDuration(ver actors.Version, t abi.RegisteredSealProof) ab | |
} | ||
} | ||
|
||
func SetProviderCollateralSupplyTarget(num, denom big.Int) { | ||
{{range .versions}} | ||
{{if (ge . 2)}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Guessing we're not doing this for earlier versions just because it isn't that helpful and the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We didn't have supply target in v0 actors There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (and v1 actors didn't exist) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. isn't that what There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, maybe, but somehow those don't seem to matter |
||
market{{.}}.ProviderCollateralSupplyTarget = builtin{{.}}.BigFrac{ | ||
Numerator: num, | ||
Denominator: denom, | ||
} | ||
{{end}} | ||
{{end}} | ||
} | ||
|
||
func DealProviderCollateralBounds( | ||
size abi.PaddedPieceSize, verified bool, | ||
rawBytePower, qaPower, baselinePower abi.StoragePower, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package kit | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/stretchr/testify/require" | ||
|
||
addr "github.com/filecoin-project/go-address" | ||
"github.com/filecoin-project/go-state-types/big" | ||
miner2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/miner" | ||
|
||
"github.com/filecoin-project/lotus/chain/actors" | ||
"github.com/filecoin-project/lotus/chain/actors/builtin/miner" | ||
"github.com/filecoin-project/lotus/chain/types" | ||
) | ||
|
||
func (tm *TestMiner) SetControlAddresses(addrs ...addr.Address) { | ||
ctx := context.TODO() | ||
|
||
mi, err := tm.FullNode.StateMinerInfo(ctx, tm.ActorAddr, types.EmptyTSK) | ||
require.NoError(tm.t, err) | ||
|
||
cwp := &miner2.ChangeWorkerAddressParams{ | ||
NewWorker: mi.Worker, | ||
NewControlAddrs: addrs, | ||
} | ||
|
||
sp, err := actors.SerializeParams(cwp) | ||
require.NoError(tm.t, err) | ||
|
||
smsg, err := tm.FullNode.MpoolPushMessage(ctx, &types.Message{ | ||
From: mi.Owner, | ||
To: tm.ActorAddr, | ||
Method: miner.Methods.ChangeWorkerAddress, | ||
|
||
Value: big.Zero(), | ||
Params: sp, | ||
}, nil) | ||
require.NoError(tm.t, err) | ||
|
||
tm.FullNode.WaitMsg(ctx, smsg.Cid()) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we throw label on here