Browse

Reference

Directory

Company

Help & Legal

Follow

Subscribe

Quick Take

Solana’s planned memory checks could make some app transactions fail even when the rest of the app keeps working. Developers have already seen one example in replayed mainnet transactions. Older code built with the Anchor framework could try to save an account’s data after handing control of that account to another program.

Anza, which develops Solana’s Agave validator software, resumed general mainnet feature activations on November 19. Its November 20 feature tracker lists the memory checks and a separate change called account data direct mapping as pending, with no mainnet activation epoch or slot for either. Direct mapping is designed to spare validators the work of repeatedly copying program data.

How Solana changes account access

Anza’s November 20 tracker listed both switches as pending on Solana mainnet, with no activation slot for either.

The checks can reject a write to an account the program no longer owns, even while validators still use copied data.

The paths show conditional runtime behavior. Their lengths carry no timing or performance measurement.

Sources

Supporting facts

Method

Conceptual diagram from SIMD-0460, the original runtime proposal and Agave’s implementation split. The same check branches to a rejected access or to two possible routes for an allowed access.

Scope

Where an Anchor instruction can fail

The memory checks can reject a read that runs past the end of an account or a write to an account the program cannot modify. They also change the stack layout older programs use to hold temporary data. Code that relied on that layout can behave differently after the change. One documented failure involves how Solana programs hand accounts to one another within a transaction.

In the case described in an Anchor patch, one program calls another and transfers ownership of an account during the call. When the first program finishes, older Anchor code tries to write the account data back even when the bytes have stayed the same. The old runtime let that attempt pass. Under Solana’s new rules, the attempt fails because the first program has already given up the right to write to that account.

The patch author says programs that delegated accounts this way hit the error in production replay. A transaction that takes the affected path can fail while an app’s other transactions continue to go through.

The Anchor 1.2.2 changelog includes the fix. It compares the data after ownership changes and skips the write if the bytes match. Teams maintaining affected programs can rebuild and test with the updated framework. For a program deployed through Solana’s upgradeable Loader V3, the party authorized to update the on-chain code must deploy that build. An app team that relies on someone else’s program needs that program’s operator to make the update.

Anza engineer Alexander Meißner wrote in the original runtime proposal that the team replayed mainnet traffic. The proposal says most developers whose apps would have failed in that exercise were contacted and had made fixes. Replay checks the instruction paths that appeared in the sample. A rarely used path can escape that check if the transactions Anza replayed never took it.

Meißner’s January 30 memory rules proposal says developers of the Agave and Firedancer validator clients split the original plan so earlier work could ship even if a later part needed more time. In Agave’s implementation discussion, Meißner described a separate testing problem. Combining the new rules and the copy change made it hard to tell intended changes in execution from mistakes. Giving the two changes separate switches let developers test the new rules with the old copying path still in place.

Solana developers propose major overhaul to address hidden risk that could disrupt its network

When validators stop copying

In the old execution path, the validator copies account data into a program’s virtual machine and takes it back when the program finishes. A call to another program adds another round trip. 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 those account bytes where they already reside.

Anza’s tracker lists the memory checks and the mapping switch one epoch apart on both testnet and devnet. On mainnet, the date to watch for affected apps is the activation of the memory checks. Validators get the copy savings when the mapping switch goes live.

Solana doubles block production speed to 200ms as network prepares for Alpenglow upgrade

Mentioned in this article

Bullish recruits Wall Street heavyweights to solve tokenized stocks’ biggest trading problem

Cookie Consent

We use cookies to improve your experience on our site. By using our site, you consent to cookies.

Cookie Preferences

Manage your cookie preferences below:

Essential cookies enable basic functions and are necessary for the proper function of the website.

CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.

Service URL: developers.cloudflare.com (opens in a new window)

Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.

Service URL: policies.google.com (opens in a new window)

Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.

Clarity is a web analytics service that tracks and reports website traffic.

Service URL: clarity.microsoft.com (opens in a new window)

You can find more information in our Privacy Policy and .

Loading image…

This image could not be loaded.

The Catalyst