Solana's pending memory checks could fail some transactions from older Anchor code
In brief
- Anza's November 20 tracker lists Solana's memory checks and direct mapping as pending, with no activation slot.
- Older Anchor code writes account data back after an ownership handoff, which the new rules reject.
- Delegating programs hit the error in production replay, an Anchor patch author said.
- Anchor 1.2.2 includes a fix, but program upgrade authorities must deploy it themselves.
What the new checks reject
Anza, which develops Solana's Agave validator software, resumed general mainnet feature activations on November 19. Two changes are still waiting. The memory checks and a separate switch called account data direct mapping both sat in the pending column of Anza's November 20 tracker, according to CryptoSlate.
The checks can reject a read that runs past the end of an account, or a write to an account the program can't modify. They also change the stack layout older programs use for temporary data (code that relied on that layout can behave differently).
The Anchor handoff problem
The trouble sits in a pattern described in an Anchor patch. One program calls another and transfers ownership of an account during the call. When the first program finished, older Anchor code tried to write the account data back even if the bytes hadn't changed, and the old runtime allowed it.
Under Solana's new rules, that write fails because the first program has already given up the right to write to the account.
The patch author said programs that delegated accounts this way hit the error in production replay. A transaction taking that path could fail while the app's other transactions keep going through.
The Anchor 1.2.2 changelog includes a fix that compares the data after ownership changes and skips the write if the bytes match. It isn't automatic, though. For programs deployed through Solana's upgradeable Loader V3, whoever's authorized to update the on-chain code has to deploy the fixed build, and an app team relying on someone else's program needs that program's operator to do it.
Why replay didn't catch everything
Anza engineer Alexander Meißner wrote in SIMD-0460, the original runtime proposal, that the team replayed mainnet traffic and that most developers whose apps would have failed were contacted and had made fixes. Replay only checks the instruction paths that showed up in the sample. A rarely used path can slip through.
Meißner's January 30 memory rules proposal said Agave and Firedancer client developers split the original plan so earlier work could ship even if a later part needed more time. Bundling the rules with the copy change made it hard to tell intended execution changes from mistakes, he wrote, so separate switches let developers test the new rules with the old copying path still in place.
That copying is what direct mapping targets. In the old path, the validator copies account data into a program's virtual machine and takes it back when the program finishes, with cross-program calls adding another round trip. Meißner's proposal described up to four copies for an instruction with a single cross-program call.
Frequently asked questions
Why could older Anchor programs fail under Solana's new memory checks?
In the case an Anchor patch described, one program hands account ownership to another during a call. Older Anchor code then tried to write the account data back even when the bytes hadn't changed. Under the new rules, that write fails because the first program no longer has the right to write to the account.
How do developers fix the Anchor account handoff issue?
The Anchor 1.2.2 changelog includes a fix that compares the data after ownership changes and skips the write if the bytes match. For programs on Solana's upgradeable Loader V3, the party authorized to update the on-chain code has to deploy the fixed build.
When will Solana's memory checks activate on mainnet?
No date has been set. Anza's November 20 feature tracker listed the memory checks and account data direct mapping as pending, with no mainnet activation epoch or slot for either.
What is Solana's account data direct mapping change?
Direct mapping was designed to spare validators the work of repeatedly copying program data. In the old path, the validator copies account data into a program's virtual machine and takes it back afterward. Meißner's proposal described up to four copies for an instruction with a single cross-program call.


