Skip to content

Conversation

@tonesnotes
Copy link
Collaborator

@tonesnotes tonesnotes commented Jan 26, 2026

Description of Changes

  • Updates to Transaction, MerklePath, Beef, BeefTx to support Uint8Array serialization.

  • Added ReaderUint8Array to Utils

  • Added WriterUint8Array to Utils

Usual process: lint, docs, version, tests, CHANGELOG

These are non-breaking changes that should be merged prior to the 2.0 branch.
Once merged, the existing BeefUint8Array branch and PR will be updated with just the breaking changes for the 2.0 release.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
12.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

❌ Patch coverage is 88.74346% with 43 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/transaction/Beef.ts 66.07% 19 Missing ⚠️
src/transaction/Transaction.ts 70.45% 13 Missing ⚠️
src/primitives/ReaderUint8Array.ts 96.72% 4 Missing ⚠️
src/primitives/WriterUint8Array.ts 96.46% 4 Missing ⚠️
src/transaction/BeefTx.ts 88.46% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@tonesnotes tonesnotes requested a review from ty-everett January 26, 2026 19:08
@github-actions
Copy link

🏁 Benchmark Comparison (Node 22)

Comparing this PR (5e22916) against master (fe07829).

⚠️ 2 regressions detected (>5% slower).

Regressions

  • ⚠️ Atomic BEEF – Transaction.toAtomicBEEF is 15.94% slower (1.60 ms vs 1.38 ms).
  • ⚠️ Atomic BEEF – Transaction.fromAtomicBEEF is 6.62% slower (4.67 ms vs 4.38 ms).
Benchmark Metric PR Branch Master Δ Change
BigNumber Arithmetic mul large numbers 8.78 ms 8.77 ms +0.01 ms +0.11%
BigNumber Arithmetic add large numbers 1.84 ms 1.85 ms -0.01 ms -0.54%
BigNumber Serialization toSm big 2.66 ms 2.69 ms -0.03 ms -1.12%
BigNumber Serialization toSm little 2.72 ms 2.74 ms -0.02 ms -0.73%
BigNumber Serialization fromSm big 3.20 ms 3.16 ms +0.04 ms +1.27%
BigNumber Serialization fromSm little 3.32 ms 3.31 ms +0.01 ms +0.30%
BigNumber Serialization fromScriptNum 3.33 ms 3.26 ms +0.07 ms +2.15%
Script Serialization Big script round trip 3.32 ms 3.32 ms +0.00 ms 0.00%
Transaction Verification deep chain verify 633.89 ms 630.28 ms +3.61 ms +0.57%
Transaction Verification wide transaction verify 647.77 ms 651.35 ms -3.58 ms -0.55%
Transaction Verification large tx verify 322.66 ms 319.47 ms +3.19 ms +1.00%
Transaction Verification nested inputs verify 179.04 ms 178.31 ms +0.73 ms +0.41%
Symmetric Key encrypt large 2MB 1884.29 ms 1911.83 ms -27.54 ms -1.44%
Symmetric Key decrypt large 2MB 1826.61 ms 1878.70 ms -52.09 ms -2.77%
Symmetric Key encrypt 50 small 8.16 ms 8.25 ms -0.09 ms -1.09%
Symmetric Key decrypt 50 small 7.76 ms 7.82 ms -0.06 ms -0.77%
Symmetric Key encrypt 200 medium 196.70 ms 201.53 ms -4.83 ms -2.40%
Symmetric Key decrypt 200 medium 192.34 ms 196.89 ms -4.55 ms -2.31%
Reader & Writer mixed ops 0.25 ms 0.25 ms +0.00 ms 0.00%
Reader & Writer large payloads 41.82 ms 42.56 ms -0.74 ms -1.74%
Reader & Writer 3000 small payloads 1.81 ms 1.83 ms -0.02 ms -1.09%
Reader & Writer 400 medium payloads 22.90 ms 23.03 ms -0.13 ms -0.56%
Atomic BEEF Transaction.toAtomicBEEF 1.60 ms 1.38 ms +0.22 ms +15.94%
Atomic BEEF Transaction.fromAtomicBEEF 4.67 ms 4.38 ms +0.29 ms +6.62%

@ty-everett ty-everett merged commit 92ccb0b into master Jan 26, 2026
10 of 11 checks passed
@ty-everett ty-everett deleted the nonBreakUint8 branch January 26, 2026 19:12
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