exchange/src/testing
Christian Grothoff e7aeec04f4
The current recoup API is broken. I guess this is another example where "trivial" API changes turn out to have (multiple!) unexpected consequences.
The current "/recoup" API does not have clear idempotency semantics, as we've discussed on the phone.  This is already bad by itself, as it makes it hard to write down what the API does other than "whatever the implementation does".

However, it actually breaks correctness in this (admittedly kinda contrived, but not impossible) case:

Say that we have a coin A obtained via withdrawal and a coin B obtained via refreshing coin A. Now the denominations of A gets revoked..

The wallet does a recoup of A for EUR:1.

Now the denomination of B also gets revoked.  The wallet recoups B (incidentally also for EUR:1) and now A can be recouped again for EUR:1.  But now the exchange is in a state where it will refuse a legitimate recoup request for A because the detection for an idempotent request kicks in.

This is IMHO bad API design, and the exchange should simply always recoup the maximum amount.

Furthermore, we usually follow the principle of "API calls that take up DB space are paid".  With the current recoup API, I can do many tiny recoup requests which the exchange then has to store, right?

I guess it would not be a big change to remove the "amount" value from the recoup/recoup-refresh request bodies, right?

- Florian
2022-01-11 12:47:35 +01:00
..
baseline move testing logic and integration tests into separate directory 2020-01-19 15:23:33 +01:00
test_exchange_api_home persist master.priv in git 2021-07-30 17:54:55 +02:00
test_exchange_api_keys_cherry_picking_home -add correct master priv in new location 2021-07-30 20:41:03 +02:00
test_taler_exchange_httpd_home -fix another master private key 2021-07-30 20:50:38 +02:00
.gitignore -fix FTBFS in testing/ 2021-11-17 21:03:13 +01:00
afl-generate.sh move testing logic and integration tests into separate directory 2020-01-19 15:23:33 +01:00
Makefile.am protocol v12 changes (/recoup split, signature changes) plus database sharding plus O(n^2)=>O(n) worst-case complexity reduction on coin balance checks 2021-12-25 13:56:40 +01:00
test_auditor_api_expire_reserve_now.conf move testing logic and integration tests into separate directory 2020-01-19 15:23:33 +01:00
test_auditor_api_version.c -fix leaks and compiler warnings 2021-11-19 20:56:53 +01:00
test_auditor_api.c protocol v12 changes (/recoup split, signature changes) plus database sharding plus O(n^2)=>O(n) worst-case complexity reduction on coin balance checks 2021-12-25 13:56:40 +01:00
test_auditor_api.conf restructure configuration, move bank account credentials from exchange-account-XXX to exchange-accountcredentials-XXX 2021-08-03 21:58:36 +02:00
test_bank_api_fakebank_twisted.conf add logic to launch crypto helpers as part of tests 2020-12-01 19:47:01 +01:00
test_bank_api_fakebank.conf restructure configuration, move bank account credentials from exchange-account-XXX to exchange-accountcredentials-XXX 2021-08-03 21:58:36 +02:00
test_bank_api_nexus.conf restructure configuration, move bank account credentials from exchange-account-XXX to exchange-accountcredentials-XXX 2021-08-03 21:58:36 +02:00
test_bank_api_pybank_twisted.conf restructure configuration, move bank account credentials from exchange-account-XXX to exchange-accountcredentials-XXX 2021-08-03 21:58:36 +02:00
test_bank_api_pybank.conf restructure configuration, move bank account credentials from exchange-account-XXX to exchange-accountcredentials-XXX 2021-08-03 21:58:36 +02:00
test_bank_api_twisted.c -fix leaks and compiler warnings 2021-11-19 20:56:53 +01:00
test_bank_api.c -fix leaks and compiler warnings 2021-11-19 20:56:53 +01:00
test_exchange_api_expire_reserve_now.conf move testing logic and integration tests into separate directory 2020-01-19 15:23:33 +01:00
test_exchange_api_keys_cherry_picking.c -fix leaks and compiler warnings 2021-11-19 20:56:53 +01:00
test_exchange_api_keys_cherry_picking.conf restructure configuration, move bank account credentials from exchange-account-XXX to exchange-accountcredentials-XXX 2021-08-03 21:58:36 +02:00
test_exchange_api_overlapping_keys_bug.c -fix leaks and compiler warnings 2021-11-19 20:56:53 +01:00
test_exchange_api_revocation.c protocol v12 changes (/recoup split, signature changes) plus database sharding plus O(n^2)=>O(n) worst-case complexity reduction on coin balance checks 2021-12-25 13:56:40 +01:00
test_exchange_api_twisted.c -fix leaks and compiler warnings 2021-11-19 20:56:53 +01:00
test_exchange_api_twisted.conf restructure configuration, move bank account credentials from exchange-account-XXX to exchange-accountcredentials-XXX 2021-08-03 21:58:36 +02:00
test_exchange_api.c protocol v12 changes (/recoup split, signature changes) plus database sharding plus O(n^2)=>O(n) worst-case complexity reduction on coin balance checks 2021-12-25 13:56:40 +01:00
test_exchange_api.conf restructure configuration, move bank account credentials from exchange-account-XXX to exchange-accountcredentials-XXX 2021-08-03 21:58:36 +02:00
test_exchange_management_api.c -fix leaks and compiler warnings 2021-11-19 20:56:53 +01:00
test_kyc_api.c -fix leaks and compiler warnings 2021-11-19 20:56:53 +01:00
test_kyc_api.conf -new option 2021-11-15 20:06:34 +01:00
test_taler_exchange_aggregator.c introducing GNUNET_TIME_Timestamp, recoup now with amounts 2021-12-14 16:04:40 +01:00
test_taler_exchange_wirewatch.c -fix leaks and compiler warnings 2021-11-19 20:56:53 +01:00
test-taler-exchange-aggregator-postgres.conf restructure configuration, move bank account credentials from exchange-account-XXX to exchange-accountcredentials-XXX 2021-08-03 21:58:36 +02:00
test-taler-exchange-wirewatch-postgres.conf restructure configuration, move bank account credentials from exchange-account-XXX to exchange-accountcredentials-XXX 2021-08-03 21:58:36 +02:00
testing_api_cmd_auditor_add_denom_sig.c work on testing ftbfs 2021-10-27 18:37:42 +02:00
testing_api_cmd_auditor_add.c introducing GNUNET_TIME_Timestamp, recoup now with amounts 2021-12-14 16:04:40 +01:00
testing_api_cmd_auditor_del.c introducing GNUNET_TIME_Timestamp, recoup now with amounts 2021-12-14 16:04:40 +01:00
testing_api_cmd_auditor_deposit_confirmation.c introducing GNUNET_TIME_Timestamp, recoup now with amounts 2021-12-14 16:04:40 +01:00
testing_api_cmd_auditor_exchanges.c adjust ECs 2020-11-07 18:51:54 +01:00
testing_api_cmd_auditor_exec_auditor_dbinit.c work on testing ftbfs 2021-10-27 18:37:42 +02:00
testing_api_cmd_auditor_exec_auditor.c work on testing ftbfs 2021-10-27 18:37:42 +02:00
testing_api_cmd_bank_admin_add_incoming.c introducing GNUNET_TIME_Timestamp, recoup now with amounts 2021-12-14 16:04:40 +01:00
testing_api_cmd_bank_admin_check.c work on testing ftbfs 2021-10-27 18:37:42 +02:00
testing_api_cmd_bank_check_empty.c typos 2020-03-31 20:57:11 +02:00
testing_api_cmd_bank_check.c work on testing ftbfs 2021-10-27 18:37:42 +02:00
testing_api_cmd_bank_history_credit.c work on testing ftbfs 2021-10-27 18:37:42 +02:00
testing_api_cmd_bank_history_debit.c work on testing ftbfs 2021-10-27 18:37:42 +02:00
testing_api_cmd_bank_transfer.c introducing GNUNET_TIME_Timestamp, recoup now with amounts 2021-12-14 16:04:40 +01:00
testing_api_cmd_batch.c -fix FTBFS in testing/ 2021-11-17 21:03:13 +01:00
testing_api_cmd_change_auth.c -fix command to avoid timing-dependent assertion failure 2021-12-02 06:41:49 +01:00
testing_api_cmd_check_keys.c introducing GNUNET_TIME_Timestamp, recoup now with amounts 2021-12-14 16:04:40 +01:00
testing_api_cmd_deposit.c introducing GNUNET_TIME_Timestamp, recoup now with amounts 2021-12-14 16:04:40 +01:00
testing_api_cmd_deposits_get.c add required payto URI traits 2021-11-07 19:35:29 +01:00
testing_api_cmd_exec_aggregator.c fix DB query and error handling 2021-11-17 11:01:19 +01:00
testing_api_cmd_exec_auditor-offline.c add taler-auditor-offline test command, fixes test_auditor_api warnings 2021-11-20 13:09:16 +01:00
testing_api_cmd_exec_closer.c work on testing ftbfs 2021-10-27 18:37:42 +02:00
testing_api_cmd_exec_transfer.c -fix misc. compiler warnings 2021-11-19 10:57:27 +01:00
testing_api_cmd_exec_wirewatch.c -fix misc. compiler warnings 2021-11-19 10:57:27 +01:00
testing_api_cmd_insert_deposit.c protocol v12 changes (/recoup split, signature changes) plus database sharding plus O(n^2)=>O(n) worst-case complexity reduction on coin balance checks 2021-12-25 13:56:40 +01:00
testing_api_cmd_kyc_check_get.c add wallet for KYC status check 2021-11-07 17:57:23 +01:00
testing_api_cmd_kyc_proof.c get first KYC test to pass 2021-11-09 15:39:31 +01:00
testing_api_cmd_kyc_wallet_get.c -fixes for test 2021-11-09 22:52:01 +01:00
testing_api_cmd_oauth.c be more backwards-compatible 2021-12-08 21:14:36 +01:00
testing_api_cmd_offline_sign_fees.c -work on testing FTBFS 2021-10-27 21:59:04 +02:00
testing_api_cmd_offline_sign_keys.c -work on testing FTBFS 2021-10-27 21:59:04 +02:00
testing_api_cmd_recoup_refresh.c The current recoup API is broken. I guess this is another example where "trivial" API changes turn out to have (multiple!) unexpected consequences. 2022-01-11 12:47:35 +01:00
testing_api_cmd_recoup.c The current recoup API is broken. I guess this is another example where "trivial" API changes turn out to have (multiple!) unexpected consequences. 2022-01-11 12:47:35 +01:00
testing_api_cmd_refresh.c protocol v12 changes (/recoup split, signature changes) plus database sharding plus O(n^2)=>O(n) worst-case complexity reduction on coin balance checks 2021-12-25 13:56:40 +01:00
testing_api_cmd_refund.c -work on testing FTBFS 2021-10-27 21:59:04 +02:00
testing_api_cmd_revoke_denom_key.c adapt tests to run without keyup tool 2020-12-16 15:05:43 +01:00
testing_api_cmd_revoke_sign_key.c adapt tests to run without keyup tool 2020-12-16 15:05:43 +01:00
testing_api_cmd_revoke.c -work on testing FTBFS 2021-10-27 21:59:04 +02:00
testing_api_cmd_rewind.c -fix misc. compiler warnings 2021-11-19 10:57:27 +01:00
testing_api_cmd_serialize_keys.c libtalertesting compiles 2021-10-27 22:28:52 +02:00
testing_api_cmd_set_wire_fee.c introducing GNUNET_TIME_Timestamp, recoup now with amounts 2021-12-14 16:04:40 +01:00
testing_api_cmd_signal.c move testing logic and integration tests into separate directory 2020-01-19 15:23:33 +01:00
testing_api_cmd_sleep.c move testing logic and integration tests into separate directory 2020-01-19 15:23:33 +01:00
testing_api_cmd_stat.c libtalertesting compiles 2021-10-27 22:28:52 +02:00
testing_api_cmd_status.c introducing GNUNET_TIME_Timestamp, recoup now with amounts 2021-12-14 16:04:40 +01:00
testing_api_cmd_transfer_get.c -fix FTBFS issues 2021-10-31 00:21:46 +02:00
testing_api_cmd_twister_exec_client.c libtalertesting compiles 2021-10-27 22:28:52 +02:00
testing_api_cmd_wait.c typos 2020-03-31 20:57:11 +02:00
testing_api_cmd_wire_add.c introducing GNUNET_TIME_Timestamp, recoup now with amounts 2021-12-14 16:04:40 +01:00
testing_api_cmd_wire_del.c introducing GNUNET_TIME_Timestamp, recoup now with amounts 2021-12-14 16:04:40 +01:00
testing_api_cmd_wire.c fix test failures 2020-12-25 08:59:04 +01:00
testing_api_cmd_withdraw.c handle revoke followed immediately by a sign request 2021-11-24 17:44:26 +01:00
testing_api_helpers_auditor.c make exchange API more uniform in how information is returned 2020-04-05 22:05:38 +02:00
testing_api_helpers_bank.c fix comments 2021-11-07 19:37:06 +01:00
testing_api_helpers_exchange.c introducing GNUNET_TIME_Timestamp, recoup now with amounts 2021-12-14 16:04:40 +01:00
testing_api_loop.c -misc bugfixes 2021-11-19 11:47:52 +01:00
testing_api_traits.c the big macrofication of the traits 2021-10-27 15:21:48 +02:00
testing_api_twister_helpers.c indentation and logging fixes 2020-08-10 08:10:44 +02:00