Skip to content

Deleted 0.6.7 compatibility#809

Merged
tomusdrw merged 6 commits intomainfrom
maso-delete-067
Dec 3, 2025
Merged

Deleted 0.6.7 compatibility#809
tomusdrw merged 6 commits intomainfrom
maso-delete-067

Conversation

@DrEverr
Copy link
Member

@DrEverr DrEverr commented Dec 1, 2025

  • delete 0.6.7 compatibility
  • delete jamduna and javajam test cases: as they are only for version 0.6.7
  • updated 0.6.7 w3f vectors to 0.7.0
  • updated gha to remove 0.6.7 cases and use 0.7.0 on w3f

fix errors

delete 0.6.7
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 1, 2025

📝 Walkthrough

Summary by CodeRabbit

  • Chores

    • Dropped support for Gray Paper version 0.6.7; the platform now supports only versions 0.7.0, 0.7.1, and 0.7.2.
    • Removed obsolete test vectors and CI/CD workflows for legacy version 0.6.7 and the JAM/JAMduna test suite.
    • Simplified version-specific conditional logic throughout the codebase.
  • Tests

    • Updated test expectations and removed version-gated test cases to align with current supported versions.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

The changes remove support for Gray Paper v0.6.7 and the JAMDUNA test suite, consolidating many previously version-gated codec and data paths into single, version-agnostic implementations. Numerous test-runner scripts and GitHub workflow files for 0.6.7 were deleted or updated to target 0.7.x and test-vector refs were updated. Multiple modules dropped Compatibility/GpVersion branches (affecting codecs, key derivation, serialized-state, and tests), several test fixtures and expected hashes were updated, and package/test-runner script entries were adjusted.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60–90 minutes

  • Pay extra attention to codec consolidations that change field ordering or map-key types (packages/jam/block/work-package.ts, packages/jam/block/work-report.ts, packages/jam/block/work-item.ts, packages/jam/state/statistics.ts, packages/jam/transition/accumulate/operand.ts).
  • Inspect merkleization and key-derivation changes (packages/jam/state-merkleization/*, packages/jam/state/serialized-state.ts).
  • Verify tests updated to new hard-coded hashes/fixtures (packages/jam/state-*, transition tests) match the unified encodings.
  • Confirm CI/workflow removals and bin/test-runner/package.json edits do not leave dangling references or broken invocations.

Possibly related PRs

Suggested reviewers

  • tomusdrw
  • mateuszsikora

Poem

🐇 I hopped through files and trimmed an old furrow,
One codec now hums where branches were thorough.
Workflows tidy, test vectors set to the new,
Hashes aligned, and the rabbits all chewed.
Hop — 0.7's carrot patch waits for you!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Deleted 0.6.7 compatibility' accurately and concisely summarizes the main change—removing version 0.6.7 support throughout the codebase.
Description check ✅ Passed The description is directly related to the changeset, covering the four main objectives: deleting 0.6.7 compatibility, removing jamduna/javajam tests, updating W3F vectors, and updating GitHub Actions.
✨ 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 maso-delete-067

📜 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 8c9f8fa and 858291f.

📒 Files selected for processing (1)
  • .github/scripts/load-test-ref.sh (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/scripts/load-test-ref.sh
⏰ 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: benchmarks (22.x)
  • GitHub Check: run (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.

@DrEverr DrEverr marked this pull request as ready for review December 2, 2025 10:10
@DrEverr DrEverr requested review from mateuszsikora and tomusdrw and removed request for mateuszsikora December 2, 2025 10:10
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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/jam/state-merkleization/keys.ts (1)

108-121: Remove legacyServiceNested as dead code.

The function is not used anywhere in the codebase and can be safely deleted. After removal of 0.6.7 compatibility, this function became orphaned with no callers.

🧹 Nitpick comments (5)
bin/test-runner/w3f-070.ts (1)

1-27: w3f-070 runner wiring looks correct; consider merging CLI ignored patterns if needed.

The runner cleanly delegates to main with the new test-vectors/w3f-070 root, enforces JSON patterns, and documents why specific files/dirs are ignored. The logging and error‑handling flow matches the other test-runner patterns and respects the current TypeScript guidelines (no unsafe casts, no Codec classes, etc.).

One optional tweak: if parseArgs can also supply ignored patterns, your hard-coded ignored: [...] will override them. If you want to allow callers to extend the ignore set instead of replacing it, you could merge them, e.g. ignored: [...(args.ignored ?? []), "..."].

packages/jam/state-merkleization/serialized-state.ts (1)

3-4: Serialized state cleanup matches dropped legacy compatibility

Switching BytesBlob/U32 to type-only imports and narrowing utils usage to TEST_COMPARE_USING is a good dependency cleanup. Simplifying SerializedService.getStorage to always use serialize.serviceStorage(this.blake2b, this.serviceId, rawKey) removes the obsolete legacy key-format path and is consistent with only supporting 0.7.x versions now.

If any tests or docs still mention the old storage-key variant, consider pruning those in a follow-up to avoid confusion.

Also applies to: 8-9, 19-20, 211-214

packages/jam/jam-host-calls/accumulate/transfer.ts (1)

22-24: Host-call index constant is consistent with supported versions

Given the prior compatibility logic already resolved to 20 for all versions ≥0.6.7, hard-coding index = tryAsHostCallIndex(20); preserves behavior for the remaining supported 0.7.x versions and cleanly drops obsolete pre-0.6.7 handling.

Consider adding a brief comment noting that earlier indices are intentionally unsupported now, to make this migration explicit to future readers.

packages/jam/state-merkleization/keys.ts (1)

51-58: Update graypaper links to current version.

The links at lines 51 and 58 still reference v=0.6.3. As per coding guidelines, when making changes to code with graypaper links, ensure they point to the current version. Consider updating these to v=0.7.1 for consistency with the other updated links in this file.

packages/jam/transition/accumulate/operand.ts (1)

12-13: Update graypaper link to current version.

The link references v=0.6.7 but should be updated to the current version (e.g., v=0.7.1) to match the removal of 0.6.7 compatibility. Same applies to the link at line 34.

📜 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 3923458 and 7ca17c4.

📒 Files selected for processing (24)
  • .github/scripts/load-test-ref.sh (1 hunks)
  • .github/workflows/build-qa.yml (2 hunks)
  • .github/workflows/vectors-jamduna-067.yml (0 hunks)
  • .github/workflows/vectors-javajam.yml (0 hunks)
  • .github/workflows/vectors-w3f-davxy-067.yml (0 hunks)
  • .github/workflows/vectors-w3f.yml (3 hunks)
  • README.md (0 hunks)
  • bin/test-runner/jamduna-067.ts (0 hunks)
  • bin/test-runner/package.json (1 hunks)
  • bin/test-runner/w3f-070.ts (1 hunks)
  • bin/test-runner/w3f-davxy-067.ts (0 hunks)
  • bin/test-runner/w3f.ts (0 hunks)
  • packages/core/utils/compatibility.test.ts (5 hunks)
  • packages/core/utils/compatibility.ts (1 hunks)
  • packages/jam/block/work-package.ts (2 hunks)
  • packages/jam/jam-host-calls/accumulate/transfer.ts (1 hunks)
  • packages/jam/state-merkleization/keys.ts (1 hunks)
  • packages/jam/state-merkleization/serialized-state.ts (2 hunks)
  • packages/jam/state-merkleization/state-entries.test.ts (1 hunks)
  • packages/jam/state/statistics.test.ts (0 hunks)
  • packages/jam/state/statistics.ts (1 hunks)
  • packages/jam/state/test.utils.ts (1 hunks)
  • packages/jam/transition/accumulate/operand.ts (2 hunks)
  • packages/jam/transition/disputes/disputes.test.ts (2 hunks)
💤 Files with no reviewable changes (8)
  • packages/jam/state/statistics.test.ts
  • bin/test-runner/w3f-davxy-067.ts
  • bin/test-runner/w3f.ts
  • README.md
  • .github/workflows/vectors-jamduna-067.yml
  • .github/workflows/vectors-w3f-davxy-067.yml
  • bin/test-runner/jamduna-067.ts
  • .github/workflows/vectors-javajam.yml
🧰 Additional context used
📓 Path-based instructions (2)
**/*.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/transition/disputes/disputes.test.ts
  • packages/jam/jam-host-calls/accumulate/transfer.ts
  • packages/jam/state-merkleization/state-entries.test.ts
  • packages/jam/state/test.utils.ts
  • packages/jam/state/statistics.ts
  • packages/jam/state-merkleization/keys.ts
  • packages/core/utils/compatibility.ts
  • packages/jam/transition/accumulate/operand.ts
  • packages/jam/block/work-package.ts
  • bin/test-runner/w3f-070.ts
  • packages/jam/state-merkleization/serialized-state.ts
  • packages/core/utils/compatibility.test.ts
packages/core/**/*.ts

⚙️ CodeRabbit configuration file

packages/core/**/*.ts: Core packages must not import any JAM-related packages
(i.e. packages defined under packages/jam/**)

Files:

  • packages/core/utils/compatibility.ts
  • packages/core/utils/compatibility.test.ts
🧠 Learnings (9)
📚 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/transition/disputes/disputes.test.ts
  • packages/jam/block/work-package.ts
📚 Learning: 2025-06-10T12:06:32.535Z
Learnt from: tomusdrw
Repo: FluffyLabs/typeberry PR: 419
File: packages/jam/database-lmdb/states.test.ts:158-160
Timestamp: 2025-06-10T12:06:32.535Z
Learning: In test code, tomusdrw prefers pragmatic solutions over strict type safety when listing all entries would be cumbersome. Using `Object.assign({}, state)` for state updates in tests is acceptable even if it compromises type safety, prioritizing test maintainability and readability.

Applied to files:

  • packages/jam/transition/disputes/disputes.test.ts
  • packages/jam/state-merkleization/state-entries.test.ts
  • packages/jam/state/test.utils.ts
  • packages/jam/state-merkleization/serialized-state.ts
📚 Learning: 2025-06-10T12:20:17.513Z
Learnt from: tomusdrw
Repo: FluffyLabs/typeberry PR: 419
File: packages/jam/state/state-inmemory.ts:141-149
Timestamp: 2025-06-10T12:20:17.513Z
Learning: In the `InMemoryService.copyFrom` function in `packages/jam/state/state-inmemory.ts`, duplicate checking for `(hash, length)` pairs in the lookup history is not necessary because the function operates under the assumption that the input `ServiceEntries` comes from an existing well-formed state, which already maintains the invariant of unique lookup history entries per hash and length combination.

Applied to files:

  • packages/jam/transition/disputes/disputes.test.ts
  • packages/jam/state-merkleization/state-entries.test.ts
  • packages/jam/state/test.utils.ts
  • packages/jam/state-merkleization/keys.ts
  • packages/jam/block/work-package.ts
  • packages/jam/state-merkleization/serialized-state.ts
📚 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:

  • .github/workflows/vectors-w3f.yml
  • bin/test-runner/package.json
  • bin/test-runner/w3f-070.ts
📚 Learning: 2025-06-10T12:10:10.532Z
Learnt from: tomusdrw
Repo: FluffyLabs/typeberry PR: 419
File: packages/jam/state-merkleization/serialize-update.ts:115-126
Timestamp: 2025-06-10T12:10:10.532Z
Learning: In packages/jam/state-merkleization/serialize-update.ts, service removal is handled separately from service updates. The UpdateServiceKind enum does not include a Remove variant. Service removals are handled via the servicesRemoved parameter in serializeUpdate() which is processed by serializeRemovedServices(), while service updates/creations are handled via servicesUpdates parameter processed by serializeServiceUpdates().

Applied to files:

  • packages/jam/state/statistics.ts
  • packages/jam/state-merkleization/keys.ts
  • packages/jam/state-merkleization/serialized-state.ts
📚 Learning: 2025-06-10T12:04:56.072Z
Learnt from: tomusdrw
Repo: FluffyLabs/typeberry PR: 419
File: packages/jam/transition/accumulate/accumulate.ts:193-193
Timestamp: 2025-06-10T12:04:56.072Z
Learning: In the typeberry codebase, the Service.getPreimage() method was updated to return BytesBlob | null directly instead of PreimageItem | null, so the returned value is already a BytesBlob and doesn't need .blob property access.

Applied to files:

  • packages/jam/state-merkleization/keys.ts
  • packages/jam/state-merkleization/serialized-state.ts
📚 Learning: 2025-11-03T10:12:27.580Z
Learnt from: tomusdrw
Repo: FluffyLabs/typeberry PR: 757
File: packages/jam/state-vectors/index.ts:18-36
Timestamp: 2025-11-03T10:12:27.580Z
Learning: In TypeScript files, the coding guideline requiring classes with `static Codec` field to have a private constructor and static `create` method applies specifically to classes using `codec.Class`. When using `codec.object`, this pattern is not required because the code only cares about the shape, not the instance.

Applied to files:

  • packages/jam/transition/accumulate/operand.ts
  • packages/jam/block/work-package.ts
📚 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/jam/transition/accumulate/operand.ts
📚 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:

  • packages/jam/block/work-package.ts
🧬 Code graph analysis (6)
packages/jam/transition/disputes/disputes.test.ts (2)
packages/jam/block/work-report.ts (1)
  • WorkReport (149-153)
packages/jam/config/chain-spec.ts (1)
  • tinyChainSpec (109-126)
packages/jam/jam-host-calls/accumulate/transfer.ts (1)
packages/core/pvm-host-calls/host-call-handler.ts (1)
  • tryAsHostCallIndex (11-11)
packages/jam/transition/accumulate/operand.ts (3)
packages/jam/block/refine-context.ts (3)
  • WorkPackageHash (18-18)
  • ExportsRootHash (21-21)
  • AuthorizerHash (15-15)
packages/jam/block/common.ts (1)
  • ServiceGas (31-31)
packages/jam/block/work-result.ts (1)
  • WorkExecResult (28-69)
packages/jam/block/work-package.ts (4)
packages/jam/block/common.ts (1)
  • ServiceId (26-26)
packages/jam/block/refine-context.ts (1)
  • RefineContext (53-90)
packages/jam/block/work-item.ts (1)
  • WorkItem (112-190)
packages/core/collections/sized-array.ts (1)
  • FixedSizeArray (18-54)
bin/test-runner/w3f-070.ts (1)
bin/test-runner/w3f/runners.ts (1)
  • runners (54-78)
packages/core/utils/compatibility.test.ts (1)
packages/core/utils/compatibility.ts (1)
  • Compatibility (54-113)
🔇 Additional comments (12)
.github/workflows/vectors-w3f.yml (1)

1-1: Workflow wiring for w3f-0.7.0 looks consistent; please verify the npm start arg & dist filename.

The version bump, runner invocation, and result/artifact paths all line up with the new w3f-070.ts test-runner and GP_VERSION=0.7.0. One thing to double‑check: per prior design, the start script used to accept logical suite names (e.g. jamduna, w3f) rather than TS filenames. Passing w3f-070.ts here is fine as long as index.ts (the start entrypoint) now expects that form and emits ./dist/w3f-070.txt as configured. Based on learnings, this is the only potential mismatch area to re‑confirm.

Also applies to: 14-14, 42-42, 45-45, 51-51

.github/scripts/load-test-ref.sh (1)

2-2: Updated test-vectors REF is isolated and safe.

Only the REF constant changed; the script behavior is otherwise identical, so this is a straightforward point to the new test-vectors commit.

If you haven’t already, it’s worth confirming that this hash in fluffylabs/test-vectors indeed contains the new w3f-070 vectors you expect.

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

37-44: New w3f:0.7.0 script matches the new runner and versioning scheme.

The script correctly wires GP_VERSION=0.7.0 to w3f-070.ts and is consistent with the existing w3f-davxy and jam-conformance entries, so this looks good.

.github/workflows/build-qa.yml (1)

5-29: Workflow changes correctly target 0.7.x only

Branch filters and the explicit GP_VERSION=0.7.{0,1,2} npm test steps align with dropping 0.6.7 while still exercising all supported versions. No issues spotted.

packages/jam/state/test.utils.ts (1)

399-405: TEST_STATE_ROOT version mapping looks consistent with new version set

Using selectIfGreaterOrEqual with a fallback hash for 0.7.0 and a single override for GpVersion.V0_7_1 (also used by 0.7.2) matches the updated supported-version set and how Compatibility works. Assuming the new fallback was taken from the 0.7.0 vectors, this change looks correct.

packages/jam/state-merkleization/state-entries.test.ts (1)

59-66: Updated expected root matches new compatibility semantics

The new fallback hash and single GpVersion.V0_7_1 entry mirror how TEST_STATE_ROOT is structured (0.7.0 via fallback, 0.7.1+ via override). This keeps the “update state then check root” test aligned with the reduced version set.

packages/jam/state/statistics.ts (1)

15-20: ServiceId codec simplification aligns with removing JAMDUNA/0.6.7

codecServiceId now only distinguishes the W3F_DAVXY suite (plain u32 opaque) from the default varU32 encoding, which matches the new supported-version matrix. The sortKeys: (a, b) => a - b comparator remains valid for both representations since they are numeric at runtime.

Also applies to: 275-277

packages/core/utils/compatibility.test.ts (1)

31-38: Tests accurately cover new 0.7.0–0.7.2 ordering and selection semantics

The updated assertions for isGreaterOrEqual, isLessThan, and selectIfGreaterOrEqual correctly encode the intended ordering [V0_7_0, V0_7_1, V0_7_2] and how the helper should pick fallback/low/mid/high values. This provides good regression coverage for the trimmed version set.

Also applies to: 39-46, 49-60, 63-75, 78-90, 93-104, 107-113

packages/jam/transition/disputes/disputes.test.ts (1)

13-13: Disputes tests now version-agnostic and aligned with new work-report codec

Importing only resultToString and asserting against fixed work-report hashes removes brittle version-branching in the test while matching the updated WorkReport.Codec behavior. Assuming the new hash literals were derived from the 0.7.x vectors, this looks correct.

Also applies to: 87-91

packages/core/utils/compatibility.ts (1)

3-14: LGTM!

The removal of GpVersion.V0_6_7 and TestSuite.JAMDUNA is consistent with the PR objectives. The updated ALL_VERSIONS_IN_ORDER array correctly reflects the supported versions.

packages/jam/block/work-package.ts (2)

38-48: LGTM!

The simplified single Codec definition without version branching is consistent with the PR objectives and follows the class pattern with static Codec, private constructor, and static create method.


6-6: WorkItem.Codec contains dead code due to minimum version requirement.

Since V0_7_0 is now the minimum supported version, the Compatibility.isGreaterOrEqual(GpVersion.V0_7_0) check at line 113 will always evaluate to true. Remove the else branch (the codec definition for pre-0.7.0 format) to simplify the code.

Copy link
Contributor

@mateuszsikora mateuszsikora left a comment

Choose a reason for hiding this comment

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

try to look for Compatibility.isLessThan(GpVersion.V0_7_0) in the project - there are a few more places to update

# Conflicts:
#	.github/workflows/build-qa.yml
#	.github/workflows/vectors-jamduna-067.yml
#	.github/workflows/vectors-javajam.yml
#	.github/workflows/vectors-w3f-davxy-067.yml
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

🧹 Nitpick comments (8)
packages/jam/jamnp-s/protocol/ce-133-work-package-submission.test.ts (1)

50-51: Document the origin/meaning of the testWorkPackage hex blob

The large inline hex fixture is fine for a test, but it’s opaque. Consider adding a short comment indicating its origin (e.g., which W3F/Gray Paper vector and version it comes from) so it’s easier to regenerate or update when vectors change.

packages/jam/transition/disputes/disputes.test.ts (1)

77-80: Ensure the skipped test is tracked for follow-up.

The NOTE explains that test data needs to be obtained from W3F test vectors or regenerated. This is reasonable for now, but consider opening an issue to track re-enabling this test to avoid it being forgotten.

Do you want me to open an issue to track re-enabling this test once the 0.7.0 test data is available?

packages/jam/block/work-report.ts (1)

102-124: Constructor is protected but coding guidelines require private.

Per coding guidelines: "Classes with static Codec field must have private constructor and static create method." The constructor here is protected. If there are no subclasses requiring this visibility, consider changing to private for consistency.

-  protected constructor(
+  private constructor(
packages/jam/block/header.test.ts (1)

32-39: Canonical header encoding fixtures look good

The test now uses a single canonical encoding for both full and unsealed headers, matching the unified Header.Codec and encodeUnsealedHeader path. If these hex fixtures need frequent updates as the spec evolves, consider adding a short comment or helper indicating how they were generated (e.g. script or upstream vector) to simplify future refreshes.

packages/jam/block/header.ts (1)

94-105: Update encodeUnsealedHeader Gray Paper link to current version

encodeUnsealedHeader still points at a v=0.6.4 Gray Paper URL in its JSDoc, while the surrounding Header documentation has been updated to v=0.7.2. To keep docs aligned with the spec version this PR targets (and with the new unified codec), it would be good to update this URL to the appropriate 0.7.x section as well. Likewise, please double‑check the ValidatorKeys link earlier in the file so all header‑related links consistently reference the current Gray Paper version.

As per coding guidelines, graypaper links in touched code should track the current spec version.

packages/jam/state/test.utils.ts (3)

21-44: Use of Compatibility/GpVersion here is fine as long as this stays test‑only

Importing Compatibility and GpVersion in this helper is appropriate given it’s consumed by JAM state tests and not by production entrypoints. Just keep in mind the past bundling issues around @typeberry/utils and ensure packages/jam/state/test.utils.ts is not pulled into browser‑facing bundles.

Based on learnings, @typeberry/utils should stay out of browser paths.


392-405: Availability assignment and state root updates appear self‑consistent

TEST_AVAILABILITY_ASSIGNMENT, the corresponding c10 entry in TEST_STATE, and TEST_STATE_ROOT’s fallback were all updated together, which should keep the snapshot, trie contents, and root hash in sync for the new vectors. Since these are hand‑maintained hex blobs, consider adding a brief comment pointing to the exact upstream snapshot / tooling used to regenerate them to reduce the chance of future mismatches.

Also applies to: 481-484


496-505: STATISTICS blob duplication between test.utils and statistics.test

The c13 value now uses Compatibility.selectIfGreaterOrEqual with the same fallback/V0_7_1 STATISTICS blobs as in statistics.test.ts. That keeps the state snapshot compatible with the updated ServiceStatistics.Codec, but it does duplicate a very long literal in two places. If these vectors change again, it might be worth centralizing the STATISTICS hex string in a single exported constant to avoid accidental divergence between the state snapshot and the statistics unit test.

📜 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 7ca17c4 and 724852b.

📒 Files selected for processing (19)
  • .github/workflows/vectors-w3f-070.yml (3 hunks)
  • packages/jam/block/header.test.ts (1 hunks)
  • packages/jam/block/header.ts (2 hunks)
  • packages/jam/block/test-block-0-6-5.ts (0 hunks)
  • packages/jam/block/test-helpers.ts (2 hunks)
  • packages/jam/block/test-work-report-0-6-5.ts (0 hunks)
  • packages/jam/block/work-item.ts (2 hunks)
  • packages/jam/block/work-report.ts (5 hunks)
  • packages/jam/jamnp-s/protocol/ce-133-work-package-submission.test.ts (2 hunks)
  • packages/jam/safrole/safrole-seal-067.test.ts (0 hunks)
  • packages/jam/safrole/safrole-seal.test.ts (1 hunks)
  • packages/jam/state/statistics.test.ts (1 hunks)
  • packages/jam/state/statistics.ts (5 hunks)
  • packages/jam/state/test.utils.ts (4 hunks)
  • packages/jam/transition/accumulate/operand.ts (1 hunks)
  • packages/jam/transition/block-verifier.test.ts (3 hunks)
  • packages/jam/transition/disputes/disputes.test.ts (3 hunks)
  • packages/jam/transition/hasher.test.ts (2 hunks)
  • packages/jam/transition/reports/verify-credentials.test.ts (2 hunks)
💤 Files with no reviewable changes (3)
  • packages/jam/block/test-work-report-0-6-5.ts
  • packages/jam/block/test-block-0-6-5.ts
  • packages/jam/safrole/safrole-seal-067.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/jam/transition/accumulate/operand.ts
🧰 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/transition/block-verifier.test.ts
  • packages/jam/transition/hasher.test.ts
  • packages/jam/transition/disputes/disputes.test.ts
  • packages/jam/transition/reports/verify-credentials.test.ts
  • packages/jam/state/statistics.test.ts
  • packages/jam/safrole/safrole-seal.test.ts
  • packages/jam/block/header.test.ts
  • packages/jam/block/test-helpers.ts
  • packages/jam/block/work-report.ts
  • packages/jam/block/header.ts
  • packages/jam/block/work-item.ts
  • packages/jam/state/statistics.ts
  • packages/jam/state/test.utils.ts
  • packages/jam/jamnp-s/protocol/ce-133-work-package-submission.test.ts
🧠 Learnings (8)
📚 Learning: 2025-06-10T12:20:17.513Z
Learnt from: tomusdrw
Repo: FluffyLabs/typeberry PR: 419
File: packages/jam/state/state-inmemory.ts:141-149
Timestamp: 2025-06-10T12:20:17.513Z
Learning: In the `InMemoryService.copyFrom` function in `packages/jam/state/state-inmemory.ts`, duplicate checking for `(hash, length)` pairs in the lookup history is not necessary because the function operates under the assumption that the input `ServiceEntries` comes from an existing well-formed state, which already maintains the invariant of unique lookup history entries per hash and length combination.

Applied to files:

  • packages/jam/transition/hasher.test.ts
📚 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/transition/disputes/disputes.test.ts
  • packages/jam/block/work-item.ts
  • packages/jam/state/test.utils.ts
📚 Learning: 2025-06-10T12:06:32.535Z
Learnt from: tomusdrw
Repo: FluffyLabs/typeberry PR: 419
File: packages/jam/database-lmdb/states.test.ts:158-160
Timestamp: 2025-06-10T12:06:32.535Z
Learning: In test code, tomusdrw prefers pragmatic solutions over strict type safety when listing all entries would be cumbersome. Using `Object.assign({}, state)` for state updates in tests is acceptable even if it compromises type safety, prioritizing test maintainability and readability.

Applied to files:

  • packages/jam/transition/disputes/disputes.test.ts
  • packages/jam/state/test.utils.ts
📚 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:

  • .github/workflows/vectors-w3f-070.yml
📚 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/jam/block/test-helpers.ts
📚 Learning: 2025-11-03T10:12:27.580Z
Learnt from: tomusdrw
Repo: FluffyLabs/typeberry PR: 757
File: packages/jam/state-vectors/index.ts:18-36
Timestamp: 2025-11-03T10:12:27.580Z
Learning: In TypeScript files, the coding guideline requiring classes with `static Codec` field to have a private constructor and static `create` method applies specifically to classes using `codec.Class`. When using `codec.object`, this pattern is not required because the code only cares about the shape, not the instance.

Applied to files:

  • packages/jam/block/header.ts
  • packages/jam/state/statistics.ts
📚 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:

  • packages/jam/block/work-item.ts
📚 Learning: 2025-06-10T12:10:10.532Z
Learnt from: tomusdrw
Repo: FluffyLabs/typeberry PR: 419
File: packages/jam/state-merkleization/serialize-update.ts:115-126
Timestamp: 2025-06-10T12:10:10.532Z
Learning: In packages/jam/state-merkleization/serialize-update.ts, service removal is handled separately from service updates. The UpdateServiceKind enum does not include a Remove variant. Service removals are handled via the servicesRemoved parameter in serializeUpdate() which is processed by serializeRemovedServices(), while service updates/creations are handled via servicesUpdates parameter processed by serializeServiceUpdates().

Applied to files:

  • packages/jam/state/statistics.ts
🧬 Code graph analysis (4)
packages/jam/transition/block-verifier.test.ts (1)
packages/core/utils/result.ts (2)
  • Result (4-4)
  • Result (81-111)
packages/jam/block/header.ts (4)
packages/jam/block/common.ts (3)
  • StateRootHash (43-43)
  • TimeSlot (16-16)
  • ValidatorIndex (21-21)
packages/core/crypto/bandersnatch.ts (3)
  • BANDERSNATCH_VRF_SIGNATURE_BYTES (10-10)
  • BANDERSNATCH_VRF_SIGNATURE_BYTES (11-11)
  • BandersnatchVrfSignature (44-44)
packages/core/crypto/index.ts (4)
  • BANDERSNATCH_VRF_SIGNATURE_BYTES (15-15)
  • BandersnatchVrfSignature (6-6)
  • ED25519_KEY_BYTES (20-20)
  • Ed25519Key (18-18)
packages/core/crypto/ed25519.ts (3)
  • ED25519_KEY_BYTES (11-11)
  • ED25519_KEY_BYTES (12-12)
  • Ed25519Key (23-23)
packages/jam/state/statistics.ts (1)
packages/jam/block/common.ts (1)
  • ServiceId (26-26)
packages/jam/state/test.utils.ts (1)
packages/core/utils/compatibility.ts (1)
  • Compatibility (54-113)
🔇 Additional comments (17)
packages/jam/jamnp-s/protocol/ce-133-work-package-submission.test.ts (1)

10-10: OK import source looks correct

Using OK from @typeberry/utils as the return token for withNewStream aligns with the existing call site and keeps the test logic unchanged. No issues here.

.github/workflows/vectors-w3f-070.yml (1)

1-51: Changes align with PR objectives and are internally consistent.

The workflow correctly transitions from 0.6.7 to 0.7.0, with consistent updates across the workflow name (line 1), environment variable (line 14), test runner target (line 42), and artifact paths (lines 45, 51). The filename vectors-w3f-070.yml appropriately uses the compact version notation. The w3f-070.ts test runner target exists and is properly configured to accept the invocation npm start -w @typeberry/test-runner -- w3f-070.ts, which correctly resolves the suite file and generates the expected output path ./dist/w3f-070.txt.

packages/jam/safrole/safrole-seal.test.ts (2)

1-24: LGTM!

The imports and setup are appropriate for this test file.


125-225: LGTM!

The test data constants are properly structured using appropriate type-safe conversion methods (tryAsPerValidator, tryAsPerEpochBlock) and creation functions.

packages/jam/transition/hasher.test.ts (1)

25-25: LGTM!

The removal of Compatibility and GpVersion imports and the simplification to a fixed expected hash aligns with the PR objective of removing 0.6.7 compatibility. The test now uses a single, version-agnostic expected value.

Also applies to: 153-156

packages/jam/transition/reports/verify-credentials.test.ts (1)

9-9: LGTM!

The import cleanup and fixed message blob are consistent with the version unification effort across the codebase. The test now asserts against a deterministic expected value.

Also applies to: 224-226

packages/jam/transition/block-verifier.test.ts (1)

17-17: LGTM!

The removal of version-conditional logic and use of fixed expected values for error messages and result hashes is consistent with the PR's version unification objective.

Also applies to: 128-132, 196-197

packages/jam/block/test-helpers.ts (1)

8-10: LGTM!

Good simplification. The test helpers now return data directly without version-conditional fallbacks, consistent with the codebase-wide removal of 0.6.5/0.6.7 variant handling.

Also applies to: 20-22

packages/jam/transition/disputes/disputes.test.ts (1)

91-93: Hash expectations updated for 0.7.0.

The hardcoded expected hashes are appropriate given the test is currently skipped. When the test is re-enabled with proper test data, these assertions will validate the new codec behavior.

packages/jam/block/work-report.ts (2)

57-78: LGTM on the unified Codec!

The consolidation from version-conditional codecs to a single WorkReport.Codec is clean and aligns with the PR's objective. The codec properly handles core index validation with appropriate bounds checking.


55-55: The graypaper link version is already current. The code correctly uses v=0.7.2, which is the current version as of November 2025. No changes needed.

packages/jam/block/header.ts (1)

110-124: Unified Header.Codec matches 0.7.x layout

The new Header.Codec definition is consistent with the documented field layout (parent hash, prior state root, extrinsic hash, timeslot, optional markers, author index, entropy, offenders, seal), and with encodeUnsealedHeader assuming the seal is the final fixed‑size field. No correctness or compatibility concerns from this change.

packages/jam/state/statistics.test.ts (1)

5-20: Version‑aware STATISTICS blob wiring looks consistent

Using Compatibility.selectIfGreaterOrEqual here with a fallback blob and a V0_7_1 override aligns with the ServiceStatistics.Codec setup and keeps the test valid across supported Gray Paper versions while remaining simple (decode with no error). This also effectively replaces the removed older test case.

packages/jam/state/statistics.ts (2)

72-90: CoreStatistics single Codec matches 0.7.2 spec

The unified CoreStatistics.Codec (using varU32/codecVarU16/codecVarGas) and the updated Gray Paper URL are consistent with the 0.7.2 layout. Using field names in create() and the constructor avoids any dependency on descriptor order, so this change is safe and keeps the codec.Class pattern intact.


135-170: ServiceStatistics version gating and services map look correct

The ServiceStatistics.Codec setup keeps 0.7.0 support via the fallback descriptor and switches to the 0.7.1+ descriptor (with ignoreValueWithDefault for deprecated onTransfers* fields) when Compatibility reports ≥ V0_7_1. This matches the intended evolution of the statistics schema. Updating StatisticsData.Codec.services to use codec.u32.asOpaque<ServiceId>() with sortKeys: (a, b) => a - b is consistent with ServiceId being an opaque U32 and preserves deterministic ordering.

Also applies to: 236-244

packages/jam/block/work-item.ts (2)

1-7: Import cleanup improves runtime dependency surface

Dropping Compatibility/GpVersion from this runtime module and keeping only Opaque/WithDebug from @typeberry/utils reduces coupling to the compatibility helpers and is friendlier for browser bundling, while preserving the existing debug/type utilities.

Based on learnings about @typeberry/utils in browser builds, this is a nice simplification.


107-126: Unified WorkItem.Codec matches 0.7.2 spec and class shape

The new WorkItem.Codec definition (service id, code hash, gas limits, export count, payload, bounded importSegments, and var‑len extrinsics) lines up with the updated Gray Paper link and the constructor field comments. The codecKnownSizeArray bounds mirror MAX_NUMBER_OF_SEGMENTS, and the codec.Class pattern (private ctor + create) is correctly preserved, so encoding/decoding semantics stay clear and version‑agnostic.

Also applies to: 150-172

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)
packages/core/utils/compatibility.ts (1)

13-13: Minor: Fix grammar in comment.

The comment should read "the supported versions" rather than "a supported versions".

-// NOTE: Also acts as a supported versions
+// NOTE: Also acts as the list of supported versions
📜 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 724852b and 0c2ff51.

📒 Files selected for processing (3)
  • .github/workflows/vectors-w3f-070.yml (3 hunks)
  • bin/test-runner/package.json (1 hunks)
  • packages/core/utils/compatibility.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
packages/core/**/*.ts

⚙️ CodeRabbit configuration file

packages/core/**/*.ts: Core packages must not import any JAM-related packages
(i.e. packages defined under packages/jam/**)

Files:

  • packages/core/utils/compatibility.ts
**/*.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/core/utils/compatibility.ts
🧠 Learnings (1)
📚 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:

  • .github/workflows/vectors-w3f-070.yml
  • bin/test-runner/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: e2e (22.x)
  • GitHub Check: run (22.x)
  • GitHub Check: run (22.x)
  • GitHub Check: benchmarks (22.x)
  • GitHub Check: run (22.x)
🔇 Additional comments (6)
bin/test-runner/package.json (1)

38-38: LGTM! Script correctly updated to target 0.7.0 vectors.

The script properly sets the GP_VERSION environment variable and targets the new w3f-070.ts runner, aligning with the PR objective to update W3F vectors to 0.7.0.

packages/core/utils/compatibility.ts (2)

3-11: LGTM! Enum updates align with version consolidation.

The removal of V0_6_7 from GpVersion and JAMDUNA from TestSuite correctly implements the PR objective to drop 0.6.7 compatibility and consolidate to 0.7.x versions only.


14-14: LGTM! Version array correctly updated.

The ALL_VERSIONS_IN_ORDER array now correctly reflects only the 0.7.x versions, and the usage in error messages (lines 32, 78) and version comparison methods remains consistent.

.github/workflows/vectors-w3f-070.yml (3)

1-1: Workflow name and file naming aligned to 0.7.0.

The workflow name has been updated from "w3f-0.6.7" to "w3f-0.7.0", and the filename appears to reflect the version update as well, addressing the past review feedback.


15-15: GP_VERSION updated consistently to 0.7.0.

The environment variable has been correctly updated to align with the PR objective to remove 0.6.7 compatibility.


43-43: No issues found with npm start command format and test runner script.

The command npm start -w @typeberry/test-runner -- w3f-070.ts correctly invokes the test runner:

  • The w3f-070.ts script exists at bin/test-runner/w3f-070.ts and properly imports from common.js and w3f/runners.js
  • The npm start script (defined as tsx --test-timeout=900000 ./index.ts in bin/test-runner/package.json) accepts the test suite filename as an argument via process.argv[2]
  • The output file will be generated at ./dist/w3f-070.txt as expected (index.ts removes the .ts extension and writes to the dist directory)

@tomusdrw tomusdrw enabled auto-merge December 3, 2025 09:51
@tomusdrw tomusdrw added this pull request to the merge queue Dec 3, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Dec 3, 2025
@DrEverr DrEverr added this pull request to the merge queue Dec 3, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Dec 3, 2025
@DrEverr DrEverr enabled auto-merge December 3, 2025 12:43
@DrEverr DrEverr added this pull request to the merge queue Dec 3, 2025
@github-actions
Copy link

github-actions bot commented Dec 3, 2025

View all
File Benchmark Ops
bytes/hex-from.ts[0] parse hex using Number with NaN checking 137539.73 ±0.07% 84.87% slower
bytes/hex-from.ts[1] parse hex from char codes 908928.36 ±0.16% fastest ✅
bytes/hex-from.ts[2] parse hex from string nibbles 565182.61 ±0.19% 37.82% slower
math/add_one_overflow.ts[0] add and take modulus 248902995.04 ±7.66% fastest ✅
math/add_one_overflow.ts[1] condition before calculation 243278660.83 ±7.16% 2.26% slower
logger/index.ts[0] console.log with string concat 8482120.26 ±52.42% fastest ✅
logger/index.ts[1] console.log with args 782382.87 ±109.22% 90.78% slower
hash/index.ts[0] hash with numeric representation 192.57 ±0.21% 27.22% slower
hash/index.ts[1] hash with string representation 110.33 ±0.2% 58.3% slower
hash/index.ts[2] hash with symbol representation 184.07 ±0.23% 30.43% slower
hash/index.ts[3] hash with uint8 representation 165.35 ±0.13% 37.51% slower
hash/index.ts[4] hash with packed representation 264.59 ±0.24% fastest ✅
hash/index.ts[5] hash with bigint representation 193.7 ±0.12% 26.79% slower
hash/index.ts[6] hash with uint32 representation 203.48 ±0.22% 23.1% slower
collections/map-set.ts[0] 2 gets + conditional set 121410.92 ±0.19% fastest ✅
collections/map-set.ts[1] 1 get 1 set 61713.86 ±0.01% 49.17% slower
codec/bigint.compare.ts[0] compare custom 253411612.79 ±6.81% fastest ✅
codec/bigint.compare.ts[1] compare bigint 241069923.72 ±8.2% 4.87% slower
bytes/hex-to.ts[0] number toString + padding 277579.48 ±0.14% fastest ✅
bytes/hex-to.ts[1] manual 14896.12 ±0.24% 94.63% slower
codec/bigint.decode.ts[0] decode custom 165224078.52 ±3.83% fastest ✅
codec/bigint.decode.ts[1] decode bigint 83693999.69 ±2.57% 49.35% slower
math/count-bits-u32.ts[0] standard method 126583890.53 ±3.58% 45.67% slower
math/count-bits-u32.ts[1] magic 233010534.24 ±6.77% fastest ✅
codec/decoding.ts[0] manual decode 17341219.91 ±0.54% 88.89% slower
codec/decoding.ts[1] int32array decode 156080506.91 ±4.37% fastest ✅
codec/decoding.ts[2] dataview decode 151221607.27 ±3.97% 3.11% slower
codec/encoding.ts[0] manual encode 2656032.17 ±0.2% 18% slower
codec/encoding.ts[1] int32array encode 3239092.23 ±0.35% fastest ✅
codec/encoding.ts[2] dataview encode 3231907.67 ±0.28% 0.22% slower
math/count-bits-u64.ts[0] standard method 4177481.62 ±0.25% 95.02% slower
math/count-bits-u64.ts[1] magic 83811006.25 ±2.05% fastest ✅
math/mul_overflow.ts[0] multiply and bring back to u32 251274934.37 ±7.3% fastest ✅
math/mul_overflow.ts[1] multiply and take modulus 245253111.69 ±6.54% 2.4% slower
math/switch.ts[0] switch 244808387.57 ±7.21% 2.39% slower
math/switch.ts[1] if 250794761.97 ±6.36% fastest ✅
codec/view_vs_object.ts[0] Get the first field from Decoded 516665.24 ±0.28% 0.82% slower
codec/view_vs_object.ts[1] Get the first field from View 57169.22 ±88.97% 89.03% slower
codec/view_vs_object.ts[2] Get the first field as view from View 105807.68 ±0.2% 79.69% slower
codec/view_vs_object.ts[3] Get two fields from Decoded 515761.78 ±0.28% 1% slower
codec/view_vs_object.ts[4] Get two fields from View 84588.76 ±0.22% 83.76% slower
codec/view_vs_object.ts[5] Get two fields from materialized from View 177075.75 ±0.25% 66.01% slower
codec/view_vs_object.ts[6] Get two fields as views from View 84394.11 ±0.22% 83.8% slower
codec/view_vs_object.ts[7] Get only third field from Decoded 520962.53 ±0.28% fastest ✅
codec/view_vs_object.ts[8] Get only third field from View 104713.68 ±0.21% 79.9% slower
codec/view_vs_object.ts[9] Get only third field as view from View 104897.65 ±0.21% 79.86% slower
codec/view_vs_collection.ts[0] Get first element from Decoded 32300.72 ±0.19% 54.51% slower
codec/view_vs_collection.ts[1] Get first element from View 71013.81 ±0.22% fastest ✅
codec/view_vs_collection.ts[2] Get 50th element from Decoded 32430.6 ±0.12% 54.33% slower
codec/view_vs_collection.ts[3] Get 50th element from View 36641.44 ±0.1% 48.4% slower
codec/view_vs_collection.ts[4] Get last element from Decoded 32379.81 ±0.22% 54.4% slower
codec/view_vs_collection.ts[5] Get last element from View 24969.52 ±0.25% 64.84% slower
collections/hash-dict-vs-blob-dict_delete.ts[0] StringHashDictionary 4851 ±0.31% 1.4% slower
collections/hash-dict-vs-blob-dict_delete.ts[1] BlobDictionary(1) 4917.11 ±0.22% 0.06% slower
collections/hash-dict-vs-blob-dict_delete.ts[2] BlobDictionary(2) 4920.12 ±0.2% fastest ✅
collections/hash-dict-vs-blob-dict_delete.ts[3] BlobDictionary(3) 4882.82 ±0.33% 0.76% slower
collections/hash-dict-vs-blob-dict_delete.ts[4] BlobDictionary(4) 4837.06 ±0.44% 1.69% slower
collections/hash-dict-vs-blob-dict_delete.ts[5] BlobDictionary(5) 4870.8 ±0.24% 1% slower
collections/hash-dict-vs-blob-dict_get.ts[0] StringHashDictionary 3851.57 ±0.26% 0.22% slower
collections/hash-dict-vs-blob-dict_get.ts[1] BlobDictionary(1) 3859.93 ±0.23% fastest ✅
collections/hash-dict-vs-blob-dict_get.ts[2] BlobDictionary(2) 3859.12 ±0.23% 0.02% slower
collections/hash-dict-vs-blob-dict_get.ts[3] BlobDictionary(3) 3817.15 ±0.21% 1.11% slower
collections/hash-dict-vs-blob-dict_get.ts[4] BlobDictionary(4) 3843.93 ±0.24% 0.41% slower
collections/hash-dict-vs-blob-dict_get.ts[5] BlobDictionary(5) 3857.38 ±0.25% 0.07% slower
collections/hash-dict-vs-blob-dict_set.ts[0] StringHashDictionary 3757.97 ±0.16% fastest ✅
collections/hash-dict-vs-blob-dict_set.ts[1] BlobDictionary(1) 3729.99 ±0.15% 0.74% slower
collections/hash-dict-vs-blob-dict_set.ts[2] BlobDictionary(2) 3721.83 ±0.24% 0.96% slower
collections/hash-dict-vs-blob-dict_set.ts[3] BlobDictionary(3) 3719.36 ±0.25% 1.03% slower
collections/hash-dict-vs-blob-dict_set.ts[4] BlobDictionary(4) 3712.42 ±0.21% 1.21% slower
collections/hash-dict-vs-blob-dict_set.ts[5] BlobDictionary(5) 3702.81 ±0.18% 1.47% slower
collections/map_vs_sorted.ts[0] Map 257422.34 ±0.72% fastest ✅
collections/map_vs_sorted.ts[1] Map-array 103623.84 ±0.03% 59.75% slower
collections/map_vs_sorted.ts[2] Array 68247.33 ±2.29% 73.49% slower
collections/map_vs_sorted.ts[3] SortedArray 176587.82 ±0.14% 31.4% slower
bytes/compare.ts[0] Comparing Uint32 bytes 21144.28 ±0.41% 4.82% slower
bytes/compare.ts[1] Comparing raw bytes 22214.76 ±0.34% fastest ✅
bytes/bytes-to-number.ts[0] Conversion with bitops 8443.91 ±4.28% 4.11% slower
bytes/bytes-to-number.ts[1] Conversion without bitops 8806.01 ±4.14% fastest ✅
hash/blake2b.ts[0] our hasher 2.23 ±0.3% fastest ✅
hash/blake2b.ts[1] blake2b js 0.05 ±0.57% 97.76% slower
crypto/ed25519.ts[0] native crypto 6.35 ±13.58% 79.28% slower
crypto/ed25519.ts[1] wasm lib 10.89 ±0.03% 64.47% slower
crypto/ed25519.ts[2] wasm lib batch 30.65 ±0.45% fastest ✅

Benchmarks summary: 83/83 OK ✅

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Dec 3, 2025
@tomusdrw tomusdrw added this pull request to the merge queue Dec 3, 2025
Merged via the queue into main with commit 8992448 Dec 3, 2025
14 of 15 checks passed
@tomusdrw tomusdrw deleted the maso-delete-067 branch December 3, 2025 15:04
@tomusdrw tomusdrw mentioned this pull request Dec 3, 2025
2 tasks
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