Skip to content

Commit

Permalink
Drops InputsHash for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruteri committed Oct 4, 2023
1 parent c5d7aad commit 205426c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 17 deletions.
14 changes: 6 additions & 8 deletions core/types/confidential.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ type ConfidentialComputeRequest struct {
Value *big.Int
Data []byte

ExecutionNode common.Address
ConfidentialInputsHash common.Hash
ExecutionNode common.Address

ChainID *big.Int
V, R, S *big.Int
Expand All @@ -24,12 +23,11 @@ type ConfidentialComputeRequest struct {
// copy creates a deep copy of the transaction data and initializes all fields.
func (tx *ConfidentialComputeRequest) copy() TxData {
cpy := &ConfidentialComputeRequest{
Nonce: tx.Nonce,
To: copyAddressPtr(tx.To),
Data: common.CopyBytes(tx.Data),
Gas: tx.Gas,
ExecutionNode: tx.ExecutionNode,
ConfidentialInputsHash: tx.ConfidentialInputsHash,
Nonce: tx.Nonce,
To: copyAddressPtr(tx.To),
Data: common.CopyBytes(tx.Data),
Gas: tx.Gas,
ExecutionNode: tx.ExecutionNode,

Value: new(big.Int),
GasPrice: new(big.Int),
Expand Down
3 changes: 0 additions & 3 deletions core/types/transaction_marshalling.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ func (tx *Transaction) MarshalJSON() ([]byte, error) {

case *ConfidentialComputeRequest:
enc.ExecutionNode = &itx.ExecutionNode
enc.ConfidentialInputsHash = itx.ConfidentialInputsHash
enc.Nonce = (*hexutil.Uint64)(&itx.Nonce)
enc.To = tx.To()
enc.Gas = (*hexutil.Uint64)(&itx.Gas)
Expand Down Expand Up @@ -390,8 +389,6 @@ func (tx *Transaction) UnmarshalJSON(input []byte) error {
}
itx.ExecutionNode = *dec.ExecutionNode

itx.ConfidentialInputsHash = dec.ConfidentialInputsHash

if dec.Nonce == nil {
return errors.New("missing required field 'nonce' in transaction")
}
Expand Down
1 change: 0 additions & 1 deletion core/types/transaction_signing.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ func (s suaveSigner) Hash(tx *Transaction) common.Hash {
tx.Type(),
[]interface{}{
txdata.ExecutionNode,
txdata.ConfidentialInputsHash,
tx.Nonce(),
tx.GasPrice(),
tx.Gas(),
Expand Down
1 change: 0 additions & 1 deletion internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,6 @@ func newRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber
}

result.ExecutionNode = &inner.ExecutionNode
result.ConfidentialInputsHash = &inner.ConfidentialInputsHash

// if a legacy transaction has an EIP-155 chain id, include it explicitly
if id := tx.ChainId(); id.Sign() != 0 {
Expand Down
4 changes: 0 additions & 4 deletions internal/ethapi/transaction_args.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,6 @@ func (args *TransactionArgs) toTransaction() *types.Transaction {
Data: args.data(),
}

if args.ConfidentialInputsHash != nil {
ccrData.ConfidentialInputsHash = *args.ConfidentialInputsHash
}

data = ccrData
default:
data = &types.LegacyTx{
Expand Down

0 comments on commit 205426c

Please sign in to comment.