With preview 10 we plan to move from per-contract+per-address autoincrement nonces for Soroban auth payloads to temp storage random nonces + signature expiration. This means that nonce no longer is attached to any contract. Our ContractData entries are always attributed to a contract though. So I see two options:
- use
ScAddressinstead ofHash contractIdinContractDataentries. this way we can store nonces for every valid address, including classic accounts. the downside is +4 bytes/contract data entry. the upside is that we provide an extension point if we ever want to provide some Soroban functionality for classic accounts (a simple example would be adding subscription support) - come up with a new entry just for nonces
- use
ContractDataentry with some special hash (e.g. 0xff for all values) and address in theScValpayload. the downside is +32 unnecessary bytes/nonce entry.
I would prefer the first option, but wanted to check if there are other options I'm missing or some concerns
cc @open wigeon @unkempt heron