Commit Graph

695 Commits

Author SHA1 Message Date
Jonathan Buchanan
c10b783521
use 'pipe' instead of 'eventfd' on non-Linux systems 2022-01-18 09:15:54 -05:00
Christian Grothoff
766a291151
fix #7143 2022-01-11 17:56:32 +01:00
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
Christian Grothoff
aaaaa9a103
fix amount denormalization issue 2022-01-10 09:04:09 +01:00
d91750ca0f
drop extensions table 2022-01-08 19:45:19 +01:00
d6bf20028d
Fixed prepared statement for extensions 2022-01-08 19:45:00 +01:00
cc7d7707ab
[age restriction] progress 10/n
More work towards support for extensions:
- Prepared statements and DB-plugin-functions for setting and retrieving
  configurations from the database added.
- primitive "registry" of extensions for age restrictions and peer2peer
  (stub)
- TALER_Extensions now with FP for parsing, setting and converting a
  configuration.
- /management/extensions handler now verifies signature of the (opaque)
  json object for all extensions.
- /management/extensions handler calls the FP in the corrensponding
  TALER_Extension for parsing and setting the configuration of a
  particular extension

More work towards age restriction:
- TALER_Extensions interfaces for config-parser, -setter and converter
  implemented for age restriction
- DB event handler now retrieves config from database, parses it and
  sets it (the age mask) in the global extension.
- load_age_mask now loads age mask from the global extension (and not
  from the config file)
- add age_restricted_denoms to /keys response
2022-01-08 14:40:20 +01:00
Christian Grothoff
5cd2bc5de3
-cleanup 2021-12-28 15:36:26 +01:00
Christian Grothoff
070f442a11
resolve #7124: ensure -s also deletes work_shards 2021-12-26 13:05:39 +01:00
Christian Grothoff
e7d4183d1c
-fix FTBFS 2021-12-25 17:22:54 +01:00
Christian Grothoff
74e4c6429a
clean up refresh-reveal logic, reducing local copying 2021-12-25 16:13:06 +01:00
Christian Grothoff
f6ecb6c895
-eliminate redundant hash operation on link signatures 2021-12-25 15:39:01 +01:00
Christian Grothoff
87376e02eb
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
1b23857f2c
[age restriction] progress 8/n
More work towards support for extensions and age restriction

- updated gana
- added handler for DB-Event
- added TEH_extensions_init() and _done()
- added global for age restriction
- added stub for post handler
- added SQL-table for extension metadata
- added enum type for extensions and other data structures

Also:
- fixed some warnings -Wmaybe-unitialized
2021-12-23 15:15:33 +01:00
Christian Grothoff
62444504f7
denormalize reserve_pub in reserve tables to enable sharding 2021-12-19 13:43:33 +01:00
Christian Grothoff
1acc851deb
-fix recoup ugliness 2021-12-16 20:18:44 +01:00
Christian Grothoff
fdfcb29027
-fix FTBFS 2021-12-15 11:36:36 +01:00
Christian Grothoff
1a1fafbd43
introducing GNUNET_TIME_Timestamp, recoup now with amounts 2021-12-14 16:04:40 +01:00
Christian Grothoff
bf54ee30d4
experiment 2021-12-13 12:28:28 +01:00
Christian Grothoff
386301d1cf
-was integrated 2021-12-09 23:17:15 +01:00
Christian Grothoff
fba91c63d5
introduce stored procedure for coin balance check 2021-12-09 23:13:39 +01:00
Christian Grothoff
7fdcec4c3c
-complete 'melt.sql', in theory 2021-12-08 20:52:23 +01:00
Christian Grothoff
e0700ad916
optimize /deposit logic to minimize serialization failures (presumably) 2021-12-08 20:33:14 +01:00
Christian Grothoff
21951eacc2
quick hack to see about improving melt serialization failures 2021-12-08 18:22:07 +01:00
Christian Grothoff
9d3f7d3a56
move ensure_coin_known for melt and recoup outside of transaction, more logging 2021-12-08 15:18:40 +01:00
Christian Grothoff
a727348638
-wip 2021-12-08 11:53:27 +01:00
Christian Grothoff
7dcd217b60
-fix balance calculation 2021-12-06 16:37:32 +01:00
Christian Grothoff
f3629bdafc
improve SQL comments 2021-12-06 15:15:59 +01:00
Christian Grothoff
6ba9f934c4
-add FIXMEs 2021-12-05 19:23:16 +01:00
Christian Grothoff
19de0f604f
change order of statements when making coin known to possibly reduce serialization failures 2021-12-05 17:59:02 +01:00
Christian Grothoff
67de20d26e
major rework of withdraw transaction to use stored procedure and (presumably) reduce serialization failures by avoiding SELECT before INSERT 2021-12-05 17:16:00 +01:00
Christian Grothoff
c8480d97a1
try to optimize aggregator queries 2021-11-29 10:09:21 +01:00
Christian Grothoff
65533e8df5
-simple DB benchmark 2021-11-29 00:17:09 +01:00
Christian Grothoff
c3ce84af44
fix config 2021-11-28 22:20:56 +01:00
Christian Grothoff
cba49056c4
benchmark skeleton 2021-11-28 19:52:59 +01:00
Christian Grothoff
2d1a618d3d
sql fix 2021-11-27 22:58:50 +01:00
Christian Grothoff
e46fb30965
refactor get_ready_deposits query and index to hopefully make query faster 2021-11-27 14:56:28 +01:00
Christian Grothoff
ef29658161
fix #7107 2021-11-24 00:25:17 +01:00
Christian Grothoff
cb96bb0ba7
-fix warning 2021-11-21 15:16:58 +01:00
Thien-Thi Nguyen
2c8bd158d9
fix typo: s/row_id/rowid/ 2021-11-20 06:10:51 -05:00
Christian Grothoff
52fe9d657b
-fix leaks and compiler warnings 2021-11-19 20:56:53 +01:00
Christian Grothoff
326110ffe9
-improve comments, DCE 2021-11-19 16:45:55 +01:00
Christian Grothoff
6b8c757887
towards merging with master 2021-11-17 11:26:19 +01:00
Christian Grothoff
ed1db63a48
fix DB query and error handling 2021-11-17 11:01:19 +01:00
Christian Grothoff
422b0ffd4c
fix oauth_username issue 2021-11-16 19:31:27 +01:00
591cefd315
[age restriction] progress 3/n
- remove redundant struct members for age commitment hash
- undo pre-mature implementation in taler-exchange-secmod-rsa.c
- carry through age restriction parameter for TALER_denom_blind
2021-11-16 14:43:54 +01:00
Christian Grothoff
e5ead88057
complete oauth logic (in theory) 2021-11-15 20:00:45 +01:00
Christian Grothoff
0325a79631
avoid duplication 2021-11-15 14:39:18 +01:00
Christian Grothoff
016551dbb4
misc TODOs for KYC left 2021-11-09 20:36:30 +01:00
Christian Grothoff
98c30bee88
fix payto:// construction routine and move it to libtalerutil 2021-11-07 19:22:12 +01:00
Christian Grothoff
cd8d4bede1
add missing file 2021-11-07 11:41:53 +01:00
Christian Grothoff
81f9b2c93e
-misc fixes 2021-11-06 19:57:34 +01:00
Christian Grothoff
bae7ddbf4e
sql fix 2021-11-06 19:46:00 +01:00
Christian Grothoff
57acad487d
move extension options to external table 2021-11-06 19:04:54 +01:00
Christian Grothoff
938e2ce39c
more RSA cleanup 2021-11-06 16:04:26 +01:00
Christian Grothoff
f01ab79015
RSA-despecialization 2021-11-06 15:29:10 +01:00
Christian Grothoff
ba627bf84c
-fixes 2021-11-05 22:22:47 +01:00
Christian Grothoff
32da809fd6
abstract denomination keys a bit more 2021-11-05 14:00:10 +01:00
Christian Grothoff
766922f7e9
implement missing SQL statement 2021-11-05 13:20:14 +01:00
Christian Grothoff
1408e1587b
introduce invalid key type 2021-11-01 23:49:13 +01:00
Christian Grothoff
22ce5bff77
fix sharding 2021-11-01 18:05:01 +01:00
Christian Grothoff
5b3a468d38
-bugfix 2021-11-01 13:40:45 +01:00
Christian Grothoff
b88b36ecad
style fixes 2021-11-01 13:34:14 +01:00
Christian Grothoff
783d07b476
consistently distinguish blinded/unblinded denomination sigs 2021-10-31 18:12:54 +01:00
Christian Grothoff
3eae999efc
distinguish between blind and non-blind denomination signatures 2021-10-31 17:56:56 +01:00
Christian Grothoff
de8e0907aa
DB test passes again 2021-10-31 15:32:20 +01:00
Christian Grothoff
1d5edc6882
SQL fixes 2021-10-31 13:58:20 +01:00
Christian Grothoff
35e3506660
fixing SQL statements 2021-10-31 13:27:50 +01:00
Christian Grothoff
43ee9da01d
misc fixes 2021-10-31 12:49:51 +01:00
Christian Grothoff
b5e9523f94
fix test FTBFS 2021-10-31 10:32:10 +01:00
Christian Grothoff
2faf102a05
-more dB work 2021-10-30 21:26:40 +02:00
Christian Grothoff
bc57abc3da
-more dB work 2021-10-30 20:49:23 +02:00
Christian Grothoff
d83a65320a
-more work on FTBFS issues 2021-10-30 19:57:54 +02:00
Christian Grothoff
963a06c0aa
fix more FTBFS issues 2021-10-30 19:28:11 +02:00
Christian Grothoff
55ea7fcb9a
SQL fixes 2021-10-30 13:52:03 +02:00
Christian Grothoff
22e7dabef1
sql fixes 2021-10-29 19:13:47 +02:00
Christian Grothoff
08b23fb70a
fix SQL 2021-10-29 11:46:06 +02:00
Christian Grothoff
ab3042243d
address most FIXMEs in pg plugin 2021-10-29 11:35:34 +02:00
Christian Grothoff
9968a34a1d
address most FIXMEs in pg plugin 2021-10-29 11:28:12 +02:00
Christian Grothoff
efd4e19bd2
fix FTBFS of exchangedb 2021-10-27 23:31:56 +02:00
Christian Grothoff
091f1062b1
-fixing FTBFS 2021-10-27 09:23:13 +02:00
Christian Grothoff
d4e03b12ae
-more changes towards fixing FTBFS 2021-10-27 09:23:12 +02:00
Christian Grothoff
868a4ce76d
-resovling more FTBFS issues 2021-10-27 09:23:12 +02:00
Christian Grothoff
dbb812414b
database change -- breaks everything 2021-10-27 09:23:11 +02:00
Christian Grothoff
778a402d07
-implement more of the KYC handlers 2021-10-19 21:02:10 +02:00
Christian Grothoff
b38b51d5e8
implement /kyc-check, add skeleton for /kyc-proof 2021-10-17 15:58:23 +02:00
Christian Grothoff
4e3b133e47
-incomplete draft for /kyc-wallet handler 2021-10-17 14:12:13 +02:00
Christian Grothoff
932d2aaf88
implement returning KYC status from GET /deposits/ endpoint 2021-10-17 13:22:15 +02:00
Christian Grothoff
a48db85013
add KYC logic for /deposit handling (DB part incomplete) 2021-10-15 23:34:23 +02:00
Christian Grothoff
ca12adced4
-basic logic for withdraw KYC checks 2021-10-14 21:06:47 +02:00
Christian Grothoff
7d62fa065b
start with KYC support in DB 2021-10-14 14:45:10 +02:00
Christian Grothoff
acbadd5c6e
-modify C API to future-proof it for returning more details as required for KYC implementation 2021-10-13 18:52:59 +02:00
Christian Grothoff
b38f251beb
-DCE, nicer return values 2021-09-17 11:35:10 +02:00
Christian Grothoff
ae8d481e1c
implement taler-exchange-transfer DB sharding logic 2021-09-05 15:25:57 +02:00
Christian Grothoff
adc6c53b5c
doxygen and spelling fixes 2021-09-04 13:00:20 +02:00
Christian Grothoff
c972925933
fix aggregator benchmark generation logic 2021-09-04 11:06:37 +02:00
Christian Grothoff
1c1d28d3f5
first draft for an aggregator benchmark, plus fixing inclusive/exclusive sharding range issues 2021-09-03 21:30:14 +02:00
Christian Grothoff
5149af9314
preliminary work on supporting sharding/parallel aggregation (undertested, but tests pass again) 2021-09-03 19:08:02 +02:00
Christian Grothoff
6e1877b142
-implement long-standing aggregation SQL query simplification 2021-09-03 09:55:16 +02:00
Christian Grothoff
bed08b39d0
-code cleanup 2021-09-03 09:51:19 +02:00
Christian Grothoff
6ab130d994
-wip 2021-09-03 09:44:50 +02:00
Christian Grothoff
0013ce41e7
hyperaggregation schema proposal 2021-08-31 17:41:46 +02:00
Christian Grothoff
82a5038acf
-doxygen fixes 2021-08-23 00:06:36 +02:00
Christian Grothoff
c559b1c935
complete implementation of long-polling for reserve status; remove support for multi-threaded exchange httpd 2021-08-23 00:00:32 +02:00
Christian Grothoff
1cc87bf9fe
-add notifications for inbound reserve transactions 2021-08-22 12:25:48 +02:00
Christian Grothoff
af6995c9aa
-doxygen fix 2021-08-22 11:53:42 +02:00
Christian Grothoff
10f9272e45
-implement long polling support on reserve status (but not yet in C client library) 2021-08-22 00:12:18 +02:00
Christian Grothoff
a11e3cb193
-indent fix 2021-08-19 16:32:57 +02:00
Christian Grothoff
28e55409dd
-doxygen fix 2021-08-13 22:45:55 +02:00
Christian Grothoff
41aa1ed41d
-add support for event notifications to exchangedb plugin 2021-08-13 22:35:13 +02:00
Christian Grothoff
03633cb29a
-fix test 2021-08-08 20:18:53 +02:00
Christian Grothoff
7fd4f1d846
-sepa is ancient, iban is correct 2021-08-08 00:01:07 +02:00
Christian Grothoff
caf6807856
-fix assertion failure caused by testcase 2021-08-06 10:20:58 +02:00
Christian Grothoff
36164914e6
-fix doxygen 2021-08-04 08:39:19 +02:00
Christian Grothoff
ba3f70390a
restructure configuration, move bank account credentials from exchange-account-XXX to exchange-accountcredentials-XXX 2021-08-03 21:58:36 +02:00
Christian Grothoff
33a28efef7
-more json_pack fixes 2021-07-31 21:48:36 +02:00
Christian Grothoff
306a08a71c
-rename TALER_amount_get_zero to TALER_amount_set_zero 2021-07-23 13:02:04 +02:00
Christian Grothoff
23e0847188
-fix #6933 2021-07-22 15:47:24 +02:00
Christian Grothoff
970c9eab86
-fix doxygen 2021-07-15 20:04:15 +02:00
Christian Grothoff
2e981c1a6e
fix serial selection in auditor-sync 2021-06-27 23:38:52 +02:00
Christian Grothoff
4ba4cf74ae
-fix typo 2021-06-27 15:36:42 +02:00
Christian Grothoff
9fb6ea3203
fix auditor-offline issue 2021-06-22 19:48:18 +02:00
Christian Grothoff
ba5af82db1
-bugfixes, and FTBFS 2021-06-22 14:47:54 +02:00
Christian Grothoff
0caf3ac2b7
-fix up wirewatch logic 2021-06-22 13:15:50 +02:00
Christian Grothoff
c9a928fe35
make insert transaction more optimistic, may reduce conflicts 2021-06-21 11:47:34 +02:00
Christian Grothoff
de41998d55
-useless 2021-06-21 00:18:32 +02:00
Christian Grothoff
9c51720cbf
fixing parallel fakebank to ensure transactions are ordered, fixing indices/constraint preservation after DB update to 0002 2021-06-21 00:17:16 +02:00
Christian Grothoff
108bf57d04
preparations for sharded wirewatch 2021-06-20 16:41:04 +02:00
Christian Grothoff
2a9ec82dce
fix batch size adjustment of wirewatcher 2021-06-19 17:11:11 +02:00
Christian Grothoff
4384c6ec85
fix misc doxygen issues 2021-04-21 20:28:30 +02:00
Christian Grothoff
b7ef3cfd36
fix #6845 2021-04-14 14:48:28 +02:00
Christian Grothoff
12deb6c267
fix memory leaks 2021-02-13 16:24:38 +01:00
Christian Grothoff
3b9c381112
remove master_pub from DB 2021-01-15 11:53:54 +01:00
Christian Grothoff
e3a0bc0d1f
fix sync issues, add rudimentary test 2021-01-13 19:47:45 +01:00
Christian Grothoff
52513dcc26
bugfixes in auditor-sync logic 2021-01-12 23:00:57 +01:00
Christian Grothoff
543cd6d342
finish irbt_callbacks 2021-01-10 21:42:25 +01:00
Christian Grothoff
278b35a0fb
more work on INSERT statements 2021-01-10 18:40:39 +01:00
Christian Grothoff
af97a44ae6
complete select_serial_by_* SELECT statements 2021-01-10 18:06:18 +01:00
Christian Grothoff
f70c53d2d6
expand irbt templates 2021-01-10 17:27:46 +01:00
Christian Grothoff
bee612e2ef
expand irbt templates 2021-01-10 17:07:09 +01:00
Christian Grothoff
59cde016a6
preparing statements for auditor replication logic 2021-01-10 17:04:52 +01:00
Christian Grothoff
80b4fc0869
skeleton for postgres_insert_records_by_table 2021-01-10 13:27:33 +01:00
Christian Grothoff
5e80154f43
complete (untested) implementation of lrbt_callbacks 2021-01-10 12:56:13 +01:00
Christian Grothoff
b40afe196c
remove redundant old_coin_pub from link data 2021-01-10 12:15:47 +01:00
Christian Grothoff
ca66a1d1af
fix major bug with SQL statement missing ORDER BY freshcoin_index resulting in possible link failures (but usually lucky with old DB schema) 2021-01-10 00:54:12 +01:00
Christian Grothoff
02ecf68a3d
more optimizations of tables with foreign keys 2021-01-09 13:18:01 +01:00
Christian Grothoff
260e287685
change wire_reference to be uint64_t always; more work on lrbt_callbacks 2021-01-08 23:36:09 +01:00
Christian Grothoff
db61628a9c
use known_coin_id instead of coin_pub, use reserve_out_serial_id/rrc_serial instead of h_blind_ev/h_coin_ev 2021-01-08 21:07:42 +01:00
Christian Grothoff
7ef7d793de
use auditor_uuid instead of auditor_pub as foreign key 2021-01-08 19:11:36 +01:00
Christian Grothoff
13555448b6
change exchange database to use denominations_serial instead of denom_pub_hash as foreign key 2021-01-08 18:14:46 +01:00