Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.arcium.com/llms.txt

Use this file to discover all available pages before exploring further.

Output sizes

Outputs of confidential instructions must fit in a single Solana transaction, because results are delivered through the callback transaction. This limits callback output to approximately 1232 bytes. If a computation exceeds the limit, it fails with OutputTooLarge. Return compact results, pack small values with Pack<T>, or split large work into multiple computations.

Arcis language constraints

Arcis compiles Rust-like code into fixed MPC circuits. The circuit shape must be known at compile time, so several standard Rust patterns need different implementations:
PatternStatusUse instead
Vec, String, HashMapNot supportedFixed-size arrays, byte arrays, or structs
while, loopNot supportedfor loops with fixed bounds
break, continue, early returnNot supportedA single exit path with conditional assignments
let ... elseNot supportedif let or match
EnumsNot supported yetStructs, tagged integer fields, or explicit branches
.reveal() or .from_arcis() inside non-constant conditionalsNot supportedMove the reveal or conversion outside the branch
Arcis supports if, else, else if, if let, let chains, match, matches!, fixed-size arrays, structs, tuples, and fixed-bound loops. See the Operations guide for the complete support matrix.

Common errors

Error or symptomLikely causeFix
OutputTooLargeCallback output exceeds the Solana transaction size limitReturn less data, pack values, or split the computation
Computation never finalizesComputation definition was not initialized, callback is missing, or cluster configuration is wrongInitialize the computation definition, check callback registration, and verify the cluster offset
Decryption failsNonce mismatch, nonce reuse, wrong MXE key, or incorrect ciphertext orderUse a fresh 16-byte nonce per encryption and match the circuit argument order exactly
Shared input fails silentlyMissing x25519_pubkey before the nonce and ciphertextFor Enc<Shared, T>, pass public key, nonce, then ciphertexts
Callback runs but state is unchangedCallback account was not writable or was omitted from callback accountsMark the account writable in both the callback account list and the Anchor account struct
Circuit compile failureUnsupported Rust construct or variable-size dataReplace dynamic constructs with fixed-size Arcis patterns

What’s next?

Best practices

Performance tips and common patterns

Operations guide

Complete operation support matrix

Types reference

Supported and unsupported types

Deployment

Deploy your MXE to the network