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 power table cli #3379

Closed

Conversation

deaswang
Copy link
Contributor

fixes #3028
use cli go-filecoin actor power-table.

commands/actor.go Show resolved Hide resolved
commands/actor.go Outdated Show resolved Hide resolved
@anorth anorth removed the request for review from frrist September 19, 2019 05:39
Copy link
Member

@anorth anorth left a comment

Choose a reason for hiding this comment

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

@ZenGround0 you wrote the issue calling for this, could you please take a look when you get a chance?

@@ -47,7 +49,8 @@ var actorCmd = &cmds.Command{
Tagline: "Interact with actors. Actors are built-in smart contracts.",
},
Subcommands: map[string]*cmds.Command{
"ls": actorLsCmd,
"ls": actorLsCmd,
"power-table": actorPowerCmd,
Copy link
Member

Choose a reason for hiding this comment

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

Only miner actors can have power, and it would be more findable if this command were with the existing miner power command. Please move this to the miner command. Move the tests appropriately.

node := b.WithGenesisInit(testGen).
WithConfig(func(c *config.Config) {
c.Mining.AutoSealIntervalSeconds = 120
}).
Copy link
Member

Choose a reason for hiding this comment

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

Unnecessary config

out := cmd.RunSuccess(ctx, "actor", "power-table").ReadStdout()
assert.Contains(t, out, minerAddr1.String())
assert.Contains(t, out, minerAddr2.String())
assert.Contains(t, out, minerAddr3.String())
Copy link
Member

Choose a reason for hiding this comment

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

Please assert the entire output. I hope that the order is deterministic.

@anorth
Copy link
Member

anorth commented Sep 19, 2019

I am on the fence about accepting this. See my comment #3028 (comment)

The one reason I'd accept it is in recognition that @deaswang you stepped up to take on an issue that we had filed (although categorized as icebox) and we really value your engagement. Nevertheless, I think this code will be deleted as we migrate to a new API in the future.

@ZenGround0

@ZenGround0
Copy link
Contributor

I'll echo @anorth in saying that your work is high quality and valuable for the project @deaswang. From the above it sounds like the right call is to close this down and close the issue too.

@anorth, @deaswang how do you think we can prevent mixups like this in the future. Should we ask contributors to comment below issues they want to take on so that we can catch things we've subsequently decided against before contributors put in work? Should we be asking contributors to only consider candidate issues (might require zenhub which contributors can't access) or issues with a certain label, i.e. help-wanted? Are issues like #3028 rare enough in our backlog that this isn't a problem worth addressing right now.

@ZenGround0 ZenGround0 closed this Sep 19, 2019
@anorth
Copy link
Member

anorth commented Sep 24, 2019

I do think contributors should post a comment on issues they are intending to work on, and be then assigned to such issue to indicate that status.

ZenHub is accessible to all contributors: it's free for open source projects. It's documented and linked from our contributing guide. I would expect regular contributors to consult it.

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.

UX: power table visualization
4 participants