Commit Graph

647 Commits

Author SHA1 Message Date
1962ed6b0b
improvements in extension handling
- extensions_sig is needed globally
- keep original json with config of extension
- fixed various bugs re: extension handling
2022-01-22 00:26:43 +01:00
0b56de6c99
[age restriction] progress 12/n
- taler-offline-tool now handles extensions
  - command "extensions" added with subcommands "show" and "sign"
  - parses extensions from taler config
  - shows and signs of extensions and their configurations
  - creates signed set of configurations for upload
  - added test for retrieval of extension config

- simplified signature verification for extensions
  - remove per-extension signatures, also from DB schema
  - adjust prepared statements accordingly
  - adjust DB event handler for extensions
  - allow NULL for config for extension in DB schema
  - handler for /management/extensions adjusted to new datastructures

- changed test for TALER_denom_blind/TALER_denom_sign_blinded with and
  without TALER_AgeHash

- minor updates and various fixes
2022-01-21 15:41:02 +01:00
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