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 election run-dummy command #4498

Merged
merged 2 commits into from
Oct 31, 2020
Merged

Add election run-dummy command #4498

merged 2 commits into from
Oct 31, 2020

Conversation

Kubuxu
Copy link
Contributor

@Kubuxu Kubuxu commented Oct 20, 2020

> source scripts/dev/runAPI.bash
> runAPI MinerGetBaseInfo '["t02388", 163405, [{"/": "'"$(./lotus chain head | head -1)"'"}]]' | jq .
{
  "jsonrpc": "2.0",
  "result": {
    "MinerPower": "14156212207616",
    "NetworkPower": "681826195678953472",
    "Sectors": [
      {
        "SealProof": 3,
        "SectorNumber": 179,
        "SealedCID": {
          "/": "bagboea4b5abcas5opeafvoqljrxfwnfbo5amnyhg6cwzyt37rch5z4not3stserq"
        }
      }
    ],
    "WorkerKey": "f3rutut57upcbuzyq6si2xajhvr7d4u7exd7knqop4t6w3bpl57uqpdnfs72t2tyaz7vivwdvyc3bzvq2i37ma",
    "SectorSize": 34359738368,
    "PrevBeaconEntry": {
      "Round": 259249,
      "Data": "hQ687JZRrGV4U6QMrzac7I3evTOGnXAIY3bZagH4TLZI00+3KkclftPDtVoPbyEvFAwV474o/0G+EzoSnHf4I6Uh+uLupLBH0QVB5VdlHf0RyaBO8iYPHlNF5Hrmr0+6"
    },
    "BeaconEntries": null,
    "EligibleForMining": true
  },
  "id": 2
}
# take MinerPower and Network Power and run what is below with these numbers to simulate a day of mining
> ./lotus-shed election run-dummy  --miner-power 14156212207616 --network-power 681826195678953472 | head -2880 | grep true | wc -l
0

Jakub Sztandera added 2 commits October 26, 2020 17:44
Signed-off-by: Jakub Sztandera <[email protected]>
Signed-off-by: Jakub Sztandera <[email protected]>
@Kubuxu Kubuxu marked this pull request as ready for review October 26, 2020 16:45
@magik6k magik6k merged commit 9781922 into master Oct 31, 2020
@magik6k magik6k deleted the feat/try-election branch October 31, 2020 00:02
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