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(genesis): Add task for processing genesis state #8

Merged
merged 1 commit into from
Sep 17, 2020

Conversation

frrist
Copy link
Member

@frrist frrist commented Sep 16, 2020

only handles miner state, as more models are added the genesis task
processing logic will need to be extended to include new models in the
genesis state.

special handling is required here since most task processing works by
comparing the state of actors across two tipsets, since there isn't a
tipset before the genesis block we need special handling.

to follow #7

@frrist frrist requested a review from iand September 16, 2020 19:55
@frrist frrist self-assigned this Sep 16, 2020
Base automatically changed from frrist/run-in-transaction to master September 17, 2020 09:38
case builtin.VerifiedRegistryActorCodeID:
// TODO
default:
return fmt.Errorf("unknown actor in genesis state. address: %s code: %s head: %s", addr, genesisAct.Code, genesisAct.Head)
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems drastic to abort just because we have an unknown actor. Maybe log and continue.

}
}
return &genesismodel.GenesisMinerTaskResult{
stateModel,
Copy link
Contributor

Choose a reason for hiding this comment

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

Use field names here otherwise this will break if we add a field

- only handles miner state, as more models are added the genesis task
processing logic will need to be extended to include new models in the
genesis state.

special handling is required here since *most* task processing work by
comparing the state of actors across two tipsets, since there isn't a
tipset before the genesis block we need special handling.
@frrist
Copy link
Member Author

frrist commented Sep 17, 2020

@iand I have addressed the feedback and rebased onto master, this is ready for another look when you are available.

Copy link
Contributor

@iand iand left a comment

Choose a reason for hiding this comment

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

LGTM

@frrist frrist merged commit 1584c1a into master Sep 17, 2020
@frrist frrist deleted the frrist/genesis-task branch September 17, 2020 19:50
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