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

[Feature] - Integration ssv-keys in ssv-network for generating keyshares #276

Merged
merged 33 commits into from
Dec 5, 2023

Conversation

Mohsen-T
Copy link
Contributor

@Mohsen-T Mohsen-T commented Nov 8, 2023

  1. Added ssv-keys as a dependency modeul to the ssv-network project’s within package.json, temporarily using v1.0.5-dev tag of ssv-keys
  2. Established a directory named json within the Hardhat's test folder, designated for housing the validatorKeys.json and operatorKeys.json files.
  3. Conducted updates to contract-helpers.ts to enhance functionality with these functions: registerValidators, registerOperators, getSecretSharedPayload, and etc
  4. Revised all test cases to accommodate the newly integrated functions in contract-helpers.ts
  5. Eliminated redundant constants and functions from contract-helpers.ts to streamline the codebase.
  6. Used the Prettier plugin to beautify and format Solidity, Typescript codes
  7. Ticket: Use ssv-keys sdk to generate share in tests

mtabasco and others added 24 commits August 30, 2023 12:49
* remove registerAuth implementation

* remove test

* remove all references to registerAuth in tests
* fix sequential network withdrawals issue
* A validator can voluntarily exit
* Update local-dev.md
* fix Types.shrink
* add SSVViews.getNetworkValidatorsCount()
- integrated ssv-keys
- added a new folder named keystore, encompass the test-keystore.json, operatorIds.json, operatorKeys.json
- added new function registerValidatorsWithKeystore in contract-helpers.ts
- added test case in register.ts
- used Prettier plugin to beautify and format Solidity & Typescript
- keystores: array of keystore files json string
- passwords: array of keystore files password
- operatorIds: array of operator ids
- operatorKeys: array of operator key strings
test/keystore/test.keystore.json Outdated Show resolved Hide resolved
test/keystore/operatorIds.json Outdated Show resolved Hide resolved
test/helpers/contract-helpers.ts Show resolved Hide resolved
test/helpers/contract-helpers.ts Outdated Show resolved Hide resolved
test/helpers/contract-helpers.ts Outdated Show resolved Hide resolved
test/helpers/contract-helpers.ts Outdated Show resolved Hide resolved
test/helpers/contract-helpers.ts Outdated Show resolved Hide resolved
test/helpers/contract-helpers.ts Outdated Show resolved Hide resolved
test/helpers/contract-helpers.ts Outdated Show resolved Hide resolved
- added validatorKeys.json and operatorKeys.json in json folder
- updated registerValidators() and registerOperators functions
- changed execution codes related new functions in all test scripts
- removed unnecessary constants and functions
Copy link
Collaborator

@mtabasco mtabasco left a comment

Choose a reason for hiding this comment

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

@Mohsen-T well done!
A suggestion: move the json folder into the helpers one. thanks!

package.json Outdated Show resolved Hide resolved
test/account/withdraw.ts Show resolved Hide resolved
});

it('Withdraw from operator balance emits "OperatorWithdrawn"', async () => {
await expect(ssvNetworkContract.connect(helpers.DB.owners[0]).withdrawOperatorEarnings(1, helpers.CONFIG.minimalOperatorFee)).to.emit(ssvNetworkContract, 'OperatorWithdrawn');
await expect(
ssvNetworkContract.connect(helpers.DB.owners[0]).withdrawOperatorEarnings(1, helpers.CONFIG.minimalOperatorFee),
Copy link
Collaborator

Choose a reason for hiding this comment

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

here is example of single line

@mtabasco mtabasco changed the base branch from main to v1.1.0 December 5, 2023 10:04
@mtabasco mtabasco merged commit 7564dfe into v1.1.0 Dec 5, 2023
4 checks passed
@mtabasco mtabasco deleted the mohsen-feature-generate-shares-using-ssvkeys branch December 5, 2023 10:51
liorrutenberg pushed a commit that referenced this pull request Feb 15, 2024
* event ValidatorExited -> indexed owner

* fix: added a test case in balance.ts

* fix: reviewed the balance calculation when an operator is removed

* Update balances.ts

* fix: added a test case

* fix: removed only

* fix: progressing

* fix: updated test case

* fix: removed log

* [Feature] - Integration ssv-keys in ssv-network for generating keyshares  (#276)

* feat: updated validators & operators management using ssv-keys

* [Update]: deployment tests and update task and documentation (#282)

* fix: updated documentations

* [Update] Added triggers for compilation in a few tasks (upgrading / updating) (#285)

* feat: added trigger for compilation in tasks

* fix: changed before test

* bulk validator registration (init)

* 2 register validator functions, all tests pass

* refactor cluster and operators libraries

* V1.0.2 deployment metadata (#283)

* v1.0.2 deployment metadata

* Bulk registration of validators (#287)

* bulk validator registration

* update CHANGELOG

* bulk remove validators

* upgrade goerli prod

* bulk exit validator

* hlsky dev metadata

* add exit validator tests

* update CHANGELOG

* update gas usage

* update roles doc

* minor improvements

* v1.1.0 goerli_prod metadata

* remove abis from git

* remove liquidation check (duplicate)

* Fix: updated the test coverage

Enhanced test coverage by incorporating additional test cases to address previously overlooked scenarios

* fix: bulkRemoveValidators reduce validator counter

* fix: bulkRemoveValidator all tests passed

* update gas numbers

* update NatSpec comments

* add audit report

* holesky deployment metadata

---------

Co-authored-by: Mohsen-T <[email protected]>
Co-authored-by: Mohsen-T <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants