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 new actor dump: miner #1264

Merged
merged 8 commits into from
Oct 2, 2023
Merged

Conversation

Terryhung
Copy link
Collaborator

@Terryhung Terryhung commented Sep 22, 2023

We have implemented a miner actor dump task, which allows us to comprehensively inspect the current status of miners and easily analyze the historical behavior of a specific miner.

Use the StateLookupRobustAddress to get the miner address.

@Terryhung Terryhung force-pushed the terryhung/add-new-miner-dump branch from 01854d7 to 0591960 Compare September 22, 2023 06:35
@Terryhung Terryhung force-pushed the terryhung/add-new-miner-dump branch from 0591960 to c251896 Compare September 22, 2023 06:41
@Terryhung Terryhung force-pushed the terryhung/add-new-miner-dump branch from 67fceaf to 7323593 Compare September 22, 2023 14:09
@Terryhung Terryhung force-pushed the terryhung/add-new-miner-dump branch from 7323593 to 528d74b Compare September 22, 2023 14:15
@Terryhung Terryhung marked this pull request as ready for review September 22, 2023 14:46
@@ -58,6 +58,7 @@ type ChainAPI interface {

type StateAPI interface {
StateGetActor(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*types.Actor, error)
StateLookupRobustAddress(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This Lotus API will use the ForEach to iterate address map. Maybe we could implement a new map: key is actor_id, value is robust address.

@Terryhung Terryhung force-pushed the terryhung/add-new-miner-dump branch from 624ab93 to f3bc311 Compare September 25, 2023 16:56
return err
}

err = minerDumpObj.UpdateBalanceRelated(minerActor.Actor, minerState)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

UpdateBalanceInfo

@Terryhung Terryhung merged commit 7326abd into master Oct 2, 2023
@Terryhung Terryhung deleted the terryhung/add-new-miner-dump branch October 2, 2023 06:58
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