From f6657afa3bd36db493dc555d3e4158b09921e088 Mon Sep 17 00:00:00 2001 From: healthykim Date: Sat, 11 Apr 2026 18:22:27 +0900 Subject: [PATCH] rename protocol version from eth71 to eth72 --- core/txpool/blobpool/blobpool.go | 4 ++-- core/txpool/blobpool/buffer.go | 2 +- core/txpool/blobpool/buffer_test.go | 2 +- core/txpool/blobpool/lookup.go | 2 +- core/txpool/subpool.go | 4 ++-- eth/handler.go | 4 ++-- eth/handler_eth.go | 4 ++-- eth/protocols/eth/broadcast.go | 2 +- eth/protocols/eth/handler.go | 6 +++--- eth/protocols/eth/handlers.go | 2 +- eth/protocols/eth/peer.go | 2 +- eth/protocols/eth/protocol.go | 8 ++++---- 12 files changed, 21 insertions(+), 21 deletions(-) diff --git a/core/txpool/blobpool/blobpool.go b/core/txpool/blobpool/blobpool.go index 2f44991d21..644f43913b 100644 --- a/core/txpool/blobpool/blobpool.go +++ b/core/txpool/blobpool/blobpool.go @@ -130,7 +130,7 @@ type blobTxMeta struct { id uint64 // Storage ID in the pool's persistent store storageSize uint32 // Byte size in the pool's persistent store size uint64 // RLP-encoded size of transaction including the attached blob - sizeWithoutBlob uint64 // RLP-encoded size of transaction without blob data (for ETH/71) + sizeWithoutBlob uint64 // RLP-encoded size of transaction without blob data (for ETH/72) custody *types.CustodyBitmap @@ -1500,7 +1500,7 @@ func (p *BlobPool) getRLP(hash common.Hash) []byte { // - (1) Store them separately on disk, tracking both IDs. // - (2) Keep transactions in memory and store cells on disk. // -// However, this approach does not fit well with eth71 peers, since blobs +// However, this approach does not fit well with eth72 peers, since blobs // must be included in that case. It may require decoding and re-encoding, // as well as double disk I/O each time. func (p *BlobPool) Get(hash common.Hash, includeBlob bool) *types.Transaction { diff --git a/core/txpool/blobpool/buffer.go b/core/txpool/blobpool/buffer.go index 30dba84ae8..e9695849ea 100644 --- a/core/txpool/blobpool/buffer.go +++ b/core/txpool/blobpool/buffer.go @@ -67,7 +67,7 @@ func NewBlobBuffer(addToPool func(*PooledBlobTx) error, dropPeer func(string)) * } } -// AddTx buffers a blob transaction (without blobs) from an ETH/71 peer. +// AddTx buffers a blob transaction (without blobs) from an ETH/72 peer. // If cells are already buffered, verification and pool insertion are attempted. func (b *BlobBuffer) AddTx(tx *types.Transaction, peer string) error { b.evict() diff --git a/core/txpool/blobpool/buffer_test.go b/core/txpool/blobpool/buffer_test.go index 74680c530a..1a75742212 100644 --- a/core/txpool/blobpool/buffer_test.go +++ b/core/txpool/blobpool/buffer_test.go @@ -13,7 +13,7 @@ import ( ) // makeV1Tx creates a V1 blob transaction with cell proofs, then strips blobs -// (simulating what ETH/71 peers send). +// (simulating what ETH/72 peers send). func makeV1Tx(t *testing.T, nonce uint64, blobCount int, blobOffset int, key *ecdsa.PrivateKey) *types.Transaction { t.Helper() tx := makeMultiBlobTx(nonce, 1, 1, 1, blobCount, blobOffset, key, types.BlobSidecarVersion1) diff --git a/core/txpool/blobpool/lookup.go b/core/txpool/blobpool/lookup.go index 39cb2c69b9..cbbeedde1b 100644 --- a/core/txpool/blobpool/lookup.go +++ b/core/txpool/blobpool/lookup.go @@ -24,7 +24,7 @@ import ( type txMetadata struct { id uint64 // the billy id of transction size uint64 // the RLP encoded size of transaction (blobs are included) - sizeWithoutBlob uint64 // the RLP encoded size without blob data (for ETH/71 announcements) + sizeWithoutBlob uint64 // the RLP encoded size without blob data (for ETH/72 announcements) custody types.CustodyBitmap } diff --git a/core/txpool/subpool.go b/core/txpool/subpool.go index 5f35f0a44a..b8f1384651 100644 --- a/core/txpool/subpool.go +++ b/core/txpool/subpool.go @@ -88,7 +88,7 @@ type PendingFilter struct { type TxMetadata struct { Type uint8 // The type of the transaction Size uint64 // The length of the 'rlp encoding' of a transaction (including blobs) - SizeWithoutBlob uint64 // The length without blob data (for ETH/71 announcements) + SizeWithoutBlob uint64 // The length without blob data (for ETH/72 announcements) } // SubPool represents a specialized transaction pool that lives on its own (e.g. @@ -133,7 +133,7 @@ type SubPool interface { Get(hash common.Hash, includeBlob bool) *types.Transaction // GetRLP returns a RLP-encoded transaction if it is contained in the pool. - // If includeBlob is false, blob data is stripped from blob transactions (ETH/71). + // If includeBlob is false, blob data is stripped from blob transactions (ETH/72). GetRLP(hash common.Hash, includeBlob bool) []byte // GetMetadata returns the transaction type and transaction size with the diff --git a/eth/handler.go b/eth/handler.go index 34ce49102d..2fb479a0ff 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -200,12 +200,12 @@ func newHandler(config *handlerConfig) (*handler, error) { addTxs := func(peer string, txs []*types.Transaction) []error { errs := make([]error, len(txs)) p := h.peers.peer(peer) - isETH71 := p != nil && p.Version() >= eth.ETH71 + isETH72 := p != nil && p.Version() >= eth.ETH72 var poolTxs []*types.Transaction var index []int for i, tx := range txs { - if isETH71 && tx.Type() == types.BlobTxType { + if isETH72 && tx.Type() == types.BlobTxType { errs[i] = h.blobBuffer.AddTx(tx, peer) } else { poolTxs = append(poolTxs, tx) diff --git a/eth/handler_eth.go b/eth/handler_eth.go index c0052d44cc..077d5de389 100644 --- a/eth/handler_eth.go +++ b/eth/handler_eth.go @@ -113,9 +113,9 @@ func handleTransactions(peer *eth.Peer, list []*types.Transaction, directBroadca // If we receive any blob transactions missing sidecars, or with // sidecars that don't correspond to the versioned hashes reported // in the header, disconnect from the sending peer. - if peer.Version() >= eth.ETH71 { + if peer.Version() >= eth.ETH72 { if tx.BlobTxSidecar() != nil && len(tx.BlobTxSidecar().Blobs) != 0 { - return fmt.Errorf("not allowed to respond with full-blob transaction under eth71") + return fmt.Errorf("not allowed to respond with full-blob transaction under eth72") } } else { if tx.BlobTxSidecar() == nil { diff --git a/eth/protocols/eth/broadcast.go b/eth/protocols/eth/broadcast.go index a1fa419f40..2c71cdec08 100644 --- a/eth/protocols/eth/broadcast.go +++ b/eth/protocols/eth/broadcast.go @@ -133,7 +133,7 @@ func (p *Peer) announceTransactions() { } pending = append(pending, queue[count]) pendingTypes = append(pendingTypes, meta.Type) - if p.version >= ETH71 && meta.SizeWithoutBlob > 0 { + if p.version >= ETH72 && meta.SizeWithoutBlob > 0 { pendingSizes = append(pendingSizes, uint32(meta.SizeWithoutBlob)) } else { pendingSizes = append(pendingSizes, uint32(meta.Size)) diff --git a/eth/protocols/eth/handler.go b/eth/protocols/eth/handler.go index 41a58abc08..ff90d6e328 100644 --- a/eth/protocols/eth/handler.go +++ b/eth/protocols/eth/handler.go @@ -194,7 +194,7 @@ var eth69 = map[uint64]msgHandler{ BlockRangeUpdateMsg: handleBlockRangeUpdate, } -var eth71 = map[uint64]msgHandler{ +var eth72 = map[uint64]msgHandler{ TransactionsMsg: handleTransactions, NewPooledTransactionHashesMsg: handleNewPooledTransactionHashes71, GetBlockHeadersMsg: handleGetBlockHeaders, @@ -227,8 +227,8 @@ func handleMessage(backend Backend, peer *Peer) error { switch peer.version { case ETH69: handlers = eth69 - case ETH71: - handlers = eth71 + case ETH72: + handlers = eth72 default: return fmt.Errorf("unknown eth protocol version: %v", peer.version) } diff --git a/eth/protocols/eth/handlers.go b/eth/protocols/eth/handlers.go index 81afd9aaee..d349449044 100644 --- a/eth/protocols/eth/handlers.go +++ b/eth/protocols/eth/handlers.go @@ -523,7 +523,7 @@ func handleGetPooledTransactions(backend Backend, msg Decoder, peer *Peer) error if err := msg.Decode(&query); err != nil { return err } - hashes, txs := answerGetPooledTransactions(backend, query.GetPooledTransactionsRequest, peer.version < ETH71) + hashes, txs := answerGetPooledTransactions(backend, query.GetPooledTransactionsRequest, peer.version < ETH72) return peer.ReplyPooledTransactionsRLP(query.RequestId, hashes, txs) } diff --git a/eth/protocols/eth/peer.go b/eth/protocols/eth/peer.go index b6f88ed4d2..b63b43459d 100644 --- a/eth/protocols/eth/peer.go +++ b/eth/protocols/eth/peer.go @@ -172,7 +172,7 @@ func (p *Peer) AsyncSendTransactions(hashes []common.Hash) { func (p *Peer) sendPooledTransactionHashes(hashes []common.Hash, types []byte, sizes []uint32, cells types.CustodyBitmap) error { // Mark all the transactions as known, but ensure we don't overflow our limits p.knownTxs.Add(hashes...) - if p.version >= ETH71 { + if p.version >= ETH72 { return p2p.Send(p.rw, NewPooledTransactionHashesMsg, NewPooledTransactionHashesPacket71{Types: types, Sizes: sizes, Hashes: hashes, Mask: cells}) } return p2p.Send(p.rw, NewPooledTransactionHashesMsg, NewPooledTransactionHashesPacket70{Types: types, Sizes: sizes, Hashes: hashes}) diff --git a/eth/protocols/eth/protocol.go b/eth/protocols/eth/protocol.go index d1aafa34f1..9ef1928b8f 100644 --- a/eth/protocols/eth/protocol.go +++ b/eth/protocols/eth/protocol.go @@ -31,7 +31,7 @@ import ( // Constants to match up protocol versions and messages const ( ETH69 = 69 - ETH71 = 71 + ETH72 = 72 ) // ProtocolName is the official short name of the `eth` protocol used during @@ -40,11 +40,11 @@ const ProtocolName = "eth" // ProtocolVersions are the supported versions of the `eth` protocol (first // is primary). -var ProtocolVersions = []uint{ETH71, ETH69} +var ProtocolVersions = []uint{ETH72, ETH69} // protocolLengths are the number of implemented message corresponding to // different protocol versions. -var protocolLengths = map[uint]uint64{ETH69: 18, ETH71: 20} +var protocolLengths = map[uint]uint64{ETH69: 18, ETH72: 20} // maxMessageSize is the maximum cap on the size of a protocol message. const maxMessageSize = 10 * 1024 * 1024 @@ -241,7 +241,7 @@ type NewPooledTransactionHashesPacket70 struct { Hashes []common.Hash } -// NewPooledTransactionHashesPacket71 represents a transaction announcement packet on eth/71 +// NewPooledTransactionHashesPacket71 represents a transaction announcement packet on ETH/72 // with an additional custody bitmap field for cell-based blob data availability. type NewPooledTransactionHashesPacket71 struct { Types []byte