Swich gas-price to 0 in many places

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2020-08-01 16:23:13 +02:00
parent 5bfee9875c
commit 81a65fe1bc
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA
7 changed files with 46 additions and 64 deletions

View File

@ -932,13 +932,11 @@ var slashConsensusFault = &cli.Command{
}
msg := &types.Message{
To: maddr,
From: def,
Value: types.NewInt(0),
GasPrice: types.NewInt(1),
GasLimit: 0,
Method: builtin.MethodsMiner.ReportConsensusFault,
Params: enc,
To: maddr,
From: def,
Value: types.NewInt(0),
Method: builtin.MethodsMiner.ReportConsensusFault,
Params: enc,
}
smsg, err := api.MpoolPushMessage(ctx, msg)

View File

@ -86,12 +86,10 @@ var noncefix = &cli.Command{
for i := start; i < end; i++ {
msg := &types.Message{
From: addr,
To: addr,
Value: types.NewInt(1),
GasLimit: 0,
GasPrice: types.NewInt(1),
Nonce: i,
From: addr,
To: addr,
Value: types.NewInt(1),
Nonce: i,
}
smsg, err := api.WalletSignMessage(ctx, addr, msg)
if err != nil {

View File

@ -69,12 +69,10 @@ var verifRegAddVerifierCmd = &cli.Command{
ctx := lcli.ReqContext(cctx)
msg := &types.Message{
To: builtin.VerifiedRegistryActorAddr,
From: fromk,
Method: builtin.MethodsVerifiedRegistry.AddVerifier,
GasPrice: types.NewInt(1),
GasLimit: 0,
Params: params,
To: builtin.VerifiedRegistryActorAddr,
From: fromk,
Method: builtin.MethodsVerifiedRegistry.AddVerifier,
Params: params,
}
smsg, err := api.MpoolPushMessage(ctx, msg)

View File

@ -78,7 +78,6 @@ var actorSetAddrsCmd = &cli.Command{
To: maddr,
From: minfo.Worker,
Value: types.NewInt(0),
GasPrice: types.NewInt(1),
GasLimit: gasLimit,
Method: 18,
Params: params,

View File

@ -28,6 +28,7 @@ type MsigAPI struct {
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) {
lenAddrs := uint64(len(addrs))
@ -45,7 +46,7 @@ func (a *MsigAPI) MsigCreate(ctx context.Context, req uint64, addrs []address.Ad
}
if gp == types.EmptyInt {
gp = types.NewInt(1)
gp = types.NewInt(0)
}
// Set up constructor parameters for multisig
@ -77,9 +78,8 @@ func (a *MsigAPI) MsigCreate(ctx context.Context, req uint64, addrs []address.Ad
From: src,
Method: builtin.MethodsInit.Exec,
Params: enc,
GasPrice: gp,
GasLimit: 0,
Value: val,
GasPrice: gp,
}
// 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{
To: msig,
From: src,
Value: types.NewInt(0),
Method: builtin.MethodsMultisig.Propose,
Params: enc,
GasLimit: 0,
GasPrice: types.NewInt(1),
To: msig,
From: src,
Value: types.NewInt(0),
Method: builtin.MethodsMultisig.Propose,
Params: enc,
}
smsg, err := a.MpoolAPI.MpoolPushMessage(ctx, msg)
@ -236,13 +234,11 @@ func (a *MsigAPI) msigApproveOrCancel(ctx context.Context, operation api.MsigPro
}
msg := &types.Message{
To: msig,
From: src,
Value: types.NewInt(0),
Method: msigResponseMethod,
Params: enc,
GasLimit: 0,
GasPrice: types.NewInt(1),
To: msig,
From: src,
Value: types.NewInt(0),
Method: msigResponseMethod,
Params: enc,
}
smsg, err := a.MpoolAPI.MpoolPushMessage(ctx, msg)

View File

@ -122,13 +122,11 @@ func (s SealingAPIAdapter) StateComputeDataCommitment(ctx context.Context, maddr
}
ccmt := &types.Message{
To: builtin.StorageMarketActorAddr,
From: maddr,
Value: types.NewInt(0),
GasPrice: types.NewInt(0),
GasLimit: 0,
Method: builtin.MethodsMarket.ComputeDataCommitment,
Params: ccparams,
To: builtin.StorageMarketActorAddr,
From: maddr,
Value: types.NewInt(0),
Method: builtin.MethodsMarket.ComputeDataCommitment,
Params: ccparams,
}
r, err := s.delegate.StateCall(ctx, ccmt, tsk)
if err != nil {

View File

@ -171,13 +171,11 @@ func (s *WindowPoStScheduler) checkNextRecoveries(ctx context.Context, dlIdx uin
}
msg := &types.Message{
To: s.actor,
From: s.worker,
Method: builtin.MethodsMiner.DeclareFaultsRecovered,
Params: enc,
Value: types.NewInt(0),
GasLimit: 0,
GasPrice: types.NewInt(2),
To: s.actor,
From: s.worker,
Method: builtin.MethodsMiner.DeclareFaultsRecovered,
Params: enc,
Value: types.NewInt(0),
}
sm, err := s.api.MpoolPushMessage(ctx, msg)
@ -255,13 +253,11 @@ func (s *WindowPoStScheduler) checkNextFaults(ctx context.Context, dlIdx uint64,
}
msg := &types.Message{
To: s.actor,
From: s.worker,
Method: builtin.MethodsMiner.DeclareFaults,
Params: enc,
Value: types.NewInt(0), // TODO: Is there a fee?
GasLimit: 0,
GasPrice: types.NewInt(2),
To: s.actor,
From: s.worker,
Method: builtin.MethodsMiner.DeclareFaults,
Params: enc,
Value: types.NewInt(0), // TODO: Is there a fee?
}
sm, err := s.api.MpoolPushMessage(ctx, msg)
@ -457,12 +453,11 @@ func (s *WindowPoStScheduler) submitPost(ctx context.Context, proof *miner.Submi
}
msg := &types.Message{
To: s.actor,
From: s.worker,
Method: builtin.MethodsMiner.SubmitWindowedPoSt,
Params: enc,
Value: types.NewInt(1000), // currently hard-coded late fee in actor, returned if not late
GasPrice: types.NewInt(3),
To: s.actor,
From: s.worker,
Method: builtin.MethodsMiner.SubmitWindowedPoSt,
Params: enc,
Value: types.NewInt(1000), // currently hard-coded late fee in actor, returned if not late
}
// TODO: consider maybe caring about the output