Skip to content
This repository was archived by the owner on Dec 3, 2025. It is now read-only.

Contract - #894

Draft
geoff-vball wants to merge 1 commit into
mainfrom
validator-gas
Draft

Contract#894
geoff-vball wants to merge 1 commit into
mainfrom
validator-gas

Contract

0407317
Select commit
Loading
Failed to load commit list.
GitHub Advanced Security / Slither succeeded Dec 2, 2025 in 33s

24 new alerts including 14 medium severity security vulnerabilities

New alerts in code changed by this pull request

Security Alerts:

  • 14 medium
  • 10 low

See annotations below for details.

View all branch alerts.

Annotations

Check warning on line 214 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Unused return

ValidatorSetGasTests.testGasUsageBatchOperations() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#187-214) ignores return value by _validatorSet.registerValidator(1000 + i,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#203)

Check warning on line 185 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Unused return

ValidatorSetGasTests.testGasUsageReadOperations() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#161-185) ignores return value by _validatorSet.registerValidator(3000,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#167)

Check warning on line 185 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Unused return

ValidatorSetGasTests.testGasUsageReadOperations() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#161-185) ignores return value by _validatorSet.getTotalValidators() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#176)

Check warning on line 185 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Unused return

ValidatorSetGasTests.testGasUsageReadOperations() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#161-185) ignores return value by _validatorSet.registerValidator(2000,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#166)

Check warning on line 185 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Unused return

ValidatorSetGasTests.testGasUsageReadOperations() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#161-185) ignores return value by _validatorSet.getValidator(validatorId1) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#171)

Check warning on line 159 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Unused return

ValidatorSetGasTests.testGasUsagePublicKeySameLength() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#121-159) ignores return value by _validatorSet.registerValidator(1000,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#126)

Check warning on line 159 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Unused return

ValidatorSetGasTests.testGasUsagePublicKeySameLength() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#121-159) ignores return value by _validatorSet.registerValidator(1000,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#136)

Check warning on line 159 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Unused return

ValidatorSetGasTests.testGasUsagePublicKeySameLength() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#121-159) ignores return value by _validatorSet.registerValidator(1000,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#131)

Check warning on line 119 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Unused return

ValidatorSetGasTests.testGasUsageComparisonDifferentStakeAmounts() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#95-119) ignores return value by _validatorSet.registerValidator(type()(uint256).max,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#105)

Check warning on line 119 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Unused return

ValidatorSetGasTests.testGasUsageComparisonDifferentStakeAmounts() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#95-119) ignores return value by _validatorSet.registerValidator(1,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#100)

Check warning on line 93 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Unused return

ValidatorSetGasTests.testGasUsageMultipleRegistrations() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#67-93) ignores return value by _validatorSet.registerValidator(2000,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#77)

Check warning on line 93 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Unused return

ValidatorSetGasTests.testGasUsageMultipleRegistrations() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#67-93) ignores return value by _validatorSet.registerValidator(3000,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#82)

Check warning on line 93 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Unused return

ValidatorSetGasTests.testGasUsageMultipleRegistrations() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#67-93) ignores return value by _validatorSet.registerValidator(1000,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#72)

Check warning on line 28 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Unused return

ValidatorSetGasTests.testGasUsageRegisterValidator() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#21-28) ignores return value by _validatorSet.registerValidator(1000,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#24)

Check notice on line 119 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Reentrancy vulnerabilities

Reentrancy in ValidatorSetGasTests.testGasUsageComparisonDifferentStakeAmounts() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#95-119):
	External calls:
	- _validatorSet.registerValidator(1,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#100)
	- _validatorSet.registerValidator(type()(uint256).max,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#105)
	Event emitted after the call(s):
	- log_named_uint(Gas used for small stake (1 wei),gasUsed1) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#108)
	- log_named_uint(Gas used for large stake (max uint256),gasUsed2) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#109)
	- log_named_uint(Gas usage difference,gasUsageDifference) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#113)

Check notice on line 93 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Reentrancy vulnerabilities

Reentrancy in ValidatorSetGasTests.testGasUsageMultipleRegistrations() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#67-93):
	External calls:
	- _validatorSet.registerValidator(1000,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#72)
	- _validatorSet.registerValidator(2000,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#77)
	- _validatorSet.registerValidator(3000,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#82)
	Event emitted after the call(s):
	- log_named_uint(Gas used for 1st registration,gasUsed1) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#85)
	- log_named_uint(Gas used for 2nd registration,gasUsed2) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#86)
	- log_named_uint(Gas used for 3rd registration,gasUsed3) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#87)

Check notice on line 159 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Reentrancy vulnerabilities

Reentrancy in ValidatorSetGasTests.testGasUsagePublicKeySameLength() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#121-159):
	External calls:
	- _validatorSet.registerValidator(1000,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#126)
	- _validatorSet.registerValidator(1000,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#131)
	- _validatorSet.registerValidator(1000,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#136)
	Event emitted after the call(s):
	- log_named_uint(Gas used for short public key (48 bytes),gasUsed1) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#139)
	- log_named_uint(Gas used for medium public key (48 bytes),gasUsed2) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#140)
	- log_named_uint(Gas used for long public key (48 bytes),gasUsed3) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#141)

Check notice on line 65 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Reentrancy vulnerabilities

Reentrancy in ValidatorSetGasTests.testGasUsageUpdateValidator() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#46-65):
	External calls:
	- validatorId = _validatorSet.registerValidator(1000,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#48)
	- _validatorSet.updateValidator(validatorId,2000,newPublicKey) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#56)
	Event emitted after the call(s):
	- log_named_uint(Gas used for updating validator,gasUsed) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#59)

Check notice on line 44 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Reentrancy vulnerabilities

Reentrancy in ValidatorSetGasTests.testGasUsageGetValidator() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#30-44):
	External calls:
	- validatorId = _validatorSet.registerValidator(1000,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#32)
	Event emitted after the call(s):
	- log_named_uint(Gas used for getting validator,gasUsed) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#39)

Check notice on line 28 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Reentrancy vulnerabilities

Reentrancy in ValidatorSetGasTests.testGasUsageRegisterValidator() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#21-28):
	External calls:
	- _validatorSet.registerValidator(1000,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#24)
	Event emitted after the call(s):
	- log_named_uint(Gas used for registration,gasUsed) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#27)

Check notice on line 185 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Reentrancy vulnerabilities

Reentrancy in ValidatorSetGasTests.testGasUsageReadOperations() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#161-185):
	External calls:
	- validatorId1 = _validatorSet.registerValidator(1000,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#165)
	- _validatorSet.registerValidator(2000,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#166)
	- _validatorSet.registerValidator(3000,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#167)
	Event emitted after the call(s):
	- log_named_uint(Gas used for getValidator,gasUsed1) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#179)
	- log_named_uint(Gas used for getTotalValidators,gasUsed2) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#180)

Check notice on line 214 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Calls inside a loop

ValidatorSetGasTests.testGasUsageBatchOperations() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#187-214) has external calls inside a loop: log_named_uint(string(abi.encodePacked(Gas for registration ,vm.toString(i + 1))),iterationGasUsed) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#205-208)

Check notice on line 214 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Calls inside a loop

ValidatorSetGasTests.testGasUsageBatchOperations() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#187-214) has external calls inside a loop: _validatorSet.registerValidator(1000 + i,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#203)

Check notice on line 214 in contracts/ext-interop/tests/ValidatorSetGasTests.t.sol

See this annotation in the file changed.

@github-advanced-security github-advanced-security / Slither

Reentrancy vulnerabilities

Reentrancy in ValidatorSetGasTests.testGasUsageBatchOperations() (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#187-214):
	External calls:
	- _validatorSet.registerValidator(1000 + i,PUBLIC_KEY) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#203)
	Event emitted after the call(s):
	- log_named_uint(string(abi.encodePacked(Gas for registration ,vm.toString(i + 1))),iterationGasUsed) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#205-208)
	- log_named_uint(Total gas used for 5 registrations,totalGasUsed) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#212)
	- log_named_uint(Average gas per registration,totalGasUsed / validators.length) (contracts/ext-interop/tests/ValidatorSetGasTests.t.sol#213)