Skip to content

Commit

Permalink
Remove createValidatorPublicKeys
Browse files Browse the repository at this point in the history
  • Loading branch information
tsudmi committed Jun 10, 2024
1 parent f1ad373 commit 515347e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 26 deletions.
5 changes: 1 addition & 4 deletions test/ValidatorsChecker.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {
import {
EthValidatorsData,
createEthValidatorsData,
createValidatorPublicKeys,
getValidatorsManagerSigningData,
getValidatorsMultiProof,
} from './shared/validators'
Expand Down Expand Up @@ -52,7 +51,6 @@ networks.forEach((network) => {
vaultNotDeposited: EthVault
let validatorsData: EthValidatorsData
let validators: Buffer[]
let publicKeys: Uint8Array[]
let validatorsRegistryRoot: string

beforeEach('deploy fixture', async () => {
Expand Down Expand Up @@ -109,7 +107,6 @@ networks.forEach((network) => {
const numValidators = 5
validators = validatorsData.validators.slice(0, numValidators)

publicKeys = await createValidatorPublicKeys()
validatorsRegistryRoot = await validatorsRegistry.get_deposit_root()
await vault.connect(other).deposit(other.address, ZERO_ADDRESS, { value: validatorDeposit })
await vaultV1.connect(other).deposit(other.address, ZERO_ADDRESS, { value: validatorDeposit })
Expand Down Expand Up @@ -217,7 +214,7 @@ networks.forEach((network) => {
.checkValidatorsManagerSignature(
vaultAddress,
validatorsRegistryRoot,
Buffer.concat(publicKeys),
Buffer.concat(validators),
ethers.getBytes(signature)
)
).to.be.revertedWithCustomError(validatorsChecker, 'AccessDenied')
Expand Down
7 changes: 0 additions & 7 deletions test/__snapshots__/RewardSplitter.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,3 @@ Object {
"gasUsed": 170789,
}
`;

exports[`RewardSplitter withdraw rewards can enter exit queue with multicall 1`] = `
Object {
"calldataByteLength": 612,
"gasUsed": 170767,
}
`;
15 changes: 0 additions & 15 deletions test/shared/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,21 +172,6 @@ export async function createValidators(
return validators
}

export async function createValidatorPublicKeys(): Promise<any[]> {
const publicKeys: Uint8Array[] = []
await bls.init(bls.BLS12_381)

for (let i = 0; i < secretKeys.length; i++) {
const secretKey = new bls.SecretKey()
secretKey.deserialize(ethers.getBytes(secretKeys[i]))
const publicKey = secretKey.getPublicKey().serialize()

publicKeys.push(publicKey)
}

return publicKeys
}

export function appendDepositData(
validator: Buffer,
depositAmount: bigint,
Expand Down

0 comments on commit 515347e

Please sign in to comment.