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

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

Open
akolotov opened this issue Oct 12, 2020 · 0 comments
Open

Comments

@akolotov
Copy link
Collaborator

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.

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

No branches or pull requests

1 participant