fix(unspents): pin varuint-bitcoin as explicit direct dependency - #9453
Merged
davidkaplanbitgo merged 1 commit intoAug 26, 2026
Merged
Conversation
Contributor
ralph-bitgo
Bot
force-pushed
the
WCN-2005-varuint-bitcoin-explicit-dependency
branch
from
August 7, 2026 20:06
01adf83 to
8979d28
Compare
bitgo-ai-agent-dev
Bot
force-pushed
the
WCN-2005-varuint-bitcoin-explicit-dependency
branch
from
August 7, 2026 20:06
8979d28 to
3c3dda7
Compare
src/inputWeights.ts directly imports varuint-bitcoin for encodingLength used in all fee/vsize calculations, but it was previously declared with a caret range (^1.0.4) that could resolve unexpected 1.x releases. Tighten the declared range to ~1.1.2 (patch-level tilde) so the version this package executes is controlled by its own range — not by whatever @bitgo/utxo-lib's transitive copy happens to resolve to. This also eliminates the phantom-dependency risk under strict linkers (pnpm default, Yarn PnP) where hoisting is not guaranteed. Ticket: WCN-2005 Session-Id: 246d0476-a850-4ced-ba5e-27978aa7cc08 Task-Id: 11c93817-9a0a-4fbb-b685-5cf43507b89a
davidkaplanbitgo
force-pushed
the
WCN-2005-varuint-bitcoin-explicit-dependency
branch
from
August 26, 2026 00:06
3c3dda7 to
f4263a8
Compare
davidkaplanbitgo
marked this pull request as ready for review
August 26, 2026 00:06
davidkaplanbitgo
approved these changes
Aug 26, 2026
pranishnepal
approved these changes
Aug 26, 2026
lokesh-bitgo
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
varuint-bitcoinversion range inmodules/unspents/package.jsonfrom^1.0.4to~1.1.2yarn.lockstanza key to replace the^1.0.4alias with~1.1.2Why
src/inputWeights.tsdirectly importsvaruint-bitcoinforencodingLength(), which is used in every fee/vsize calculation in the package — but previously the resolved version and pinning were effectively owned by@bitgo/utxo-lib's transitive dependency range, not by@bitgo/unspentsitselfMODULE_NOT_FOUND— an availability loss for any consumer using a strict package manager~1.1.2ensures@bitgo/unspentscontrols which patch-level version of this consensus-serialization function it executes, independent of future changes to@bitgo/utxo-lib's dependency tree1.1.2(already locked); this change only makes the ownership explicit and defensiveTest plan
yarn workspace @bitgo/unspents unit-testpassesyarn install --frozen-lockfilesucceeds (lock file stanza updated to include~1.1.2key)Ticket: WCN-2005