From 6dd878eaca65fe5bd413abb8d7a8beb25572b64f Mon Sep 17 00:00:00 2001 From: georgehao Date: Thu, 8 May 2025 17:57:15 +0800 Subject: [PATCH 1/4] upgrade intermediate rust version (#1653) --- .github/workflows/intermediate-docker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/intermediate-docker.yml b/.github/workflows/intermediate-docker.yml index 3b6668160..0a41720d6 100644 --- a/.github/workflows/intermediate-docker.yml +++ b/.github/workflows/intermediate-docker.yml @@ -24,6 +24,7 @@ on: options: - nightly-2023-12-03 - nightly-2022-12-10 + - nightly-2025-01-17 default: "nightly-2023-12-03" PYTHON_VERSION: description: "Python version" From 0e65686ce4a5134b3baa38505cd75e246f1c99ff Mon Sep 17 00:00:00 2001 From: georgehao Date: Thu, 8 May 2025 19:30:13 +0800 Subject: [PATCH 2/4] upgrade intermdiate rust to 1.86.0 (#1654) --- .github/workflows/intermediate-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/intermediate-docker.yml b/.github/workflows/intermediate-docker.yml index 0a41720d6..631d65173 100644 --- a/.github/workflows/intermediate-docker.yml +++ b/.github/workflows/intermediate-docker.yml @@ -24,7 +24,7 @@ on: options: - nightly-2023-12-03 - nightly-2022-12-10 - - nightly-2025-01-17 + - 1.86.0 default: "nightly-2023-12-03" PYTHON_VERSION: description: "Python version" From d26381cba384ee86bba97ac2280290062bdce54a Mon Sep 17 00:00:00 2001 From: georgehao Date: Thu, 8 May 2025 21:40:25 +0800 Subject: [PATCH 3/4] upgrade cargo chef to 0.1.71 (#1655) --- .github/workflows/intermediate-docker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/intermediate-docker.yml b/.github/workflows/intermediate-docker.yml index 631d65173..f7c3cccbe 100644 --- a/.github/workflows/intermediate-docker.yml +++ b/.github/workflows/intermediate-docker.yml @@ -48,6 +48,7 @@ on: type: choice options: - 0.1.41 + - 0.1.71 BASE_IMAGE: description: "which intermediate image you want to update" required: true From 826357ab5dfca3bb3de244e0b23b057d6a8d91ff Mon Sep 17 00:00:00 2001 From: colin <102356659+colinlyguo@users.noreply.github.com> Date: Sat, 10 May 2025 18:46:36 +0800 Subject: [PATCH 4/4] fix(rollup-relayer): update commit status logic (#1656) --- common/version/version.go | 2 +- rollup/internal/orm/batch.go | 16 ++++++---------- rollup/internal/orm/orm_test.go | 2 +- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/common/version/version.go b/common/version/version.go index d01945d4b..263fbf49c 100644 --- a/common/version/version.go +++ b/common/version/version.go @@ -5,7 +5,7 @@ import ( "runtime/debug" ) -var tag = "v4.5.7" +var tag = "v4.5.8" var commit = func() string { if info, ok := debug.ReadBuildInfo(); ok { diff --git a/rollup/internal/orm/batch.go b/rollup/internal/orm/batch.go index 2d83c4791..95f5a7bf8 100644 --- a/rollup/internal/orm/batch.go +++ b/rollup/internal/orm/batch.go @@ -386,7 +386,12 @@ func (o *Batch) UpdateRollupStatus(ctx context.Context, hash string, status type func (o *Batch) UpdateCommitTxHashAndRollupStatus(ctx context.Context, hash string, commitTxHash string, status types.RollupStatus, dbTX ...*gorm.DB) error { updateFields := make(map[string]interface{}) updateFields["commit_tx_hash"] = commitTxHash - updateFields["rollup_status"] = int(status) + updateFields["rollup_status"] = gorm.Expr( + `CASE + WHEN rollup_status NOT IN (?, ?) THEN ? + ELSE rollup_status + END`, + types.RollupFinalizing, types.RollupFinalized, int(status)) if status == types.RollupCommitted { updateFields["committed_at"] = utils.NowUTC() } @@ -397,15 +402,6 @@ func (o *Batch) UpdateCommitTxHashAndRollupStatus(ctx context.Context, hash stri } db = db.WithContext(ctx) - var currentBatch Batch - if err := db.Where("hash", hash).First(¤tBatch).Error; err != nil { - return fmt.Errorf("Batch.UpdateCommitTxHashAndRollupStatus error when querying current status: %w, batch hash: %v", err, hash) - } - - if types.RollupStatus(currentBatch.RollupStatus) == types.RollupFinalizing || types.RollupStatus(currentBatch.RollupStatus) == types.RollupFinalized { - return nil - } - db = db.Model(&Batch{}) db = db.Where("hash", hash) diff --git a/rollup/internal/orm/orm_test.go b/rollup/internal/orm/orm_test.go index b53299bd3..7b6f9496a 100644 --- a/rollup/internal/orm/orm_test.go +++ b/rollup/internal/orm/orm_test.go @@ -314,7 +314,7 @@ func TestBatchOrm(t *testing.T) { updatedBatch, err = batchOrm.GetLatestBatch(context.Background()) assert.NoError(t, err) assert.NotNil(t, updatedBatch) - assert.Equal(t, "", updatedBatch.CommitTxHash) + assert.Equal(t, "commitTxHash", updatedBatch.CommitTxHash) assert.Equal(t, types.RollupFinalized, types.RollupStatus(updatedBatch.RollupStatus)) err = batchOrm.UpdateFinalizeTxHashAndRollupStatus(context.Background(), batchHash2, "finalizeTxHash", types.RollupFinalizeFailed)