Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
6e090f83
Unverified
Commit
6e090f83
authored
Oct 30, 2023
by
Maurelian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
specs: Improvements to liveness checking specs
parent
a3d3ae3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
11 deletions
+43
-11
safe-liveness-checking.md
specs/safe-liveness-checking.md
+43
-11
No files found.
specs/safe-liveness-checking.md
View file @
6e090f83
...
@@ -11,7 +11,11 @@
...
@@ -11,7 +11,11 @@
-
[
Owner removal call flow
](
#owner-removal-call-flow
)
-
[
Owner removal call flow
](
#owner-removal-call-flow
)
-
[
Shutdown
](
#shutdown
)
-
[
Shutdown
](
#shutdown
)
-
[
Security Properties
](
#security-properties
)
-
[
Security Properties
](
#security-properties
)
-
[
In the guard
](
#in-the-guard
)
-
[
In the module
](
#in-the-module
)
-
[
Interdependency between the guard and module
](
#interdependency-between-the-guard-and-module
)
-
[
Interdependency between the guard and module
](
#interdependency-between-the-guard-and-module
)
-
[
Operational considerations
](
#operational-considerations
)
-
[
Manual validation of new owner liveness
](
#manual-validation-of-new-owner-liveness
)
-
[
Deploying the liveness checking system
](
#deploying-the-liveness-checking-system
)
-
[
Deploying the liveness checking system
](
#deploying-the-liveness-checking-system
)
-
[
Modify the liveness checking system
](
#modify-the-liveness-checking-system
)
-
[
Modify the liveness checking system
](
#modify-the-liveness-checking-system
)
-
[
Replacing the module
](
#replacing-the-module
)
-
[
Replacing the module
](
#replacing-the-module
)
...
@@ -45,7 +49,18 @@ For implementing liveness checks a `LivenessGuard` is created which receives the
...
@@ -45,7 +49,18 @@ For implementing liveness checks a `LivenessGuard` is created which receives the
each executed transaction, and tracks the latest time at which a transaction was signed by each
each executed transaction, and tracks the latest time at which a transaction was signed by each
signer. This time is made publicly available by calling a
`lastLive(address)(Timestamp)`
method.
signer. This time is made publicly available by calling a
`lastLive(address)(Timestamp)`
method.
Signers may also call the contract's
`showLiveness()()`
method directly in order to prove liveness.
Owners are recorded in this mapping in one of 4 ways:
1.
Upon deployment, the guard reads the current set of owners from the Safe contract.
1.
When a new owner is added to the safe. Similarly, when an owner is removed from the Safe, it's
entry is deleted from the mapping.
1.
When a transaction is executed, the signatures on that transaction are passed to the guard and
used to identify the signers. If more than the required number of signatures is provided, they
are ignored.
1.
An owner may call the contract's
`showLiveness()()`
method directly in order to prove liveness.
Note that the first two methods do not require the owner to actually sign anything. However these mechanisms
are necessary to prevent new owners from being removed before they have had a chance to show liveness.
### The liveness module
### The liveness module
...
@@ -85,25 +100,34 @@ sequenceDiagram
...
@@ -85,25 +100,34 @@ sequenceDiagram
### Shutdown
### Shutdown
In the unlikely event that the signer set (
`N`
) is reduced below the allowed
threshold, then (and only then) is a
In the unlikely event that the signer set (
`N`
) is reduced below the allowed
minimum number of
shutdown mechanism activated which removes the existing signers, and hands control of the
owners, then (and only then) is a shutdown mechanism activated which removes the existing
multisig over to a predetermined entity.
signers, and hands control of the
multisig over to a predetermined entity.
### Security Properties
### Security Properties
The following security properties must be upheld:
The following security properties must be upheld:
#### In the guard
1.
Signatures are assigned to the correct signer.
1.
Signatures are assigned to the correct signer.
1.
Non-signers are unable to create a record of having signed.
1.
Non-signers are unable to create a record of having signed.
1.
A
sig
ner cannot be censored or griefed such that their signing is not recorded.
1.
A
n ow
ner cannot be censored or griefed such that their signing is not recorded.
1.
Sig
ners may demonstrate liveness either by signing a transaction or by calling directly to the
1.
Ow
ners may demonstrate liveness either by signing a transaction or by calling directly to the
guard.
guard.
1.
The module only removes a signer if they have demonstrated liveness during the interval, or
1.
It must be impossible for the guard's
`checkTransaction`
or
`checkAfterExecution`
method to
if necessary to convert the safe to a 1 of 1.
permanently revert given any calldata and the current state.
1.
The module sets the correct 75% threshold upon removing a signer.
1.
The guard correctly handles updates to the owners list, such that new owners are recorded, and
removed owners are deleted.
1.
An
`ownersBefore`
enumerable set variable is used to accomplish this, it must be emptied at
the end of the
`checkAfterExecution`
call.
#### In the module
1.
During a shutdown the module correctly removes all signers, and converts the safe to a 1 of 1.
1.
During a shutdown the module correctly removes all signers, and converts the safe to a 1 of 1.
1.
It must be impossible for the guard's checkTransaction or checkAfterExecution to permanently
1.
The module only removes an owner if they have not demonstrated liveness during the interval, or
revert given any calldata and the current state.
if enough other owners have been removed to activate the shutdown mechanism.
1.
The module correctly sets the Safe's threshold upon removing a signer.
Note: neither the module nor guard attempt to prevent a quorum of owners from removing either the liveness
Note: neither the module nor guard attempt to prevent a quorum of owners from removing either the liveness
module or guard. There are legitimate reasons they might wish to do so. Moreover, if such a quorum
module or guard. There are legitimate reasons they might wish to do so. Moreover, if such a quorum
...
@@ -119,6 +143,14 @@ This means that the module can be removed or replaced without any affect on the
...
@@ -119,6 +143,14 @@ This means that the module can be removed or replaced without any affect on the
The module however does have a dependency on the guard; if the guard is removed from the Safe, then
The module however does have a dependency on the guard; if the guard is removed from the Safe, then
the module will no longer be functional and calls to its
`removeOwners`
function will revert.
the module will no longer be functional and calls to its
`removeOwners`
function will revert.
## Operational considerations
### Manual validation of new owner liveness
As
[
noted above
](
#the-liveness-guard
)
newly added owners are recorded in the guard without
necessarily having signed a transaction. Off-chain validation of the liveness of an address must
therefore be done prior to adding a new owner.
### Deploying the liveness checking system
### Deploying the liveness checking system
[
deploying
]:
#deploying-the-liveness-checking-system
[
deploying
]:
#deploying-the-liveness-checking-system
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment