Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch Soroban nonces from autoincrement to random values with signature expiration. #103

Merged
merged 2 commits into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Stellar-contract.x
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ typedef string SCString<>;
typedef string SCSymbol<SCSYMBOL_LIMIT>;

struct SCNonceKey {
SCAddress nonce_address;
int64 nonce;
};

union SCVal switch (SCValType type)
Expand Down
4 changes: 2 additions & 2 deletions Stellar-ledger-entries.x
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ enum ContractDataFlags {
};

struct ContractDataEntry {
Hash contractID;
SCAddress contract;
SCVal key;
ContractDataType type;

Expand Down Expand Up @@ -635,7 +635,7 @@ case LIQUIDITY_POOL:
case CONTRACT_DATA:
struct
{
Hash contractID;
SCAddress contract;
SCVal key;
ContractDataType type;
ContractLedgerEntryType leType;
Expand Down
6 changes: 4 additions & 2 deletions Stellar-transaction.x
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,8 @@ struct SorobanAuthorizedInvocation
struct SorobanAddressCredentials
{
SCAddress address;
uint64 nonce;
int64 nonce;
uint32 signatureExpirationLedger;
SCVec signatureArgs;
};

Expand Down Expand Up @@ -670,7 +671,8 @@ case ENVELOPE_TYPE_SOROBAN_AUTHORIZATION:
struct
{
Hash networkID;
uint64 nonce;
int64 nonce;
uint32 signatureExpirationLedger;
SorobanAuthorizedInvocation invocation;
} sorobanAuthorization;
};
Expand Down