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

Add time-lock functionality - IO1-2302 #181

Open
wants to merge 164 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 161 commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
786b766
v3 core experements
Aug 8, 2022
29830c5
replace owner earns logic by operator
Aug 8, 2022
cdc607f
turn off optimizer
Aug 8, 2022
455abfa
wip optimisation
Aug 8, 2022
6977457
WIP updateValidator
Aug 8, 2022
0367a16
remove & update & tests
Aug 10, 2022
4f78290
fix tests
Aug 10, 2022
b90da20
wip improve tests
Aug 10, 2022
cc06aaa
wip
Aug 10, 2022
ab0f45d
wip
Aug 10, 2022
b85dbbf
wip logic math
Aug 14, 2022
af69417
wip logic math
Aug 15, 2022
ba67f75
mixed up values IO1-990
Aug 15, 2022
025cca2
update tests
Aug 15, 2022
f854a34
logs improvements, fix math issues
Aug 16, 2022
c8a784f
extend logs
Aug 16, 2022
f888cfd
update validator etc
Aug 17, 2022
78663ed
gas issues, validatorpk, extended operator logic
Aug 21, 2022
b4c7164
update encrypted and shares keys logic
Aug 21, 2022
c9141d2
fix group balance
Aug 21, 2022
7475309
tmp
Aug 21, 2022
786d50a
Revert "fix group balance"
Aug 21, 2022
7d4904c
fix tests
Aug 21, 2022
2a209ce
push stress test
Aug 21, 2022
518f7cc
mapping for transfer
Aug 22, 2022
5a856a5
fixed to correct events
Aug 23, 2022
7a3c9bf
wip cleanup the code
Aug 23, 2022
f1d5a1d
transfer tests #1
adamzigdon Aug 23, 2022
7048499
Merge remote-tracking branch 'origin/logic-refactoring' into transfer…
adamzigdon Aug 23, 2022
0fd9085
small code fixes
Aug 24, 2022
ffa038e
add balanceOf
Aug 24, 2022
0c3c3d7
remove test functions
Aug 24, 2022
90eb1c9
integrated compressed shares
Aug 24, 2022
fa9dbe5
Merge branch 'logic-refactoring' of github.com:bloxapp/ssv-network in…
Aug 24, 2022
a7aef9f
update testing structure (#85)
andrew-blox Aug 24, 2022
6c2356c
fixed vadim test
Aug 24, 2022
bafb7a0
clean contract tests
Aug 25, 2022
9ae41d5
changed collection name to cluster
Aug 25, 2022
53a44de
changed group name to pod
Aug 25, 2022
59180dd
Merge pull request #87 from bloxapp/cluster-pod-names
Aug 25, 2022
59b8561
Merge branch 'contract-v3' into Andrew--clean-tests--IO1-1664
adamzigdon Aug 25, 2022
bc22cc7
Merge pull request #86 from bloxapp/Andrew--clean-tests--IO1-1664
adamzigdon Aug 25, 2022
eeabaf7
init interface with supported events
Aug 25, 2022
8a35d66
interface with supported functions
Aug 25, 2022
3e493f1
Merge pull request #88 from bloxapp/contract-interface
Aug 25, 2022
b8b16bd
add gas usage tracking
adamzigdon Aug 25, 2022
6a1d5ed
eslint fixes, runTx, changed validators tests
Aug 30, 2022
5947e13
runTx -> trackGas + fix tests
Aug 31, 2022
cd1bd4b
fix tests, extend validators tests
Aug 31, 2022
5655ca8
improvements and remove validator
Aug 31, 2022
7fa7206
fix tests
Aug 31, 2022
1e73ff4
misspel fix
Aug 31, 2022
24f68c6
adding GasGroup enum
adamzigdon Aug 31, 2022
03024f8
Merge branch 'tests-scnearios' of github.com:bloxapp/ssv-network into…
adamzigdon Aug 31, 2022
8acb640
fix trackgas output
Sep 1, 2022
03fc0d8
rename eraningins to snapshot + gas improvment
Sep 1, 2022
067e558
operatorSnapshot to interface
Sep 1, 2022
22a3076
Merge pull request #91 from bloxapp/operator-snapshot
Sep 1, 2022
f04e4fc
wip errors
Sep 1, 2022
7960903
Merge remote-tracking branch 'origin/contract-v3' into tests-scnearios
adamzigdon Sep 1, 2022
af0317e
refactor helpers
adamzigdon Sep 1, 2022
0a81d8b
comment out some files
adamzigdon Sep 1, 2022
2619cb0
change to chai
adamzigdon Sep 1, 2022
a04ad3e
finilise validator tests with changed infrastructure
Sep 4, 2022
8984813
fix lint issues
Sep 4, 2022
a6074c6
extend register validator test
Sep 6, 2022
03e21ed
extend tests by new cases
Sep 6, 2022
aa77dbf
Merge pull request #90 from bloxapp/tests-scnearios
Sep 7, 2022
46cfa62
Tests operator register--IO1-1740 (#92)
vadiminc Sep 12, 2022
698bad8
Tests operator remove--IO1-1741 (#93)
vadiminc Sep 12, 2022
9ea025b
enable optimzier and update gas limits
Sep 12, 2022
64d1fc5
Merge branch 'contract-v3' of github.com:bloxapp/ssv-network into con…
Sep 12, 2022
c37fa61
adding validator testing
Sep 12, 2022
4237af6
update validator tests
Sep 13, 2022
6a1e50c
Update solidity code
Sep 13, 2022
a196942
add bulk transfer tests
Sep 13, 2022
5aa1720
update remove testing
Sep 14, 2022
1748cf5
some changes
adamzigdon Sep 14, 2022
b2bdc95
update terminology
Sep 14, 2022
0d30b8c
update helper from cluster to pod emit
Sep 14, 2022
d263d2f
small updates to tests
Sep 14, 2022
9a45178
more changes
adamzigdon Sep 15, 2022
7bbb123
Merge branch 'Andrew--adding-validator-testing--IO1-1753' of github.c…
adamzigdon Sep 15, 2022
afa638c
Update tests
Sep 15, 2022
30917d3
fixes
adamzigdon Sep 15, 2022
a8025b6
Finalize validator tests
Sep 15, 2022
0899f77
Add transfer helpers
Sep 15, 2022
3943abb
Register with 7 operator fix
Sep 15, 2022
a34764f
Merge pull request #100 from bloxapp/Andrew--adding-validator-testing…
Sep 18, 2022
a344ff9
Operator fee timelocks (#98)
vadiminc Sep 22, 2022
31a1553
network fee core changes (#103)
vadiminc Oct 6, 2022
32e3112
Liquidate function (#105)
vadiminc Oct 23, 2022
1ca7afd
core logic with improvements (#107)
vadiminc Oct 26, 2022
44401fa
fix merge conflicts with v3
Oct 26, 2022
0f7d3ce
add liquidate gas limit
Oct 26, 2022
9c063d9
code improvements based by pr review
Oct 27, 2022
3d6fda0
code improvements based by pr review
Oct 27, 2022
2c722e4
proposal for registerpod flow
Oct 27, 2022
e1771d2
remove operator simplified
Oct 27, 2022
cb776c2
maxAllowedFee simplified
Oct 27, 2022
51e77d7
improve and fix tests
Oct 27, 2022
12e6c6b
on register validator make sure all the operators exist
Oct 27, 2022
9e530d6
Merge branch 'contract-v3-temp' of github.com:bloxapp/ssv-network int…
Oct 27, 2022
4f45122
on remove validator make sure all the operators exist
Oct 27, 2022
49839c0
Merge branch 'contract-v3-temp' of github.com:bloxapp/ssv-network int…
Oct 27, 2022
149813f
small validation improvment
Oct 27, 2022
40862ac
rename operators update on transfer function
Oct 27, 2022
1670eb9
remove private dao functions
Oct 27, 2022
cb0be42
fix tests
adamzigdon Oct 27, 2022
b7e310d
Merge pull request #106 from bloxapp/contract-v3-temp
adamzigdon Oct 27, 2022
3030335
core balances logic includes reactivation (#108)
vadiminc Nov 10, 2022
eb682fe
core and tests changes for register validator (#112)
vadiminc Nov 14, 2022
47c00d1
remove operator with withdraw (#117)
vadiminc Nov 15, 2022
cd8330d
Or-update liquidate test names
Or-blox Nov 29, 2022
94ab6fa
Or- update validator test names
Or-blox Nov 29, 2022
68e4de9
Or-Changes in test names
Or-blox Nov 29, 2022
72afcf3
Poc validator bytes (#132)
vadiminc Dec 20, 2022
db119e6
Or deposit tests (#135)
Or-blox Dec 20, 2022
66a1756
fee recipient logic (#134)
vadiminc Dec 21, 2022
94f13a4
Or withdraw tests (#136)
Or-blox Dec 21, 2022
e8a1f8f
operator removal logic (#151)
vadiminc Dec 28, 2022
939c45a
Get DAO functions + pod burn rate (#153)
vadiminc Dec 28, 2022
5e39c4e
Revert "Get DAO functions + pod burn rate (#153)" (#154)
vadiminc Dec 28, 2022
5752a44
Missed get functions (#155)
vadiminc Dec 29, 2022
4393503
Remove podMetadataUpdated IO1 2182
andrew-blox Jan 2, 2023
c655580
Add validator gas test io1-2187
andrew-blox Jan 2, 2023
6545896
apply rules, upgrade solhint
mtabasco Jan 3, 2023
b43dd3a
list of gas optz changes IO1-1433 (#160)
vadiminc Jan 4, 2023
220a964
sync with contract-v3
mtabasco Jan 4, 2023
ecdbedd
Merge pull request #161 from bloxapp/solhint-rules
mtabasco Jan 5, 2023
ebcc4d0
Extra names (#163)
vadiminc Jan 10, 2023
187b3f2
add OperatorFeeDeclared, ValidatorDoesNotExist (#166)
mtabasco Jan 12, 2023
bdb60f6
UUPS proxy implementation (#167)
mtabasco Jan 12, 2023
92c0c38
naming changes
mtabasco Jan 17, 2023
57dbfac
Real RSA data
andrew-blox Jan 18, 2023
e9f3b36
naming changes (#169)
mtabasco Jan 18, 2023
2536f2e
Merge branch 'contract-v3' of https://github.com/bloxapp/ssv-network …
mtabasco Jan 20, 2023
6a069ee
IO1-2358-index-events (#175)
vadiminc Jan 25, 2023
a9bc0dc
Final names (#174)
Or-blox Jan 26, 2023
2ead029
Merge branch 'contract-v3' of https://github.com/bloxapp/ssv-network …
mtabasco Jan 27, 2023
7b7026e
isTimeLocked function + initial tests
mtabasco Feb 3, 2023
cd67697
add sanity tests
mtabasco Feb 5, 2023
2ba206c
withdrawNetworkEarnings time-locked functionality
mtabasco Feb 6, 2023
11a55df
updateLiquidationThresholdPeriod time-locked
mtabasco Feb 7, 2023
4ca30b7
delete locked period of functions after execution
mtabasco Feb 7, 2023
fad1ed5
Change contracts structure - IO1-2233 (#176)
mtabasco Feb 8, 2023
f789a00
Merge branch 'contract-v3' of https://github.com/bloxapp/ssv-network …
mtabasco Feb 9, 2023
da229c4
Add slither to CI pipeline - IO1-2233 (#177)
mtabasco Feb 9, 2023
e8d9b16
Merge branch 'contract-v3' of https://github.com/bloxapp/ssv-network …
mtabasco Feb 9, 2023
8a92030
Limit max # validators per operator - IO1-2160 (#178)
mtabasco Feb 9, 2023
132d2af
Merge branch 'contract-v3' of https://github.com/bloxapp/ssv-network …
mtabasco Feb 9, 2023
5ddba74
tagging process before deployment and upgrade
mtabasco Feb 10, 2023
03a6bb7
sync with contract-v3
mtabasco Feb 10, 2023
a041f6c
Revert "tagging process before deployment and upgrade"
mtabasco Feb 13, 2023
1ebd665
remove locker account from FunctionLocked event
mtabasco Feb 13, 2023
4c4a9dc
emit uint256 cluster balance
mtabasco Feb 15, 2023
7d368ec
Versioned contract - IO1-1818 (#179)
mtabasco Feb 15, 2023
60b0208
Merge branch 'contract-v3' of https://github.com/bloxapp/ssv-network …
mtabasco Feb 15, 2023
82ad2c4
Merge branch 'contract-v3' into time-lock-functions
mtabasco Feb 16, 2023
7c3f0a0
change id name
mtabasco Feb 16, 2023
98996d3
emit parameter data in FunctionLocked event, add TIMELOCK readme
mtabasco Feb 17, 2023
f46b580
TIMELOCK.md updated
mtabasco Feb 20, 2023
5a0bb1b
2 step transfer ownership - IO1-434 (#180)
mtabasco Feb 21, 2023
88b5545
merge contract-v3
Feb 21, 2023
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
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true

[*.{ts,json,js}]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.yml]
indent_size = 2

[*.md]
max_line_length = off
trim_trailing_whitespace = false
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ OPERATOR_MAX_FEE_INCREASE=3
SET_OPERATOR_FEE_PERIOD=259200 # 3 days
APPROVE_OPERATOR_FEE_PERIOD=345600 # 4 days
VALIDATORS_PER_OPERATOR_LIMIT=2000
REGISTERED_OPERATORS_PER_ACCOUNT_LIMIT=10
SSVNETWORK_PROXY_ADDRESS=
SSVNETWORKVIEWS_PROXY_ADDRESS=
INITIAL_VERSION="0.0.1"
27 changes: 27 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js', 'hardhat.config.ts'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'indent': ['error', 2],
'semi': [2, 'always'],
'quotes': [2, 'single', 'avoid-escape'],
'@typescript-eslint/no-empty-function': 0,
},
};
4 changes: 2 additions & 2 deletions .github/workflows/code-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
node-version: '16.x'
- run: npm install
env:
GH_TOKEN: ${{ secrets.github_token }}
- run: npx hardhat coverage
- run: NO_GAS_ENFORCE=1 npx hardhat coverage
2 changes: 1 addition & 1 deletion .github/workflows/linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
node-version: '16.x'
- run: npm install
env:
GH_TOKEN: ${{ secrets.github_token }}
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/slither.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Slither Analysis
on: [push]
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Run Slither
uses: crytic/[email protected]
id: slither
with:
node-version: 16
fail-on: high
slither-args: --exclude controlled-delegatecall
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
node-version: '16.x'
- run: npm install
env:
GH_TOKEN: ${{ secrets.github_token }}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cache
coverage
coverage.json
artifacts
.openzeppelin/unknown-*
.openzeppelin/
subgraph/build
.idea
/incentivized_testnet/operators*
Expand Down
Loading