You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR refactors the BlobPool to drop its unused validation hook and centralizes gas-limit filtering, adds file-based trie journaling with safe atomic writes, extends EIP-4844 support to post-Osaka per EIP-7918, enforces new block-size and tx-gas caps (EIPs 7825, 7934), introduces the CLZ opcode and secp256r1 (P256VERIFY) precompile, and harmonizes GetBlockNumber/ReadHeaderNumber calls to a (uint64,bool) API across the chain reader and rawdb.
Class diagram for ChainConfig and BlobScheduleConfig fork extensions
classDiagram
class ChainConfig {
+*uint64 BPO1Time
+*uint64 BPO2Time
+*uint64 BPO3Time
+*uint64 BPO4Time
+*uint64 BPO5Time
+IsBPO1(num *big.Int, time uint64) bool
+IsBPO2(num *big.Int, time uint64) bool
+IsBPO3(num *big.Int, time uint64) bool
+IsBPO4(num *big.Int, time uint64) bool
+IsBPO5(num *big.Int, time uint64) bool
}
class BlobScheduleConfig {
+*BlobConfig BPO1
+*BlobConfig BPO2
+*BlobConfig BPO3
+*BlobConfig BPO4
+*BlobConfig BPO5
}
ChainConfig "1" -- "1" BlobScheduleConfig : BlobScheduleConfig
BlobScheduleConfig "1" -- "0..1" BlobConfig : BPO1..BPO5
Loading
Class diagram for BlobTxSidecar and related changes
Trigger a new review: Comment @sourcery-ai review on the pull request.
Continue discussions: Reply directly to Sourcery's review comments.
Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with @sourcery-ai issue to create an issue from it.
Generate a pull request title: Write @sourcery-ai anywhere in the pull
request title to generate a title at any time. You can also comment @sourcery-ai title on the pull request to (re-)generate the title at any time.
Generate a pull request summary: Write @sourcery-ai summary anywhere in
the pull request body to generate a PR summary at any time exactly where you
want it. You can also comment @sourcery-ai summary on the pull request to
(re-)generate the summary at any time.
Generate reviewer's guide: Comment @sourcery-ai guide on the pull
request to (re-)generate the reviewer's guide at any time.
Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
pull request to resolve all Sourcery comments. Useful if you've already
addressed all the comments and don't want to see them anymore.
Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
request to dismiss all existing Sourcery reviews. Especially useful if you
want to start fresh with a new review - don't forget to comment @sourcery-ai review to trigger a new review!
Reviewer's Guide
This PR refactors the BlobPool to drop its unused validation hook and centralizes gas-limit filtering, adds file-based trie journaling with safe atomic writes, extends EIP-4844 support to post-Osaka per EIP-7918, enforces new block-size and tx-gas caps (EIPs 7825, 7934), introduces the CLZ opcode and secp256r1 (P256VERIFY) precompile, and harmonizes GetBlockNumber/ReadHeaderNumber calls to a (uint64,bool) API across the chain reader and rawdb.
Class diagram for ChainConfig and BlobScheduleConfig fork extensions
classDiagram class ChainConfig { +*uint64 BPO1Time +*uint64 BPO2Time +*uint64 BPO3Time +*uint64 BPO4Time +*uint64 BPO5Time +IsBPO1(num *big.Int, time uint64) bool +IsBPO2(num *big.Int, time uint64) bool +IsBPO3(num *big.Int, time uint64) bool +IsBPO4(num *big.Int, time uint64) bool +IsBPO5(num *big.Int, time uint64) bool } class BlobScheduleConfig { +*BlobConfig BPO1 +*BlobConfig BPO2 +*BlobConfig BPO3 +*BlobConfig BPO4 +*BlobConfig BPO5 } ChainConfig "1" -- "1" BlobScheduleConfig : BlobScheduleConfig BlobScheduleConfig "1" -- "0..1" BlobConfig : BPO1..BPO5Class diagram for BlobTxSidecar and related changes
classDiagram class BlobTxSidecar { +byte Version +[]kzg4844.Blob Blobs +[]kzg4844.Commitment Commitments +[]kzg4844.Proof Proofs +Copy() *BlobTxSidecar +ToV1() error +CellProofsAt(idx int) ([]kzg4844.Proof, error) +NewBlobTxSidecar(version byte, blobs, commitments, proofs) } class BlobTx { +*BlobTxSidecar Sidecar } BlobTx "1" -- "0..1" BlobTxSidecar : SidecarClass diagram for PendingFilter and gas limit cap
classDiagram class PendingFilter { +*uint256.Int MinTip +*uint256.Int BaseFee +*uint256.Int BlobFee +uint64 GasLimitCap +bool OnlyPlainTxs +bool OnlyBlobTxs }Class diagram for environment and block size tracking (miner/worker.go)
classDiagram class environment { +uint64 size +txFitsSize(tx *types.Transaction) bool }Class diagram for BlockChainConfig and trie journal directory
classDiagram class BlockChainConfig { +string TrieJournalDirectory }Class diagram for triedb.Config and journal directory
classDiagram class Config { +string JournalDirectory }Class diagram for HeaderChain and GetBlockNumber API change
classDiagram class HeaderChain { +GetBlockNumber(hash common.Hash) (uint64, bool) }Class diagram for rawdb.ReadHeaderNumber API change
classDiagram class rawdb { +ReadHeaderNumber(db ethdb.KeyValueReader, hash common.Hash) (uint64, bool) }Class diagram for new precompile: p256Verify
classDiagram class p256Verify { +RequiredGas(input []byte) uint64 +Run(input []byte) ([]byte, error) }Class diagram for new opcode: CLZ (EIP-7939)
classDiagram class EVMInterpreter { +opCLZ(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) }Class diagram for params/protocol_params.go new constants
classDiagram class params { +const MaxTxGas uint64 +const MaxBlockSize uint64 +const P256VerifyGas uint64 +const BlobBaseCost uint64 }File-Level Changes
core/txpool/blobpool/blobpool.gocore/txpool/subpool.gotriedb/pathdb/journal.gotriedb/pathdb/fileutils_unix.gotriedb/pathdb/fileutils_windows.gocore/rawdb/database.goconsensus/misc/eip4844/eip4844.goconsensus/misc/eip4844/eip4844_test.gocore/types/tx_blob.gocmd/devp2p/internal/ethtest/suite.goeth/catalyst/api.gocore/types/tx_blob_test.gominer/worker.gocore/block_validator.gocore/state_transition.goparams/protocol_params.gocore/vm/instructions.gocore/vm/jump_table.gocore/vm/contracts.gocrypto/secp256r1/verifier.gocore/headerchain.gocore/blockchain_reader.gocore/rawdb/accessors_chain.gocore/rawdb/accessors_body.gocore/txindexer.goPossibly linked issues
Tips and commands
Interacting with Sourcery
@sourcery-ai reviewon the pull request.issue from a review comment by replying to it. You can also reply to a
review comment with
@sourcery-ai issueto create an issue from it.@sourcery-aianywhere in the pullrequest title to generate a title at any time. You can also comment
@sourcery-ai titleon the pull request to (re-)generate the title at any time.@sourcery-ai summaryanywhere inthe pull request body to generate a PR summary at any time exactly where you
want it. You can also comment
@sourcery-ai summaryon the pull request to(re-)generate the summary at any time.
@sourcery-ai guideon the pullrequest to (re-)generate the reviewer's guide at any time.
@sourcery-ai resolveon thepull request to resolve all Sourcery comments. Useful if you've already
addressed all the comments and don't want to see them anymore.
@sourcery-ai dismisson the pullrequest to dismiss all existing Sourcery reviews. Especially useful if you
want to start fresh with a new review - don't forget to comment
@sourcery-ai reviewto trigger a new review!Customizing Your Experience
Access your dashboard to:
summary, the reviewer's guide, and others.
Getting Help
Originally posted by @sourcery-ai[bot] in #30 (comment)