Repository: ethereumjs/ethereumjs-monorepo
Pull request #3975: Clean up noCompile CI
Author: login: acolytec3
Labels: name: PR state: needs review
name: type: refactor
name: type: CI
name: package: client
name: type: maintenance
Created: 2025-04-14T11:27:51Z | Merged: 2025-04-17T12:52:09Z

Follow up of https://github.com/ethereumjs/ethereumjs-monorepo/pull/3972

This cleans up the `noCompile` CI job we have for checking for unerasable Typescript syntax so it no longer uses `process.exit` which could mask issues in the `examples` CI job.

To test that it still detects unerasable syntax, just add something like `const variable = <any>'someVariable'` in any of  the `src/index.ts` files in any  
of the packages imported by `client` (basically all of them with the exception of `wallet` and `era`), and then try to run the script with 
`node --conditions=typescript --experimental-strip-types examples/inlineClient.ts` from the `client` directory root.


Diff:
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 5f04933f53e..fa4bc39ba2b 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -143,13 +143,6 @@ jobs:
     with:
       dep-cache-key: ${{ needs.build.outputs.dep-cache-key }}
 
-  genesis:
-    needs: build
-    uses: ./.github/workflows/genesis-build.yml
-    secrets: inherit
-    with:
-      dep-cache-key: ${{ needs.build.outputs.dep-cache-key }}
-
   mpt:
     needs: build
     uses: ./.github/workflows/mpt-build.yml
@@ -157,9 +150,9 @@ jobs:
     with:
       dep-cache-key: ${{ needs.build.outputs.dep-cache-key }}
 
-  rlp:
+  static:
     needs: build
-    uses: ./.github/workflows/rlp-build.yml
+    uses: ./.github/workflows/static-build.yml
     secrets: inherit
     with:
       dep-cache-key: ${{ needs.build.outputs.dep-cache-key }}
@@ -200,16 +193,15 @@ jobs:
       dep-cache-key: ${{ needs.build.outputs.dep-cache-key }}
       submodule-cache-key: ${{ needs.checkout-submodules.outputs.submodule-cache-key }}
 
-  wallet:
+  lint:
     needs: build
-    uses: ./.github/workflows/wallet-build.yml
-    secrets: inherit
+    uses: ./.github/workflows/lint.yml
     with:
       dep-cache-key: ${{ needs.build.outputs.dep-cache-key }}
 
-  lint:
+  noCompile:
     needs: build
-    uses: ./.github/workflows/lint.yml
+    uses: ./.github/workflows/noCompile.yml
     with:
       dep-cache-key: ${{ needs.build.outputs.dep-cache-key }}
 
diff --git a/.github/workflows/common-build.yml b/.github/workflows/common-build.yml
index f6c8b56e657..247aca8f16e 100644
--- a/.github/workflows/common-build.yml
+++ b/.github/workflows/common-build.yml
@@ -53,9 +53,20 @@ jobs:
         run: npm ci     
         working-directory: ${{ github.workspace }}            
 
+        # Run coverage for common
       - run: npm run coverage
       - uses: codecov/codecov-action@v4
         with:
           token: ${{ secrets.CODECOV_TOKEN }}
           files: ${{ env.cwd }}/coverage/lcov.info
           flags: common
+
+        # Run coverage for util
+      - run: npm run coverage
+        working-directory: ${{ github.workspace }}/packages/util
+        
+      - uses: codecov/codecov-action@v4
+        with:
+          token: ${{ secrets.CODECOV_TOKEN }}
+          files: ${{ env.cwd }}/coverage/lcov.info
+          flags: util
\ No newline at end of file
diff --git a/.github/workflows/ethash-build.yml b/.github/workflows/ethash-build.yml
deleted file mode 100644
index 2859f079f2f..00000000000
--- a/.github/workflows/ethash-build.yml
+++ /dev/null
@@ -1,64 +0,0 @@
-name: Ethash
-on:
-  workflow_call:
-    inputs:
-      dep-cache-key:
-        required: false
-        type: string
-  workflow_dispatch:
-    inputs:
-      dep-cache-key:
-        required: false
-        default: 'none'
-      submodule-cache-key:
-        required: false
-        default: 'none'
-
-
-env:
-  cwd: ${{github.workspace}}/packages/ethash
-
-defaults:
-  run:
-    working-directory: packages/ethash
-
-concurrency:
-  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-ethash
-  cancel-in-progress: true
-
-jobs:
-  test-ethash:
-    runs-on: ubuntu-latest
-
-    steps:
-      # We clone the repo and submodules if triggered from work-flow dispatch
-      - if: inputs.submodule-cache-key == 'none'
-        uses: actions/checkout@v4
-
-      # We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
-      - if: inputs.dep-cache-key != 'none'
-        uses: actions/cache/restore@v4
-        id: dep-cache
-        with:
-          path: ${{github.workspace}}
-          key: ${{ inputs.dep-cache-key }}
-
-      - name: Use Node.js 20
-        uses: actions/setup-node@v4
-        with:
-          node-version: 20
-          cache: 'npm'
-
-      - name: Install Dependencies (if not restored from cache)
-        if: steps.dep-cache.outputs.cache-hit != 'true'
-        run: npm ci
-        working-directory: ${{ github.workspace }}
-
-
-
-      - run: npm run coverage
-      - uses: codecov/codecov-action@v4
-        with:
-          token: ${{ secrets.CODECOV_TOKEN }}
-          files: ${{ env.cwd }}/coverage/lcov.info
-          flags: ethash
diff --git a/.github/workflows/genesis-build.yml b/.github/workflows/genesis-build.yml
deleted file mode 100644
index 75e0f2bfce9..00000000000
--- a/.github/workflows/genesis-build.yml
+++ /dev/null
@@ -1,63 +0,0 @@
-name: genesis
-on:
-  workflow_call:
-    inputs:
-      dep-cache-key:
-        required: false
-        type: string
-  workflow_dispatch:
-    inputs:
-      dep-cache-key:
-        required: false
-        default: 'none'
-      submodule-cache-key:
-        required: false
-        default: 'none'
-
-env:
-  cwd: ${{github.workspace}}/packages/genesis
-
-defaults:
-  run:
-    working-directory: packages/genesis
-
-concurrency:
-  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-genesis
-  cancel-in-progress: true
-
-jobs:
-  test-genesis:
-    runs-on: ubuntu-latest
-
-    steps:
-      # We clone the repo and submodules if triggered from work-flow dispatch
-      - if: inputs.submodule-cache-key == 'none'
-        uses: actions/checkout@v4
-
-      # We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
-      - if: inputs.dep-cache-key != 'none' 
-        uses: actions/cache/restore@v4
-        id: dep-cache
-        with:
-          path: ${{github.workspace}}
-          key: ${{ inputs.dep-cache-key }}
-
-      - name: Use Node.js 20
-        uses: actions/setup-node@v4
-        with:
-          node-version: 20
-          cache: 'npm'
-
-      - name: Install Dependencies (if not restored from cache)
-        if: steps.dep-cache.outputs.cache-hit != 'true'
-        run: npm ci     
-        working-directory: ${{ github.workspace }}
-      
-      - run: npm run coverage
-      - uses: codecov/codecov-action@v4
-        with:
-          token: ${{ secrets.CODECOV_TOKEN }}
-          files: ${{ env.cwd }}/coverage/lcov.info
-          flags: genesis
-
-      - run: npm run test:node 
\ No newline at end of file
diff --git a/.github/workflows/noCompile.yml b/.github/workflows/noCompile.yml
index 46dc263eb5e..e8f32d0dc21 100644
--- a/.github/workflows/noCompile.yml
+++ b/.github/workflows/noCompile.yml
@@ -10,9 +10,6 @@ on:
       dep-cache-key:
         required: false
         default: 'none'
-  push:
-    branches:
-      - master
 
 concurrency:
   group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-noCompile
@@ -34,16 +31,16 @@ jobs:
           path: ${{github.workspace}}
           key: ${{ env.DEP_CACHE_KEY }}
   
-      - name: Use Node.js 23
+      - name: Use Node.js 22
         uses: actions/setup-node@v4
         with:
-          node-version: 23
+          node-version: 22
           cache: 'npm'
 
       - name: Install Dependencies (if not restored from cache)
         if: steps.dep-cache.outputs.cache-hit != 'true'
-        run: npm ci --ignore-scripts  
+        run: npm i --ignore-scripts  
         working-directory: ${{ github.workspace }}
     
-      - run: node --conditions=typescript --experimental-strip-types examples/inlineClient.ts
+      - run: node --conditions=typescript --experimental-strip-types scripts/inlineClient.ts
         working-directory: ${{ github.workspace }}/packages/client
\ No newline at end of file
diff --git a/.github/workflows/rlp-build.yml b/.github/workflows/static-build.yml
similarity index 65%
rename from .github/workflows/rlp-build.yml
rename to .github/workflows/static-build.yml
index 5d215940167..11b2b519029 100644
--- a/.github/workflows/rlp-build.yml
+++ b/.github/workflows/static-build.yml
@@ -1,4 +1,4 @@
-name: RLP
+name: Static Packages Build
 on:
   workflow_call:
     inputs:
@@ -14,18 +14,14 @@ on:
         required: false
 
 env:
-  cwd: ${{github.workspace}}/packages/rlp
-
-defaults:
-  run:
-    working-directory: packages/rlp
+  cwd: ${{github.workspace}}/packages/rlp # This doesn't appear to matter since code coverage finds all of the reports
 
 concurrency:
-  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-rlp
+  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-static
   cancel-in-progress: true
 
 jobs:
-  test-rlp:
+  test-static:
     runs-on: ubuntu-latest
 
     steps:
@@ -52,9 +48,25 @@ jobs:
         run: npm ci     
         working-directory: ${{ github.workspace }}
 
+      # Run coverage for rlp
+      - run: npm run coverage
+        working-directory: ${{ github.workspace }}/packages/rlp
+
+      # Run coverage for genesis
+      - run: npm run coverage
+        working-directory: ${{ github.workspace }}/packages/genesis
+
+      # Run coverage for ethash
+      - run: npm run coverage
+        working-directory: ${{ github.workspace }}/packages/ethash
+
+      # Run coverage for wallet
       - run: npm run coverage
+        working-directory: ${{ github.workspace }}/packages/wallet
+        # Upload code coverage for all jobs
       - uses: codecov/codecov-action@v4
         with:
           token: ${{ secrets.CODECOV_TOKEN }}
           files: ${{ env.cwd }}/coverage/lcov.info
-          flags: rlp
+          flags: static
+
diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml
index dc6776ce24c..4f6c63ffe56 100644
--- a/.github/workflows/typecheck.yml
+++ b/.github/workflows/typecheck.yml
@@ -59,4 +59,4 @@ jobs:
             
    
       - run: npm run tsc --workspaces
-        working-directory: ${{ github.workspace }}
+        working-directory: ${{ github.workspace }}
\ No newline at end of file
diff --git a/.github/workflows/wallet-build.yml b/.github/workflows/wallet-build.yml
deleted file mode 100644
index 4a42bc02cd8..00000000000
--- a/.github/workflows/wallet-build.yml
+++ /dev/null
@@ -1,58 +0,0 @@
-name: Wallet
-on:
-  workflow_call:
-    inputs:
-      dep-cache-key:
-        required: false
-        type: string
-  workflow_dispatch:
-    inputs:
-      dep-cache-key:
-        required: false
-        type: string
-env:
-  cwd: ${{github.workspace}}/packages/wallet
-
-defaults:
-  run:
-    working-directory: packages/wallet
-
-concurrency:
-  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-wallet
-  cancel-in-progress: true
-
-jobs:
-  test-wallet:
-    runs-on: ubuntu-latest
-
-    steps:
-      - uses: actions/checkout@v4
-
-      - uses: actions/cache/restore@v4
-        id: dep-cache
-        with:
-          path: ${{github.workspace}}
-          key: ${{ inputs.dep-cache-key }}
-
-      - name: Use Node.js 20
-        uses: actions/setup-node@v4
-        with:
-          node-version: 20
-          cache: 'npm'
-
-      - name: Install Dependencies (if not restored from cache)
-        if: steps.dep-cache.outputs.cache-hit != 'true'
-        run: npm ci     
-        working-directory: ${{ github.workspace }}
-    
-
-
-
-      - run: npm run coverage
-      - uses: codecov/codecov-action@v4
-        with:
-          token: ${{ secrets.CODECOV_TOKEN }}
-          files: ${{ env.cwd }}/coverage/lcov.info
-          flags: wallet
-
-      - run: npm run test:node # Only run node tests for now until vitest browser test issues are sorted out
diff --git a/config/cspell-ts.json b/config/cspell-ts.json
index 6b7a6633089..886d66163ce 100644
--- a/config/cspell-ts.json
+++ b/config/cspell-ts.json
@@ -24,6 +24,7 @@
     }
   ],
   "words": [
+    "unerasable",
     "bytelist",
     "bytestring",
     "binarytree",
diff --git a/packages/client/examples/inlineClient.ts b/packages/client/examples/inlineClient.ts
deleted file mode 100644
index 46316ff2265..00000000000
--- a/packages/client/examples/inlineClient.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { createCommonFromGethGenesis } from '@ethereumjs/common'
-import { eip4844GethGenesis } from '@ethereumjs/testdata'
-import { Config } from '../src/config.ts'
-import { createInlineClient } from '../src/util/inclineClient.ts'
-
-const main = async () => {
-  const client = await createInlineClient(
-    new Config({}),
-    createCommonFromGethGenesis(eip4844GethGenesis, {}),
-    {},
-    undefined,
-    true,
-  )
-  await client.start()
-  await client.stop()
-  process.exit(0)
-}
-
-main()
diff --git a/packages/client/scripts/inlineClient.ts b/packages/client/scripts/inlineClient.ts
new file mode 100644
index 00000000000..0582a655ba7
--- /dev/null
+++ b/packages/client/scripts/inlineClient.ts
@@ -0,0 +1,18 @@
+import { createCommonFromGethGenesis } from '@ethereumjs/common'
+import { eip4844GethGenesis } from '@ethereumjs/testdata'
+import { Config } from '../src/config.ts'
+import { createInlineClient } from '../src/util/inclineClient.ts'
+
+// This script imports `createInlineClient` which in turn loads all of our our libraries and will trigger the UNSUPPORTED_TYPESCRIPT_SYNTAX error when
+// we run `node --conditions=typescript --experimental-strip-types examples/inlineClient.ts` if there is unerasable syntax (e.g. <SomeType>someVar)
+
+const main = async () => {
+  const common = createCommonFromGethGenesis(eip4844GethGenesis, {})
+  const config = new Config({ common })
+  const client = await createInlineClient(config, common, {}, undefined, true)
+
+  console.log(`client is started: ${client.started}`)
+  await client.stop()
+}
+
+void main()


Reviews:
user: login: holgerd77
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-14T13:50:12Z
user: login: holgerd77
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-14T14:01:31Z
user: login: jochem-brouwer
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-14T14:07:23Z
user: login: jochem-brouwer
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-14T14:07:58Z
user: login: acolytec3
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-15T00:20:57Z
user: login: acolytec3
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-15T00:21:50Z
user: login: acolytec3
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-15T00:24:41Z
user: login: jochem-brouwer
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-15T05:07:04Z
user: login: jochem-brouwer
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-15T05:09:01Z
user: login: holgerd77
body: LGTM 🙂 (already discussed and approved)
state: APPROVED
author_association: MEMBER
submitted_at: 2025-04-17T12:51:55Z

Review comments:
diff_hunk: @@ -3,17 +3,4 @@ import { eip4844GethGenesis } from '@ethereumjs/testdata'
 import { Config } from '../src/config.ts'
 import { createInlineClient } from '../src/util/inclineClient.ts'
 
-const main = async () => {
-  const client = await createInlineClient(
-    new Config({}),
-    createCommonFromGethGenesis(eip4844GethGenesis, {}),
-    {},
-    undefined,
-    true,
-  )
-  await client.start()
-  await client.stop()
-  process.exit(0)
-}
-
-main()
path: packages/client/examples/inlineClient.ts
user: login: holgerd77
body: So just to confirm: it is intended to remove the whole code block here?
created_at: 2025-04-14T13:50:12Z
author_association: MEMBER
diff_hunk: @@ -3,17 +3,4 @@ import { eip4844GethGenesis } from '@ethereumjs/testdata'
 import { Config } from '../src/config.ts'
 import { createInlineClient } from '../src/util/inclineClient.ts'
 
-const main = async () => {
-  const client = await createInlineClient(
-    new Config({}),
-    createCommonFromGethGenesis(eip4844GethGenesis, {}),
-    {},
-    undefined,
-    true,
-  )
-  await client.start()
-  await client.stop()
-  process.exit(0)
-}
-
-main()
path: packages/client/examples/inlineClient.ts
user: login: holgerd77
body: Respectively to add: *something* is not consistent here. So if it is really intended to just use some random (or targeted, whatever 🙂) code import to the the noCompile functionality/code basis we should not call this `inlineClient.ts` e.g. but something more innocent. Also, would generally still feel better I guess if we execute *some* whatever code part here.
created_at: 2025-04-14T14:01:31Z
author_association: MEMBER
diff_hunk: @@ -3,17 +3,4 @@ import { eip4844GethGenesis } from '@ethereumjs/testdata'
 import { Config } from '../src/config.ts'
 import { createInlineClient } from '../src/util/inclineClient.ts'
 
-const main = async () => {
-  const client = await createInlineClient(
-    new Config({}),
-    createCommonFromGethGenesis(eip4844GethGenesis, {}),
-    {},
-    undefined,
-    true,
-  )
-  await client.start()
-  await client.stop()
-  process.exit(0)
path: packages/client/examples/inlineClient.ts
user: login: jochem-brouwer
body: A point here also, why did we need `process.exit(0)`?  If we remove the `process.exit` and this script does not 'quit', this means we have a dangling promise somewhere. So the client does not correctly shut down. But the CLI client shuts down file :thinking: So why do we need the `process.exit`?
created_at: 2025-04-14T14:07:23Z
author_association: MEMBER
diff_hunk: @@ -3,17 +3,4 @@ import { eip4844GethGenesis } from '@ethereumjs/testdata'
 import { Config } from '../src/config.ts'
 import { createInlineClient } from '../src/util/inclineClient.ts'
 
-const main = async () => {
-  const client = await createInlineClient(
-    new Config({}),
-    createCommonFromGethGenesis(eip4844GethGenesis, {}),
-    {},
-    undefined,
-    true,
-  )
-  await client.start()
-  await client.stop()
-  process.exit(0)
-}
-
-main()
+console.log('exit')
path: packages/client/examples/inlineClient.ts
user: login: jochem-brouwer
body: If the test runner starts "tree shaking" this will only run the `console.log`. How are we sure that "everything" is ran?
created_at: 2025-04-14T14:07:57Z
author_association: MEMBER
diff_hunk: @@ -3,17 +3,4 @@ import { eip4844GethGenesis } from '@ethereumjs/testdata'
 import { Config } from '../src/config.ts'
 import { createInlineClient } from '../src/util/inclineClient.ts'
 
-const main = async () => {
-  const client = await createInlineClient(
-    new Config({}),
-    createCommonFromGethGenesis(eip4844GethGenesis, {}),
-    {},
-    undefined,
-    true,
-  )
-  await client.start()
-  await client.stop()
-  process.exit(0)
-}
-
-main()
path: packages/client/examples/inlineClient.ts
user: login: acolytec3
body: So the point is not to actually run anything.  The point is to have node to simply load the code.  If it encounters any "unerasable" typescript syntax, it will error out before ever getting to the stage of running code.  We don't actually need to run anything unless you really want to.  The goal is to get node to try and import as much of our code as possible and the `inlineClient` hits almost all of our libraries.  If we want complete coverage, the alternative way to do it is just import everything from each package with
```ts
import * as binarytree from '@ethereumjs/binarytree'
import * as common from '@ethereumjs/common'
// etc.
```

That way, since nodejs doesn't do any tree shaking, it will try to import everything.  The `experimental-strip-types` flag is just using SWC (a typescript compiler written in rust - similar to esbuild that tsx uses) and so it will hit any un-erasable typescript.
created_at: 2025-04-15T00:20:57Z
author_association: CONTRIBUTOR
diff_hunk: @@ -3,17 +3,4 @@ import { eip4844GethGenesis } from '@ethereumjs/testdata'
 import { Config } from '../src/config.ts'
 import { createInlineClient } from '../src/util/inclineClient.ts'
 
-const main = async () => {
-  const client = await createInlineClient(
-    new Config({}),
-    createCommonFromGethGenesis(eip4844GethGenesis, {}),
-    {},
-    undefined,
-    true,
-  )
-  await client.start()
-  await client.stop()
-  process.exit(0)
path: packages/client/examples/inlineClient.ts
user: login: acolytec3
body: The script was never closing (as as I could tell) since it was running an async function that never resolved or something.  Regardless, as I explained above, there should be no need to actually run any code since the type stripping happens before execution.
created_at: 2025-04-15T00:21:50Z
author_association: CONTRIBUTOR
diff_hunk: @@ -3,17 +3,4 @@ import { eip4844GethGenesis } from '@ethereumjs/testdata'
 import { Config } from '../src/config.ts'
 import { createInlineClient } from '../src/util/inclineClient.ts'
 
-const main = async () => {
-  const client = await createInlineClient(
-    new Config({}),
-    createCommonFromGethGenesis(eip4844GethGenesis, {}),
-    {},
-    undefined,
-    true,
-  )
-  await client.start()
-  await client.stop()
-  process.exit(0)
-}
-
-main()
+console.log('exit')
path: packages/client/examples/inlineClient.ts
user: login: acolytec3
body: I'm pretty sure node never does tree shaking natively.  You have to use a bundler for something like that.
created_at: 2025-04-15T00:24:41Z
author_association: CONTRIBUTOR
diff_hunk: @@ -3,17 +3,4 @@ import { eip4844GethGenesis } from '@ethereumjs/testdata'
 import { Config } from '../src/config.ts'
 import { createInlineClient } from '../src/util/inclineClient.ts'
 
-const main = async () => {
-  const client = await createInlineClient(
-    new Config({}),
-    createCommonFromGethGenesis(eip4844GethGenesis, {}),
-    {},
-    undefined,
-    true,
-  )
-  await client.start()
-  await client.stop()
-  process.exit(0)
-}
-
-main()
+console.log('exit')
path: packages/client/examples/inlineClient.ts
user: login: jochem-brouwer
body: Oh right, good point, not sure how I got this idea 😅
created_at: 2025-04-15T05:07:04Z
author_association: MEMBER
diff_hunk: @@ -3,17 +3,4 @@ import { eip4844GethGenesis } from '@ethereumjs/testdata'
 import { Config } from '../src/config.ts'
 import { createInlineClient } from '../src/util/inclineClient.ts'
 
-const main = async () => {
-  const client = await createInlineClient(
-    new Config({}),
-    createCommonFromGethGenesis(eip4844GethGenesis, {}),
-    {},
-    undefined,
-    true,
-  )
-  await client.start()
-  await client.stop()
-  process.exit(0)
path: packages/client/examples/inlineClient.ts
user: login: jochem-brouwer
body: Weird, I think when I tested yesterday it resolved (so also closed without CTRL-C). But I ran it in the test-examples context maybe that is different. There should be no dangling promises though, otherwise the `stop()` fails to stop something (which is a bug)
created_at: 2025-04-15T05:09:01Z
author_association: MEMBER

PR comments:
user: login: codecov[bot]
created_at: 2025-04-14T11:29:54Z
body: ## [Codecov](https://app.codecov.io/gh/ethereumjs/ethereumjs-monorepo/pull/3975?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereumjs) Report
Attention: Patch coverage is `0%` with `12 lines` in your changes missing coverage. Please review.
> Project coverage is 79.67%. Comparing base [(`3b4a3df`)](https://app.codecov.io/gh/ethereumjs/ethereumjs-monorepo/commit/3b4a3df348f8b0ffca6fcd9f59b71a703491a953?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereumjs) to head [(`6e3f4d6`)](https://app.codecov.io/gh/ethereumjs/ethereumjs-monorepo/commit/6e3f4d605497ed73086b2c7572d957091f1e3d0a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereumjs).
> Report is 1 commits behind head on master.

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


[![Impacted file tree graph](https://app.codecov.io/gh/ethereumjs/ethereumjs-monorepo/pull/3975/graphs/tree.svg?width=650&height=150&src=pr&token=5GTaSDxbii&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereumjs)](https://app.codecov.io/gh/ethereumjs/ethereumjs-monorepo/pull/3975?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereumjs)

| [Flag](https://app.codecov.io/gh/ethereumjs/ethereumjs-monorepo/pull/3975/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereumjs) | Coverage Δ | |
|---|---|---|
| [block](https://app.codecov.io/gh/ethereumjs/ethereumjs-monorepo/pull/3975/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereumjs) | `83.34% <ø> (ø)` | |
| [blockchain](https://app.codecov.io/gh/ethereumjs/ethereumjs-monorepo/pull/3975/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereumjs) | `89.32% <ø> (ø)` | |
| [client](https://app.codecov.io/gh/ethereumjs/ethereumjs-monorepo/pull/3975/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereumjs) | `67.96% <0.00%> (+0.02%)` | :arrow_up: |
| [common](https://app.codecov.io/gh/ethereumjs/ethereumjs-monorepo/pull/3975/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereumjs) | `97.51% <ø> (ø)` | |
| [devp2p](https://app.codecov.io/gh/ethereumjs/ethereumjs-monorepo/pull/3975/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereumjs) | `86.71% <ø> (-0.08%)` | :arrow_down: |
| [evm](https://app.codecov.io/gh/ethereumjs/ethereumjs-monorepo/pull/3975/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereumjs) | `72.98% <ø> (ø)` | |
| [mpt](https://app.codecov.io/gh/ethereumjs/ethereumjs-monorepo/pull/3975/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereumjs) | `89.76% <ø> (+0.05%)` | :arrow_up: |
| [statemanager](https://app.codecov.io/gh/ethereumjs/ethereumjs-monorepo/pull/3975/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereumjs) | `69.16% <ø> (ø)` | |
| [static](https://app.codecov.io/gh/ethereumjs/ethereumjs-monorepo/pull/3975/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereumjs) | `99.11% <ø> (?)` | |
| [tx](https://app.codecov.io/gh/ethereumjs/ethereumjs-monorepo/pull/3975/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereumjs) | `90.59% <ø> (ø)` | |
| [util](https://app.codecov.io/gh/ethereumjs/ethereumjs-monorepo/pull/3975/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereumjs) | `89.53% <ø> (+7.65%)` | :arrow_up: |
| [vm](https://app.codecov.io/gh/ethereumjs/ethereumjs-monorepo/pull/3975/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereumjs) | `57.20% <ø> (ø)` | |

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=ethereumjs#carryforward-flags-in-the-pull-request-comment) to find out more.

</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: jochem-brouwer
created_at: 2025-04-14T21:57:26Z
body: The `process.exit` is problematic, here is why. 

Add this to `./packages/client/examples/testTimeout.ts`

```typescript
function sleep(ms) {
    return new Promise((resolve) => {
      setTimeout(resolve, ms);
    });
  }

const main = async () => {
    console.log("SETTING TIMEOUT")
    for (let i = 0; i < 50; i++) {
        console.log("timeout",i)
        await sleep(1000)
    }
    console.log('done')
}

main()
```

Now in client run `tsx ../../scripts/examples-runner.ts -- client`

This will print some timouts (should print up to 50) but then quits. So the entire process is killed.

Three comments here:

1. If I remove the `process.exit` it runs just fine for me
2. If the purpose of the inlineClient example is only to be used to bootstrap this noCompile job then we should not put it in the examples folder but somewhere else (IMO)
3. I think the master noCompile job is failing. Maybe the action job is configured wrong with the cache?

Should we not use the same mechanism as our package build jobs? https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/.github/workflows/build.yml

```yml
jobs:
  checkout-submodules:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
        with:
          submodules: recursive

      - id: create-cache-key
        run: echo "submodule-cache-key=$(git submodule)" >> $GITHUB_OUTPUT
        shell: bash

      - uses: actions/cache/restore@v4
        id: submodules-cache-restore
        with:
          key: submodule-${{ steps.create-cache-key.outputs.submodule-cache-key }}
          path: ${{github.workspace}}/packages/ethereum-tests

      - if: steps.submodules-cache-restore.outputs.cache-hit != 'true'
        uses: actions/cache/save@v4
        id: submodule-cache-save
        with:
          path: ${{github.workspace}}/packages/ethereum-tests
          key: submodule-${{ steps.create-cache-key.outputs.submodule-cache-key}}
```
author_association: MEMBER