From 1cd855e08ffaccf1f2fbeba2e30d821d5b989402 Mon Sep 17 00:00:00 2001 From: Brian Curcio Date: Thu, 4 Jun 2026 14:13:58 -0300 Subject: [PATCH 1/3] feat(collector): make blob (type-3) sidecar requirement opt-in --- cmd/collect/main.go | 11 +++++++++++ collector/collector.go | 3 +++ collector/tx_processor.go | 25 +++++++++++++++++++------ 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/cmd/collect/main.go b/cmd/collect/main.go index b23d255..27c988f 100644 --- a/cmd/collect/main.go +++ b/cmd/collect/main.go @@ -76,6 +76,15 @@ var cliFlags = []cli.Flag{ Category: "Collector Configuration", }, + // Blob (EIP-4844) tx handling + &cli.BoolFlag{ + Name: "require-blob-sidecar", + EnvVars: []string{"REQUIRE_BLOB_SIDECAR"}, + Value: false, + Usage: "Restore pre-v1.4 strict validation: reject EIP-4844 (type-3) txs whose blob sidecar is nil. Default is permissive (accept canonical-only blob txs as delivered by standard EL JSON-RPC subscriptions).", + Category: "Collector Configuration", + }, + // SSE TX Subscription API &cli.StringFlag{ Name: "api-listen-addr", @@ -152,6 +161,7 @@ func runCollector(cCtx *cli.Context) error { enablePprof = cCtx.Bool("pprof") clickhouseDSN = cCtx.String("clickhouse-dsn") redisEndpoint = cCtx.String("redis-endpoint") + requireBlobSidecar = cCtx.Bool("require-blob-sidecar") ) // Logger setup @@ -195,6 +205,7 @@ func runCollector(cCtx *cli.Context) error { APIListenAddr: apiListenAddr, MetricsListenAddr: metricsListenAddr, EnablePprof: enablePprof, + RequireBlobSidecar: requireBlobSidecar, }) collector.Start() diff --git a/collector/collector.go b/collector/collector.go index 7bf7f92..caec69c 100644 --- a/collector/collector.go +++ b/collector/collector.go @@ -35,6 +35,8 @@ type CollectorOpts struct { APIListenAddr string MetricsListenAddr string EnablePprof bool // if true, enables pprof on the metrics server + + RequireBlobSidecar bool // if true, restores pre-v1.4 strict rejection of sidecar-less type-3 txs } type Collector struct { @@ -69,6 +71,7 @@ func (c *Collector) Start() { HTTPReceivers: c.opts.Receivers, ReceiversAllowedSources: c.opts.ReceiversAllowedSources, APIServer: apiServer, + RequireBlobSidecar: c.opts.RequireBlobSidecar, }) // Start the transaction processor, which kicks off background goroutines diff --git a/collector/tx_processor.go b/collector/tx_processor.go index f5f01eb..f313f1a 100644 --- a/collector/tx_processor.go +++ b/collector/tx_processor.go @@ -44,6 +44,13 @@ type TxProcessorOpts struct { HTTPReceivers []string ReceiversAllowedSources []string APIServer *api.Server + // RequireBlobSidecar, when true, restores the pre-v1.4 behavior of rejecting + // EIP-4844 (type-3) txs whose BlobTxSidecar is nil. Standard EL JSON-RPC + // subscriptions return canonical encoding only (sidecar lives in the txpool's + // blob store, not exposed over RPC), so enabling this drops blob txs from + // observability — useful only if the collector is consuming a source that + // guarantees full network-encoded blob txs. + RequireBlobSidecar bool } type TxProcessor struct { @@ -79,6 +86,8 @@ type TxProcessor struct { redisEndpoint string redis *Redis + + requireBlobSidecar bool } type OutFiles struct { @@ -120,6 +129,8 @@ func NewTxProcessor(opts TxProcessorOpts) *TxProcessor { receivers: receivers, receiversAllowedSources: opts.ReceiversAllowedSources, receiversAllowAllSources: len(opts.ReceiversAllowedSources) == 1 && opts.ReceiversAllowedSources[0] == "all", + + requireBlobSidecar: opts.RequireBlobSidecar, } } @@ -424,7 +435,11 @@ func (p *TxProcessor) validateTx(txIn common.TxIn) error { // inspired by https: return core.ErrTipAboveFeeCap } - // Ensure blob txs are correctly formed + // Blob txs: by default (RequireBlobSidecar=false) we accept type-3 txs with or + // without a sidecar — standard EL JSON-RPC subscriptions deliver canonical encoding + // only, and we store raw_tx as canonical RLP via tx.MarshalBinary(). Setting + // RequireBlobSidecar restores the pre-v1.4 strict behavior of rejecting + // sidecar-less blob txs. if err := p.validateBlobTx(tx); err != nil { log.Debugw("error: invalid blob transaction", "reason", err) return err @@ -434,18 +449,16 @@ func (p *TxProcessor) validateTx(txIn common.TxIn) error { // inspired by https: return nil } -// validateBlobTx ensures that a blob tx is capable of being consumed -// by our system. Namely, the blob tx should be in the "full" PooledTransactions -// network representation with the full sidecar available. func (p *TxProcessor) validateBlobTx(tx *types.Transaction) error { + if !p.requireBlobSidecar { + return nil + } if tx.Type() != types.BlobTxType { return nil } - if tx.BlobTxSidecar() == nil { return errBlobMissingSidecar } - return nil } From 084f74566de2cefebea89abe60bdcb5aac2fb2f4 Mon Sep 17 00:00:00 2001 From: Brian Curcio Date: Thu, 4 Jun 2026 14:42:00 -0300 Subject: [PATCH 2/3] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- collector/tx_processor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collector/tx_processor.go b/collector/tx_processor.go index f313f1a..d25cbab 100644 --- a/collector/tx_processor.go +++ b/collector/tx_processor.go @@ -48,7 +48,7 @@ type TxProcessorOpts struct { // EIP-4844 (type-3) txs whose BlobTxSidecar is nil. Standard EL JSON-RPC // subscriptions return canonical encoding only (sidecar lives in the txpool's // blob store, not exposed over RPC), so enabling this drops blob txs from - // observability — useful only if the collector is consuming a source that + // observability - useful only if the collector is consuming a source that // guarantees full network-encoded blob txs. RequireBlobSidecar bool } From dc0ee90f9328c8d1467acd08af84aba1df2539dc Mon Sep 17 00:00:00 2001 From: Brian Curcio Date: Thu, 4 Jun 2026 14:42:26 -0300 Subject: [PATCH 3/3] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- collector/tx_processor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collector/tx_processor.go b/collector/tx_processor.go index d25cbab..a327ed7 100644 --- a/collector/tx_processor.go +++ b/collector/tx_processor.go @@ -436,7 +436,7 @@ func (p *TxProcessor) validateTx(txIn common.TxIn) error { // inspired by https: } // Blob txs: by default (RequireBlobSidecar=false) we accept type-3 txs with or - // without a sidecar — standard EL JSON-RPC subscriptions deliver canonical encoding + // without a sidecar - standard EL JSON-RPC subscriptions deliver canonical encoding // only, and we store raw_tx as canonical RLP via tx.MarshalBinary(). Setting // RequireBlobSidecar restores the pre-v1.4 strict behavior of rejecting // sidecar-less blob txs.