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

core: check for create blob txes #28779

Closed
wants to merge 3 commits into from
Closed

Conversation

s1na
Copy link
Contributor

@s1na s1na commented Jan 9, 2024

From the spec:

The field to deviates slightly from the semantics with the exception that it MUST NOT be nil and therefore must always represent a 20-byte address. This means that blob transactions cannot have the form of a create transaction.

Comment on lines +317 to +319
if msg.To == nil {
return ErrBlobTxCreate
}
Copy link
Contributor

Choose a reason for hiding this comment

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

func (tx *BlobTx) to() *common.Address    { tmp := tx.To; return &tmp }

Copy link
Contributor

Choose a reason for hiding this comment

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

So the to of a blob tx can never return nil, hence this check is not needed

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, so, if someone creates a core.Message explicitly, and uses it to make a state transition, then this can happen. So the PR is good, from that perspective

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

LGTM

@s1na
Copy link
Contributor Author

s1na commented Jan 10, 2024

Since this case can only happen through RPC I think it makes sense to merge it together as part of #28786. Closing this.

@s1na s1na closed this Jan 10, 2024
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.

None yet

3 participants