@@ -131,19 +131,19 @@ func toWordSize(size uint64) uint64 {
131131// A Message contains the data derived from a single transaction that is relevant to state
132132// processing.
133133type Message struct {
134- To * common.Address
135- From common.Address
136- Nonce uint64
137- Value * big.Int
138- GasLimit uint64
139- GasPrice * big.Int
140- GasFeeCap * big.Int
141- GasTipCap * big.Int
142- Data []byte
143- AccessList types.AccessList
144- BlobGasFeeCap * big.Int
145- BlobHashes []common.Hash
146- AuthList []types.SetCodeAuthorization
134+ To * common.Address
135+ From common.Address
136+ Nonce uint64
137+ Value * big.Int
138+ GasLimit uint64
139+ GasPrice * big.Int
140+ GasFeeCap * big.Int
141+ GasTipCap * big.Int
142+ Data []byte
143+ AccessList types.AccessList
144+ BlobGasFeeCap * big.Int
145+ BlobHashes []common.Hash
146+ SetCodeAuthorizations []types.SetCodeAuthorization
147147
148148 // When SkipNonceChecks is true, the message nonce is not checked against the
149149 // account nonce in state.
@@ -157,20 +157,20 @@ type Message struct {
157157// TransactionToMessage converts a transaction into a Message.
158158func TransactionToMessage (tx * types.Transaction , s types.Signer , baseFee * big.Int ) (* Message , error ) {
159159 msg := & Message {
160- Nonce : tx .Nonce (),
161- GasLimit : tx .Gas (),
162- GasPrice : new (big.Int ).Set (tx .GasPrice ()),
163- GasFeeCap : new (big.Int ).Set (tx .GasFeeCap ()),
164- GasTipCap : new (big.Int ).Set (tx .GasTipCap ()),
165- To : tx .To (),
166- Value : tx .Value (),
167- Data : tx .Data (),
168- AccessList : tx .AccessList (),
169- AuthList : tx .AuthList (),
170- SkipNonceChecks : false ,
171- SkipFromEOACheck : false ,
172- BlobHashes : tx .BlobHashes (),
173- BlobGasFeeCap : tx .BlobGasFeeCap (),
160+ Nonce : tx .Nonce (),
161+ GasLimit : tx .Gas (),
162+ GasPrice : new (big.Int ).Set (tx .GasPrice ()),
163+ GasFeeCap : new (big.Int ).Set (tx .GasFeeCap ()),
164+ GasTipCap : new (big.Int ).Set (tx .GasTipCap ()),
165+ To : tx .To (),
166+ Value : tx .Value (),
167+ Data : tx .Data (),
168+ AccessList : tx .AccessList (),
169+ SetCodeAuthorizations : tx .SetCodeAuthorizations (),
170+ SkipNonceChecks : false ,
171+ SkipFromEOACheck : false ,
172+ BlobHashes : tx .BlobHashes (),
173+ BlobGasFeeCap : tx .BlobGasFeeCap (),
174174 }
175175 // If baseFee provided, set gasPrice to effectiveGasPrice.
176176 if baseFee != nil {
@@ -372,11 +372,11 @@ func (st *stateTransition) preCheck() error {
372372 }
373373 }
374374 // Check that EIP-7702 authorization list signatures are well formed.
375- if msg .AuthList != nil {
375+ if msg .SetCodeAuthorizations != nil {
376376 if msg .To == nil {
377377 return fmt .Errorf ("%w (sender %v)" , ErrSetCodeTxCreate , msg .From )
378378 }
379- if len (msg .AuthList ) == 0 {
379+ if len (msg .SetCodeAuthorizations ) == 0 {
380380 return fmt .Errorf ("%w (sender %v)" , ErrEmptyAuthList , msg .From )
381381 }
382382 }
@@ -417,7 +417,7 @@ func (st *stateTransition) execute() (*ExecutionResult, error) {
417417 )
418418
419419 // Check clauses 4-5, subtract intrinsic gas if everything is correct
420- gas , err := IntrinsicGas (msg .Data , msg .AccessList , msg .AuthList , contractCreation , rules .IsHomestead , rules .IsIstanbul , rules .IsShanghai )
420+ gas , err := IntrinsicGas (msg .Data , msg .AccessList , msg .SetCodeAuthorizations , contractCreation , rules .IsHomestead , rules .IsIstanbul , rules .IsShanghai )
421421 if err != nil {
422422 return nil , err
423423 }
@@ -467,8 +467,8 @@ func (st *stateTransition) execute() (*ExecutionResult, error) {
467467 st .state .SetNonce (msg .From , st .state .GetNonce (msg .From )+ 1 )
468468
469469 // Apply EIP-7702 authorizations.
470- if msg .AuthList != nil {
471- for _ , auth := range msg .AuthList {
470+ if msg .SetCodeAuthorizations != nil {
471+ for _ , auth := range msg .SetCodeAuthorizations {
472472 // Note errors are ignored, we simply skip invalid authorizations here.
473473 st .applyAuthorization (msg , & auth )
474474 }
0 commit comments