Skip to content

Conversation

natanasow
Copy link
Contributor

Description

Create acceptance tests for the feature based on the Acceptance Criteria created when designing the feature.

Related issue(s)

Fixes #4396

Testing Guide

Changes from original design (optional)

N/A

Additional work needed (optional)

N/A

Checklist

  • I've assigned an assignee to this PR and related issue(s) (if applicable)
  • I've assigned a label to this PR and related issue(s) (if applicable)
  • I've assigned a milestone to this PR and related issue(s) (if applicable)
  • I've updated documentation (code comments, README, etc. if applicable)
  • I've done sufficient testing (unit, integration, etc.)

natanasow and others added 11 commits September 23, 2025 16:41
Signed-off-by: nikolay <[email protected]>
Signed-off-by: Simeon Nakov <[email protected]>
Co-authored-by: Simeon Nakov <[email protected]>
Signed-off-by: nikolay <[email protected]>
Signed-off-by: Konstantina Blazhukova <[email protected]>
Co-authored-by: Nikolay Atanasow <[email protected]>
Signed-off-by: Konstantina Blazhukova <[email protected]>
Signed-off-by: nikolay <[email protected]>
@natanasow natanasow self-assigned this Oct 2, 2025
@natanasow natanasow added the enhancement New feature or request label Oct 2, 2025
@natanasow natanasow added this to the 0.73.0 milestone Oct 2, 2025
@natanasow natanasow changed the base branch from main to feat/transaction-pool October 2, 2025 12:38
Copy link

github-actions bot commented Oct 2, 2025

Test Results

 20 files  ± 0  263 suites  ±0   18m 21s ⏱️ - 16m 47s
761 tests +21  751 ✅ +21  5 💤 ±0  5 ❌ ±0 
781 runs  +27  771 ✅ +27  5 💤 ±0  5 ❌ ±0 

For more details on these failures, see this check.

Results for commit cc134c3. ± Comparison against base commit 57c9fa1.

♻️ This comment has been updated with latest results.

konstantinabl and others added 6 commits October 3, 2025 15:42
Signed-off-by: Konstantina Blazhukova <[email protected]>
Signed-off-by: nikolay <[email protected]>
Co-authored-by: Konstantina Blazhukova <[email protected]>
Signed-off-by: nikolay <[email protected]>
Signed-off-by: Konstantina Blazhukova <[email protected]>
Co-authored-by: Konstantina Blazhukova <[email protected]>
@natanasow natanasow changed the base branch from feat/transaction-pool to main October 7, 2025 06:24
@natanasow natanasow changed the base branch from main to feat/transaction-pool October 7, 2025 06:24
@natanasow natanasow changed the base branch from feat/transaction-pool to main October 7, 2025 06:56
Signed-off-by: nikolay <[email protected]>
Signed-off-by: nikolay <[email protected]>
Copy link
Contributor

@konstantinabl konstantinabl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few comments and questions

describe('Transaction Pool feature', async () => {
describe('ENABLE_TX_POOL = true', async () => {
overrideEnvsInMochaDescribe({ ENABLE_TX_POOL: true });
it('should have equal nonces (pending and latest) after successful validated transaction', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: successfully* ?

const txHash = await relay.sendRawTransaction(signedTx);
await relay.pollForValidTransactionReceipt(txHash);

const nonceLatest = await relay.getAccountNonce(accounts[1].address);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe lets add a comment clarifying that they are equal because pending will get only the MN value and pending pool would be empty? wdy

expect(nonceLatest).to.equal(noncePending);
});

it('scenario #5', async () => {});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this some leftover?

});
const txHash2 = await relay.sendRawTransaction(signedTx2);

const [receipt1, receipt2] = await Promise.all([
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this here, we are essentially checking the nonces before we get the transaction receipts, why do we care about the status? For me this was kind of confusing, cause i thought we would wait for the receipts then check the nonces. Also side question the latest nonce after the receipt should be the same as the pending correct?

type: 1,
};

describe('Transaction Pool feature', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume these tests are with USE_ASYNC_TX_PROCESSING set to true, should we have some with the value set to false?

Copy link

codecov bot commented Oct 7, 2025

Codecov Report

❌ Patch coverage is 84.30421% with 97 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/relay/src/lib/types/transactionPool.ts 0.00% 79 Missing ⚠️
packages/relay/src/lib/relay.ts 83.33% 6 Missing ⚠️
...ctionPoolService/RedisPendingTransactionStorage.ts 96.26% 4 Missing ⚠️
...ckages/relay/src/lib/clients/redisClientManager.ts 96.61% 2 Missing ⚠️
...thService/transactionService/TransactionService.ts 92.85% 2 Missing ⚠️
...s/relay/src/lib/clients/cache/IRedisCacheClient.ts 0.00% 1 Missing ⚠️
packages/relay/src/lib/eth.ts 94.11% 1 Missing ⚠️
packages/server/src/index.ts 0.00% 1 Missing ⚠️
packages/ws-server/src/index.ts 0.00% 1 Missing ⚠️
@@            Coverage Diff             @@
##             main    #4443      +/-   ##
==========================================
- Coverage   96.24%   95.88%   -0.36%     
==========================================
  Files         121      126       +5     
  Lines       19941    20310     +369     
  Branches     1755     1761       +6     
==========================================
+ Hits        19192    19475     +283     
- Misses        727      811      +84     
- Partials       22       24       +2     
Flag Coverage Δ
config-service 98.81% <100.00%> (+<0.01%) ⬆️
relay 90.93% <83.41%> (-0.31%) ⬇️
server 88.82% <ø> (ø)
ws-server 98.27% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ckages/config-service/src/services/globalConfig.ts 100.00% <100.00%> (ø)
packages/relay/src/lib/clients/cache/redisCache.ts 88.11% <100.00%> (-6.41%) ⬇️
packages/relay/src/lib/clients/sdkClient.ts 95.82% <100.00%> (+0.03%) ⬆️
packages/relay/src/lib/precheck.ts 98.73% <100.00%> (+0.05%) ⬆️
...elay/src/lib/services/cacheService/cacheService.ts 97.30% <100.00%> (+0.28%) ⬆️
...rvices/ethService/accountService/AccountService.ts 96.53% <100.00%> (-0.02%) ⬇️
packages/relay/src/lib/services/index.ts 100.00% <100.00%> (ø)
...ctionPoolService/LocalPendingTransactionStorage.ts 100.00% <100.00%> (ø)
...s/transactionPoolService/transactionPoolService.ts 100.00% <100.00%> (ø)
packages/relay/src/lib/types/events.ts 100.00% <100.00%> (ø)
... and 9 more

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create acceptance tests for the transaction pool feature
3 participants