From 0b105dad976953fcfdd5f4b13610591393eaabf7 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Thu, 6 Jan 2022 15:35:39 +0100 Subject: [PATCH] Add gas charge for VerifyReplicaUpdate Signed-off-by: Jakub Sztandera --- chain/vm/gas.go | 2 ++ chain/vm/gas_v0.go | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/chain/vm/gas.go b/chain/vm/gas.go index 27d9c8d94..fe44b55b1 100644 --- a/chain/vm/gas.go +++ b/chain/vm/gas.go @@ -206,6 +206,8 @@ var prices = map[abi.ChainEpoch]Pricelist{ }, verifyPostDiscount: false, verifyConsensusFault: 495422, + + verifyReplicaUpdate: 36316136, }, } diff --git a/chain/vm/gas_v0.go b/chain/vm/gas_v0.go index 548227a33..1bda6dfae 100644 --- a/chain/vm/gas_v0.go +++ b/chain/vm/gas_v0.go @@ -120,6 +120,8 @@ type pricelistV0 struct { verifyPostLookup map[abi.RegisteredPoStProof]scalingCost verifyPostDiscount bool verifyConsensusFault int64 + + verifyReplicaUpdate int64 } var _ Pricelist = (*pricelistV0)(nil) @@ -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