diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a1c16b36a..0815cab87 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,7 +1,6 @@ /**/Dockerfile* @shidaxi /.github @shidaxi /ops @shidaxi @bradyjoestar -/tss @byteflyfunny -/subsidy @curryxbo -/mt-batcher @guoshijiang -/* @wukongcheng @bradyjoestar @silmaj @HaoyangLiu +/tss @byteflyfunny @agnarsong +/mt-batcher @guoshijiang @agnarsong +/* @wukongcheng @bradyjoestar @Sha3nS @HaoyangLiu @agnarsong diff --git a/packages/data-transport-layer/src/services/da-ingestion/service.ts b/packages/data-transport-layer/src/services/da-ingestion/service.ts index d2a5032d7..7da6d3ff3 100644 --- a/packages/data-transport-layer/src/services/da-ingestion/service.ts +++ b/packages/data-transport-layer/src/services/da-ingestion/service.ts @@ -187,12 +187,17 @@ export class DaIngestionService extends BaseService { ) // batch transaction list - await this._storeBatchTransactionsByDSId( + const execOk = await this._storeBatchTransactionsByDSId( dataStoreRollupId['data_store_id'], index, this.options.mantleDaUpgradeDataStoreId ) - + this.logger.info('store batch transactions by store id', { + execOk, + }) + if (!execOk) { + return + } // put rollup store info to db await this.state.db.putRollupStoreByBatchIndex( { @@ -320,7 +325,7 @@ export class DaIngestionService extends BaseService { ) { const transactionEntries: TransactionEntry[] = [] if (storeId <= 0) { - return [] + return false } const batchTxs = await this.GetBatchTransactionByDataStoreId(storeId) .then((rst) => { @@ -332,7 +337,7 @@ export class DaIngestionService extends BaseService { }) try { if (batchTxs.length === 0) { - return + return false } for (const batchTx of batchTxs) { const queueOrigin = @@ -371,34 +376,43 @@ export class DaIngestionService extends BaseService { s: '0x'.concat(sigS), }, } - let gasLimit = BigNumber.from(0).toString() - let target = constants.AddressZero - let origin = null if (batchTx['TxMeta']['queueIndex'] != null) { - const enqueue = await this.state.db.getEnqueueByIndex( - BigNumber.from(batchTx['TxMeta']['queueIndex']).toNumber() - ) - if (enqueue != null) { - gasLimit = enqueue.gasLimit - target = enqueue.target - origin = enqueue.origin + const lastestEnqueue = await this.state.db.getLatestEnqueue() + if (lastestEnqueue.index > batchTx['TxMeta']['queueIndex']) { + this.logger.info('get queue index from da and l1(EigenLayer)', { + lastestEnqueue: lastestEnqueue.index, + queueIndex: batchTx['TxMeta']['queueIndex'], + }) + const enqueue = await this.state.db.getEnqueueByIndex( + BigNumber.from(batchTx['TxMeta']['queueIndex']).toNumber() + ) + let gasLimit = BigNumber.from(0).toString() + let target = constants.AddressZero + let origin = null + if (enqueue != null) { + gasLimit = enqueue.gasLimit + target = enqueue.target + origin = enqueue.origin + } + transactionEntries.push({ + index: batchTx['TxMeta']['index'], + batchIndex: daBatchIndex, + blockNumber: batchTx['TxMeta']['l1BlockNumber'], + timestamp: batchTx['TxMeta']['l1Timestamp'], + gasLimit, + target, + origin, + data: txData, + queueOrigin, + value: batchTx['TxDetail']['value'], + queueIndex: batchTx['TxMeta']['queueIndex'], + decoded, + confirmed: true, + }) + } else { + return false } } - transactionEntries.push({ - index: batchTx['TxMeta']['index'], - batchIndex: daBatchIndex, - blockNumber: batchTx['TxMeta']['l1BlockNumber'], - timestamp: batchTx['TxMeta']['l1Timestamp'], - gasLimit, - target, - origin, - data: txData, - queueOrigin, - value: batchTx['TxDetail']['value'], - queueIndex: batchTx['TxMeta']['queueIndex'], - decoded, - confirmed: true, - }) this.daIngestionMetrics.currentL2TransactionIndex.set( batchTx['TxMeta']['index'] ) @@ -409,6 +423,7 @@ export class DaIngestionService extends BaseService { storeId + upgradeBatchIndex ) this.daIngestionMetrics.syncDataStoreId.set(upgradeBatchIndex + storeId) + return true } catch (error) { throw new Error(`eigen layer sync finish, error is: ${error}`) }