-
Notifications
You must be signed in to change notification settings - Fork 37
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: implement the v10 migration #142
Conversation
140cda3
to
0991928
Compare
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.
Approved with one nit
0991928
to
08baf70
Compare
return cid.Undef, xerrors.Errorf("failed to make eth zero address: %w", err) | ||
} | ||
|
||
migrations[oldInitCodeCID] = initActorMigrator{OutCodeCID: newInitCodeCID, EthZeroAddress: ethZeroAddr} |
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.
Oh, I see. Yeah.... that's not so fun. Could we just apply it as an implicit message? Or is that not allowed.
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 not so fun? Manipulating the init actor state like this? It's...not too different from stuff what we've done before.
We could apply an implicit message after the migration has run (so in Lotus, after we've done all the code CID transformations and such). But I'm generally comfortable with this (honestly we did much more in the v17 migration).
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.
Fair enough.
return cid.Undef, xerrors.Errorf("failed to set EAM Actor: %w", err) | ||
} | ||
|
||
// Create the EthZeroAddress as an EthAccount |
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.
I'm not seeing us create it. Are we just checking to see if it exists?
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.
WDYM? There's basically 2 steps to "creating" it:
- Assigning it an ID in the init actor (happens as part of the init actor migration)
- Adding that ID to the state tree as an EthAccount, which happens ~25 lines after this comment.
We're not assigning it a robust address, but that seemed okay to me?
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.
Assigning it an ID in the init actor (happens as part of the init actor migration)
Ah, this is what I was looking for. You're right, we're creating the actor here, we've already assigned the address.
Address
field nil