Skip to content

Commit

Permalink
Add gas charge for VerifyReplicaUpdate
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
  • Loading branch information
Jakub Sztandera committed Jan 6, 2022
1 parent 6f316cd commit 50edae9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions chain/vm/gas.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ var Prices = map[abi.ChainEpoch]Pricelist{
},
verifyPostDiscount: false,
verifyConsensusFault: 495422,

verifyReplicaUpdate: 36316136,
},
}

Expand Down
5 changes: 3 additions & 2 deletions chain/vm/gas_v0.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ type pricelistV0 struct {
verifyPostLookup map[abi.RegisteredPoStProof]scalingCost
verifyPostDiscount bool
verifyConsensusFault int64

verifuReplicaUpdate int64
}

var _ Pricelist = (*pricelistV0)(nil)
Expand Down Expand Up @@ -229,8 +231,7 @@ func (pl *pricelistV0) OnVerifyAggregateSeals(aggregate proof7.AggregateSealVeri

// OnVerifyReplicaUpdate
func (pl *pricelistV0) OnVerifyReplicaUpdate(update proof7.ReplicaUpdateInfo) GasCharge {
// TODO: do the thing
return GasCharge{}
return newGasCharge("OnVerifyReplicaUpdate", pl.verifyReplicaUpdate, 0)
}

// OnVerifyPost
Expand Down

0 comments on commit 50edae9

Please sign in to comment.