From aa93cae5f43cb957e845933c5004a4eac441d0ac Mon Sep 17 00:00:00 2001 From: Bharath Vedartham Date: Tue, 21 May 2024 15:10:40 +0530 Subject: [PATCH] fix: continue the tx validation loop if assetId length check fails (#18) Currently, we check if the length of the assetId sent by the rollup is of 32 bytes. If the check fails, we still continue executing the code which will lead to a panic as in the subsequent we try to index the bytes. The fix would be to ignore this tx when the validation fails --- grpc/execution/server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/grpc/execution/server.go b/grpc/execution/server.go index c25003888..4dfa60a74 100644 --- a/grpc/execution/server.go +++ b/grpc/execution/server.go @@ -246,6 +246,7 @@ func (s *ExecutionServiceServerV1Alpha2) ExecuteBlock(ctx context.Context, req * if len(deposit.AssetId) != 32 { log.Debug("ignoring deposit tx with invalid asset ID", "assetID", deposit.AssetId) + continue } assetID := [32]byte{} copy(assetID[:], deposit.AssetId[:32])