Skip to content

R4R: improve denom validation#3666

Merged
jackzampolin merged 6 commits intodevelopfrom
alessio/improve-denom-validation
Mar 1, 2019
Merged

R4R: improve denom validation#3666
jackzampolin merged 6 commits intodevelopfrom
alessio/improve-denom-validation

Conversation

@alessio
Copy link
Copy Markdown
Contributor

@alessio alessio commented Feb 16, 2019

  • Use a more precise regular expression to match denom strings (e.g. [[:lower:]] instead of [[:alpha:]]) and avoid trimming spaces.
  • validateDenom() -> validateDenom() error, use mustValidateDenom() in constructors to forcibly panic when validation fails.
  • Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote tests
  • Updated relevant documentation (docs/)
  • Added entries in PENDING.md with issue #
  • rereviewed Files changed in the github PR explorer

For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@cwgoes
Copy link
Copy Markdown
Contributor

cwgoes commented Feb 25, 2019

Concept ACK, we should do this sooner rather than later since it reduces the space of acceptable denoms.

@alessio alessio force-pushed the alessio/improve-denom-validation branch from 7b12bcb to b498705 Compare March 1, 2019 15:21
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 1, 2019

Codecov Report

Merging #3666 into develop will decrease coverage by <.01%.
The diff coverage is 78.94%.

@@             Coverage Diff             @@
##           develop    #3666      +/-   ##
===========================================
- Coverage    61.39%   61.39%   -0.01%     
===========================================
  Files          189      189              
  Lines        14098    14100       +2     
===========================================
  Hits          8656     8656              
- Misses        4886     4888       +2     
  Partials       556      556

Copy link
Copy Markdown
Contributor

@jackzampolin jackzampolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this. Also agree with @cwgoes

@alessio alessio changed the title WIP: improve denom validation R4R: improve denom validation Mar 1, 2019
@jackzampolin jackzampolin merged commit b47032d into develop Mar 1, 2019
@jackzampolin jackzampolin deleted the alessio/improve-denom-validation branch March 1, 2019 20:10
@okwme
Copy link
Copy Markdown
Contributor

okwme commented Jul 14, 2020

Was the limit to 3 characters something that existed before this PR? Was there more reason than limiting the space of acceptable denoms? I'm trying to build an app with single char denoms rn and wondering if there's a good reason not to (besides forking the SDK 🍴)

Screen Shot 2020-07-14 at 17 24 32

cc @ebuchman

@ebuchman
Copy link
Copy Markdown
Contributor

Goes back even further: 2c1d533#diff-641f1d674d28f26344e36b61db7f47beL12

Probably it's to avoid people squatting smaller denoms and issues with readability/differentiation with less than 3 letters

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

Successfully merging this pull request may close these issues.

6 participants