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

Kill switch: Polish and integrate MVP version #518

Draft
wants to merge 38 commits into
base: next
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
383dd79
contracts: base kill switch implementation
facuspagnuolo Apr 24, 2019
9d7a118
contracts: binary kill switch implementation
facuspagnuolo Apr 24, 2019
c3f78fd
contracts: severities kill switch implementation
facuspagnuolo Apr 24, 2019
4d9ce01
contracts: application level kill switch
facuspagnuolo Apr 24, 2019
51127c4
contracts: kernel level kill switch
facuspagnuolo Apr 24, 2019
b75fdca
tests: add kill switch unit tests
facuspagnuolo Apr 29, 2019
4f4421e
contracts: use ternary ignoration for kill-switch settings
facuspagnuolo Apr 29, 2019
00b76b9
contracts: fix linting issues
facuspagnuolo Apr 29, 2019
df3568f
kill-switch: cleanup models leaving only app level
facuspagnuolo Apr 30, 2019
b6c5531
kill-switch: use `highest` instead of `lowest` allowed severities
facuspagnuolo Apr 30, 2019
c20c608
kill-switch: Support one issues registry per contract
facuspagnuolo Apr 30, 2019
1f17dcb
kill-switch: drop custom programmatic handling
facuspagnuolo Apr 30, 2019
130c343
kill-switch: integrate with aragonOS components
facuspagnuolo May 1, 2019
3c9eb50
kill-switch: place mocks and test files in corresponding dirs
facuspagnuolo May 2, 2019
ffff170
kill-switch: minor tweaks based on @bingen's feedback
facuspagnuolo May 3, 2019
76f8521
kill-switch: skip gas costs test for coverage
facuspagnuolo May 3, 2019
2db3e46
kill-switch: rename 'ignore' action to 'allow'
facuspagnuolo May 3, 2019
d28cfee
kill-switch: rename issues registry `entry` by `implementation`
facuspagnuolo May 7, 2019
dba7e42
kill-switch: rename test files to follow naming convention
facuspagnuolo May 7, 2019
60268b2
kill-switch: improve authentication params
facuspagnuolo May 7, 2019
8f91fec
kill-switch: fix app id constant value
facuspagnuolo May 7, 2019
1ce842d
kill-switch: improve gas costs and support current kernel versions
facuspagnuolo May 7, 2019
a13d491
kill-switch: move kernel initialization logic to DAO factory
facuspagnuolo May 7, 2019
77b8b2e
kill-switch: rename issues registry `isSeverityFor` to `hasSeverity`
facuspagnuolo May 7, 2019
d499267
kill-switch: rename `killSwitched` modifier to `killSwitchProtected`
facuspagnuolo May 7, 2019
17922cc
kill-switch: improve settings to customize different scenarios
facuspagnuolo May 8, 2019
0f288ce
kill-switch: add `DAOFactory` tests
facuspagnuolo May 8, 2019
a5f6bfe
kill-switch: test non compliant kernel versions
facuspagnuolo May 8, 2019
7f73ac3
kill-switch: allow core instances by default
facuspagnuolo May 8, 2019
5230a86
kill-switch: optimize tests
facuspagnuolo May 8, 2019
fd6348c
kill-switch: parameterize instance being called in kernel
facuspagnuolo May 9, 2019
6ab5f69
Merge branch 'dev' of github.com:aragon/aragonOS into application_kil…
facuspagnuolo May 9, 2019
ae617f6
kill-switch: apply suggestions from @izqui
facuspagnuolo May 17, 2019
ce7a29b
kill-switch: extract `killSwitchProtected` modifier to function
facuspagnuolo May 17, 2019
08f1a8b
kill-switch: address feedback from @sohkai
facuspagnuolo May 20, 2019
5817661
kill-switch: small tweaks and optimizations
facuspagnuolo May 21, 2019
3113233
kill-switch: split unit and integration tests
facuspagnuolo May 21, 2019
c057f0d
kill-switch: rename mocks dir and improve inline doc
facuspagnuolo Jun 10, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
kill-switch: skip gas costs test for coverage
  • Loading branch information
facuspagnuolo committed May 3, 2019
commit 76f85211db0d891c2d4764d1f775b57f03720dab
5 changes: 3 additions & 2 deletions test/contracts/kill_switch/KillSwitch.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { ACTION, SEVERITY } = require('./enums')
const { skipCoverage } = require('../../helpers/coverage')
const { assertRevert } = require('../../helpers/assertThrow')
const { getEvents, getEvent, getEventArgument } = require('../../helpers/events')

@@ -631,12 +632,12 @@ contract('KillSwitch', ([_, root, owner, securityPartner, anyone]) => {
await defaultIssuesRegistry.setSeverityFor(appBase.address, SEVERITY.LOW, { from: securityPartner })
})

it('kill switch should overload ~32k of gas to a function', async () => {
it('kill switch should overload ~32k of gas to a function', skipCoverage(async () => {
const { receipt: { cumulativeGasUsed: gasUsedWithKillSwitch } } = await app.write(10, { from: owner })
const { receipt: { cumulativeGasUsed: gasUsedWithoutKillSwitch } } = await app.writeWithoutKillSwitch(10, { from: owner })

const killSwitchCost = gasUsedWithKillSwitch - gasUsedWithoutKillSwitch
assert(killSwitchCost <= 32000, 'kill switch should overload ~32k of gas')
})
}))
})
})