-
Notifications
You must be signed in to change notification settings - Fork 20.6k
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
params,core: add max and target value to chain config #31002
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.
app
eth/tracers/internal/tracetest/testdata/prestate_tracer/setcode_tx.json
Outdated
Show resolved
Hide resolved
Made the updates from your review, Marius. Thanks! |
@@ -26,7 +26,7 @@ import ( | |||
"github.com/holiman/uint256" | |||
) | |||
|
|||
var rand = mrand.New(mrand.NewSource(1)) | |||
var rnd = mrand.New(mrand.NewSource(1)) |
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 renamed this because it was playing havoc with my LSP for some reason.
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.
then rename mrand
to rand
if you can
5df556c
to
c3daabe
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.
nitpicks, need to head out for today, will take a deeper look tomorrow!
// Most of the blob gas logic here is agnostic as to if the chain supports | ||
// blobs or not, however the max check panics when called on a chain without | ||
// a defined schedule, so we need to verify it's safe to call. | ||
if miner.chainConfig.IsCancun(env.header.Number, env.header.Time) { |
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.
By moving this logic after the resolve, we will pull up all blob transactions if the block is not full, but full enough of blob transactions afaik. So we're doing a lot of unnecessary work
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.
Right good point. I meant to move this above again and forgot.
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.
LGTM
{Latest,}MaxBlobsPerBlock returns a length, which is traditionally an int in Go. When comparing with blob gas (uint64) a conversion is required, but I think it's actually helpful. Kind of makes it clearer that you're working with different units. When comparing against a slice length, no conversion is needed. I'm also adding MaxBlobGasPerBlock to simplify the most common expression involving MaxBlobsPerBlock.
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.
made some style edits
@@ -26,7 +26,7 @@ import ( | |||
"github.com/holiman/uint256" | |||
) | |||
|
|||
var rand = mrand.New(mrand.NewSource(1)) | |||
var rnd = mrand.New(mrand.NewSource(1)) |
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.
then rename mrand
to rand
if you can
{common.Hash{0x07}, types.BlobTxType, params.BlobTxBlobGasPerBlob * 10}, | ||
{common.Hash{0x08}, types.BlobTxType, params.BlobTxBlobGasPerBlob * 10}, |
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 if the maximum is increased in the future? These numbers won't be accurate, and unless someone remembers to change that here, it won't be representative of what the max could be. I would suggest keeping some max value in params
, that is used in the Prague config, and here as well.
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.
It's just a simple data-passing test. The same value is sent a few lines up in doTxNotify
.
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.
majed
Sadeqi&6323 |
Implements EIP-7840 and EIP-7691.