From c64f335b8d20bb395b0d2dcac58884b1cf3a8e8b Mon Sep 17 00:00:00 2001 From: Weixie Cui Date: Fri, 3 Jul 2026 20:00:00 +0800 Subject: [PATCH] core/types: reject empty authorizationList in SetCodeTx JSON Check len(authorizationList) instead of nil so an empty array is rejected with a clear error, consistent with blobVersionedHashes. --- core/types/transaction_marshalling.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/types/transaction_marshalling.go b/core/types/transaction_marshalling.go index e3950b2a76..c0b5b31152 100644 --- a/core/types/transaction_marshalling.go +++ b/core/types/transaction_marshalling.go @@ -474,8 +474,8 @@ func (tx *Transaction) UnmarshalJSON(input []byte) error { if dec.AccessList != nil { itx.AccessList = *dec.AccessList } - if dec.AuthorizationList == nil { - return errors.New("missing required field 'authorizationList' in transaction") + if len(dec.AuthorizationList) == 0 { + return errors.New("'authorizationList' must contain at least one authorization") } itx.AuthList = dec.AuthorizationList