SAC trustline with no event
A contract call creates a classic trustline: no CHANGE_TRUST operation, no event, only a created ledger entry. Indexers that wait for either miss it.
The shape
Since CAP-0073 a contract call (the Stellar Asset Contract's trust function) can create a classic trustline. The trustline appears only as a created ledger entry in the operation's changes: there is no CHANGE_TRUST operation and no operation event. Readers that learn about trustlines from operation types or events drop it. wallet-backend recorded the balance but no TRUSTLINE/ADD state change (#731).
Variants
The variants are generated by a standalone stellar-core v30.0.0 at protocols 30 and 28. On most of them the order of the operation's changes is not stable between core processes, so those pin an order-normalised hash and list every raw ordering seen.
| Variant | Protocol | Network | Source | Size | sha256 |
|---|---|---|---|---|---|
p30-mainnet-generated | P30 | mainnet passphrase | generated by stellar-core v30.0.0 change order varies: 2 orderings in 20 runs | 2,924 B | a08d8c7b8db5… |
p28-mainnet-generated | P28 | mainnet passphrase | generated by stellar-core v30.0.0 change order varies: 2 orderings in 2 runs | 2,916 B | 86051026e6f0… |
p30-testnet-generated | P30 | testnet passphrase | generated by stellar-core v30.0.0 | 2,924 B | 4bd94c7a2455… |
p28-testnet-generated | P28 | testnet passphrase | generated by stellar-core v30.0.0 change order varies: 2 orderings in 2 runs | 2,916 B | a37deedf9fde… |
What a correct reader returns
| A correct reader finds | Value | Backed by |
|---|---|---|
The transaction calls trust on the XPF Stellar Asset Contract for bob. | trust | constructionsnapshotcorewalker |
| The contract called is the SAC for XPF issued by the fixed issuer key; its ID depends on the network. p30-mainnet-generated | CDFHSHLQOMFLCUBG5K36JGP2QH24MM6X5DLCTPXHHUPYF6CSRPQDXZUG | constructionsnapshotcorewalker |
| The contract called is the SAC for XPF issued by the fixed issuer key; its ID depends on the network. p28-mainnet-generated | CDFHSHLQOMFLCUBG5K36JGP2QH24MM6X5DLCTPXHHUPYF6CSRPQDXZUG | constructionsnapshotcorewalker |
| The contract called is the SAC for XPF issued by the fixed issuer key; its ID depends on the network. p30-testnet-generated | CBRDUZVZSMQJDBGSVV64VHIFDCUZFPPXE3BLTZK2NDEPACGV72MIYNFE | constructionsnapshotcorewalker |
| The contract called is the SAC for XPF issued by the fixed issuer key; its ID depends on the network. p28-testnet-generated | CBRDUZVZSMQJDBGSVV64VHIFDCUZFPPXE3BLTZK2NDEPACGV72MIYNFE | constructionsnapshotcorewalker |
| Some change (in any order) creates bob's XPF trustline: balance 0, limit i64::MAX, authorized. | some change where 6 fields match | constructionsnapshotcorewalker |
| The operation emits no event: an indexer that waits for an event or a CHANGE_TRUST operation never learns about this trustline. | length 0 | snapshot |
| The invocation succeeded. | cbbc48750debb8535093b3deaf88ac7f4cff87425576a58de2bac754acdb4616 | snapshotcorewalker |
The trustline is found by matching a change "in any order": an indexer must never depend on the order of changes within an operation.
What it reproduces
wallet-backend#731stellar-etl#460make replay feeds this entry's P28 variant to two wallet-backend builds through a mock stellar-rpc. Build 764a4f5b drops the trustline: no TRUSTLINE/ADD state change is recorded. Build c152783c, "record SAC-created trustline state changes" (#734, the fix for #731), records it. See Replay.
Check it yourself
make verify
make replaySAC trust() for a trustor who is not the transaction source creates a trustline
alice submits, carol is the trustor: carol authorizes with address credentials and a nonce.
SAC trust() on an existing trustline succeeds and changes nothing
Calling trust() again for bob, whose trustline exists, succeeds with no ledger change and no event: a reader must not create, duplicate or touch anything.