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 excessBlobGas in front #27797

Merged
merged 3 commits into from Jul 31, 2023
Merged

Conversation

jsvisa
Copy link
Contributor

@jsvisa jsvisa commented Jul 28, 2023

We should check ExcessBlobGas before buyGas, or else an nil pointer error is occurred

Signed-off-by: jsvisa <delweng@gmail.com>
@karalabe
Copy link
Member

Myeah, that check doesn't make any sense at all. It's crashing anyway, it's a programming error. Just remove it altogether.

@jsvisa
Copy link
Contributor Author

jsvisa commented Jul 28, 2023

Myeah, that check doesn't make any sense at all. It's crashing anyway, it's a programming error. Just remove it altogether.

Yes, for the result it also crashed, but it crashed for a readable message(missing field excess data gas) instead of nil pointer call stack. BTW, does that never happen if a valid blob tx, if so I think we can remove them all.

Signed-off-by: jsvisa <delweng@gmail.com>
core/state_transition.go Outdated Show resolved Hide resolved
Signed-off-by: jsvisa <delweng@gmail.com>
@jsvisa
Copy link
Contributor Author

jsvisa commented Jul 31, 2023

@karalabe PTAL, thanks

Copy link
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@karalabe karalabe added this to the 1.12.1 milestone Jul 31, 2023
@karalabe karalabe merged commit 43a1a48 into ethereum:master Jul 31, 2023
1 of 2 checks passed
MoonShiesty pushed a commit to MoonShiesty/go-ethereum that referenced this pull request Aug 30, 2023
* core: check excessBlobGas in front

Signed-off-by: jsvisa <delweng@gmail.com>

* core: no need to manual panic

Signed-off-by: jsvisa <delweng@gmail.com>

* core: no comment

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
devopsbo3 pushed a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
* core: check excessBlobGas in front

Signed-off-by: jsvisa <delweng@gmail.com>

* core: no need to manual panic

Signed-off-by: jsvisa <delweng@gmail.com>

* core: no comment

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
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

2 participants