Skip to content

Use array instead of mapping to keep consistency to work with lists #511

Open
@akolotov

Description

@akolotov

As per the usage template for the bridge it was found that the bridge validators list does not contains lots of validators. 3-7 is enough. Bigger number of validators is more difficult to manage and coordinate.

But initially, an assumption that the list could be huge was made. That's why to keep the list it was suggested to use the mapping that has more advantage for large lists (BaseBridgeValidators.sol and BaseRewardAddressList.sol) . But for the small lists expenses required for the SSTORE operations used in the mapping are higher. That's why later (BaseMediatorFeeManager.sol), the array started using instead of the mapping.

In order to keep consistency, consider to refactor the code to use the array in BaseBridgeValidators.sol and BaseRewardAddressList.sol modules.

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