02Sheet 02.03.022 · Entries
A muxed ScAddress as a contract-data key traps
CAP-0067: a muxed ScAddress may not appear in a contract-data key.
FIG. · Where it sits · inside LedgerCloseMetaCAP-0067 · CAP-0046 · H-A11 · H-C6
muxed ScAddress inside a contract-data key: trapped
Soroban failure: trapped
The shape
CAP-0067: a muxed ScAddress may not appear in a contract-data key. The address is valid in the arguments and even in the footprint's LedgerKey, but the put traps.
Variants
| Variant | Protocol | Network | Source | Size | sha256 |
|---|---|---|---|---|---|
p30-mainnet-generated | P30 | mainnet passphrase | generated by stellar-core v30.0.0 | 2,376 B | d9ed4d3aad1f… |
p28-mainnet-generated | P28 | mainnet passphrase | generated by stellar-core v30.0.0 | 2,368 B | 348b1dab127c… |
p30-testnet-generated | P30 | testnet passphrase | generated by stellar-core v30.0.0 | 2,376 B | 42b8c11c5c41… |
p28-testnet-generated | P28 | testnet passphrase | generated by stellar-core v30.0.0 | 2,368 B | f1a9be02db27… |
p30-mainnet-generated-galexie | P30 | mainnet passphrase | generated by stellar-core v30.0.0 change order varies: 2 orderings in 2 runs | 4,820 B | 1dc6b9099964… |
What a correct reader returns
| A correct reader finds | Value | Backed by |
|---|---|---|
| The call fails: the host traps. | trapped | constructionsnapshotcorewalker |
| The footprint's read-write key holds the muxed address M(bob, 42). | MCDNGZ7NJFNBWBP7DXYQKJRBG2VAIR5DCCCLUDBZW5B3VGUFKDG5AAAAAAAAAAAAFITJA | constructionsnapshotcorewalker |
| With diagnostic events the host says why: storage error invalid_input, "muxed addresses should not be used in the storage keys". p30-mainnet-generated-galexie | some change where 2 fields match | snapshotcorewalker |
Check it yourself
make verify # schema, hashes, the byte-for-byte round trip and every fact above
make oracle # the facts' values, re-read by stellar-core and the schema walkerEntry id scval.muxed-address-key-trapped · compiled from catalog/scval.muxed-address-key-trapped.json · entry.json
A Soroban transaction with 20 signatures and a 32-byte symbol
signatures<20> full (carol needs all 20 signers at thresholds 20) and SCSymbol<32> at 32 bytes as storage key, event topic and argument.
Integer boundaries where reading the low 64 bits as signed goes wrong
i128 2^63, -2^63 and -1, u128 2^64, i256 -2^63, u256 2^127, u32 max, i32 min, timepoint 2^63: values whose low half has its top bit set.