Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PE-1184: 2023-02-03 Governance Spell #311

Merged
merged 18 commits into from
Feb 6, 2023
Merged

PE-1184: 2023-02-03 Governance Spell #311

merged 18 commits into from
Feb 6, 2023

Conversation

godsflaw
Copy link
Contributor

@godsflaw godsflaw commented Jan 30, 2023

Description

Contribution Checklist

  • PR title starts with (PE-<TICKET_NUMBER>)
  • Code approved
  • Tests approved
  • CI Tests pass

Checklist

  • Every contract variable/method declared as public/external private/internal
  • Consider if this PR needs the officeHours modifier override
  • Verify expiration (30 days unless otherwise specified)
  • Verify hash in the description matches here
  • Validate all addresses used are in changelog or known
  • Notify any external teams affected by the spell so they have the opportunity to review
  • Deploy spell ETH_GAS_LIMIT="XXX" ETH_GAS_PRICE="YYY" make deploy
  • Verify mainnet contract on etherscan
  • Change test to use mainnet spell address and deploy timestamp
  • Run make archive-spell or make date="YYYY-MM-DD" archive-spell to make an archive directory and copy DssSpell.sol, DssSpell.t.sol, DssSpell.t.base.sol, and DssSpellCollateralOnboarding.sol
  • squash and merge this PR

godsflaw and others added 6 commits January 31, 2023 12:11
* update dss-test and add foundry.toml

* add chainid export

* add l2 tests WITH TODOs for Spell addresses

* add balance check for PP
This reverts commit 102a4d5.
@godsflaw
Copy link
Contributor Author

godsflaw commented Feb 2, 2023

Went with the default value of 0.1 ETH for make fund-pause-proxy on mainnet. This is a foot shooting prevention measure. I will run this locally with 0.5ether though.`

This is in simulation:

$ make fund-pause-proxy
./scripts/fund-pause-proxy.sh
Pause Proxy ETH balance (wei) before Bombshell: 0
Deploying Bombshell with 0.1ether...
Bombshell located at: 0x2EDf0b73aD9a114a42C792622021E2d2a47E6192
    https://etherscan.io/address/0x2EDf0b73aD9a114a42C792622021E2d2a47E6192
Pause Proxy ETH balance (wei) after Bombshell: 100000000000000000
$ bc
>>> scale=18
>>> 100000000000000000/10^18
.100000000000000000
>>>

on mainnet:

$ make fund-pause-proxy
./scripts/fund-pause-proxy.sh
Pause Proxy ETH balance (wei) before Bombshell: 0
Deploying Bombshell with 0.5ether...
Bombshell located at: 0x2EDf0b73aD9a114a42C792622021E2d2a47E6192
    https://etherscan.io/address/0x2EDf0b73aD9a114a42C792622021E2d2a47E6192
Pause Proxy ETH balance (wei) after Bombshell: 500000000000000000
$ bc
>>> scale=18
>>> 500000000000000000/10^18
.500000000000000000
>>>

Pause Proxy Balance:
https://etherscan.io/address/0xBE8E3e3618f7474F8cB1d074A26afFef007E98FB

godsflaw and others added 3 commits February 2, 2023 11:03
* Add Opt & Arb relay calls

* Fix tests & fix typo

* Add starknet L2spell test + Arb gov relay balance check

* Update src/test/starknet.t.sol

Co-authored-by: Christopher Mooney <chris@dod.net>

---------

Co-authored-by: Christopher Mooney <chris@dod.net>
src/DssSpell.t.sol Outdated Show resolved Hide resolved
godsflaw and others added 2 commits February 2, 2023 15:12
Co-authored-by: rockyfour <115617270+rockyfour@users.noreply.github.com>
rockyfour
rockyfour previously approved these changes Feb 3, 2023
Copy link
Contributor

@rockyfour rockyfour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to deploy.

  • Optimism l2 spell -
  • Arbitrum l2 spell ok (https://arbiscan.io/address/0x852CCBB823D73b3e35f68AD6b14e29B02360FD3d#code)
    • code ok ()
    • configured dstDomain ok ("ETH-MAIN-A")
    • configured teleport gateway matches l2TeleportGateway in l1 ARBITRUM_TELEPORT_BRIDGE
  • Starknet l2 spell -
    • declared addresses ok:
      • dai matches STARKNET_DAI_BRIDGE l2Dai - hex(385291772725090318157700937045086145273563247402457518748197066808155336371)
      • bridge matches STARKNET_DAI_BRIDGE l2DaiBridge - hex(3326542335218638260710262166293903627998802370811525948909206799059756478048)
      • bridge_legacy matches STARKNET_DAI_BRIDGE_LEGACY l2DaiBridge - hex(30097160908876648820186558578205092597541264579458245618642493561688286878)
      • teleport_gateway matches STARKNET_TELEPORT_BRIDGE l2TeleportGateway - hex(2576156530550162489556572307842752856275393324011611706622942743423291814452)
      • gov_relay_legacy matches STARKNET_GOV_RELAY_LEGACY l2GovernanceRelay - hex(787160384835569379705326849547148806310979384177683342024625021854735775346)
    • code of old gov relay and bridge denials ok:
      • dai is already warded to the newer gov relay - 2694177356735021486157429760236097264988741722222124772754810418722371262171
      • bridge is already warded to newer gov relay
      • teleport_gateway is already to by newer gov relay
      • dai is already warded to newer bridge - 3326542335218638260710262166293903627998802370811525948909206799059756478048
    • code of teleport deactivation ok -
      • coded domain ok("ETH-MAIN-A")
    • diff with starknet goerli spell ok (https://www.diffchecker.com/FTM2aaV2/)
  • OPT_MAX_GAS ok
  • ARB_MAX_GAS, ARB_GAS_PRICE_BID, ARB_MAX_SUBMISSION_COST, ARB_L1_CALL_VALUE - ok
  • made sure that a low value ARB_MAX_SUBMISSION_COST would make the test fail
  • STA_GAS_USAGE_ESTIMATION, STA_GAS_PRICE, STA_L1_CALL_VALUE - match goerli
  • diff with goerli -ok
    -hash and copy ok
  • tests pass:
    Running 1 test for src/test/starknet.t.sol:StarknetTests
    [PASS] testStarknet() (gas: 1558777)
    Test result: ok. 1 passed; 0 failed; finished in 261.71ms

Running 20 tests for src/DssSpell.t.sol:DssSpellTest
[PASS] testAuth() (gas: 9223371487101211439)
[PASS] testAuthInSources() (gas: 9223371487098953477)
[PASS] testBytecodeMatches() (gas: 2446573)
[PASS] testCastCost() (gas: 1281337)
[PASS] testChainlogValues() (gas: 9434183)
[PASS] testChainlogVersionBump() (gas: 4620064)
[PASS] testContractSize() (gas: 9006)
[PASS] testDeployCost() (gas: 2432087)
[PASS] testFailNotScheduled() (gas: 14331)
[PASS] testFailTooEarly() (gas: 13901)
[PASS] testFailTooLate() (gas: 13856)
[PASS] testFailWrongDay() (gas: 13901)
[PASS] testGeneral() (gas: 35375146)
[PASS] testL2ArbitrumSpell() (gas: 11659081)
[PASS] testL2OptimismSpell() (gas: 11294804)
[PASS] testNextCastTime() (gas: 353681)
[PASS] testOnTime() (gas: 1277187)
[PASS] testPSMs() (gas: 2786001)
[PASS] testPayments() (gas: 1413694)
[PASS] testUseEta() (gas: 352299)
Test result: ok. 20 passed; 0 failed; finished in 26.31s

brianmcmichael
brianmcmichael previously approved these changes Feb 3, 2023
Copy link
Contributor

@brianmcmichael brianmcmichael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Office hours off
hash and date correct
Scripts match(ish) Goerli
Payment addresses and amounts match gov copy
Tests public and passing
l2 spells verified
l2 tests validate post-state

Running 1 test for src/test/starknet.t.sol:StarknetTests
[PASS] testStarknet() (gas: 1558777)
Test result: ok. 1 passed; 0 failed; finished in 19.72s

Running 20 tests for src/DssSpell.t.sol:DssSpellTest
[PASS] testAuth() (gas: 9223371487101211439)
[PASS] testAuthInSources() (gas: 9223371487098953477)
[PASS] testBytecodeMatches() (gas: 2459253)
[PASS] testCastCost() (gas: 1281337)
[PASS] testChainlogValues() (gas: 9434183)
[PASS] testChainlogVersionBump() (gas: 4620064)
[PASS] testContractSize() (gas: 9006)
[PASS] testDeployCost() (gas: 2444731)
[PASS] testFailNotScheduled() (gas: 14331)
[PASS] testFailTooEarly() (gas: 13901)
[PASS] testFailTooLate() (gas: 13856)
[PASS] testFailWrongDay() (gas: 13901)
[PASS] testGeneral() (gas: 35389637)
[PASS] testL2ArbitrumSpell() (gas: 11659081)
[PASS] testL2OptimismSpell() (gas: 11294804)
[PASS] testNextCastTime() (gas: 353681)
[PASS] testOnTime() (gas: 1277187)
[PASS] testPSMs() (gas: 2786001)
[PASS] testPayments() (gas: 1413407)
[PASS] testUseEta() (gas: 352299)
Test result: ok. 20 passed; 0 failed; finished in 536.18s

rockyfour
rockyfour previously approved these changes Feb 3, 2023
Copy link
Contributor

@rockyfour rockyfour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to publish and archive.

compiler version - ok
optimizations off - ok
license - ok
code matches repo - ok
dss-exec-lib address - ok

tests pass:
[⠒] Compiling...
[⠔] Compiling 4 files with 0.8.16
[⠢] Solc 0.8.16 finished in 1.76s
Compiler run successful

Running 1 test for src/test/starknet.t.sol:StarknetTests
[PASS] testStarknet() (gas: 1558777)
Test result: ok. 1 passed; 0 failed; finished in 23.22s

Running 20 tests for src/DssSpell.t.sol:DssSpellTest
[PASS] testAuth() (gas: 9223371487101211439)
[PASS] testAuthInSources() (gas: 9223371487098953477)
[PASS] testBytecodeMatches() (gas: 2459253)
[PASS] testCastCost() (gas: 1281337)
[PASS] testChainlogValues() (gas: 9434183)
[PASS] testChainlogVersionBump() (gas: 4620064)
[PASS] testContractSize() (gas: 9006)
[PASS] testDeployCost() (gas: 2444731)
[PASS] testFailNotScheduled() (gas: 14331)
[PASS] testFailTooEarly() (gas: 13901)
[PASS] testFailTooLate() (gas: 13856)
[PASS] testFailWrongDay() (gas: 13901)
[PASS] testGeneral() (gas: 35391734)
[PASS] testL2ArbitrumSpell() (gas: 11659081)
[PASS] testL2OptimismSpell() (gas: 11294804)
[PASS] testNextCastTime() (gas: 353681)
[PASS] testOnTime() (gas: 1277187)
[PASS] testPSMs() (gas: 2786001)
[PASS] testPayments() (gas: 1413867)
[PASS] testUseEta() (gas: 352299)
Test result: ok. 20 passed; 0 failed; finished in 879.65s

brianmcmichael
brianmcmichael previously approved these changes Feb 3, 2023
Copy link
Contributor

@brianmcmichael brianmcmichael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified code matches(ish) github.
All compiler options good.

Tests pass.
Good for publish.

Using DssExecLib at: 0x8De6DDbCd5053d32292AAA0D2105A32d108484a6
[] Compiling...
[] Compiling 4 files with 0.8.16
[] Solc 0.8.16 finished in 3.73s
Compiler run successful

Running 1 test for src/test/starknet.t.sol:StarknetTests
[PASS] testStarknet() (gas: 1558777)
Test result: ok. 1 passed; 0 failed; finished in 19.47s

Running 20 tests for src/DssSpell.t.sol:DssSpellTest
[PASS] testAuth() (gas: 9223371487101211439)
[PASS] testAuthInSources() (gas: 9223371487098953477)
[PASS] testBytecodeMatches() (gas: 2459253)
[PASS] testCastCost() (gas: 1281337)
[PASS] testChainlogValues() (gas: 9434183)
[PASS] testChainlogVersionBump() (gas: 4620064)
[PASS] testContractSize() (gas: 9006)
[PASS] testDeployCost() (gas: 2444731)
[PASS] testFailNotScheduled() (gas: 14331)
[PASS] testFailTooEarly() (gas: 13901)
[PASS] testFailTooLate() (gas: 13856)
[PASS] testFailWrongDay() (gas: 13901)
[PASS] testGeneral() (gas: 35391734)
[PASS] testL2ArbitrumSpell() (gas: 11659081)
[PASS] testL2OptimismSpell() (gas: 11294804)
[PASS] testNextCastTime() (gas: 353681)
[PASS] testOnTime() (gas: 1277187)
[PASS] testPSMs() (gas: 2786001)
[PASS] testPayments() (gas: 1413637)
[PASS] testUseEta() (gas: 352299)
Test result: ok. 20 passed; 0 failed; finished in 558.44s

Copy link
Contributor

@rockyfour rockyfour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Archive ok, good to merge.

@brianmcmichael brianmcmichael merged commit b528982 into master Feb 6, 2023
@brianmcmichael brianmcmichael deleted the PE-1184 branch February 6, 2023 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants