feat: Implement Executor Service for asynchronous transaction processing#14
Open
toruguera wants to merge 1 commit intochore/update-bundle-endpoint-mempoolfrom
Open
Conversation
willemneal
reviewed
Jan 21, 2026
Comment on lines
+88
to
+96
| for (const bundleId of bundleIds) { | ||
| await bundleTransactionRepository.create({ | ||
| transactionId: txHash, | ||
| bundleId: bundleId, | ||
| createdAt: new Date(), | ||
| createdBy: accountId, | ||
| }); | ||
| } | ||
| } |
willemneal
reviewed
Jan 21, 2026
| LOG.info("Executor started", { intervalMs: EXECUTOR_CONFIG.INTERVAL_MS }); | ||
|
|
||
| // Execute immediately, then on interval | ||
| this.executeNext(); |
willemneal
reviewed
Jan 21, 2026
Comment on lines
+59
to
+79
| for (const bundle of bundles) { | ||
| // Add deposit operations | ||
| bundle.operations.deposit.forEach((op) => { | ||
| txBuilder.addOperation(op); | ||
| }); | ||
|
|
||
| // Add create operations | ||
| bundle.operations.create.forEach((op) => { | ||
| txBuilder.addOperation(op); | ||
| }); | ||
|
|
||
| // Add spend operations | ||
| bundle.operations.spend.forEach((op) => { | ||
| txBuilder.addOperation(op); | ||
| }); | ||
|
|
||
| // Add withdraw operations | ||
| bundle.operations.withdraw.forEach((op) => { | ||
| txBuilder.addOperation(op); | ||
| }); | ||
| } |
There was a problem hiding this comment.
Since there are a max of 100 operations. And there is already 1 fee, then there is a max of 24 bundles?
24 * 4 + 1 = 97 operations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement Executor Service for asynchronous transaction processing
Summary
Implements the Executor Service that processes slots from the Mempool queue, aggregates bundles into transactions, and submits them to the Stellar network asynchronously.
Changes
New Executor Service
executor.service.ts: Pure functionbuildTransactionFromSlot()that:executor.process.ts:Executorclass with:PENDINGon failureexecutor.types.ts: Types for transaction building and execution resultsexecutor.errors.ts: Specific error classes for executor failuresFeatures
UNVERIFIEDstatusBundleTransactionjunction tableFiles Created
src/core/service/executor/executor.types.tssrc/core/service/executor/executor.errors.tssrc/core/service/executor/executor.service.tssrc/core/service/executor/executor.process.ts