diff --git a/core/types/arb_types.go b/core/types/arb_types.go index 5f379c5449..3fc08e67dd 100644 --- a/core/types/arb_types.go +++ b/core/types/arb_types.go @@ -347,11 +347,8 @@ func (d *ArbitrumDepositTx) setSignatureValues(chainID, v, r, s *big.Int) { } type ArbitrumInternalTx struct { - ChainId *big.Int - SubType uint8 - Data []byte - L2BlockNumber uint64 - TxIndex uint64 + ChainId *big.Int + Data []byte } func (t *ArbitrumInternalTx) txType() byte { @@ -361,10 +358,7 @@ func (t *ArbitrumInternalTx) txType() byte { func (t *ArbitrumInternalTx) copy() TxData { return &ArbitrumInternalTx{ new(big.Int).Set(t.ChainId), - t.SubType, common.CopyBytes(t.Data), - t.L2BlockNumber, - t.TxIndex, } } diff --git a/core/types/transaction.go b/core/types/transaction.go index aacf3faf65..56deb5d5b1 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -60,7 +60,8 @@ type Transaction struct { time time.Time // Time first seen locally (spam avoidance) // Arbitrum cache - PosterCost *big.Int + PosterCost *big.Int + CalldataUnits uint64 // caches hash atomic.Value diff --git a/core/types/transaction_marshalling.go b/core/types/transaction_marshalling.go index 2c44a68732..e4fde624a5 100644 --- a/core/types/transaction_marshalling.go +++ b/core/types/transaction_marshalling.go @@ -47,9 +47,6 @@ type txJSON struct { AccessList *AccessList `json:"accessList,omitempty"` // Arbitrum fields: - SubType *hexutil.Uint64 `json:"subType,omitempty"` // Internal - L2BlockNumber *hexutil.Uint64 `json:"l2BlockNumber,omitempty"` // Internal - TxIndex *hexutil.Uint64 `json:"txIndex,omitempty"` // Internal From *common.Address `json:"from,omitempty"` // Contract SubmitRetryable Unsigned Retry RequestId *common.Hash `json:"requestId,omitempty"` // Contract SubmitRetryable Deposit TicketId *common.Hash `json:"ticketId,omitempty"` // Retry @@ -131,10 +128,6 @@ func (t *Transaction) MarshalJSON() ([]byte, error) { enc.R = (*hexutil.Big)(tx.R) enc.S = (*hexutil.Big)(tx.S) case *ArbitrumInternalTx: - subType := uint64(tx.SubType) - enc.SubType = (*hexutil.Uint64)(&subType) - enc.L2BlockNumber = (*hexutil.Uint64)(&tx.L2BlockNumber) - enc.TxIndex = (*hexutil.Uint64)(&tx.TxIndex) enc.ChainID = (*hexutil.Big)(tx.ChainId) enc.Data = (*hexutil.Bytes)(&tx.Data) case *ArbitrumDepositTx: @@ -399,24 +392,12 @@ func (t *Transaction) UnmarshalJSON(input []byte) error { if dec.ChainID == nil { return errors.New("missing required field 'chainId' in transaction") } - if dec.SubType == nil { - return errors.New("missing required field 'subType' in transaction") - } if dec.Data == nil { return errors.New("missing required field 'input' in transaction") } - if dec.L2BlockNumber == nil { - return errors.New("missing required field 'l2BlockNumber' in transaction") - } - if dec.TxIndex == nil { - return errors.New("missing required field 'txIndex' in transaction") - } inner = &ArbitrumInternalTx{ - ChainId: (*big.Int)(dec.ChainID), - SubType: uint8(*dec.SubType), - Data: *dec.Data, - L2BlockNumber: uint64(*dec.L2BlockNumber), - TxIndex: uint64(*dec.TxIndex), + ChainId: (*big.Int)(dec.ChainID), + Data: *dec.Data, } case ArbitrumDepositTxType: diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 51d302e759..c7de73ae50 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1381,9 +1381,6 @@ type RPCTransaction struct { S *hexutil.Big `json:"s"` // Arbitrum fields: - SubType *hexutil.Uint64 `json:"subType,omitempty"` // Internal - L2BlockNumber *hexutil.Uint64 `json:"l2BlockNumber,omitempty"` // Internal - TxIndex *hexutil.Uint64 `json:"txIndex,omitempty"` // Internal RequestId *common.Hash `json:"requestId,omitempty"` // Contract SubmitRetryable Deposit TicketId *common.Hash `json:"ticketId,omitempty"` // Retry RefundTo *common.Address `json:"refundTo,omitempty"` // SubmitRetryable Retry @@ -1444,10 +1441,6 @@ func newRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber // Arbitrum: support arbitrum-specific transaction types switch inner := tx.GetInner().(type) { case *types.ArbitrumInternalTx: - subType := uint64(inner.SubType) - result.SubType = (*hexutil.Uint64)(&subType) - result.L2BlockNumber = (*hexutil.Uint64)(&inner.L2BlockNumber) - result.TxIndex = (*hexutil.Uint64)(&inner.TxIndex) result.ChainID = (*hexutil.Big)(inner.ChainId) case *types.ArbitrumDepositTx: result.RequestId = &inner.L1RequestId