-
Notifications
You must be signed in to change notification settings - Fork 46
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: extract basic account actor states #278
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the advantage of this over simply extracting basic actor state and json for every actor? That step is very fast compared to parsing the actor state into separate tables.
Extracting the basic state for all actors will have a time and storage cost and querying the table will become more difficult due to the amount of data. Given sentinel's remit perhaps this is acceptable and necessary? |
I would prefer to modify the
Is this a hunch or have we observed this to be the case with the |
I've modified so that it collects basic state for all account actors. |
tasks/actorstate/account.go
Outdated
type AccountExtractor struct{} | ||
|
||
func init() { | ||
Register(builtin.AccountActorCodeID, AccountExtractor{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Register the account actor v1 codeID in addition to the v2 (this) one.
This PR enables Sentinel to persist state for the burnt funds actor without having to extract and persist data for ALL accounts.It registers anAccountExtractor
for the Account Actor CID and introduces the concept of aFilteredExtractor
. If an extractor is aFilteredExtractor
thenprocessActor
will call it'sFilter
method to see if it wants to extract data for a given actor.At the moment theAccountExtractor
is only interested in the burnt funds account and has no specialized extraction needs beyond what is automatically extracted by the common extractor. It means it'sExtract
method is basically a noop.This PR adds an account actor extractor so that basic state is extracted for account actors.