Skip to content

banned_validators calls functions.banned, which the staking ABI does not have #147

Backlog

Description

@kp2pml30

staking.banned_validators() (and GenLayerClient.banned_validators()) always raises: it calls functions.banned(start_index, size), but the packaged staking ABI (genlayer_py/staking/abi/staking_abi.json) has no banned function, so web3 raises ABIFunctionNotFound before any RPC is made

client.banned_validators()  # ABIFunctionNotFound: ... 'banned' was not found in this contract's abi

Expected

The ABI has getAllBannedValidators(uint256 _startIndex, uint256 _size), returning IGenLayerStaking.BannedValidators[]: (address validator, uint256 untilEpochBanned, bool permanentlyBanned). The method should call it

Notes

  1. The return annotation list[ChecksumAddress] does not match that struct: returning the addresses only drops untilEpochBanned and permanentlyBanned, so changing the return type is an API decision
  2. getAllBannedValidatorsForEpoch(uint256 _epoch, ...) exists too
  3. No unit test covers the method; a test that builds the contract from the packaged ABI would have caught it
  4. Check the genlayer-js counterpart for the same mismatch

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions