Skip to content

Commit

Permalink
Update values for gas refunds
Browse files Browse the repository at this point in the history
The WalletRegistry once deployed as an upgradable proxy increased gas
usage for transactions. Here we align the values.
  • Loading branch information
nkuba committed Apr 13, 2022
1 parent eae6887 commit 3f2b9cd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions solidity/ecdsa/contracts/WalletRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,9 @@ contract WalletRegistry is

// TODO: revisit all initial values

dkgResultSubmissionGas = 275000;
dkgResultApprovalGasOffset = 65000;
notifyOperatorInactivityGasOffset = 85000;
dkgResultSubmissionGas = 288_000;
dkgResultApprovalGasOffset = 62_000;
notifyOperatorInactivityGasOffset = 86_000;

sortitionPoolRewardsBanDuration = 2 weeks;

Expand Down
4 changes: 2 additions & 2 deletions solidity/ecdsa/deploy/02_deploy_reimbursement_pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const { deployer } = await getNamedAccounts()
const deployerSigner = await ethers.getSigner(deployer)

const staticGas = 40800 // gas amount consumed by the refund() + tx cost
const maxGasPrice = 500000000000 // 500 gwei
const staticGas = 48_000 // gas amount consumed by the refund() + tx cost
const maxGasPrice = ethers.utils.parseUnits("500", "gwei")

const ReimbursementPool = await deployments.deploy("ReimbursementPool", {
from: deployer,
Expand Down
2 changes: 1 addition & 1 deletion solidity/ecdsa/test/WalletRegistry.WalletCreation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3445,7 +3445,7 @@ describe("WalletRegistry - Wallet Creation", async () => {
)
expect(diff).to.be.gt(0)
expect(diff).to.be.lt(
ethers.utils.parseUnits("2000000", "gwei") // 0,002 ETH
ethers.utils.parseUnits("2500000", "gwei") // 0,0025 ETH
)
})
})
Expand Down
6 changes: 3 additions & 3 deletions solidity/ecdsa/test/WalletRegistryGovernance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ describe("WalletRegistryGovernance", async () => {
const initialAuthorizationDecreaseDelay = 5184000 // 60 days
const initialMaliciousDkgResultSlashingAmount = to1e18(50000)
const initialMaliciousDkgResultNotificationRewardMultiplier = 100
const initialDkgResultSubmissionGas = 275000
const initialDkgResultApprovalGasOffset = 65000
const initialNotifyOperatorInactivityGasOffset = 85000
const initialDkgResultSubmissionGas = 288_000
const initialDkgResultApprovalGasOffset = 62_000
const initialNotifyOperatorInactivityGasOffset = 86_000
const initialSortitionPoolRewardsBanDuration = 1209600 // 14 days

before("load test fixture", async () => {
Expand Down

0 comments on commit 3f2b9cd

Please sign in to comment.