exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 048f3710d0a73f21678819cef3eb23ab8fae5b3a
parent c17eabba94ec0aabc307c7bdb1b9953641f6946d
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue, 11 Aug 2026 13:35:20 +0200

update GANA

Diffstat:
Msrc/include/taler/taler_error_codes.h | 40++++++++++++++++++++++++++++++++++++++++
Msrc/include/taler/taler_signatures.h | 18++++++++++++++++++
Msrc/util/taler_error_codes.c | 42+++++++++++++++++++++++++++++++++++++++++-
3 files changed, 99 insertions(+), 1 deletion(-)

diff --git a/src/include/taler/taler_error_codes.h b/src/include/taler/taler_error_codes.h @@ -4747,6 +4747,22 @@ enum TALER_ErrorCode /** + * The provided new content is based on an outdated backup: the previous write was overwritten in the meantime. + * Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409). + * (A value of 0 indicates that the error is generated client-side). + */ + TALER_EC_SYNC_CONFLICTING_WRITE = 6115, + + + /** + * The backup does not form a consistent linked list (e.g. the previous block does not match the given hash). + * Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409). + * (A value of 0 indicates that the error is generated client-side). + */ + TALER_EC_SYNC_INCONSISTENT_BACKUP = 6116, + + + /** * The wallet does not implement a version of the exchange protocol that is compatible with the protocol version of the exchange. * Returned with an HTTP status code of #MHD_HTTP_NOT_IMPLEMENTED (501). * (A value of 0 indicates that the error is generated client-side). @@ -5267,6 +5283,30 @@ enum TALER_ErrorCode /** + * The exchange presents a master public key or currency that the user has not accepted yet. The operation was refused. + * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0). + * (A value of 0 indicates that the error is generated client-side). + */ + TALER_EC_WALLET_EXCHANGE_KEYS_NOT_ACCEPTED = 7066, + + + /** + * The wallet was asked to accept or reject a change of the exchange's keys, but the exchange does not present a new key set. + * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0). + * (A value of 0 indicates that the error is generated client-side). + */ + TALER_EC_WALLET_EXCHANGE_NO_KEY_CHANGE_PENDING = 7067, + + + /** + * The key set that was confirmed is not the one that the exchange currently presents. + * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0). + * (A value of 0 indicates that the error is generated client-side). + */ + TALER_EC_WALLET_EXCHANGE_KEY_CHANGE_MISMATCH = 7068, + + + /** * We encountered a timeout with our payment backend. * Returned with an HTTP status code of #MHD_HTTP_GATEWAY_TIMEOUT (504). * (A value of 0 indicates that the error is generated client-side). diff --git a/src/include/taler/taler_signatures.h b/src/include/taler/taler_signatures.h @@ -485,6 +485,24 @@ /** + * EdDSA signature for uploading or updating a block in a backup. + */ +#define TALER_SIGNATURE_SYNC_BLOCK_UPLOAD 1452 + + +/** + * EdDSA signature for deleting a block from a backup. + */ +#define TALER_SIGNATURE_SYNC_BLOCK_DELETE 1453 + + +/** + * EdDSA signature for uploading a blob to the hash-indexed object store. + */ +#define TALER_SIGNATURE_SYNC_OBJECT_UPLOAD 1454 + + +/** * Signature over messages to delete in the mailbox service */ #define TALER_SIGNATURE_MAILBOX_MESSAGES_DELETE 1551 diff --git a/src/util/taler_error_codes.c b/src/util/taler_error_codes.c @@ -4572,6 +4572,22 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = { }, { + /* 6115 */ + .ec = TALER_EC_SYNC_CONFLICTING_WRITE, + .hint = + "The provided new content is based on an outdated backup: the previous write was overwritten in the meantime.", + .http_code = MHD_HTTP_CONFLICT + }, + + { + /* 6116 */ + .ec = TALER_EC_SYNC_INCONSISTENT_BACKUP, + .hint = + "The backup does not form a consistent linked list (e.g. the previous block does not match the given hash).", + .http_code = MHD_HTTP_CONFLICT + }, + + { /* 7000 */ .ec = TALER_EC_WALLET_EXCHANGE_PROTOCOL_VERSION_INCOMPATIBLE, .hint = @@ -5069,6 +5085,30 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = { }, { + /* 7066 */ + .ec = TALER_EC_WALLET_EXCHANGE_KEYS_NOT_ACCEPTED, + .hint = + "The exchange presents a master public key or currency that the user has not accepted yet. The operation was refused.", + .http_code = MHD_HTTP_UNINITIALIZED + }, + + { + /* 7067 */ + .ec = TALER_EC_WALLET_EXCHANGE_NO_KEY_CHANGE_PENDING, + .hint = + "The wallet was asked to accept or reject a change of the exchange's keys, but the exchange does not present a new key set.", + .http_code = MHD_HTTP_UNINITIALIZED + }, + + { + /* 7068 */ + .ec = TALER_EC_WALLET_EXCHANGE_KEY_CHANGE_MISMATCH, + .hint = + "The key set that was confirmed is not the one that the exchange currently presents.", + .http_code = MHD_HTTP_UNINITIALIZED + }, + + { /* 8000 */ .ec = TALER_EC_ANASTASIS_GENERIC_BACKEND_TIMEOUT, .hint = "We encountered a timeout with our payment backend.", @@ -5962,7 +6002,7 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = { /** * The length of @e code_hint_pairs. */ -static const unsigned int code_hint_pairs_length = 769; +static const unsigned int code_hint_pairs_length = 774; const char *