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

Account abstraction #9831

Merged
merged 4 commits into from
Dec 16, 2022
Merged

Account abstraction #9831

merged 4 commits into from
Dec 16, 2022

Conversation

arajasek
Copy link
Contributor

@arajasek arajasek commented Dec 11, 2022

Allows sends from Embryos if and only if their delegated addresses are valid Ethereum Account addresses.

@@ -521,7 +521,7 @@ func (filec *FilecoinEC) checkBlockMessages(ctx context.Context, b *types.FullBl
return xerrors.Errorf("failed to get actor: %w", err)
}

if !isValidForSending(act) {
if !IsValidForSending(act) {
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to put this behind a version check? I guess the actor couldn't exist on-chain... but I wanted to double check.

Copy link
Contributor Author

@arajasek arajasek Dec 15, 2022

Choose a reason for hiding this comment

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

Yeah, we shouldn't need to as written.

if builtin.IsAccountActor(act.Code) {
return true
}

// HACK: Allow Eth embryos to send messages
if !builtin.IsEmbryo(act.Code) || act.Address == nil || act.Address.Protocol() != address.Delegated {
if !builtin.IsEmbryo(act.Code) || act.Address == nil || act.Address.Protocol() != address.Delegated || act.Nonce != 0 {
Copy link
Member

Choose a reason for hiding this comment

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

Also ethereum accounts? Or are we including that in IsAccountActor?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Eth Accounts didn't exist yet -- adding now.

@arajasek arajasek marked this pull request as ready for review December 15, 2022 22:00
@arajasek arajasek requested a review from a team as a code owner December 15, 2022 22:00
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