# Anchor workspace for the draft Science Markets programs. # # Draft only. Nothing here is deployed, and no keypair, RPC secret, or funded # account belongs in this tree. [workspace] members = ["[internal location withheld]", "[internal location withheld]"] resolver = "2" # Checked arithmetic in the deployed artifact, not only in debug builds. The # instructions also use checked_* explicitly; this is the belt to that braces. [profile.release] overflow-checks = true lto = "fat" codegen-units = 1 [profile.release.build-override] opt-level = 3 incremental = false codegen-units = 1 # Do not lower `opt-level`, raise `codegen-units`, or otherwise tune this profile # to shrink the artifact without running the full on-chain lifecycle. # # `create_reserve` already sits at 4104 bytes of stack against the BPF limit of # 4096. At `opt-level = "s"` with `codegen-units = 16` the build reports # "Finished" and produces a 599 KB .so that deploys, passes `create_market`, and # then fails `create_reserve` on chain with error 6012 (WrongMint). That error # is raised by `reserve_bump` when a derived PDA does not match the passed # account, so it reads like a seed bug and is not one. The smaller artifact is # a miscompile. # # `build-sbf` prints the stack overflow as an Error but exits successfully, and # `solana program deploy` will happily deploy the stale or broken .so. Check the # build log for "exceeded max offset", not just the exit code.