-
Notifications
You must be signed in to change notification settings - Fork 20.5k
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
base: master
Are you sure you want to change the base?
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.
62f4f6f
to
5df556c
Compare
params/config.go
Outdated
// requested time. | ||
func (c *ChainConfig) TargetBlobsPerBlock(time uint64) uint64 { | ||
if c.BlobScheduleConfig == nil { | ||
panic("blob schedule not defined") |
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.
Should try to remove these panics and put a check in the fork order checker.
params/config.go
Outdated
// fork. | ||
type BlobConfig struct { | ||
Target uint64 `json:"target"` | ||
Max uint64 `json:"max"` |
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.
Probably should add update fraction here too?
tests/state_test_util.go
Outdated
@@ -312,8 +312,11 @@ func (t *StateTest) RunNoVerify(subtest StateSubtest, vmconfig vm.Config, snapsh | |||
context.Difficulty = big.NewInt(0) | |||
} | |||
if config.IsCancun(new(big.Int), block.Time()) && t.json.Env.ExcessBlobGas != nil { | |||
context.BlobBaseFee = eip4844.CalcBlobFee(*t.json.Env.ExcessBlobGas) | |||
header := block.Header() |
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 think I would prefer to do a fake header here, instead of modifying the existing header
Implements EIP-7840 and EIP-7691.