From d2498fcf4a51504eba63dc9cf0f6a9a59ed1de84 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 1 May 2024 01:12:00 +0800 Subject: [PATCH 1/9] feat(driver): check `maxBytesPerTxList` for compressed txlist bytes --- driver/chain_syncer/blob/syncer.go | 4 ---- pkg/txlist_validator/tx_list_validator.go | 18 ++++++++++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/driver/chain_syncer/blob/syncer.go b/driver/chain_syncer/blob/syncer.go index 3db1945b1..70f62977e 100644 --- a/driver/chain_syncer/blob/syncer.go +++ b/driver/chain_syncer/blob/syncer.go @@ -262,10 +262,6 @@ func (s *Syncer) onBlockProposed( } } - if txListBytes, err = utils.Decompress(txListBytes); err != nil { - return fmt.Errorf("failed to decompress tx list bytes: %w", err) - } - // If the transactions list is invalid, we simply insert an empty L2 block. if !s.txListValidator.ValidateTxList(event.BlockId, txListBytes, event.Meta.BlobUsed) { log.Info("Invalid transactions list, insert an empty L2 block instead", "blockID", event.BlockId) diff --git a/pkg/txlist_validator/tx_list_validator.go b/pkg/txlist_validator/tx_list_validator.go index 1d1801a77..b660a823b 100644 --- a/pkg/txlist_validator/tx_list_validator.go +++ b/pkg/txlist_validator/tx_list_validator.go @@ -6,6 +6,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/rlp" + "github.com/taikoxyz/taiko-client/internal/utils" ) // TxListValidator is responsible for validating the transactions list in a TaikoL1.proposeBlock transaction. @@ -34,19 +35,28 @@ func (v *TxListValidator) ValidateTxList( blockID *big.Int, txListBytes []byte, blobUsed bool, -) (isValid bool) { +) bool { // If the transaction list is empty, it's valid. if len(txListBytes) == 0 { return true } if !blobUsed && (len(txListBytes) > int(v.maxBytesPerTxList)) { - log.Info("Transactions list binary too large", "length", len(txListBytes), "blockID", blockID) + log.Info("Compressed transactions list binary too large", "length", len(txListBytes), "blockID", blockID) return false } - var txs types.Transactions - if err := rlp.DecodeBytes(txListBytes, &txs); err != nil { + var ( + txs types.Transactions + err error + ) + + if txListBytes, err = utils.Decompress(txListBytes); err != nil { + log.Info("Failed to decompress tx list bytes", "blockID", blockID, "error", err) + return false + } + + if err = rlp.DecodeBytes(txListBytes, &txs); err != nil { log.Info("Failed to decode transactions list bytes", "blockID", blockID, "error", err) return false } From cf1550b2ec57ab4d5177e5a82675561d5b0cefeb Mon Sep 17 00:00:00 2001 From: David Date: Wed, 1 May 2024 09:01:13 +0800 Subject: [PATCH 2/9] feat: update comments --- pkg/txlist_validator/tx_list_validator.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/txlist_validator/tx_list_validator.go b/pkg/txlist_validator/tx_list_validator.go index b660a823b..2c2acc4b6 100644 --- a/pkg/txlist_validator/tx_list_validator.go +++ b/pkg/txlist_validator/tx_list_validator.go @@ -30,7 +30,12 @@ func NewTxListValidator( } // ValidateTxList checks whether the transactions list in the TaikoL1.proposeBlock transaction's -// input data is valid. +// input data is valid, the rules are: +// - If the transaction list is empty, it's valid. +// - If the transaction list is not empty: +// 1. If the transaction list is using calldata, the compressed bytes of the transaction list must be +// less than or equal to maxBytesPerTxList. +// 2. The transaction list bytes must be able to be RLP decoded into a list of transactions. func (v *TxListValidator) ValidateTxList( blockID *big.Int, txListBytes []byte, From 99fc7a815931dd44b82d200df8a54c24cfb6c6a9 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 1 May 2024 11:25:04 +0800 Subject: [PATCH 3/9] feat: introduce `TxListDecompressor` --- driver/chain_syncer/blob/syncer.go | 33 ++++++++--------- .../txlist_decomporessor.go | 35 +++++++++++-------- .../txlist_decomporessor_test.go | 29 ++++++++------- 3 files changed, 50 insertions(+), 47 deletions(-) rename pkg/txlist_validator/tx_list_validator.go => driver/txlist_decompressor/txlist_decomporessor.go (64%) rename pkg/txlist_validator/tx_list_validator_test.go => driver/txlist_decompressor/txlist_decomporessor_test.go (82%) diff --git a/driver/chain_syncer/blob/syncer.go b/driver/chain_syncer/blob/syncer.go index 70f62977e..ba7c03301 100644 --- a/driver/chain_syncer/blob/syncer.go +++ b/driver/chain_syncer/blob/syncer.go @@ -26,20 +26,20 @@ import ( "github.com/taikoxyz/taiko-client/pkg/rpc" anchorTxConstructor "github.com/taikoxyz/taiko-client/driver/anchor_tx_constructor" - txlistfetcher "github.com/taikoxyz/taiko-client/driver/txlist_fetcher" + txListDecomporessor "github.com/taikoxyz/taiko-client/driver/txlist_decompressor" + txlistFetcher "github.com/taikoxyz/taiko-client/driver/txlist_fetcher" eventIterator "github.com/taikoxyz/taiko-client/pkg/chain_iterator/event_iterator" - txListValidator "github.com/taikoxyz/taiko-client/pkg/txlist_validator" ) // Syncer responsible for letting the L2 execution engine catching up with protocol's latest // pending block through deriving L1 calldata. type Syncer struct { - ctx context.Context - rpc *rpc.Client - state *state.State - progressTracker *beaconsync.SyncProgressTracker // Sync progress tracker - anchorConstructor *anchorTxConstructor.AnchorTxConstructor // TaikoL2.anchor transactions constructor - txListValidator *txListValidator.TxListValidator // Transactions list validator + ctx context.Context + rpc *rpc.Client + state *state.State + progressTracker *beaconsync.SyncProgressTracker // Sync progress tracker + anchorConstructor *anchorTxConstructor.AnchorTxConstructor // TaikoL2.anchor transactions constructor + txListDecompressor *txListDecomporessor.TxListDecompressor // Transactions list decompressor // Used by BlockInserter lastInsertedBlockID *big.Int reorgDetectedFlag bool @@ -72,7 +72,7 @@ func NewSyncer( state: state, progressTracker: progressTracker, anchorConstructor: constructor, - txListValidator: txListValidator.NewTxListValidator( + txListDecompressor: txListDecomporessor.NewTxListDecompressor( uint64(configs.BlockMaxGasLimit), rpc.BlockMaxTxListBytes, client.L2.ChainID, @@ -246,11 +246,11 @@ func (s *Syncer) onBlockProposed( } // Decode transactions list. - var txListDecoder txlistfetcher.TxListFetcher + var txListDecoder txlistFetcher.TxListFetcher if event.Meta.BlobUsed { - txListDecoder = txlistfetcher.NewBlobTxListFetcher(s.rpc.L1Beacon, s.blobDatasource) + txListDecoder = txlistFetcher.NewBlobTxListFetcher(s.rpc.L1Beacon, s.blobDatasource) } else { - txListDecoder = new(txlistfetcher.CalldataFetcher) + txListDecoder = new(txlistFetcher.CalldataFetcher) } txListBytes, err := txListDecoder.Fetch(ctx, tx, &event.Meta) if err != nil { @@ -262,18 +262,13 @@ func (s *Syncer) onBlockProposed( } } - // If the transactions list is invalid, we simply insert an empty L2 block. - if !s.txListValidator.ValidateTxList(event.BlockId, txListBytes, event.Meta.BlobUsed) { - log.Info("Invalid transactions list, insert an empty L2 block instead", "blockID", event.BlockId) - txListBytes = []byte{} - } - + // Decompress the transactions list and try to insert a new head block to L2 EE. payloadData, err := s.insertNewHead( ctx, event, parent, s.state.GetHeadBlockID(), - txListBytes, + s.txListDecompressor.TryDecomporess(event.BlockId, txListBytes, event.Meta.BlobUsed), &rawdb.L1Origin{ BlockID: event.BlockId, L2BlockHash: common.Hash{}, // Will be set by taiko-geth. diff --git a/pkg/txlist_validator/tx_list_validator.go b/driver/txlist_decompressor/txlist_decomporessor.go similarity index 64% rename from pkg/txlist_validator/tx_list_validator.go rename to driver/txlist_decompressor/txlist_decomporessor.go index 2c2acc4b6..e4b0cb434 100644 --- a/pkg/txlist_validator/tx_list_validator.go +++ b/driver/txlist_decompressor/txlist_decomporessor.go @@ -1,4 +1,4 @@ -package txlistvalidator +package txlistdecompressor import ( "math/big" @@ -9,46 +9,49 @@ import ( "github.com/taikoxyz/taiko-client/internal/utils" ) -// TxListValidator is responsible for validating the transactions list in a TaikoL1.proposeBlock transaction. -type TxListValidator struct { +// TxListDecompressor is responsible for validating and decompressing +// the transactions list in a TaikoL1.proposeBlock transaction. +type TxListDecompressor struct { blockMaxGasLimit uint64 maxBytesPerTxList uint64 chainID *big.Int } -// NewTxListValidator creates a new TxListValidator instance based on giving configurations. -func NewTxListValidator( +// NewTxListDecompressor creates a new TxListDecompressor instance based on giving configurations. +func NewTxListDecompressor( blockMaxGasLimit uint64, maxBytesPerTxList uint64, chainID *big.Int, -) *TxListValidator { - return &TxListValidator{ +) *TxListDecompressor { + return &TxListDecompressor{ blockMaxGasLimit: blockMaxGasLimit, maxBytesPerTxList: maxBytesPerTxList, chainID: chainID, } } -// ValidateTxList checks whether the transactions list in the TaikoL1.proposeBlock transaction's +// TryDecomporess validates and decompresses whether the transactions list in the TaikoL1.proposeBlock transaction's // input data is valid, the rules are: // - If the transaction list is empty, it's valid. // - If the transaction list is not empty: // 1. If the transaction list is using calldata, the compressed bytes of the transaction list must be // less than or equal to maxBytesPerTxList. // 2. The transaction list bytes must be able to be RLP decoded into a list of transactions. -func (v *TxListValidator) ValidateTxList( +func (v *TxListDecompressor) TryDecomporess( blockID *big.Int, txListBytes []byte, blobUsed bool, -) bool { +) []byte { // If the transaction list is empty, it's valid. if len(txListBytes) == 0 { - return true + return []byte{} } + // If calldata is used, the compressed bytes of the transaction list must be + // less than or equal to maxBytesPerTxList. if !blobUsed && (len(txListBytes) > int(v.maxBytesPerTxList)) { log.Info("Compressed transactions list binary too large", "length", len(txListBytes), "blockID", blockID) - return false + return []byte{} } var ( @@ -56,16 +59,18 @@ func (v *TxListValidator) ValidateTxList( err error ) + // Decompress the transaction list bytes. if txListBytes, err = utils.Decompress(txListBytes); err != nil { log.Info("Failed to decompress tx list bytes", "blockID", blockID, "error", err) - return false + return []byte{} } + // Try to RLP decode the transaction list bytes. if err = rlp.DecodeBytes(txListBytes, &txs); err != nil { log.Info("Failed to decode transactions list bytes", "blockID", blockID, "error", err) - return false + return []byte{} } log.Info("Transaction list is valid", "blockID", blockID) - return true + return txListBytes } diff --git a/pkg/txlist_validator/tx_list_validator_test.go b/driver/txlist_decompressor/txlist_decomporessor_test.go similarity index 82% rename from pkg/txlist_validator/tx_list_validator_test.go rename to driver/txlist_decompressor/txlist_decomporessor_test.go index f525bef46..14d678ee0 100644 --- a/pkg/txlist_validator/tx_list_validator_test.go +++ b/driver/txlist_decompressor/txlist_decomporessor_test.go @@ -1,4 +1,4 @@ -package txlistvalidator +package txlistdecompressor import ( "crypto/rand" @@ -13,6 +13,7 @@ import ( "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rlp" "github.com/stretchr/testify/require" + "github.com/taikoxyz/taiko-client/internal/utils" ) var ( @@ -30,48 +31,50 @@ var ( } ) -func TestIsTxListValid(t *testing.T) { - v := NewTxListValidator( +func TestDecomporess(t *testing.T) { + d := NewTxListDecompressor( maxBlocksGasLimit, maxTxlistBytes, chainID, ) + compressed, err := utils.Compress(rlpEncodedTransactionBytes(1, true)) + require.NoError(t, err) + tests := []struct { - name string - blockID *big.Int - txListBytes []byte - isValid bool + name string + blockID *big.Int + txListBytes []byte + decompressed []byte }{ { "txListBytes binary too large", chainID, randBytes(maxTxlistBytes + 1), - false, + []byte{}, }, { "txListBytes not decodable to rlp", chainID, randBytes(0x1), - false, + []byte{}, }, { "success empty tx list", chainID, rlpEncodedTransactionBytes(0, true), - true, + []byte{}, }, { "success non-empty tx list", chainID, + compressed, rlpEncodedTransactionBytes(1, true), - true, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - isValid := v.ValidateTxList(tt.blockID, tt.txListBytes, false) - require.Equal(t, tt.isValid, isValid) + require.Equal(t, tt.decompressed, d.TryDecomporess(tt.blockID, tt.txListBytes, false)) }) } } From 6db68c16a73efc78874dac5464195f1bcea0ce9c Mon Sep 17 00:00:00 2001 From: David Date: Wed, 1 May 2024 11:27:55 +0800 Subject: [PATCH 4/9] feat: update logs --- driver/chain_syncer/blob/syncer.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/driver/chain_syncer/blob/syncer.go b/driver/chain_syncer/blob/syncer.go index ba7c03301..e0675c026 100644 --- a/driver/chain_syncer/blob/syncer.go +++ b/driver/chain_syncer/blob/syncer.go @@ -246,19 +246,19 @@ func (s *Syncer) onBlockProposed( } // Decode transactions list. - var txListDecoder txlistFetcher.TxListFetcher + var txListFecher txlistFetcher.TxListFetcher if event.Meta.BlobUsed { - txListDecoder = txlistFetcher.NewBlobTxListFetcher(s.rpc.L1Beacon, s.blobDatasource) + txListFecher = txlistFetcher.NewBlobTxListFetcher(s.rpc.L1Beacon, s.blobDatasource) } else { - txListDecoder = new(txlistFetcher.CalldataFetcher) + txListFecher = new(txlistFetcher.CalldataFetcher) } - txListBytes, err := txListDecoder.Fetch(ctx, tx, &event.Meta) + txListBytes, err := txListFecher.Fetch(ctx, tx, &event.Meta) if err != nil { if errors.Is(err, rpc.ErrBlobInvalid) { log.Info("Invalid blob detected", "blockID", event.BlockId) txListBytes = []byte{} } else { - return fmt.Errorf("failed to decode tx list: %w", err) + return fmt.Errorf("failed to fetch tx list: %w", err) } } From 61f2e7df9017852521e2df63428d15165d501512 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 2 May 2024 08:56:44 +0800 Subject: [PATCH 5/9] fix typos --- driver/chain_syncer/blob/syncer.go | 16 ++++++++-------- ...t_decomporessor.go => txlist_decompressor.go} | 4 ++-- ...essor_test.go => txlist_decompressor_test.go} | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) rename driver/txlist_decompressor/{txlist_decomporessor.go => txlist_decompressor.go} (93%) rename driver/txlist_decompressor/{txlist_decomporessor_test.go => txlist_decompressor_test.go} (96%) diff --git a/driver/chain_syncer/blob/syncer.go b/driver/chain_syncer/blob/syncer.go index e0675c026..857fddf43 100644 --- a/driver/chain_syncer/blob/syncer.go +++ b/driver/chain_syncer/blob/syncer.go @@ -26,7 +26,7 @@ import ( "github.com/taikoxyz/taiko-client/pkg/rpc" anchorTxConstructor "github.com/taikoxyz/taiko-client/driver/anchor_tx_constructor" - txListDecomporessor "github.com/taikoxyz/taiko-client/driver/txlist_decompressor" + txListDecompressor "github.com/taikoxyz/taiko-client/driver/txlist_decompressor" txlistFetcher "github.com/taikoxyz/taiko-client/driver/txlist_fetcher" eventIterator "github.com/taikoxyz/taiko-client/pkg/chain_iterator/event_iterator" ) @@ -39,7 +39,7 @@ type Syncer struct { state *state.State progressTracker *beaconsync.SyncProgressTracker // Sync progress tracker anchorConstructor *anchorTxConstructor.AnchorTxConstructor // TaikoL2.anchor transactions constructor - txListDecompressor *txListDecomporessor.TxListDecompressor // Transactions list decompressor + txListDecompressor *txListDecompressor.TxListDecompressor // Transactions list decompressor // Used by BlockInserter lastInsertedBlockID *big.Int reorgDetectedFlag bool @@ -72,7 +72,7 @@ func NewSyncer( state: state, progressTracker: progressTracker, anchorConstructor: constructor, - txListDecompressor: txListDecomporessor.NewTxListDecompressor( + txListDecompressor: txListDecompressor.NewTxListDecompressor( uint64(configs.BlockMaxGasLimit), rpc.BlockMaxTxListBytes, client.L2.ChainID, @@ -246,13 +246,13 @@ func (s *Syncer) onBlockProposed( } // Decode transactions list. - var txListFecher txlistFetcher.TxListFetcher + var txlistFetcher txlistFetcher.TxListFetcher if event.Meta.BlobUsed { - txListFecher = txlistFetcher.NewBlobTxListFetcher(s.rpc.L1Beacon, s.blobDatasource) + txlistFetcher = txlistFetcher.NewBlobTxListFetcher(s.rpc.L1Beacon, s.blobDatasource) } else { - txListFecher = new(txlistFetcher.CalldataFetcher) + txlistFetcher = new(txlistFetcher.CalldataFetcher) } - txListBytes, err := txListFecher.Fetch(ctx, tx, &event.Meta) + txListBytes, err := txlistFetcher.Fetch(ctx, tx, &event.Meta) if err != nil { if errors.Is(err, rpc.ErrBlobInvalid) { log.Info("Invalid blob detected", "blockID", event.BlockId) @@ -268,7 +268,7 @@ func (s *Syncer) onBlockProposed( event, parent, s.state.GetHeadBlockID(), - s.txListDecompressor.TryDecomporess(event.BlockId, txListBytes, event.Meta.BlobUsed), + s.txListDecompressor.TryDecompress(event.BlockId, txListBytes, event.Meta.BlobUsed), &rawdb.L1Origin{ BlockID: event.BlockId, L2BlockHash: common.Hash{}, // Will be set by taiko-geth. diff --git a/driver/txlist_decompressor/txlist_decomporessor.go b/driver/txlist_decompressor/txlist_decompressor.go similarity index 93% rename from driver/txlist_decompressor/txlist_decomporessor.go rename to driver/txlist_decompressor/txlist_decompressor.go index e4b0cb434..9018af0ac 100644 --- a/driver/txlist_decompressor/txlist_decomporessor.go +++ b/driver/txlist_decompressor/txlist_decompressor.go @@ -30,14 +30,14 @@ func NewTxListDecompressor( } } -// TryDecomporess validates and decompresses whether the transactions list in the TaikoL1.proposeBlock transaction's +// TryDecompress validates and decompresses whether the transactions list in the TaikoL1.proposeBlock transaction's // input data is valid, the rules are: // - If the transaction list is empty, it's valid. // - If the transaction list is not empty: // 1. If the transaction list is using calldata, the compressed bytes of the transaction list must be // less than or equal to maxBytesPerTxList. // 2. The transaction list bytes must be able to be RLP decoded into a list of transactions. -func (v *TxListDecompressor) TryDecomporess( +func (v *TxListDecompressor) TryDecompress( blockID *big.Int, txListBytes []byte, blobUsed bool, diff --git a/driver/txlist_decompressor/txlist_decomporessor_test.go b/driver/txlist_decompressor/txlist_decompressor_test.go similarity index 96% rename from driver/txlist_decompressor/txlist_decomporessor_test.go rename to driver/txlist_decompressor/txlist_decompressor_test.go index 14d678ee0..a816b9e5f 100644 --- a/driver/txlist_decompressor/txlist_decomporessor_test.go +++ b/driver/txlist_decompressor/txlist_decompressor_test.go @@ -74,7 +74,7 @@ func TestDecomporess(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - require.Equal(t, tt.decompressed, d.TryDecomporess(tt.blockID, tt.txListBytes, false)) + require.Equal(t, tt.decompressed, d.TryDecompress(tt.blockID, tt.txListBytes, false)) }) } } From 25e60c4e55f682b2332dee5355e99d3f1d195d57 Mon Sep 17 00:00:00 2001 From: RogerLamTd Date: Wed, 1 May 2024 18:56:33 -0700 Subject: [PATCH 6/9] var name --- driver/chain_syncer/blob/syncer.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/driver/chain_syncer/blob/syncer.go b/driver/chain_syncer/blob/syncer.go index 857fddf43..afc9f3832 100644 --- a/driver/chain_syncer/blob/syncer.go +++ b/driver/chain_syncer/blob/syncer.go @@ -246,13 +246,13 @@ func (s *Syncer) onBlockProposed( } // Decode transactions list. - var txlistFetcher txlistFetcher.TxListFetcher + var txListFetcher txlistFetcher.TxListFetcher if event.Meta.BlobUsed { - txlistFetcher = txlistFetcher.NewBlobTxListFetcher(s.rpc.L1Beacon, s.blobDatasource) + txListFetcher = txlistFetcher.NewBlobTxListFetcher(s.rpc.L1Beacon, s.blobDatasource) } else { - txlistFetcher = new(txlistFetcher.CalldataFetcher) + txListFetcher = new(txlistFetcher.CalldataFetcher) } - txListBytes, err := txlistFetcher.Fetch(ctx, tx, &event.Meta) + txListBytes, err := txListFetcher.Fetch(ctx, tx, &event.Meta) if err != nil { if errors.Is(err, rpc.ErrBlobInvalid) { log.Info("Invalid blob detected", "blockID", event.BlockId) From b1145ce4e07f6ee348c00b87c56c974ae4419d1b Mon Sep 17 00:00:00 2001 From: David Date: Fri, 3 May 2024 11:59:22 +0800 Subject: [PATCH 7/9] feat: update workflow --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d4a2b5d97..39d0ac6fc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,6 +48,8 @@ jobs: - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 + with: + version: nightly-2cb875799419c907cc3709e586ece2559e6b340e - name: Set up Go uses: actions/setup-go@v3 From 84e56d76b9248fe786c89e0d587658f41d040f6c Mon Sep 17 00:00:00 2001 From: David Date: Fri, 3 May 2024 12:02:20 +0800 Subject: [PATCH 8/9] feat: update workflow --- .github/workflows/test.yml | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 39d0ac6fc..e9a67cd71 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,8 +48,6 @@ jobs: - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly-2cb875799419c907cc3709e586ece2559e6b340e - name: Set up Go uses: actions/setup-go@v3 @@ -70,19 +68,19 @@ jobs: version: 8.4.0 run_install: false - - name: Get pnpm store directory - id: pnpm-cache - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - - - uses: actions/cache@v3 - name: Setup pnpm cache - with: - path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- + # - name: Get pnpm store directory + # id: pnpm-cache + # shell: bash + # run: | + # echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + + # - uses: actions/cache@v3 + # name: Setup pnpm cache + # with: + # path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + # key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + # restore-keys: | + # ${{ runner.os }}-pnpm-store- - name: Install protocol dependencies working-directory: ${{ env.TAIKO_MONO_DIR }} From a26b82659070e383a49d1da5cabd699e7cc735ca Mon Sep 17 00:00:00 2001 From: David Date: Fri, 3 May 2024 12:05:47 +0800 Subject: [PATCH 9/9] feat: update workflow --- .github/workflows/test.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e9a67cd71..1b6181c1f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -68,20 +68,6 @@ jobs: version: 8.4.0 run_install: false - # - name: Get pnpm store directory - # id: pnpm-cache - # shell: bash - # run: | - # echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - - # - uses: actions/cache@v3 - # name: Setup pnpm cache - # with: - # path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} - # key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - # restore-keys: | - # ${{ runner.os }}-pnpm-store- - - name: Install protocol dependencies working-directory: ${{ env.TAIKO_MONO_DIR }} run: cd ./packages/protocol && pnpm install