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(debug): Process actor by head without persistance #86

Merged
merged 1 commit into from
Oct 11, 2020

Conversation

placer14
Copy link
Contributor

Usage: ./visor debug --actor-head <head-cid>

$ ./visor --log-level=debug debug --actor-head bafy2bzaceav5xqjxizyht2o7ps5zt6zsky6itsvo5hzgwbsgehrrw6zhvrw6m
2020-10-10T22:37:15.637Z        INFO    visor/lens/lotus        lotus/lotus.go:53       Lotus API version: 0.9.0+git.8f35a5c0
SELECT "processing_actor"."head", "processing_actor"."code", "processing_actor"."nonce", "processing_actor"."balance", "processing_actor"."address", "processing_actor"."parent_state_root", "processing_actor"."tip_set", "processing_actor"."parent_tip_set", "processing_acto
r"."height", "processing_actor"."added_at", "processing_actor"."claimed_until", "processing_actor"."completed_at", "processing_actor"."errors_detected" FROM "visor_processing_actors" AS "processing_actor" WHERE (head = 'bafy2bzaceav5xqjxizyht2o7ps5zt6zsky6itsvo5hzgwbsgehr
rw6zhvrw6m') LIMIT 1
** get actor finished in 1.606408ms
** new actor info finished in 21.391µs
** ActorProcessorResult:
{
      "Ts": [
        {
          "/": "bafy2bzacea6ryf7fordylzhchpkc7ww25tk7mtpj262q5nv5ruc2ghufd3et2"
        },
        {
          "/": "bafy2bzaceagbsfjuyv7bovamsjpjhlbfxvwimiudzqm7nmxh3ncjzlczhixga"
        },
        {
          "/": "bafy2bzacedvajzu2prcq6ojwre43wivlhx3tmsb2wh6oxswas3ndqnwsghwbu"
        },
        {
          "/": "bafy2bzacedylz3ltal44ixciojtuszxdui4sb6jcaxxgpch3pjdrl4zbletjo"
        },
        {
          "/": "bafy2bzaceczgiyykt425horot7khxoxfztocq34noxvcypdzgkr3dfmprlm3m"
        }
      ],
      "Pts": [
        {
          "/": "bafy2bzacedn7xwashv7u6knwz7ucwrnvjqzj362h3xi3usaux4ezx2zk3yad6"
        }
      ],
      "StateRoot": {
        "/": "bafy2bzacebagf5wjtwxt2p3tb36smp4acsai7xrbf524ccd3kkfocqd3n6ocq"
      },
      "Addr": "t09999",
      "Actor": {
        "Code": {
          "/": "bafkqaetgnfwc6mjpon2g64tbm5sw22lomvza"
        },
        "Head": {
          "/": "bafy2bzaceav5xqjxizyht2o7ps5zt6zsky6itsvo5hzgwbsgehrrw6zhvrw6m"
        },
        "Nonce": 0,
        "Balance": "0"
      },
      "State": {
        "Info": {
          "/": "bafy2bzacebvnwjnmkvjv3o4245vcjw6sr74vxexx4h4d4wqewsdfw7f43doa2"
        },
        "PreCommitDeposits": "0",
        "LockedFunds": "0",
        "VestingFunds": {
          "/": "bafy2bzacealbq6s7ptdud6gvpc2yv54opwotncjlqjxmzb2q2rnjxv753rwdc"
        },
        "InitialPledgeRequirement": "0",
        "PreCommittedSectors": {
          "/": "bafy2bzaceamp42wmmgr2g2ymg46euououzfyck7szknvfacqscohrvaikwfay"
        },
        "PreCommittedSectorsExpiry": {
          "/": "bafy2bzacedswlcz5ddgqnyo3sak3jmhmkxashisnlpq6ujgyhe4mlobzpnhs6"
        },
        "AllocatedSectors": {
          "/": "bafy2bzacea456askyutsf7uk4ta2q5aojrlcji4mhaqokbfalgvoq4ueeh4l2"
        },
        "Sectors": {
          "/": "bafy2bzacedswlcz5ddgqnyo3sak3jmhmkxashisnlpq6ujgyhe4mlobzpnhs6"
        },
        "ProvingPeriodStart": 112899,
        "CurrentDeadline": 20,
        "Deadlines": {
          "/": "bafy2bzaceakubxbluycf7ug7ve3o5yg2kwbhjaf65gtu5m4ethfrq2qxurtcy"
        },
        "EarlyTerminations": [
          0
        ]
      },
      "Info": {
        "Owner": "t09034",
        "Worker": "t09034",
        "NewWorker": "\u003cempty\u003e",
        "ControlAddresses": null,
        "WorkerChangeEpoch": -1,
        "PeerId": "12D3KooWN8AFaTHatE5dqAtZbStjsL8t1ZJv7zGT1xNZCpTPCYuz",
        "Multiaddrs": null,
        "SealProofType": 3,
        "SectorSize": 34359738368,
        "WindowPoStPartitionSectors": 2349
      },
      "Power": {
        "MinerPower": {
          "RawBytePower": "0",
          "QualityAdjPower": "0"
        },
        "TotalPower": {
          "RawBytePower": "455171391260459008",
          "QualityAdjPower": "455171391260459008"
        },
        "HasMinPower": false
      },
      "PreCommitChanges": {
        "Added": null,
        "Removed": null
      },
      "SectorChanges": {
        "Added": null,
        "Extended": null,
        "Removed": null
      },
      "PartitionDiff": null
    }** debug actor finished in 3.491511ms
** debug total finished in 5.147261ms
SELECT pg_advisory_unlock_shared(1);

@placer14 placer14 added the kind/enhancement Improvement to an existing feature label Oct 10, 2020
@placer14 placer14 requested a review from iand October 10, 2020 22:40
@placer14 placer14 self-assigned this Oct 10, 2020
@placer14 placer14 requested a review from frrist October 10, 2020 22:40
@placer14 placer14 merged commit 10fd147 into master Oct 11, 2020
@placer14 placer14 deleted the feat/debug-actor-head branch October 11, 2020 03:40
placer14 added a commit that referenced this pull request Oct 11, 2020
…v2-codes

* origin/master:
  feat(debug): Process actor by head without persistance (#86)
@frrist
Copy link
Member

frrist commented Oct 12, 2020

Love this

placer14 added a commit that referenced this pull request Oct 14, 2020
* origin/master:
  fix: remove errgrp from UnindexedBlockData persist
  fix: verify there are no missing migrations before migrating (#89)
  chore: add tests for reward and power actor state extracters (#83)
  feat: support v2 actor codes (#84)
  feat(debug): Process actor by head without persistance (#86)
  fix: use debugf logging method in message processor (#82)
  feat(task): Create chainvis views and refresher (#77)
  perf: minor optimization of market actor diffing (#78)
  chore: fail database tests if VISOR_TEST_DB not set (#79)
  test(storage): add test to check for duplicate schema migrations (#80)
  in-process lotus "repo" lens (#75)

 Conflicts:
        tasks/actorstate/miner.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants