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 produced blocks info #5290

Merged
merged 2 commits into from
Aug 27, 2021
Merged

Conversation

deaswang
Copy link
Contributor

@deaswang deaswang commented Jan 5, 2021

fix #314 add produced blocks info.

if err != nil {
return err
}
blockReward, err := rewardActorState.ThisEpochReward()
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this per win?

Copy link
Contributor Author

@deaswang deaswang Mar 31, 2021

Choose a reason for hiding this comment

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

It is State.ThisEpochReward in reward. reference
code

@@ -355,3 +370,40 @@ func sectorsInfo(ctx context.Context, napi api.StorageMiner) error {

return nil
}

func producedBlocks(ctx context.Context, count int, head *types.TipSet, maddr address.Address, napi api.FullNode) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

How long does it take for 1 day / week / month?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it depend on how many produced block one day.
when miner produce 10-20 blocks one day, it take less 3 minutes for one day include stat produced blocks and all gas cost(need message replay, maybe cost most time).

@jennijuju
Copy link
Member

@magik6k needs to test this on a miner.

@deaswang deaswang requested a review from arajasek as a code owner May 7, 2021 01:26
@jennijuju jennijuju added the P3 P3: Might get resolved label May 24, 2021
@ZenGround0
Copy link
Contributor

@magik6k did you test this?

If not I think anyone can test in a devnet with enough setup if you write down the testing steps here.

@deaswang deaswang requested a review from a team as a code owner August 4, 2021 07:50
@magik6k magik6k merged commit 4630216 into filecoin-project:master Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 P3: Might get resolved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Information for miners
4 participants