Skip to content

Gov prop randomly fails when adding same denoms to accept and mandatory list #257

@zarazan

Description

@zarazan

Summary of Bug

When passing a governance proposal to add an asset to the mandatory and accept list at the same time there is a random chance (due to the nature of golangs range map implementation) that the validation will hit the MandatoryList first. When this happens the accept list does not contain all denoms in the mandatory list and the gov prop fails. Instead of looping over the keys and using a case statement we could explicitly set the order of validation.

Code location: https://github.com/ojo-network/ojo/blob/main/x/oracle/keeper/msg_server.go#L158-L189

Another possible solution: #256


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

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