Swich gas-price to 0 in many places
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
5bfee9875c
commit
81a65fe1bc
12
cli/chain.go
12
cli/chain.go
@ -932,13 +932,11 @@ var slashConsensusFault = &cli.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
msg := &types.Message{
|
msg := &types.Message{
|
||||||
To: maddr,
|
To: maddr,
|
||||||
From: def,
|
From: def,
|
||||||
Value: types.NewInt(0),
|
Value: types.NewInt(0),
|
||||||
GasPrice: types.NewInt(1),
|
Method: builtin.MethodsMiner.ReportConsensusFault,
|
||||||
GasLimit: 0,
|
Params: enc,
|
||||||
Method: builtin.MethodsMiner.ReportConsensusFault,
|
|
||||||
Params: enc,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
smsg, err := api.MpoolPushMessage(ctx, msg)
|
smsg, err := api.MpoolPushMessage(ctx, msg)
|
||||||
|
@ -86,12 +86,10 @@ var noncefix = &cli.Command{
|
|||||||
|
|
||||||
for i := start; i < end; i++ {
|
for i := start; i < end; i++ {
|
||||||
msg := &types.Message{
|
msg := &types.Message{
|
||||||
From: addr,
|
From: addr,
|
||||||
To: addr,
|
To: addr,
|
||||||
Value: types.NewInt(1),
|
Value: types.NewInt(1),
|
||||||
GasLimit: 0,
|
Nonce: i,
|
||||||
GasPrice: types.NewInt(1),
|
|
||||||
Nonce: i,
|
|
||||||
}
|
}
|
||||||
smsg, err := api.WalletSignMessage(ctx, addr, msg)
|
smsg, err := api.WalletSignMessage(ctx, addr, msg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -69,12 +69,10 @@ var verifRegAddVerifierCmd = &cli.Command{
|
|||||||
ctx := lcli.ReqContext(cctx)
|
ctx := lcli.ReqContext(cctx)
|
||||||
|
|
||||||
msg := &types.Message{
|
msg := &types.Message{
|
||||||
To: builtin.VerifiedRegistryActorAddr,
|
To: builtin.VerifiedRegistryActorAddr,
|
||||||
From: fromk,
|
From: fromk,
|
||||||
Method: builtin.MethodsVerifiedRegistry.AddVerifier,
|
Method: builtin.MethodsVerifiedRegistry.AddVerifier,
|
||||||
GasPrice: types.NewInt(1),
|
Params: params,
|
||||||
GasLimit: 0,
|
|
||||||
Params: params,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
smsg, err := api.MpoolPushMessage(ctx, msg)
|
smsg, err := api.MpoolPushMessage(ctx, msg)
|
||||||
|
@ -78,7 +78,6 @@ var actorSetAddrsCmd = &cli.Command{
|
|||||||
To: maddr,
|
To: maddr,
|
||||||
From: minfo.Worker,
|
From: minfo.Worker,
|
||||||
Value: types.NewInt(0),
|
Value: types.NewInt(0),
|
||||||
GasPrice: types.NewInt(1),
|
|
||||||
GasLimit: gasLimit,
|
GasLimit: gasLimit,
|
||||||
Method: 18,
|
Method: 18,
|
||||||
Params: params,
|
Params: params,
|
||||||
|
@ -28,6 +28,7 @@ type MsigAPI struct {
|
|||||||
MpoolAPI MpoolAPI
|
MpoolAPI MpoolAPI
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: remove gp (gasPrice) from arguemnts
|
||||||
func (a *MsigAPI) MsigCreate(ctx context.Context, req uint64, addrs []address.Address, duration abi.ChainEpoch, val types.BigInt, src address.Address, gp types.BigInt) (cid.Cid, error) {
|
func (a *MsigAPI) MsigCreate(ctx context.Context, req uint64, addrs []address.Address, duration abi.ChainEpoch, val types.BigInt, src address.Address, gp types.BigInt) (cid.Cid, error) {
|
||||||
|
|
||||||
lenAddrs := uint64(len(addrs))
|
lenAddrs := uint64(len(addrs))
|
||||||
@ -45,7 +46,7 @@ func (a *MsigAPI) MsigCreate(ctx context.Context, req uint64, addrs []address.Ad
|
|||||||
}
|
}
|
||||||
|
|
||||||
if gp == types.EmptyInt {
|
if gp == types.EmptyInt {
|
||||||
gp = types.NewInt(1)
|
gp = types.NewInt(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set up constructor parameters for multisig
|
// Set up constructor parameters for multisig
|
||||||
@ -77,9 +78,8 @@ func (a *MsigAPI) MsigCreate(ctx context.Context, req uint64, addrs []address.Ad
|
|||||||
From: src,
|
From: src,
|
||||||
Method: builtin.MethodsInit.Exec,
|
Method: builtin.MethodsInit.Exec,
|
||||||
Params: enc,
|
Params: enc,
|
||||||
GasPrice: gp,
|
|
||||||
GasLimit: 0,
|
|
||||||
Value: val,
|
Value: val,
|
||||||
|
GasPrice: gp,
|
||||||
}
|
}
|
||||||
|
|
||||||
// send the message out to the network
|
// send the message out to the network
|
||||||
@ -120,13 +120,11 @@ func (a *MsigAPI) MsigPropose(ctx context.Context, msig address.Address, to addr
|
|||||||
}
|
}
|
||||||
|
|
||||||
msg := &types.Message{
|
msg := &types.Message{
|
||||||
To: msig,
|
To: msig,
|
||||||
From: src,
|
From: src,
|
||||||
Value: types.NewInt(0),
|
Value: types.NewInt(0),
|
||||||
Method: builtin.MethodsMultisig.Propose,
|
Method: builtin.MethodsMultisig.Propose,
|
||||||
Params: enc,
|
Params: enc,
|
||||||
GasLimit: 0,
|
|
||||||
GasPrice: types.NewInt(1),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
smsg, err := a.MpoolAPI.MpoolPushMessage(ctx, msg)
|
smsg, err := a.MpoolAPI.MpoolPushMessage(ctx, msg)
|
||||||
@ -236,13 +234,11 @@ func (a *MsigAPI) msigApproveOrCancel(ctx context.Context, operation api.MsigPro
|
|||||||
}
|
}
|
||||||
|
|
||||||
msg := &types.Message{
|
msg := &types.Message{
|
||||||
To: msig,
|
To: msig,
|
||||||
From: src,
|
From: src,
|
||||||
Value: types.NewInt(0),
|
Value: types.NewInt(0),
|
||||||
Method: msigResponseMethod,
|
Method: msigResponseMethod,
|
||||||
Params: enc,
|
Params: enc,
|
||||||
GasLimit: 0,
|
|
||||||
GasPrice: types.NewInt(1),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
smsg, err := a.MpoolAPI.MpoolPushMessage(ctx, msg)
|
smsg, err := a.MpoolAPI.MpoolPushMessage(ctx, msg)
|
||||||
|
@ -122,13 +122,11 @@ func (s SealingAPIAdapter) StateComputeDataCommitment(ctx context.Context, maddr
|
|||||||
}
|
}
|
||||||
|
|
||||||
ccmt := &types.Message{
|
ccmt := &types.Message{
|
||||||
To: builtin.StorageMarketActorAddr,
|
To: builtin.StorageMarketActorAddr,
|
||||||
From: maddr,
|
From: maddr,
|
||||||
Value: types.NewInt(0),
|
Value: types.NewInt(0),
|
||||||
GasPrice: types.NewInt(0),
|
Method: builtin.MethodsMarket.ComputeDataCommitment,
|
||||||
GasLimit: 0,
|
Params: ccparams,
|
||||||
Method: builtin.MethodsMarket.ComputeDataCommitment,
|
|
||||||
Params: ccparams,
|
|
||||||
}
|
}
|
||||||
r, err := s.delegate.StateCall(ctx, ccmt, tsk)
|
r, err := s.delegate.StateCall(ctx, ccmt, tsk)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -171,13 +171,11 @@ func (s *WindowPoStScheduler) checkNextRecoveries(ctx context.Context, dlIdx uin
|
|||||||
}
|
}
|
||||||
|
|
||||||
msg := &types.Message{
|
msg := &types.Message{
|
||||||
To: s.actor,
|
To: s.actor,
|
||||||
From: s.worker,
|
From: s.worker,
|
||||||
Method: builtin.MethodsMiner.DeclareFaultsRecovered,
|
Method: builtin.MethodsMiner.DeclareFaultsRecovered,
|
||||||
Params: enc,
|
Params: enc,
|
||||||
Value: types.NewInt(0),
|
Value: types.NewInt(0),
|
||||||
GasLimit: 0,
|
|
||||||
GasPrice: types.NewInt(2),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sm, err := s.api.MpoolPushMessage(ctx, msg)
|
sm, err := s.api.MpoolPushMessage(ctx, msg)
|
||||||
@ -255,13 +253,11 @@ func (s *WindowPoStScheduler) checkNextFaults(ctx context.Context, dlIdx uint64,
|
|||||||
}
|
}
|
||||||
|
|
||||||
msg := &types.Message{
|
msg := &types.Message{
|
||||||
To: s.actor,
|
To: s.actor,
|
||||||
From: s.worker,
|
From: s.worker,
|
||||||
Method: builtin.MethodsMiner.DeclareFaults,
|
Method: builtin.MethodsMiner.DeclareFaults,
|
||||||
Params: enc,
|
Params: enc,
|
||||||
Value: types.NewInt(0), // TODO: Is there a fee?
|
Value: types.NewInt(0), // TODO: Is there a fee?
|
||||||
GasLimit: 0,
|
|
||||||
GasPrice: types.NewInt(2),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sm, err := s.api.MpoolPushMessage(ctx, msg)
|
sm, err := s.api.MpoolPushMessage(ctx, msg)
|
||||||
@ -457,12 +453,11 @@ func (s *WindowPoStScheduler) submitPost(ctx context.Context, proof *miner.Submi
|
|||||||
}
|
}
|
||||||
|
|
||||||
msg := &types.Message{
|
msg := &types.Message{
|
||||||
To: s.actor,
|
To: s.actor,
|
||||||
From: s.worker,
|
From: s.worker,
|
||||||
Method: builtin.MethodsMiner.SubmitWindowedPoSt,
|
Method: builtin.MethodsMiner.SubmitWindowedPoSt,
|
||||||
Params: enc,
|
Params: enc,
|
||||||
Value: types.NewInt(1000), // currently hard-coded late fee in actor, returned if not late
|
Value: types.NewInt(1000), // currently hard-coded late fee in actor, returned if not late
|
||||||
GasPrice: types.NewInt(3),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: consider maybe caring about the output
|
// TODO: consider maybe caring about the output
|
||||||
|
Loading…
Reference in New Issue
Block a user