SShortSingh.
Back to feed

Midnight Wallet SDK Has Five Bugs That Break Fresh Installs — Here Are the Patches

0
·1 views

Developers using the Midnight blockchain wallet SDK encounter recurring crashes after a fresh npm install, caused by bugs across five packages in versions including wallet-sdk-shielded 3.0.2 and facade 4.1.0. The root cause is that the SDK's custom ledger types return plain iterators lacking helper methods like .map() and .filter(), which are available on native JavaScript Map and Set objects but were never implemented in the SDK's custom types. This means errors such as 'TypeError: state.pendingOutputs.values.map is not a function' appear consistently regardless of the Node.js version being used. The fix involves converting plain iterators into arrays before chaining methods, applied via sed commands or Node scripts to the affected compiled files in node_modules. Because npm install overwrites these files, the patches must be manually re-applied each time dependencies are installed until an official SDK update is released.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developer Debugs E-Commerce Site Bug That AI Repeatedly Failed to Solve

A developer building a custom handcrafted-goods e-commerce platform encountered persistent styling and layout issues after routing the site through Cloudflare. The site appeared fully functional in local development but broke when accessed via a Cloudflare tunnel, with featured product cards and CSS styles failing to load correctly. AI tools initially pointed to Cloudflare's caching behavior — which was overriding the server's Cache-Control headers and serving stale assets for up to four hours — but clearing caches and following AI suggestions did not resolve the problem. Further investigation revealed Cloudflare was also modifying HTML through its Email Obfuscation feature, complicating diagnosis. Despite multiple AI-assisted attempts, the root cause required hands-on manual debugging rather than AI-generated fixes.

0
ProgrammingDEV Community ·

Developer Uses Sentry to Diagnose and Fix 4-Second Page Load on Personal Site

A developer connected their personal website to Sentry's performance monitoring tool and discovered a 4,229ms page load time, with the server taking over two seconds just to begin sending a response. The primary bottleneck was a backend call to the DEV.to articles API, which averaged 361ms but spiked to 1.37 seconds at the 95th percentile. Using Sentry's AI assistant Seer, the developer identified that fetching and caching the DEV.to API response server-side, rather than on every client request, would remove the call from the critical page load path. An nginx caching strategy using proxy_cache_background_update was implemented, ensuring returning visitors receive a cached response while the cache refreshes silently in the background. Performance data from the following week showed approximately a 60% improvement in median load time, dropping from 3.3 seconds on August 4 to 1.3 seconds on August 5.

0
ProgrammingDEV Community ·

Developer Builds 15 Logic Gates from Scratch Using Only NAND in Nand2Tetris

A developer has shared progress on the Nand2Tetris course, successfully implementing 15 logic gates — including NOT, AND, OR, XOR, MUX, and DMUX variants — using only NAND gates and Hardware Description Language (HDL). The approach involved deriving boolean expressions from truth tables using Sum of Products, then simplifying them via De Morgan's law and double negation to express everything in terms of NAND. A key insight was that NAND(a, a) is equivalent to NOT(a), which made building subsequent gates feel intuitive and sequential. More complex gates like MUX4WAY16 and DMUX4WAY proved challenging due to unfamiliarity, but were completed by composing already-built simpler gates. The developer now plans to tackle the next chapter, which covers arithmetic components including a Half Adder, Full Adder, and ALU.

0
ProgrammingDEV Community ·

Developer Ports Python Library to Rust: 1,059 Tests Pass but Unicode Bug Lurks

A developer participating in a hackathon ported Scrapinghub's price-parser Python library to Rust, successfully passing all 1,059 unmodified tests from the original test suite. Despite the clean test results, the port contained a subtle bug: Python's Decimal type accepts any Unicode decimal digit, while Rust's equivalent only handles ASCII, causing prices written in Arabic-Indic, Devanagari, or Bengali numerals to silently return no value. The flaw was not caught by the existing test suite because the upstream corpus was drawn entirely from Western storefronts, meaning non-ASCII digit inputs were never tested. The bug was ultimately discovered by running 500,000 randomly generated price strings through both implementations simultaneously and comparing outputs. The case highlights a fundamental limitation of test suites: they can only cover inputs that someone has already thought to include.