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

add a state-tree diff command to lotus shed #8081

Merged
merged 1 commit into from
Feb 13, 2022
Merged

Conversation

Stebalien
Copy link
Member

This makes it easier to debug state mismatches by providing a nice way to figure out which actors differ between two state-trees and how (balance, nonce, state, etc.).

It doesn't provide a way to actually diff those state-trees, but one can use lotus chain get to figure that out (although it would be nice to provide something a bit smarter).

Checklist

Before you mark the PR ready for review, please make sure that:

  • All commits have a clear commit message.
  • The PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, INTERFACE BREAKING CHANGE, CONSENSUS BREAKING, build, chore, ci, docs,perf, refactor, revert, style, test
    • area: api, chain, state, vm, data transfer, market, mempool, message, block production, multisig, networking, paychan, proving, sealing, wallet, deps
  • This PR has tests for new functionality or change in behaviour (shed yolo)
  • If new user-facing features are introduced, clear usage guidelines and / or documentation updates should be included in https://lotus.filecoin.io or Discussion Tutorials.
  • CI is green

This makes it easier to debug state mismatches by providing a nice way
to figure out which actors differ between two state-trees and
how (balance, nonce, state, etc.).

It doesn't provide a way to actually _diff_ those state-trees, but one
can use `lotus chain get` to figure that out (although it would be
_nice_ to provide something a bit smarter).
@codecov
Copy link

codecov bot commented Feb 11, 2022

Codecov Report

Merging #8081 (e89f7d9) into master (2e22781) will decrease coverage by 0.06%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8081      +/-   ##
==========================================
- Coverage   39.13%   39.06%   -0.07%     
==========================================
  Files         662      663       +1     
  Lines       72160    72216      +56     
==========================================
- Hits        28242    28214      -28     
- Misses      39008    39090      +82     
- Partials     4910     4912       +2     
Impacted Files Coverage Δ
cmd/lotus-shed/diff.go 0.00% <0.00%> (ø)
cmd/lotus-shed/main.go 0.00% <0.00%> (ø)
chain/events/observer.go 71.64% <0.00%> (-6.72%) ⬇️
storage/wdpost_sched.go 75.49% <0.00%> (-5.89%) ⬇️
chain/store/store.go 63.66% <0.00%> (-1.84%) ⬇️
extern/storage-sealing/fsm.go 57.83% <0.00%> (-1.05%) ⬇️
chain/sync_manager.go 66.77% <0.00%> (-0.94%) ⬇️
storage/wdpost_run.go 69.79% <0.00%> (-0.82%) ⬇️
node/impl/full/chain.go 12.27% <0.00%> (-0.60%) ⬇️
storage/wdpost_changehandler.go 98.11% <0.00%> (-0.48%) ⬇️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e22781...e89f7d9. Read the comment docs.

Copy link
Contributor

@arajasek arajasek left a comment

Choose a reason for hiding this comment

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

Thank you!

@arajasek arajasek merged commit bac708f into master Feb 13, 2022
@arajasek arajasek deleted the feat/shed-state-diff branch February 13, 2022 19:03
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.

2 participants