Skip to content

Conversation

@tomusdrw
Copy link
Contributor

No description provided.

@tomusdrw tomusdrw enabled auto-merge (squash) November 10, 2025 20:18
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 10, 2025

📝 Walkthrough

Summary by CodeRabbit

Release Notes

  • Chores

    • Released version 0.3.0 across all packages and modules (updated from 0.2.0).
  • Tests

    • Updated version handling in internal tests to use dynamic extraction instead of static configuration guards.

Summary by CodeRabbit

  • Chores
    • Version 0.3.0 released across all project packages. This coordinated version bump ensures consistency throughout the ecosystem. All package versions have been updated uniformly to align with the latest release cycle. The release maintains full backward compatibility and does not introduce any breaking changes, functional modifications, or disruptions to existing features and operations.

Walkthrough

Repository-wide manifest updates: the "version" field in many package.json files (root, benchmarks, bin, packages/core, packages/jam, packages/workers, etc.) was changed (mostly from 0.2.0 and a few from 0.1.3) to 0.3.0. No dependency, script, or source-code behavior changes except for packages/jam/node/main-fuzz.test.ts, which was modified to parse expected version components from package.json and CURRENT_VERSION instead of using hard-coded literals.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Areas requiring extra attention:
    • Spot-check a sample of updated package.json files across different scopes to ensure no unintended edits.
    • Review packages/jam/node/main-fuzz.test.ts for correct parsing of version components and correct imports (pkg and CURRENT_VERSION).

Possibly related PRs

Suggested reviewers

  • mateuszsikora
  • skoszuta
  • DrEverr

Poem

🐇 I hopped through manifests, line by line,

nudged each version up to three and fine.
One tiny test learned to read its name,
now versions dance and nothing broke in frame.
✨ A carrot for CI — then I nap in the vine.

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess whether the description relates to the changeset. Add a pull request description explaining the purpose of the version bump and any breaking changes or migration notes if applicable.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Bump version to v0.3.0' accurately summarizes the main change: updating all package versions from 0.2.0 to 0.3.0 across the repository.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch version/v0.3.0

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0212d19 and d14b099.

📒 Files selected for processing (1)
  • packages/jam/node/main-fuzz.test.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/jam/node/main-fuzz.test.ts
⏰ Context from checks skipped due to timeout of 120000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: state_transition (22.x)
  • GitHub Check: run (22.x)
  • GitHub Check: run (22.x)
  • GitHub Check: state_transition (22.x)
  • GitHub Check: e2e (22.x)
  • GitHub Check: test (22.x)

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
bin/rpc/package.json (1)

36-36: Consider updating zod to v4 in a future PR.

The project currently uses zod 3.25.30, which is outdated. Zod 4 introduces unified error customization, safer number validation (e.g., rejecting infinite values), and performance improvements. This is outside the scope of the current version bump but worth considering for a future enhancement.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 98b01af and 3f0b6fa.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (60)
  • benchmarks/package.json (1 hunks)
  • bin/convert/package.json (1 hunks)
  • bin/ipc2rpc/package.json (1 hunks)
  • bin/jam/package.json (1 hunks)
  • bin/lib/package.json (1 hunks)
  • bin/pvm/package.json (1 hunks)
  • bin/rpc/package.json (1 hunks)
  • bin/tci/package.json (1 hunks)
  • bin/test-runner/package.json (1 hunks)
  • package.json (1 hunks)
  • packages/configs/package.json (1 hunks)
  • packages/core/bytes/package.json (1 hunks)
  • packages/core/codec/package.json (1 hunks)
  • packages/core/collections/package.json (1 hunks)
  • packages/core/concurrent/package.json (1 hunks)
  • packages/core/crypto/package.json (1 hunks)
  • packages/core/erasure-coding/package.json (1 hunks)
  • packages/core/hash/package.json (1 hunks)
  • packages/core/json-parser/package.json (1 hunks)
  • packages/core/listener/package.json (1 hunks)
  • packages/core/logger/package.json (1 hunks)
  • packages/core/mmr/package.json (1 hunks)
  • packages/core/networking/package.json (1 hunks)
  • packages/core/numbers/package.json (1 hunks)
  • packages/core/ordering/package.json (1 hunks)
  • packages/core/pvm-debugger-adapter/package.json (1 hunks)
  • packages/core/pvm-host-calls/package.json (1 hunks)
  • packages/core/pvm-interface/package.json (1 hunks)
  • packages/core/pvm-interpreter-ananas/package.json (1 hunks)
  • packages/core/pvm-interpreter/package.json (1 hunks)
  • packages/core/pvm-program/package.json (1 hunks)
  • packages/core/pvm-spi-decoder/package.json (1 hunks)
  • packages/core/shuffling/package.json (1 hunks)
  • packages/core/trie/package.json (1 hunks)
  • packages/core/utils/package.json (1 hunks)
  • packages/extensions/ipc/package.json (1 hunks)
  • packages/jam/block-json/package.json (1 hunks)
  • packages/jam/block/package.json (1 hunks)
  • packages/jam/config-node/package.json (1 hunks)
  • packages/jam/config/package.json (1 hunks)
  • packages/jam/database-lmdb/package.json (1 hunks)
  • packages/jam/database/package.json (1 hunks)
  • packages/jam/fuzz-proto/package.json (1 hunks)
  • packages/jam/jam-host-calls/package.json (1 hunks)
  • packages/jam/jamnp-s/package.json (1 hunks)
  • packages/jam/node/package.json (1 hunks)
  • packages/jam/safrole/package.json (1 hunks)
  • packages/jam/state-json/package.json (1 hunks)
  • packages/jam/state-merkleization/package.json (1 hunks)
  • packages/jam/state-vectors/package.json (1 hunks)
  • packages/jam/state/package.json (1 hunks)
  • packages/jam/transition/disputes/package.json (1 hunks)
  • packages/jam/transition/package.json (1 hunks)
  • packages/misc/benchmark/package.json (1 hunks)
  • packages/misc/builder/package.json (1 hunks)
  • packages/workers/api-node/package.json (1 hunks)
  • packages/workers/api/package.json (1 hunks)
  • packages/workers/block-generator/package.json (1 hunks)
  • packages/workers/importer/package.json (1 hunks)
  • packages/workers/jam-network/package.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
packages/**/package.json

⚙️ CodeRabbit configuration file

packages/**/package.json: Whenever a new package is added, the packages/README.md should be updated accordingly.

packages/**/package.json: Dependencies coming from the workspace (typically the ones starting with @typeberry/)
must use * as version.

Files:

  • packages/jam/state-merkleization/package.json
  • packages/jam/state-json/package.json
  • packages/jam/state/package.json
  • packages/jam/block/package.json
  • packages/jam/transition/package.json
  • packages/jam/jam-host-calls/package.json
  • packages/core/pvm-interpreter/package.json
  • packages/core/pvm-program/package.json
  • packages/core/erasure-coding/package.json
  • packages/core/ordering/package.json
  • packages/core/numbers/package.json
  • packages/jam/transition/disputes/package.json
  • packages/core/shuffling/package.json
  • packages/core/bytes/package.json
  • packages/core/networking/package.json
  • packages/core/mmr/package.json
  • packages/core/trie/package.json
  • packages/jam/config-node/package.json
  • packages/core/concurrent/package.json
  • packages/workers/api/package.json
  • packages/core/pvm-interface/package.json
  • packages/core/json-parser/package.json
  • packages/core/logger/package.json
  • packages/core/collections/package.json
  • packages/jam/jamnp-s/package.json
  • packages/jam/config/package.json
  • packages/misc/builder/package.json
  • packages/configs/package.json
  • packages/jam/node/package.json
  • packages/core/listener/package.json
  • packages/core/pvm-interpreter-ananas/package.json
  • packages/core/pvm-debugger-adapter/package.json
  • packages/jam/state-vectors/package.json
  • packages/core/crypto/package.json
  • packages/core/pvm-host-calls/package.json
  • packages/jam/safrole/package.json
  • packages/workers/api-node/package.json
  • packages/misc/benchmark/package.json
  • packages/extensions/ipc/package.json
  • packages/core/pvm-spi-decoder/package.json
  • packages/core/hash/package.json
  • packages/jam/block-json/package.json
  • packages/workers/block-generator/package.json
  • packages/workers/importer/package.json
  • packages/jam/fuzz-proto/package.json
  • packages/core/utils/package.json
  • packages/jam/database/package.json
  • packages/workers/jam-network/package.json
  • packages/core/codec/package.json
  • packages/jam/database-lmdb/package.json
🧠 Learnings (6)
📚 Learning: 2025-09-15T14:37:04.214Z
Learnt from: tomusdrw
Repo: FluffyLabs/typeberry PR: 625
File: benchmarks/package.json:8-15
Timestamp: 2025-09-15T14:37:04.214Z
Learning: In the FluffyLabs/typeberry monorepo, the workspace:* protocol does not work for internal typeberry dependencies. The working approach is to use "*" as the version specifier for internal monorepo packages instead of "workspace:*".

Applied to files:

  • bin/tci/package.json
  • packages/core/pvm-interpreter/package.json
  • package.json
  • packages/core/pvm-program/package.json
  • bin/lib/package.json
  • packages/core/numbers/package.json
  • packages/core/bytes/package.json
  • packages/jam/config-node/package.json
  • packages/workers/api/package.json
  • packages/core/pvm-interface/package.json
  • bin/rpc/package.json
  • packages/jam/config/package.json
  • packages/misc/builder/package.json
  • packages/jam/node/package.json
  • bin/jam/package.json
  • packages/core/pvm-debugger-adapter/package.json
  • packages/core/pvm-host-calls/package.json
  • packages/workers/api-node/package.json
  • packages/extensions/ipc/package.json
  • packages/jam/fuzz-proto/package.json
  • packages/core/utils/package.json
  • packages/workers/jam-network/package.json
  • bin/pvm/package.json
📚 Learning: 2025-06-18T20:35:13.536Z
Learnt from: tomusdrw
Repo: FluffyLabs/typeberry PR: 442
File: packages/core/pvm-debugger-adapter/index.ts:22-40
Timestamp: 2025-06-18T20:35:13.536Z
Learning: The `typeberry/utils` package has browser compatibility issues due to Node.js-specific code like `measure` function using `process.hrtime()` and `testUtils` importing `node:assert`, causing white screens in browser environments.

Applied to files:

  • bin/tci/package.json
  • bin/lib/package.json
  • packages/core/bytes/package.json
  • packages/jam/config-node/package.json
  • benchmarks/package.json
  • packages/misc/builder/package.json
  • packages/jam/node/package.json
  • packages/misc/benchmark/package.json
  • packages/core/hash/package.json
  • packages/core/utils/package.json
  • bin/test-runner/package.json
📚 Learning: 2025-05-26T21:31:58.688Z
Learnt from: tomusdrw
Repo: FluffyLabs/typeberry PR: 399
File: .github/workflows/vectors-jamduna.yml:78-78
Timestamp: 2025-05-26T21:31:58.688Z
Learning: In the typeberry project, the npm start script in the test-runner workspace is designed to accept test suite names as arguments (e.g., "jamduna", "w3f"). The command `npm start -w typeberry/test-runner jamduna` is the correct way to run the jamduna test suite, not `npm run jamduna`. This is an architectural design choice where the start script acts as a unified entry point for different test suites.

Applied to files:

  • package.json
  • bin/jam/package.json
  • packages/misc/benchmark/package.json
  • packages/workers/jam-network/package.json
  • bin/test-runner/package.json
📚 Learning: 2025-04-24T19:48:31.051Z
Learnt from: tomusdrw
Repo: FluffyLabs/typeberry PR: 351
File: packages/jam/state-merkleization/index.ts:19-37
Timestamp: 2025-04-24T19:48:31.051Z
Learning: In the typeberry codebase, `Bytes` inherits from `BytesBlob`, so a `Bytes` instance can be directly used where a `BytesBlob` is expected without needing conversion.

Applied to files:

  • packages/core/bytes/package.json
📚 Learning: 2025-06-18T20:35:13.536Z
Learnt from: tomusdrw
Repo: FluffyLabs/typeberry PR: 442
File: packages/core/pvm-debugger-adapter/index.ts:22-40
Timestamp: 2025-06-18T20:35:13.536Z
Learning: The `measure` function in `typeberry/utils/debug.ts` attempts environment detection by checking `process === undefined` but still causes bundling issues because bundlers see the `process.hrtime` reference in the Node.js branch.

Applied to files:

  • benchmarks/package.json
  • packages/misc/benchmark/package.json
  • packages/core/utils/package.json
📚 Learning: 2025-04-24T19:42:18.083Z
Learnt from: tomusdrw
Repo: FluffyLabs/typeberry PR: 351
File: bin/jam/genesis.ts:7-11
Timestamp: 2025-04-24T19:42:18.083Z
Learning: Error handling for file operations and JSON parsing in the typeberry project is done at a higher level in the call stack rather than within individual utility functions.

Applied to files:

  • packages/core/json-parser/package.json
  • packages/core/utils/package.json
⏰ Context from checks skipped due to timeout of 120000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: run (22.x)
  • GitHub Check: run (22.x)
  • GitHub Check: run (22.x)
  • GitHub Check: run (22.x)
  • GitHub Check: e2e (22.x)
  • GitHub Check: test (22.x)
🔇 Additional comments (60)
packages/jam/fuzz-proto/package.json (1)

3-3: Version bump applied correctly.

All workspace dependencies (@typeberry/) correctly use "" as the version specifier.

bin/tci/package.json (1)

3-3: Version bump applied correctly.

All workspace dependencies use "*" as the version specifier, and external dependencies remain appropriately pinned.

packages/core/json-parser/package.json (1)

3-3: Version bump applied correctly.

No dependency changes in this package.

packages/jam/node/package.json (1)

3-3: Version bump applied correctly.

All 24 workspace dependencies correctly use "*" as the version specifier.

packages/jam/database-lmdb/package.json (1)

3-3: Version bump applied correctly.

All workspace dependencies use "*" as the version specifier, and external dependency (lmdb) is appropriately pinned.

packages/core/numbers/package.json (1)

3-3: Version bump applied correctly.

Workspace dependency (@typeberry/utils) correctly uses "*" as the version specifier.

packages/configs/package.json (1)

3-3: Version bump applied correctly.

No dependencies in this package.

packages/core/networking/package.json (1)

3-3: Version bump applied correctly.

All workspace dependencies use "*" as the version specifier, and external dependencies are appropriately pinned.

packages/core/mmr/package.json (1)

3-3: Version bump looks good. All internal dependencies correctly use * as version specifier.

packages/misc/builder/package.json (1)

3-3: Version bump approved. No internal dependencies; external dev dependencies unchanged.

packages/jam/block/package.json (1)

3-3: Version bump looks good. All internal dependencies correctly use * as version specifier.

packages/core/bytes/package.json (1)

3-3: Version bump approved. All internal dependencies correctly use * as version specifier.

packages/core/listener/package.json (1)

3-3: Version bump approved. No dependencies to verify.

packages/core/trie/package.json (1)

3-3: Version bump looks good. All internal dependencies correctly use * as version specifier.

packages/jam/config-node/package.json (1)

3-3: Version bump approved. All internal dependencies correctly use * as version specifier.

packages/workers/api/package.json (1)

3-3: Version bump looks good. All internal dependencies correctly use * as version specifier.

packages/extensions/ipc/package.json (1)

3-3: Version bump applied consistently with correct dependency versioning.

All internal @typeberry/* dependencies correctly use * as the version specifier, following the monorepo pattern.

packages/workers/jam-network/package.json (1)

3-3: Version bump consistent with workspace dependency pattern.

All @typeberry/* dependencies maintain the * version specifier required for monorepo packages.

benchmarks/package.json (1)

3-3: Version bump aligns with monorepo versioning strategy.

Internal dependencies correctly use *, and external packages retain explicit versions.

packages/jam/database/package.json (1)

3-3: Version bump follows established monorepo patterns.

All workspace dependencies correctly use the * version specifier.

packages/core/hash/package.json (1)

3-3: Version bump applied correctly with proper dependency versioning.

Workspace dependencies use *, and external packages retain pinned versions.

packages/jam/jam-host-calls/package.json (1)

3-3: Version bump consistent across workspace dependencies.

All internal @typeberry/* packages correctly use * as the version specifier.

package.json (1)

3-3: Root version bump applied.

Version updated in sync with workspace packages.

packages/jam/transition/disputes/package.json (1)

3-3: Version bump applied with correct workspace dependency versioning.

All @typeberry/* dependencies consistently use * as the version specifier.

packages/core/pvm-debugger-adapter/package.json (1)

3-3: Version bump and dependencies look good.

All internal workspace dependencies correctly use * versioning. No issues identified.

Also applies to: 7-17

packages/jam/state-merkleization/package.json (1)

3-3: Version bump complies with workspace guidelines.

All internal dependencies correctly use * versioning.

Also applies to: 12-23

bin/pvm/package.json (1)

3-3: Version bump is correct.

All workspace dependencies use * as specified in guidelines.

Also applies to: 7-9

packages/core/codec/package.json (1)

3-3: Version bump and dependencies correct.

Workspace dependencies consistently use * versioning.

Also applies to: 7-10

packages/core/pvm-interface/package.json (1)

3-3: Version bump to 0.3.0 and dependencies correct.

All workspace dependencies use * as required.

Also applies to: 7-8

packages/core/logger/package.json (1)

3-3: Version bump looks good.

No dependencies to review; version-only change aligns with PR objective.

packages/core/shuffling/package.json (1)

3-3: Version and dependencies are correct.

All internal workspace dependencies correctly use * versioning.

Also applies to: 7-10

packages/jam/safrole/package.json (1)

3-3: Version bump and workspace dependencies are correct.

All internal dependencies properly use * versioning per guidelines.

Also applies to: 7-17

packages/core/erasure-coding/package.json (1)

3-3: Version bump and dependencies look good.

All internal dependencies correctly use * as the version specifier, and the version is updated from 0.2.0 to 0.3.0.

Also applies to: 14-19

packages/core/collections/package.json (1)

4-4: Version and dependencies correctly updated.

All internal dependencies use * and version bumped to 0.3.0.

Also applies to: 7-10

bin/convert/package.json (1)

3-3: Version bump and workspace dependencies are correct.

All internal dependencies correctly use * and version updated to 0.3.0.

Also applies to: 16-34

packages/workers/api-node/package.json (1)

3-3: Version bump and workspace dependencies are correct.

Version bumped from 0.1.3 to 0.3.0, and all internal dependencies correctly use *.

Also applies to: 10-19

packages/jam/block-json/package.json (1)

3-3: Version and dependencies correctly updated.

All internal dependencies use * and version bumped to 0.3.0.

Also applies to: 12-18

packages/core/pvm-host-calls/package.json (1)

3-3: Version bump and workspace dependencies are correct.

All internal dependencies correctly use * and version updated to 0.3.0.

Also applies to: 7-15

packages/core/pvm-interpreter-ananas/package.json (1)

3-3: Version bump and workspace dependencies are correct.

Version bumped from 0.1.3 to 0.3.0, and all internal dependencies correctly use *.

Also applies to: 8-11

bin/rpc/package.json (1)

3-3: Version bump and workspace dependencies are correct.

Version updated to 0.3.0 and all internal dependencies correctly use *.

Also applies to: 20-32

bin/ipc2rpc/package.json (1)

3-3: Version bump looks good.

All internal dependencies correctly use "*" as the version specifier, and external dependencies are appropriately pinned.

packages/core/utils/package.json (1)

3-3: Version bump is clean.

This package has no dependencies to verify. The version change from 0.2.0 to 0.3.0 is straightforward.

bin/lib/package.json (1)

3-3: Version bump and dependencies look good.

All internal @typeberry/* dependencies correctly use "*" as the version specifier across the comprehensive dependency list.

bin/jam/package.json (1)

3-3: Version bump and dependencies are correct.

All internal @typeberry/* dependencies use "*", and the external minimist package is appropriately pinned to version 1.2.8.

packages/jam/state-vectors/package.json (1)

3-3: Version bump and dependencies look good.

All internal @typeberry/* dependencies correctly use "*" as the version specifier.

bin/test-runner/package.json (1)

3-3: Version bump and dependencies are correct.

All internal @typeberry/* dependencies correctly use "*" as the version specifier, and the external json-bigint-patch is appropriately pinned to version 0.0.8.

packages/core/concurrent/package.json (1)

3-3: Version bump and dependency are correct.

The internal @typeberry/utils dependency correctly uses "*" as the version specifier.

packages/core/crypto/package.json (1)

3-3: Version bump and dependencies are correct.

Internal @typeberry/* dependencies correctly use "*" as the version specifier, while external dependencies (@noble/ed25519 and @typeberry/native) are appropriately pinned to specific versions.

packages/core/pvm-program/package.json (1)

3-3: Version bump looks good.

All workspace dependencies correctly use * as the version specifier.

packages/jam/config/package.json (1)

3-3: Version bump looks good.

All workspace dependencies correctly use * as the version specifier.

packages/misc/benchmark/package.json (1)

3-3: Version bump looks good.

Workspace dependency uses * as the version specifier; third-party dependencies remain pinned appropriately.

packages/jam/jamnp-s/package.json (1)

3-3: Version bump looks good.

All workspace dependencies correctly use * as the version specifier.

packages/core/pvm-interpreter/package.json (1)

3-3: Version bump looks good.

All workspace dependencies correctly use * as the version specifier.

packages/workers/block-generator/package.json (1)

3-3: Version bump looks good.

All workspace dependencies correctly use * as the version specifier.

packages/core/ordering/package.json (1)

3-3: Version bump looks good.

No issues identified.

packages/jam/state/package.json (1)

3-3: Version bump looks good.

All workspace dependencies correctly use * as the version specifier.

packages/jam/transition/package.json (1)

3-3: LGTM!

Version bump is correct and all workspace dependencies properly use * as the version specifier per coding guidelines.

packages/jam/state-json/package.json (1)

3-3: LGTM!

Version bump is correct and all workspace dependencies properly use * as the version specifier per coding guidelines.

packages/workers/importer/package.json (1)

3-3: LGTM!

Version bump is correct and all workspace dependencies properly use * as the version specifier per coding guidelines.

packages/core/pvm-spi-decoder/package.json (1)

3-3: LGTM!

Version bump is correct and all workspace dependencies properly use * as the version specifier per coding guidelines.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3f0b6fa and 0212d19.

📒 Files selected for processing (1)
  • packages/jam/node/main-fuzz.test.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.ts

⚙️ CodeRabbit configuration file

**/*.ts: rules from ./CODESTYLE.md should be adhered to.

**/*.ts: Any function whose documentation mention it must not be used in production code,
can be safely used in *.test.ts files. Other usage should be carefuly reviewed
and the comment must explain why it's safe to use there.

**/*.ts: as conversions must not be used. Suggest using tryAs conversion methods.

**/*.ts: Classes with static Codec field must have private constructor and static create method.

**/*.ts: Casting a bigint (or U64) using Number(x) must have an explanation comment why
it is safe.

**/*.ts: When making changes to code with comments containing links (in classes, constants, methods, etc.)
to graypaper.fluffylabs.dev, ensure those links point to the current version for this update.

Files:

  • packages/jam/node/main-fuzz.test.ts
🧠 Learnings (1)
📚 Learning: 2025-06-18T20:35:13.536Z
Learnt from: tomusdrw
Repo: FluffyLabs/typeberry PR: 442
File: packages/core/pvm-debugger-adapter/index.ts:22-40
Timestamp: 2025-06-18T20:35:13.536Z
Learning: The `typeberry/utils` package has browser compatibility issues due to Node.js-specific code like `measure` function using `process.hrtime()` and `testUtils` importing `node:assert`, causing white screens in browser environments.

Applied to files:

  • packages/jam/node/main-fuzz.test.ts
🧬 Code graph analysis (1)
packages/jam/node/main-fuzz.test.ts (4)
packages/core/utils/compatibility.ts (1)
  • CURRENT_VERSION (19-19)
packages/jam/node/main-fuzz.ts (1)
  • getFuzzDetails (25-31)
packages/core/utils/test.ts (1)
  • deepEqual (43-195)
packages/core/numbers/index.ts (1)
  • tryAsU8 (28-31)
🪛 GitHub Actions: Build - Lint & Test
packages/jam/node/main-fuzz.test.ts

[error] 4-4: ESLint: Relative import from another package is not allowed. Use '@typeberry/jam/package.json' instead of '../../../package.json' (import/no-relative-packages)

🪛 GitHub Check: test (22.x)
packages/jam/node/main-fuzz.test.ts

[failure] 4-4:
Relative import from another package is not allowed. Use @typeberry/jam/package.json instead of ../../../package.json

⏰ Context from checks skipped due to timeout of 120000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: state_transition (22.x)
  • GitHub Check: state_transition (22.x)
  • GitHub Check: run (22.x)
  • GitHub Check: run (22.x)
  • GitHub Check: e2e (22.x)
🔇 Additional comments (1)
packages/jam/node/main-fuzz.test.ts (1)

9-10: ****

The concern about suffix handling is not applicable. CURRENT_VERSION is a GpVersion enum value (e.g., "0.7.2", "0.6.7") which never contains suffixes like "-beta" or "-rc". The enum values are clean semantic versions, so parsing them directly with .split(".") is correct. The .split("-")[0] in production code handles pkg.version (from package.json), which is a different source that may have suffixes—not CURRENT_VERSION.

Likely an incorrect or invalid review comment.

@tomusdrw tomusdrw requested a review from DrEverr November 10, 2025 20:41
@tomusdrw
Copy link
Contributor Author

@fluffylabs-bot benchmark

@fluffylabs-bot
Copy link
Contributor

fluffylabs-bot bot commented Nov 10, 2025

Benchmark workflow triggered successfully! 🎉
Requested by: @tomusdrw
PR number: #768
Target repository: FluffyLabs/typeberry-testing

🔗 Check the Actions tab for workflow progress.

@fluffylabs-bot
Copy link
Contributor

Picofuzz Benchmark Results

fallback

Metric Baseline Current Difference
min 39.35ms 13.53ms 🟢 -25.82ms (-65.62%)
mean 58.93ms 16.69ms 🟢 -42.24ms (-71.68%)
p90 64.02ms 18.80ms 🟢 -45.22ms (-70.64%)
p99 71.04ms 23.37ms 🟢 -47.67ms (-67.11%)

safrole

Metric Baseline Current Difference
min 47.46ms 13.81ms 🟢 -33.65ms (-70.90%)
mean 107.80ms 65.38ms 🟢 -42.42ms (-39.35%)
p90 183.37ms 143.35ms 🟢 -40.02ms (-21.83%)
p99 192.63ms 148.15ms 🟢 -44.48ms (-23.09%)

storage

Metric Baseline Current Difference
min 42.31ms 16.15ms 🟢 -26.16ms (-61.84%)
mean 282.42ms 270.16ms ≈ -12.27ms (-4.34%)
p90 659.08ms 726.56ms 🔴 +67.47ms (+10.24%)
p99 994.76ms 1093.22ms ≈ +98.46ms (+9.90%)

storage_light

Metric Baseline Current Difference
min 47.43ms 15.87ms 🟢 -31.56ms (-66.54%)
mean 135.92ms 101.28ms 🟢 -34.63ms (-25.48%)
p90 258.38ms 236.22ms ≈ -22.16ms (-8.58%)
p99 386.52ms 380.99ms ≈ -5.53ms (-1.43%)

🤖 Automated benchmark

@github-actions
Copy link

View all
File Benchmark Ops
collections/map-set.ts[0] 2 gets + conditional set 63241.35 ±1.35% fastest ✅
collections/map-set.ts[1] 1 get 1 set 36405.11 ±1.3% 42.43% slower
codec/encoding.ts[0] manual encode 2782290.48 ±1.65% 15.41% slower
codec/encoding.ts[1] int32array encode 3217696.18 ±2.49% 2.18% slower
codec/encoding.ts[2] dataview encode 3289289.87 ±1.79% fastest ✅
bytes/hex-from.ts[0] parse hex using Number with NaN checking 116637.44 ±1.66% 84.57% slower
bytes/hex-from.ts[1] parse hex from char codes 755947.66 ±2% fastest ✅
bytes/hex-from.ts[2] parse hex from string nibbles 474485.91 ±1.44% 37.23% slower
bytes/hex-to.ts[0] number toString + padding 264638.69 ±1.65% fastest ✅
bytes/hex-to.ts[1] manual 13820.95 ±1.47% 94.78% slower
codec/bigint.compare.ts[0] compare custom 242814484.68 ±7.08% fastest ✅
codec/bigint.compare.ts[1] compare bigint 236752335.29 ±5.09% 2.5% slower
codec/bigint.decode.ts[0] decode custom 158548152.73 ±3.03% fastest ✅
codec/bigint.decode.ts[1] decode bigint 95664854.1 ±2.31% 39.66% slower
codec/decoding.ts[0] manual decode 19666947.62 ±1.59% 87.01% slower
codec/decoding.ts[1] int32array decode 151399695.01 ±3.41% fastest ✅
codec/decoding.ts[2] dataview decode 150153188.53 ±3.5% 0.82% slower
hash/index.ts[0] hash with numeric representation 173.7 ±1.24% 26.47% slower
hash/index.ts[1] hash with string representation 103.61 ±1.61% 56.14% slower
hash/index.ts[2] hash with symbol representation 166.31 ±1.32% 29.6% slower
hash/index.ts[3] hash with uint8 representation 145.34 ±1.44% 38.48% slower
hash/index.ts[4] hash with packed representation 236.23 ±1.31% fastest ✅
hash/index.ts[5] hash with bigint representation 185.44 ±0.91% 21.5% slower
hash/index.ts[6] hash with uint32 representation 192.14 ±1.07% 18.66% slower
math/switch.ts[0] switch 265444034.59 ±4.45% fastest ✅
math/switch.ts[1] if 252716419.81 ±5.62% 4.79% slower
math/add_one_overflow.ts[0] add and take modulus 271159998.3 ±4.62% fastest ✅
math/add_one_overflow.ts[1] condition before calculation 248109299.23 ±5.66% 8.5% slower
math/count-bits-u32.ts[0] standard method 73360037.11 ±1.44% 68.95% slower
math/count-bits-u32.ts[1] magic 236247084.57 ±6.24% fastest ✅
math/count-bits-u64.ts[0] standard method 7133440.69 ±1.99% 92.24% slower
math/count-bits-u64.ts[1] magic 91983750.2 ±1.3% fastest ✅
math/mul_overflow.ts[0] multiply and bring back to u32 260458184.16 ±5.15% fastest ✅
math/mul_overflow.ts[1] multiply and take modulus 252669678.99 ±4.61% 2.99% slower
logger/index.ts[0] console.log with string concat 6426296.37 ±48.99% fastest ✅
logger/index.ts[1] console.log with args 904642.81 ±100.43% 85.92% slower
codec/view_vs_collection.ts[0] Get first element from Decoded 17421.94 ±7.91% 65.41% slower
codec/view_vs_collection.ts[1] Get first element from View 50373.95 ±1.1% fastest ✅
codec/view_vs_collection.ts[2] Get 50th element from Decoded 23049.46 ±1.16% 54.24% slower
codec/view_vs_collection.ts[3] Get 50th element from View 23777.63 ±1.4% 52.8% slower
codec/view_vs_collection.ts[4] Get last element from Decoded 22431.77 ±1.69% 55.47% slower
codec/view_vs_collection.ts[5] Get last element from View 16625.42 ±1.17% 67% slower
codec/view_vs_object.ts[0] Get the first field from Decoded 383564.45 ±0.88% fastest ✅
codec/view_vs_object.ts[1] Get the first field from View 79011.67 ±0.98% 79.4% slower
codec/view_vs_object.ts[2] Get the first field as view from View 76023.71 ±1.31% 80.18% slower
codec/view_vs_object.ts[3] Get two fields from Decoded 374707.82 ±1.02% 2.31% slower
codec/view_vs_object.ts[4] Get two fields from View 63179.88 ±0.9% 83.53% slower
codec/view_vs_object.ts[5] Get two fields from materialized from View 130193.3 ±0.93% 66.06% slower
codec/view_vs_object.ts[6] Get two fields as views from View 60765.39 ±0.97% 84.16% slower
codec/view_vs_object.ts[7] Get only third field from Decoded 378591.22 ±0.78% 1.3% slower
codec/view_vs_object.ts[8] Get only third field from View 76689.89 ±1.08% 80.01% slower
codec/view_vs_object.ts[9] Get only third field as view from View 75132.15 ±0.96% 80.41% slower
collections/map_vs_sorted.ts[0] Map 299650.4 ±0.53% fastest ✅
collections/map_vs_sorted.ts[1] Map-array 102536.19 ±0.29% 65.78% slower
collections/map_vs_sorted.ts[2] Array 40749.44 ±2.79% 86.4% slower
collections/map_vs_sorted.ts[3] SortedArray 190224.69 ±0.43% 36.52% slower
bytes/compare.ts[0] Comparing Uint32 bytes 16049.42 ±3.21% 23.17% slower
bytes/compare.ts[1] Comparing raw bytes 20889.5 ±2.02% fastest ✅
hash/blake2b.ts[0] our hasher 2.12 ±1.57% fastest ✅
hash/blake2b.ts[1] blake2b js 0.05 ±1.67% 97.64% slower
crypto/ed25519.ts[0] native crypto 5.32 ±18.45% 82.57% slower
crypto/ed25519.ts[1] wasm lib 10.88 ±0.02% 64.36% slower
crypto/ed25519.ts[2] wasm lib batch 30.53 ±0.63% fastest ✅

Benchmarks summary: 63/63 OK ✅

@tomusdrw tomusdrw merged commit bf18f09 into main Nov 10, 2025
16 checks passed
@tomusdrw tomusdrw deleted the version/v0.3.0 branch November 10, 2025 21:01
This was referenced Nov 10, 2025
@coderabbitai coderabbitai bot mentioned this pull request Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants