02Sheet 02.03.024 · Entries
A SAC balance held by a contract above int64
The issuer mints 2^64 + 2^63 XPF to a contract.
FIG. · Where it sits · inside LedgerCloseMetaCAP-0046 · H-B4 · H-B3
SAC contract balance i128 above int64
token amount above int64 max
The shape
The issuer mints 2^64 + 2^63 XPF to a contract. Contract balances in a SAC are i128 with no int64 cap, unlike trustlines. Readers that store token balances as int64 overflow.
Variants
| Variant | Protocol | Network | Source | Size | sha256 |
|---|---|---|---|---|---|
p30-mainnet-generated | P30 | mainnet passphrase | generated by stellar-core v30.0.0 | 3,044 B | 6c7c4e4e092c… |
p28-mainnet-generated | P28 | mainnet passphrase | generated by stellar-core v30.0.0 | 3,036 B | f05a662d8bb8… |
p30-testnet-generated | P30 | testnet passphrase | generated by stellar-core v30.0.0 | 3,044 B | 42d3feb5cece… |
p28-testnet-generated | P28 | testnet passphrase | generated by stellar-core v30.0.0 | 3,036 B | d252407b9efa… |
What a correct reader returns
| A correct reader finds | Value | Backed by |
|---|---|---|
| The balance entry ["Balance", kit0] holds 27670116110564327424. p30-mainnet-generated | some change where 2 fields match | constructionsnapshotcorewalker |
| The balance entry ["Balance", kit0] holds 27670116110564327424. p28-mainnet-generated | some change where 2 fields match | constructionsnapshotcorewalker |
| The balance entry ["Balance", kit0] holds 27670116110564327424. p30-testnet-generated | some change where 2 fields match | constructionsnapshotcorewalker |
| The balance entry ["Balance", kit0] holds 27670116110564327424. p28-testnet-generated | some change where 2 fields match | constructionsnapshotcorewalker |
| The mint event carries the same amount. | some change where 2 fields match | constructionsnapshotcorewalker |
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 sac.contract-balance-above-int64 · compiled from catalog/sac.contract-balance-above-int64.json · entry.json
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.
SAC mint into a trustline the SAC created
The issuer mints XPF to bob through the SAC: the classic trustline balance changes and a mint event is emitted.