Commit Graph

407 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
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
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
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
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
1a1fafbd43
introducing GNUNET_TIME_Timestamp, recoup now with amounts 2021-12-14 16:04:40 +01:00
Christian Grothoff
fba91c63d5
introduce stored procedure for coin balance check 2021-12-09 23:13:39 +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
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
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
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
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
57acad487d
move extension options to external table 2021-11-06 19:04:54 +01:00
Christian Grothoff
ba627bf84c
-fixes 2021-11-05 22:22:47 +01:00
Christian Grothoff
766922f7e9
implement missing SQL statement 2021-11-05 13:20:14 +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
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