Repository: hiero-ledger/hiero-json-rpc-relay
Pull request #3547: feat: change acceptance.yml to use matrix and tweak configurations for a more optimal CI flow
Author: login: simzzz
Labels: name: enhancement
description: New feature or request
Created: 2025-03-13T15:47:48Z | Merged: 2025-03-31T08:22:44Z

**Description**:
This PR changes the structure of the acceptance.yml file to use a matrix, which makes the configuration look more clean and readable, and also adds a limit to the max amount of jobs that can run in parallel so they don't compete for resources.
The current limit with great results I'm using is 6. This doesn't slow down the full flow by much since if a job completes a new one is picked up right away, it doesn't wait for the first 6 to finish before picking up the next 6 etc. 

Other tweaks that showed great results:
- Set `USE_ASYNC_TX_PROCESSING` to false  for the job. For some reason the runner doesn't like this value when we set it to true, causing timeouts and errors when communicating with the mirror node sometimes. This doesn't happen locally and the feature has test coverage and otherwise works as expected.
- Increase `HBAR_RATE_LIMIT_TINYBAR`, for some longer and more expensive jobs such as API Batch 1. In case they get retried we often get `-32606 HBAR_RATE_LIMIT_EXCEEDED` error on the retries. We can bump it up a bit just to be safe.

**Related issue(s)**:

Fixes #3536, fixes #3353

**Notes for reviewer**:

**Checklist**

- [ ] Documented (Code comments, README, etc.)
- [ ] Tested (unit, integration, etc.)


Linked issue #3536: Set max parallel jobs on Github to a lower value
### Problem

While working on https://github.com/hashgraph/hedera-json-rpc-relay/issues/3353 I noticed tests fail more often when all of them are ran in parallel but when you rerun them manually one by one they almost always pass. It might seem that they are competing for the limited resources that the runner has

The team from solo have a limit for this reason - https://github.com/hashgraph/solo/blob/main/.github/workflows/flow-pull-request-checks.yaml#L95 and implementing a similar limit could improve the flakiness that we are experiencing.

### Solution

- Set max-parallel value to 5 or another value

### Alternatives

_No response_

Diff:
diff --git a/.github/workflows/acceptance.yml b/.github/workflows/acceptance.yml
index 189077bc7d..6691b85b80 100644
--- a/.github/workflows/acceptance.yml
+++ b/.github/workflows/acceptance.yml
@@ -12,168 +12,41 @@ concurrency:
   cancel-in-progress: true
 
 jobs:
-  api_batch_1:
-    name: API Batch 1
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: api_batch1
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  api_batch_2:
-    name: API Batch 2
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: api_batch2
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-      
-
-  api_batch_3:
-    name: API Batch 3
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: api_batch3
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  erc20:
-    name: ERC20
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: erc20
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  ratelimiter:
-    name: Rate Limiter
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: ratelimiter
-      test_ws_server: true
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  hbarlimiter_batch_1:
-    name: HBar Limiter Batch 1
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: hbarlimiter_batch1
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  hbarlimiter_batch_2:
-    name: HBar Limiter Batch 2
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: hbarlimiter_batch2
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  hbarlimiter_batch_3:
-    name: HBar Limiter Batch 3
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: hbarlimiter_batch3
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  tokencreate:
-    name: Token Create
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: tokencreate
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  tokenmanagement:
-    name: Token Management
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: tokenmanagement
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  htsprecompilev1:
-    name: Precompile
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: htsprecompilev1
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  precompilecalls:
-    name: Precompile Calls
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: precompile-calls
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  websocket-batch-1:
-    name: Websocket Batch 1
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: ws_batch1
-      test_ws_server: true
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  websocket-batch-2:
-    name: Websocket Batch 2
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: ws_batch2
-      test_ws_server: true
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  websocket-batch-3:
-    name: Websocket Batch 3
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: ws_batch3
-      test_ws_server: true
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  cacheservice:
-    name: Cache Service
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: cache-service
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  server-config:
-    name: Server Config
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: serverconfig
+  acceptance_tests:
+    name: ${{ matrix.test.name }}
+    strategy:
+      fail-fast: false
+      max-parallel: 6
+      matrix:
+        test:
+          - { name: 'API Batch 1', testfilter: 'api_batch1' }
+          - { name: 'API Batch 2', testfilter: 'api_batch2' }
+          - { name: 'API Batch 3', testfilter: 'api_batch3' }
+          - { name: 'ERC20', testfilter: 'erc20' }
+          - { name: 'Rate Limiter', testfilter: 'ratelimiter', test_ws_server: true }
+          - { name: 'HBar Limiter Batch 1', testfilter: 'hbarlimiter_batch1' }
+          - { name: 'HBar Limiter Batch 2', testfilter: 'hbarlimiter_batch2' }
+          - { name: 'HBar Limiter Batch 3', testfilter: 'hbarlimiter_batch3' }
+          - { name: 'Token Create', testfilter: 'tokencreate' }
+          - { name: 'Token Management', testfilter: 'tokenmanagement' }
+          - { name: 'Precompile', testfilter: 'htsprecompilev1' }
+          - { name: 'Precompile Calls', testfilter: 'precompile-calls' }
+          - { name: 'Websocket Batch 1', testfilter: 'ws_batch1', test_ws_server: true }
+          - { name: 'Websocket Batch 2', testfilter: 'ws_batch2', test_ws_server: true }
+          - { name: 'Websocket Batch 3', testfilter: 'ws_batch3', test_ws_server: true }
+          - { name: 'Cache Service', testfilter: 'cache-service' }
+          - { name: 'Server Config', testfilter: 'serverconfig' }
+    uses: ./.github/workflows/acceptance-workflow.yml
+    with:
+      testfilter: ${{ matrix.test.testfilter }}
+      test_ws_server: ${{ matrix.test.test_ws_server || false }}
     secrets:
       CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
 
   publish_results:
     name: Publish Results
     if: ${{ !cancelled() }}
-    needs:
-      - api_batch_1
-      - api_batch_2
-      - api_batch_3
-      - erc20
-      - ratelimiter
-      - hbarlimiter_batch_1
-      - hbarlimiter_batch_2
-      - hbarlimiter_batch_3
-      - tokencreate
-      - tokenmanagement
-      - htsprecompilev1
-      - precompilecalls
-      - websocket-batch-1
-      - websocket-batch-2
-      - websocket-batch-3
-      - cacheservice
-
+    needs: [acceptance_tests]
     runs-on: hiero-smart-contracts-linux-medium
     steps:
       - name: Harden Runner
@@ -190,7 +63,6 @@ jobs:
       - name: Publish Test Report
         uses: step-security/publish-unit-test-result-action@4519d7c9f71dd765f8bbb98626268780f23bab28 # v2.17.0
         with:
-          # check_name: Acceptance Tests
           check_name: '' # Set to empty to disable check run
           json_thousands_separator: ','
           files: 'test-*.xml'
diff --git a/packages/server/tests/localAcceptance.env b/packages/server/tests/localAcceptance.env
index da1e3ac7a5..e0ab9e8ab1 100644
--- a/packages/server/tests/localAcceptance.env
+++ b/packages/server/tests/localAcceptance.env
@@ -28,8 +28,8 @@ LIMIT_DURATION=90000
 SERVER_REQUEST_TIMEOUT_MS=60000
 MEMWATCH_ENABLED=true
 WRITE_SNAPSHOT_ON_MEMORY_LEAK=false
-HBAR_RATE_LIMIT_TINYBAR=9000000000# 90 HBARs
+HBAR_RATE_LIMIT_TINYBAR=30000000000# 300 HBARs
 HBAR_RATE_LIMIT_DURATION=86400000# 24 hours
 HBAR_RATE_LIMIT_BASIC=6000000000# 60 HBARs
 HBAR_SPENDING_PLANS_CONFIG_FILE=./packages/server/tests/testSpendingPlansConfig.json
-USE_ASYNC_TX_PROCESSING=true
+USE_ASYNC_TX_PROCESSING=false


Reviews:
user: login: quiet-node
body: LGTM but one question
state: CHANGES_REQUESTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-24T15:55:25Z
user: login: simzzz
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-25T11:07:55Z
user: login: quiet-node
body: Nice work! LGTM!
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-03-25T14:15:24Z
user: login: PavelSBorisov
state: APPROVED
author_association: MEMBER
submitted_at: 2025-03-28T12:28:22Z

Review comments:
diff_hunk: @@ -51,6 +51,8 @@ jobs:
           if [ -n "${{ inputs.operator_id }}" ]; then
             echo "OPERATOR_ID_MAIN=${{ inputs.operator_id }}" >> $GITHUB_ENV
           fi
+          echo "USE_ASYNC_TX_PROCESSING=false" >> $GITHUB_ENV
+          echo "HBAR_RATE_LIMIT_TINYBAR=5000000000000" >> $GITHUB_ENV
path: .github/workflows/acceptance-workflow.yml
user: login: quiet-node
body: Hm I don't know if setting config here would scale or not? Did you try updating it in the localAcceptance.env instead?
created_at: 2025-03-24T15:54:05Z
author_association: CONTRIBUTOR
diff_hunk: @@ -12,168 +12,41 @@ concurrency:
   cancel-in-progress: true
 
 jobs:
-  api_batch_1:
-    name: API Batch 1
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: api_batch1
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  api_batch_2:
-    name: API Batch 2
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: api_batch2
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-      
-
-  api_batch_3:
-    name: API Batch 3
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: api_batch3
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  erc20:
-    name: ERC20
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: erc20
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  ratelimiter:
-    name: Rate Limiter
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: ratelimiter
-      test_ws_server: true
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  hbarlimiter_batch_1:
-    name: HBar Limiter Batch 1
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: hbarlimiter_batch1
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  hbarlimiter_batch_2:
-    name: HBar Limiter Batch 2
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: hbarlimiter_batch2
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  hbarlimiter_batch_3:
-    name: HBar Limiter Batch 3
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: hbarlimiter_batch3
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  tokencreate:
-    name: Token Create
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: tokencreate
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  tokenmanagement:
-    name: Token Management
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: tokenmanagement
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  htsprecompilev1:
-    name: Precompile
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: htsprecompilev1
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  precompilecalls:
-    name: Precompile Calls
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: precompile-calls
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  websocket-batch-1:
-    name: Websocket Batch 1
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: ws_batch1
-      test_ws_server: true
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  websocket-batch-2:
-    name: Websocket Batch 2
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: ws_batch2
-      test_ws_server: true
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  websocket-batch-3:
-    name: Websocket Batch 3
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: ws_batch3
-      test_ws_server: true
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  cacheservice:
-    name: Cache Service
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: cache-service
-    secrets:
-      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
-  server-config:
-    name: Server Config
-    uses: ./.github/workflows/acceptance-workflow.yml
-    with:
-      testfilter: serverconfig
+  acceptance_tests:
+    name: ${{ matrix.test.name }}
+    strategy:
+      fail-fast: false
+      max-parallel: 6
+      matrix:
+        test:
+          - { name: 'API Batch 1', testfilter: 'api_batch1' }
+          - { name: 'API Batch 2', testfilter: 'api_batch2' }
+          - { name: 'API Batch 3', testfilter: 'api_batch3' }
+          - { name: 'ERC20', testfilter: 'erc20' }
+          - { name: 'Rate Limiter', testfilter: 'ratelimiter', test_ws_server: true }
+          - { name: 'HBar Limiter Batch 1', testfilter: 'hbarlimiter_batch1' }
+          - { name: 'HBar Limiter Batch 2', testfilter: 'hbarlimiter_batch2' }
+          - { name: 'HBar Limiter Batch 3', testfilter: 'hbarlimiter_batch3' }
+          - { name: 'Token Create', testfilter: 'tokencreate' }
+          - { name: 'Token Management', testfilter: 'tokenmanagement' }
+          - { name: 'Precompile', testfilter: 'htsprecompilev1' }
+          - { name: 'Precompile Calls', testfilter: 'precompile-calls' }
+          - { name: 'Websocket Batch 1', testfilter: 'ws_batch1', test_ws_server: true }
+          - { name: 'Websocket Batch 2', testfilter: 'ws_batch2', test_ws_server: true }
+          - { name: 'Websocket Batch 3', testfilter: 'ws_batch3', test_ws_server: true }
+          - { name: 'Cache Service', testfilter: 'cache-service' }
+          - { name: 'Server Config', testfilter: 'serverconfig' }
+    uses: ./.github/workflows/acceptance-workflow.yml
+    with:
+      testfilter: ${{ matrix.test.testfilter }}
+      test_ws_server: ${{ matrix.test.test_ws_server || false }}
path: .github/workflows/acceptance.yml
user: login: quiet-node
body: nice one definitely looks cleaner! 
created_at: 2025-03-24T15:54:57Z
author_association: CONTRIBUTOR
diff_hunk: @@ -51,6 +51,8 @@ jobs:
           if [ -n "${{ inputs.operator_id }}" ]; then
             echo "OPERATOR_ID_MAIN=${{ inputs.operator_id }}" >> $GITHUB_ENV
           fi
+          echo "USE_ASYNC_TX_PROCESSING=false" >> $GITHUB_ENV
+          echo "HBAR_RATE_LIMIT_TINYBAR=5000000000000" >> $GITHUB_ENV
path: .github/workflows/acceptance-workflow.yml
user: login: simzzz
body: Yeah, you're right. It would be cleaner to put both of them there. I'll change it
created_at: 2025-03-25T11:07:55Z
author_association: CONTRIBUTOR

PR comments:
user: login: github-actions[bot]
created_at: 2025-03-13T15:52:57Z
body: ## Test Results
 20 files   -   3  256 suites   - 91   32m 36s :stopwatch: - 26m 36s
620 tests  -   2  599 :white_check_mark:  -   1  4 :zzz: ±0  17 :x:  -  1 
682 runs   - 252  645 :white_check_mark:  - 260  4 :zzz:  - 2  33 :x: +10 

For more details on these failures, see [this check](https://github.com/hiero-ledger/hiero-json-rpc-relay/runs/39589183091).

Results for commit fb3a70ee. ± Comparison against base commit 9af4a2ee.

<details>
  <summary>This pull request <b>removes</b> 4 and <b>adds</b> 2 tests. <i>Note that renamed tests count towards both.</i></summary>

```
"before all" hook for "emits an approval event" ‑ RPC Server Acceptance Tests Acceptance tests @erc20 Acceptance Tests HTS token should behave like erc20 transfer from when the token owner is not the zero address when the recipient is not the zero address when the spender has enough allowance "before all" hook for "emits an approval event"
"before all" hook for "reverts" ‑ RPC Server Acceptance Tests Acceptance tests @erc20 Acceptance Tests HTS token should behave like erc20 transfer from when the token owner is not the zero address when the recipient is not the zero address when the spender does not have enough allowance when the token owner has enough balance "before all" hook for "reverts"
"before all" hook in "Debug API Test Suite" ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests Debug API Test Suite "before all" hook in "Debug API Test Suite"
"before each" hook for "reverts" ‑ RPC Server Acceptance Tests Acceptance tests @erc20 Acceptance Tests HTS token should behave like erc20 transfer from when the token owner is not the zero address when the recipient is not the zero address when the spender does not have enough allowance "before each" hook for "reverts"
```

```
@release fail "eth_getTransactionReceipt" on precheck with wrong nonce error when sending a tx with a higher nonce ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-1 RPC Server Acceptance Tests RPC Server Acceptance Tests Transaction related RPC Calls Prechecks @release fail "eth_getTransactionReceipt" on precheck with wrong nonce error when sending a tx with a higher nonce
should execute "eth_sendRawTransaction" and deploy a contract with more than max transaction fee ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-1 RPC Server Acceptance Tests RPC Server Acceptance Tests Transaction related RPC Calls should execute "eth_sendRawTransaction" and deploy a contract with more than max transaction fee
```
</details>

[test-results]:data:application/gzip;base64,H4sIAFKp5mcC/03MSw7DIAxF0a1EjDsIBBPoZiogRkLNpyIwqrr3OjSfDt+xdd8sxBFXdm9Ee2vYWmL+LVA0h5JsjstMwE0Vuubtrup7XY+1eE8Exlz0jC8ieUKwcdwq/SmY0pKItk4qc41qsY+jqSScciXr3otdd8B/0C/TFDMNFlxn+xYRlVBca8FBSkTHjQNlYAAjdQ/Befb5AllQRsYLAQAA

:recycle: This comment has been updated with latest results.
author_association: NONE
user: login: sonarqubecloud[bot]
created_at: 2025-03-21T10:02:06Z
body: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=hashgraph_hedera-json-rpc-relay&pullRequest=3547) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=hashgraph_hedera-json-rpc-relay&pullRequest=3547&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=hashgraph_hedera-json-rpc-relay&pullRequest=3547&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=hashgraph_hedera-json-rpc-relay&pullRequest=3547&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=hashgraph_hedera-json-rpc-relay&pullRequest=3547&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=hashgraph_hedera-json-rpc-relay&pullRequest=3547&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=hashgraph_hedera-json-rpc-relay&pullRequest=3547)


author_association: NONE
user: login: codecov[bot]
created_at: 2025-03-21T13:37:21Z
body: ## [Codecov](https://app.codecov.io/gh/hashgraph/hedera-json-rpc-relay/pull/3547?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 85.66%. Comparing base [(`7c25713`)](https://app.codecov.io/gh/hashgraph/hedera-json-rpc-relay/commit/7c25713b59338a8a2801c72f6a68b0b6b8cdc847?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph) to head [(`b50f299`)](https://app.codecov.io/gh/hashgraph/hedera-json-rpc-relay/commit/b50f2990f7a675ec4a99f34689a37c4926d1fd48?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph).
> Report is 6 commits behind head on main.

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##             main    #3547      +/-   ##
==========================================
+ Coverage   84.75%   85.66%   +0.91%     
==========================================
  Files          75       75              
  Lines        4834     4836       +2     
  Branches      998      998              
==========================================
+ Hits         4097     4143      +46     
+ Misses        432      404      -28     
+ Partials      305      289      -16     
```

| [Flag](https://app.codecov.io/gh/hashgraph/hedera-json-rpc-relay/pull/3547/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph) | Coverage Δ | |
|---|---|---|
| [config-service](https://app.codecov.io/gh/hashgraph/hedera-json-rpc-relay/pull/3547/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph) | `93.58% <ø> (ø)` | |
| [relay](https://app.codecov.io/gh/hashgraph/hedera-json-rpc-relay/pull/3547/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph) | `79.27% <ø> (-0.05%)` | :arrow_down: |
| [server](https://app.codecov.io/gh/hashgraph/hedera-json-rpc-relay/pull/3547/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph) | `85.15% <ø> (ø)` | |
| [ws-server](https://app.codecov.io/gh/hashgraph/hedera-json-rpc-relay/pull/3547/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph) | `36.31% <ø> (ø)` | |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#carryforward-flags-in-the-pull-request-comment) to find out more.

[see 9 files with indirect coverage changes](https://app.codecov.io/gh/hashgraph/hedera-json-rpc-relay/pull/3547/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph)

</details>
<details><summary> :rocket: New features to boost your workflow: </summary>

- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
author_association: NONE
user: login: quiet-node
created_at: 2025-03-24T15:51:13Z
body: > Set USE_ASYNC_TX_PROCESSING to false for the job. For some reason the runner doesn't like this value when we set it to true, causing timeouts and errors when communicating with the mirror node sometimes. This doesn't happen locally and the feature has test coverage and otherwise works as expected.

Nice catch! Yes, USE_ASYNC_TX_PROCESSING=true might cause a timeout. If an internal exception is thrown during the sendRawTransaction request flow, a valid transaction hash is still returned, but the transaction never reaches consensus, leaving no record on MN. As a result, the poller continuously checks for the transaction record in an endless loop since the polling result will always be null, leading to timeout. More info about this can be found in [#3318](https://github.com/hiero-ledger/hiero-json-rpc-relay/issues/3318).
author_association: CONTRIBUTOR
user: login: quiet-node
created_at: 2025-03-26T21:54:23Z
body: Hmmm still see it took up to 6 attempts for the tests. Does the mattrix actually help? Also should we consider breaking up the tests in smaller batch like maybe adding 1 more batch like API Batch 4 or something? 

author_association: CONTRIBUTOR
user: login: simzzz
created_at: 2025-03-28T14:51:29Z
body: @quiet-node I would say yes, I ran them 6 times but they passed multiple times.  https://github.com/hiero-ledger/hiero-json-rpc-relay/actions/runs/13971754728 and usually only 1-2 jobs fail at most (usually API Batch 1).
I agree with splitting it up as a next step as it's the most problematic even when it doesn't timeout.

And currently it takes ~13 minutes for a job to fail in the worst case and most usually complete in under 10 minutes. Previously I've often had cases where it takes 30 or more:

<img width="838" alt="Screenshot 2025-03-26 at 12 45 43" src="https://github.com/user-attachments/assets/a80c594f-af23-495a-bf4d-abaf5e0e6bb8" />

author_association: CONTRIBUTOR