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

R4R: x/slashing Query Params #3117

Merged
merged 11 commits into from
Dec 14, 2018
Merged

Conversation

alexanderbez
Copy link
Contributor

@alexanderbez alexanderbez commented Dec 13, 2018

  • Implement and mount slashing query (only query params right now)
  • Fix JSON tags for params (snakecase -- this "technically" makes it a breaking change)
  • Add CLI command to query slashing params
  • Add API route to query slashing params

TODO: Docs???

closes: #2399


  • Targeted PR against correct branch (see CONTRIBUTING.md)

  • 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)

return err
}

fmt.Println(string(res))
Copy link
Member

Choose a reason for hiding this comment

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

Indent?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Que?

Copy link
Member

Choose a reason for hiding this comment

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

Does this respect the viper.GetString(client.FlagIndent)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. The querier returns JSON marshalled indented bytes, so there is no "option" to pick here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd have deserialized and then re-serialize to support this.

@alexanderbez alexanderbez added the T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine). label Dec 13, 2018
@alexanderbez
Copy link
Contributor Author

alexanderbez commented Dec 13, 2018

@fedekunze @faboweb @jackzampolin what documentation do I need to update (swagger, CLI, etc...)?

There is one new endpoint and one new command.

@codecov
Copy link

codecov bot commented Dec 13, 2018

Codecov Report

Merging #3117 into develop will increase coverage by 0.03%.
The diff coverage is 76.47%.

@@             Coverage Diff             @@
##           develop    #3117      +/-   ##
===========================================
+ Coverage    54.32%   54.35%   +0.03%     
===========================================
  Files          136      137       +1     
  Lines        10215    10232      +17     
===========================================
+ Hits          5549     5562      +13     
- Misses        4328     4331       +3     
- Partials       338      339       +1

@alexanderbez alexanderbez changed the title WIP: x/slashing Query Params R4R: x/slashing Query Params Dec 13, 2018
@jackzampolin
Copy link
Member

@alexanderbez Yup, the swagger.yaml file needs to get updated (indicated where the new route should go). The CLI docs will also need an update. We need to add a slashing section there and also add the gaiacli tx slashing unjail and gaiacli query slashing signing-info commands

Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

LGTM. Just missing tests (LCD, cli) and docs update. Then it should be good to go

Copy link
Contributor

@alessio alessio left a comment

Choose a reason for hiding this comment

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

Looks good to me

@alexanderbez
Copy link
Contributor Author

@fedekunze @jackzampolin updated docs + added integration tests

Copy link
Member

@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.

Nice! Thanks for adding the tests! This looks good!

@jackzampolin jackzampolin merged commit 110fd63 into develop Dec 14, 2018
@alexanderbez alexanderbez deleted the bez/2399-query-slashing-params branch December 14, 2018 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:CLI C:x/slashing T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Query Slashing Parameters
4 participants