SBPF UnsupportedInstruction Error in Account Data Test
Problem
The test_account_data test fails with exit code 0xf00000000 which corresponds to SBPF UnsupportedInstruction error. This occurs even though all CPI (Cross-Program Invocation) and AccountInfo synchronization functionality is working correctly.
Current Status
✅ SOLVED: Post-CPI data access functionality is fully working
❌ REMAINING: SBPF version compatibility issue
Evidence of Working CPI Implementation
The logs show all core functionality works perfectly:
sol_invoke_signed_rust: CPI succeeded
Account created successfully
✅ AccountInfo RefCell update complete: data=0x4000028c0, len=48
Real-time sync: Account Pubkey([...]) has 48 bytes of data after CPI
Error Details
- Exit Code:
0xf00000000
- Decoded: Discriminant 1 (error) + Error ordinal 15 (0xf) = UnsupportedInstruction
- Timing: Error occurs at the very end of program execution, after all CPI logic completes
- SBPF Version: VM detects programs as V0, but may contain newer instructions
Investigation Done
- ✅ Enabled SBPF V0-V3 in VM configuration
- ✅ Tested with solana-program 1.18 (older version)
- ✅ Tested with solana-program 2.2 (newer version)
- ✅ Verified CPI implementation is correct
- ❌ Still encountering UnsupportedInstruction error
Reproduction
RUST_LOG=debug cargo test test_account_data --lib
Expected Behavior
Test should pass with exit code 0 once SBPF compatibility issue is resolved.
Technical Context
- VM Configuration: Supports SBPF V0-V3 (
enabled_sbpf_versions: V0..=V3)
- Program Detection: ELF always detected as SBPF V0 regardless of solana-program version
- Error Location: vm/src/vm.rs handle_error function maps UnsupportedInstruction to 0x1010, but we're seeing 0xf00000000
Impact
- Core CPI functionality is working correctly
- Tests fail due to infrastructure/compatibility issue
- Does not affect the primary goal of post-CPI data access
Next Steps
- Investigate why programs compiled with different solana-program versions still trigger UnsupportedInstruction
- Determine if SBPF version detection/override logic needs refinement
- Potentially examine specific instruction bytes causing the unsupported instruction error
SBPF UnsupportedInstruction Error in Account Data Test
Problem
The
test_account_datatest fails with exit code0xf00000000which corresponds to SBPFUnsupportedInstructionerror. This occurs even though all CPI (Cross-Program Invocation) and AccountInfo synchronization functionality is working correctly.Current Status
✅ SOLVED: Post-CPI data access functionality is fully working
❌ REMAINING: SBPF version compatibility issue
Evidence of Working CPI Implementation
The logs show all core functionality works perfectly:
sol_invoke_signed_rust: CPI succeededAccount created successfully✅ AccountInfo RefCell update complete: data=0x4000028c0, len=48Real-time sync: Account Pubkey([...]) has 48 bytes of data after CPIError Details
0xf00000000Investigation Done
Reproduction
RUST_LOG=debug cargo test test_account_data --libExpected Behavior
Test should pass with exit code 0 once SBPF compatibility issue is resolved.
Technical Context
enabled_sbpf_versions: V0..=V3)Impact
Next Steps