Skip to content

Commit

Permalink
Revert "feat(taiko-client): introduce AccessList (#17676)"
Browse files Browse the repository at this point in the history
This reverts commit 53c0007.
  • Loading branch information
YoGhurt111 committed Jun 27, 2024
1 parent 04a3370 commit df77438
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 52 deletions.
16 changes: 0 additions & 16 deletions packages/taiko-client/proposer/transaction_builder/blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/ethereum-optimism/optimism/op-service/eth"
"github.com/ethereum-optimism/optimism/op-service/txmgr"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/crypto/kzg4844"

Expand Down Expand Up @@ -128,27 +127,12 @@ func (b *BlobTransactionBuilder) Build(
return nil, err
}
}
// Calculate TaikoData.State slot hash (includes slot 0-6 currently)
var slotHashes []common.Hash
for i := 0; i < 7; i++ {
packedData := append(
common.LeftPadBytes(b.taikoL1Address.Bytes(), 32),
common.LeftPadBytes(big.NewInt(int64(i)).Bytes(), 32)...,
)
slotHashes = append(slotHashes, crypto.Keccak256Hash(packedData))
}

return &txmgr.TxCandidate{
TxData: data,
Blobs: []*eth.Blob{blob},
To: to,
GasLimit: b.gasLimit,
Value: maxFee,
AccessList: types.AccessList{
{
Address: b.taikoL1Address,
StorageKeys: slotHashes,
},
},
}, nil
}
17 changes: 0 additions & 17 deletions packages/taiko-client/proposer/transaction_builder/calldata.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

"github.com/ethereum-optimism/optimism/op-service/txmgr"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"

"github.com/taikoxyz/taiko-mono/packages/taiko-client/bindings/encoding"
Expand Down Expand Up @@ -115,27 +114,11 @@ func (b *CalldataTransactionBuilder) Build(
}
}

// Calculate TaikoData.State slot hash (includes slot 0-6 currently)
var slotHashes []common.Hash
for i := 0; i < 7; i++ {
packedData := append(
common.LeftPadBytes(b.taikoL1Address.Bytes(), 32),
common.LeftPadBytes(big.NewInt(int64(i)).Bytes(), 32)...,
)
slotHashes = append(slotHashes, crypto.Keccak256Hash(packedData))
}

return &txmgr.TxCandidate{
TxData: data,
Blobs: nil,
To: to,
GasLimit: b.gasLimit,
Value: maxFee,
AccessList: types.AccessList{
{
Address: b.taikoL1Address,
StorageKeys: slotHashes,
},
},
}, nil
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ import (
"fmt"
"math/big"

"github.com/ethereum/go-ethereum/crypto"

"github.com/ethereum-optimism/optimism/op-service/txmgr"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"

"github.com/taikoxyz/taiko-mono/packages/taiko-client/bindings"
Expand Down Expand Up @@ -105,28 +102,12 @@ func (a *ProveBlockTxBuilder) Build(
}
}

// Calculate TaikoData.State slot hash (includes slot 0-6 currently)
var slotHashes []common.Hash
for i := 0; i < 7; i++ {
packedData := append(
common.LeftPadBytes(a.taikoL1Address.Bytes(), 32),
common.LeftPadBytes(big.NewInt(int64(i)).Bytes(), 32)...,
)
slotHashes = append(slotHashes, crypto.Keccak256Hash(packedData))
}

return &txmgr.TxCandidate{
TxData: data,
To: &to,
Blobs: nil,
GasLimit: txOpts.GasLimit,
Value: txOpts.Value,
AccessList: types.AccessList{
{
Address: a.taikoL1Address,
StorageKeys: slotHashes,
},
},
}, nil
}
}

0 comments on commit df77438

Please sign in to comment.