-
Notifications
You must be signed in to change notification settings - Fork 66
Problem (WIP #1313): light client doesn't verify the fetched staking state #1466
Conversation
4f22d1f
to
0f5ae5c
Compare
c173d05
to
fcaf70d
Compare
Codecov Report
@@ Coverage Diff @@
## master #1466 +/- ##
==========================================
+ Coverage 64.45% 64.51% +0.06%
==========================================
Files 160 160
Lines 21632 21673 +41
==========================================
+ Hits 13942 13983 +41
Misses 7690 7690
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the new column really required / does this need a breaking change? this is only for querying and if one provides the tx-query flag, it should be storing historical app states and each app state contains the staking version?
The current historical app states only stores |
all the options are breaking -- a new column is probably the simplest. |
Yes, the information was not there. |
bf98406
to
470d7ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the column is the simplest breaking change -- just one thing is whether this could function without historical states?
Also I wouldn't mark this as "fix #1313", as client wasn't updated to verify fetched staking states in this PR?
Yes, I'll remove the "fix". |
…d staking state Solution: - Support query merkle inclusion proof - Also support query historical staking state - Query json encoded staking from abci_query directly crypto-com#1464
470d7ab
to
3bfb287
Compare
bors r+ |
Build succeeded: |
1467: Problem (Fix #1040): No reward distribution integration tests r=tomtau a=yihuang Solution: - Add a dedicated reward integration test Check: - monetary expansion formula, tau decaying - no reward for jailed node - slashing is added to reward pool Based on #1466, rebase after that is merged. 1504: Bump serde_json from 1.0.51 to 1.0.52 r=tomtau a=dependabot-preview[bot] Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.51 to 1.0.52. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/serde-rs/json/commit/9354bec7ddf0733bae7666e64f0078d9d5f029d9"><code>9354bec</code></a> Release 1.0.52</li> <li><a href="https://github.com/serde-rs/json/commit/23c00cbd57bbe5b4975731e223ab51f3680b4b93"><code>23c00cb</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/serde-rs/json/issues/658">#658</a> from jplatte/to_raw_value</li> <li><a href="https://github.com/serde-rs/json/commit/169a895ef600b7c92eb135dff13c75a6108f3e58"><code>169a895</code></a> Add value::to_raw_value</li> <li><a href="https://github.com/serde-rs/json/commit/cb1782104a90f599a67b7c555b97d701f9875fe8"><code>cb17821</code></a> Run clippy on latest nightly that has clippy</li> <li><a href="https://github.com/serde-rs/json/commit/0fb61479e7026683dd32fb8dfa0eb88e35693cd2"><code>0fb6147</code></a> Mark StreamDeserializer's error codepaths as cold</li> <li>See full diff in <a href="https://github.com/serde-rs/json/compare/v1.0.51...v1.0.52">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=serde_json&package-manager=cargo&previous-version=1.0.51&new-version=1.0.52)](https://dependabot.com/compatibility-score/?dependency-name=serde_json&package-manager=cargo&previous-version=1.0.51&new-version=1.0.52) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired) </details> Co-authored-by: yihuang <huang@crypto.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Solution:
This feature(query historical staked state) is also needed to make the reward integration tests more stable.
Added a new abci_query path "staking" which is like "account", but it returns JSON directly, also support the new features (historical query, proof), the next step will be update the "staking_state" API in client-rpc and client-cli to use the new one.