BNB $557.59 +3.51%
XRP $0.941615 +2.92%
ETH $1,719.85 +3.84%
BTC $61,368.96 +4.14%
BNB $557.59 +3.51%
XRP $0.941615 +2.92%
ETH $1,719.85 +3.84%
BTC $61,368.96 +4.14%
BREAKING
Altcoins News

Solana memory checks risk breaking older Anchor app transactions

Solana memory checks risk breaking older Anchor app transactions

Community Trust ScoreVerified

80%
Real
Verified10 votes
Updated 6 minutes ago

Anza has resumed general mainnet feature activations for Solana, a move that brings two pending updates, memory checks and account data direct mapping, closer to live deployment. While these changes aim to improve validator efficiency, they introduce strict execution rules that may cause older transactions built with the Anchor framework to fail.

As of 06:48 UTC, Solana traded at $71.81, +4.1% over 24 hours, with $2.0 billion in 24-hour volume.

Anza’s feature tracker, dated November 20, lists both memory checks and account data direct mapping as pending on Solana mainnet. No specific activation epoch or slot is currently assigned for either feature. The resumption of activations occurred on November 19, marking the return of new protocol features to the primary network after a pause.

Advertisement

Stricter Rules for Account Access

The introduction of memory checks alters how Solana programs interact with account data. Under the new rules, a read operation that runs past the end of an account will be rejected. Similarly, a write operation to an account that the program does not have permission to modify will also be blocked. These checks change the stack layout that older programs use to hold temporary data, creating a potential conflict with existing code patterns.

The most significant impact is expected on applications built with the Anchor framework. Older versions of Anchor code may attempt to save an account’s data after the program has handed control of that account to another program. In the affected scenario, one program calls another and transfers ownership of an account during the call. When the first program finishes its execution, the older Anchor code tries to write the account data back, even if the underlying bytes have not changed.

In the previous runtime environment, this write attempt was allowed to pass. Under Solana’s new memory rules, the attempt fails because the first program has already relinquished the right to write to that account. This failure can cause a specific transaction path to error out, even if the application’s other transactions continue to process successfully.

Fixes and Developer Verification

The Anchor framework has released version 1.2.2, which includes a fix for this issue. The update adds a comparison of data after ownership changes; if the bytes match, the write operation is skipped. For programs deployed through Solana’s upgradeable Loader V3, the party authorized to update the on-chain code must deploy the fixed build. This means that an app team relying on a third-party program must wait for that program’s operator to make the necessary update.

Anza engineer Alexander Meißner, who wrote the original runtime proposal, stated that the team replayed mainnet traffic to identify potential issues. Meißner reported that most developers whose apps would have failed in that exercise were contacted and had made fixes. However, he noted that combining the new rules and the copy change made it hard to distinguish intended changes in execution from mistakes.

The replay process checks the instruction paths that appeared in the sample traffic. A rarely used path can escape this verification if the transactions Anza replayed never took that route. Meißner’s memory rules proposal, dated January 30, explains that developers of the Agave and Firedancer validator clients split the original plan to allow earlier work to ship if a later part required more time. This separation allowed developers to test the new memory rules while the old copying path remained in place.

Efficiency Gains and Uncertainties

Account data direct mapping is designed to spare validators the work of repeatedly copying program data. In the old execution path, the validator copies account data into a program’s virtual machine and retrieves it when the program finishes. A call to another program adds another round trip in this process. Meißner’s proposal describes up to four copies for an instruction with a single cross-program call.

With direct mapping enabled, the virtual machine can access account bytes where they already reside, eliminating these redundant copies. Anza’s tracker lists the memory checks and the mapping switch one epoch apart on both testnet and devnet, allowing for staggered testing. The effect of these changes on users’ transaction times remains unclear.

Community Trust IndexModerate Confidence
80%
Real
Real80%20%Fake
10 community signals

Evie Vavasseur

Evie Vavasseur is a crypto writer and digital content specialist covering the latest developments in blockchain technology, decentralized finance, and the broader digital asset ecosystem. With a keen eye for emerging trends, Evie provides accessible and insightful coverage of cryptocurrency markets, NFTs, and Web3 innovations for The Currency Analytics.

Advertisement

Related Stories