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

feat: add toolshed commands to inspect statetree size #9982

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

travisperson
Copy link
Contributor

@travisperson travisperson commented Jan 10, 2023

Related Issues

#9793

Proposed Changes

Add two commands stat-actor and stat-obj that work with an offline lotus repo which report dag size stats.

Additional Info

Checklist

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

  • Commits have a clear commit message.
  • 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, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • New features have usage guidelines and / or documentation updates in
  • Tests exist for new functionality or change in behavior
  • CI is green

@travisperson travisperson force-pushed the feat/obj-stats branch 3 times, most recently from a5d764e to b0f5a3e Compare January 11, 2023 19:52
@travisperson travisperson marked this pull request as ready for review January 11, 2023 20:07
@travisperson travisperson requested a review from a team as a code owner January 11, 2023 20:07
cmd/lotus-shed/state-stats.go Show resolved Hide resolved
cmd/lotus-shed/state-stats.go Outdated Show resolved Hide resolved
// When it comes to fvm / evm actors this method of inspecting fields will probably not work
// and we may only be able to collect stats for the top level object. We might be able to iterate
// over the top level fields for the actors and identify field that are CIDs, but unsure if we would
// be able to identify a field name.
Copy link
Contributor

Choose a reason for hiding this comment

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

You are right about this for M2.2, we'd need some open manifest so that something like DumpActorState gets updated with meaningful field names. For FeVM we use a single builtin actor type to manage all user contracts so this will actually work pretty well, though we'll have the same problem one level down on the user contract code hash.

cmd/lotus-shed/state-stats.go Outdated Show resolved Hide resolved
@travisperson travisperson merged commit 91a6eab into master Jan 19, 2023
@travisperson travisperson deleted the feat/obj-stats branch January 19, 2023 16:37
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