Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ logs
*.db
./prisma/db/*
./prisma/generated
prisma/dev.db
*.sqlite
*.sqlite-journal
2 changes: 1 addition & 1 deletion bun.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"": {
"name": "concero-v2-operators",
"dependencies": {
"@concero/operator-utils": "https://github.com/concero/operator-utils.git#feature/add-block-checkpoints",
"@concero/operator-utils": "https://github.com/concero/operator-utils.git#feature/restart-failed-transaction",
"@prisma/client": "6.16.2",
"@slack/web-api": "7.9.1",
"@types/jest": "29.5.14",
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ COPY --from=builder --chown=bunuser:bunuser /app/prisma /app/prisma
COPY --chown=bunuser:bunuser ./rpc.extensions.json /app/
COPY --chown=bunuser:bunuser ./rpc.overrides.json /app/

ENV NODE_ENV=production
ENV NODE_ENV=production \
DATABASE_URL=file:/app/data/concero.sqlite
ENTRYPOINT ["/app/entrypoint.sh"]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"typescript": "5.0.0"
},
"dependencies": {
"@concero/operator-utils": "https://github.com/concero/operator-utils.git#feature/add-block-checkpoints",
"@concero/operator-utils": "https://github.com/concero/operator-utils.git#feature/restart-failed-transaction",
"@prisma/client": "6.16.2",
"@slack/web-api": "7.9.1",
"@types/jest": "29.5.14",
Expand Down
16 changes: 16 additions & 0 deletions prisma/migrations/20251016181328_init/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-- CreateTable
CREATE TABLE "RelayerJob" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"jobType" TEXT NOT NULL DEFAULT 'tx-submit',
"txHash" TEXT,
"chainName" TEXT NOT NULL,
"payload" TEXT NOT NULL,
"status" TEXT NOT NULL DEFAULT 'pending',
"attempts" INTEGER NOT NULL DEFAULT 0,
"nextRetryAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL
);

-- CreateIndex
CREATE INDEX "RelayerJob_status_nextRetryAt_idx" ON "RelayerJob"("status", "nextRetryAt");
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
Warnings:

- A unique constraint covering the columns `[jobType,txHash]` on the table `RelayerJob` will be added. If there are existing duplicate values, this will fail.

*/
-- CreateIndex
CREATE UNIQUE INDEX "RelayerJob_jobType_txHash_key" ON "RelayerJob"("jobType", "txHash");
16 changes: 16 additions & 0 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,19 @@ model LogsListenerBlockCheckpoints {
@@index([chainSelector, contractAddress])
@@map("logsListener_blockCheckpoints")
}

model RelayerJob {
id Int @id @default(autoincrement())
jobType String @default("tx-submit") // tx-submit | report-request
chainName String
txHash String?
payload String
status String @default("pending") // pending | processing | done | failed
attempts Int @default(0)
nextRetryAt DateTime @default(now())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt

@@index([status, nextRetryAt])
@@unique([jobType, txHash])
}
Loading