View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005066||Taler||merchant backend API (C)||public||2017-06-05 18:25||2019-12-20 19:12|
|Reporter||Christian Grothoff||Assigned To||Marcello Stanisci|
|Platform||i7||OS||Debian GNU/Linux||OS Version||squeeze|
|Product Version||git (master)|
|Target Version||0.6||Fixed in Version||0.6|
|Summary||0005066: /history API for merchant differs from /history for bank, and it is worse|
|Description||Right now, /history for the merchant backend differs from the /bank API in several ways, all of which seem to make it inferior:|
1) start/offset are "unsigned int", while the bank uses uint64_t. The later is not only more precise, but also 32 bits may simply not be enough. 4 billion transactions are totally within the range of large sites, so we need to use 64 bit values here (and BIGSERIAL in the backend DB).
2) 'delta' can only be positive; the possibility to pass 'GNUNET_YES' to 'find_contract_terms_by_date_and_range' is thus not possible with this API. However, it does make sense to have the same backwards-or-forwards navigation capabilities for the merchant /history than what we have for the bank /history.
So 'delta' should become a int64_t. (Note that there is something with 'start' being not initialized and interpreted as -1 to go into the other direction implemented, but it seems more hack-ish than the bank /history version).
3) "unsigned int future" in 'find_contract_terms_by_date_and_range' should just be an 'int'.
|Tags||No tags attached.|
||Just pointing out another divergence between the two APIs: the bank returns results YOUNGER than 'start' and the merchant returns results OLDER than 'start'. I think we should get them do the same thing (the bank's way).|
||2cce6fe addresses all the points reported in this issue. Just note that since the whole "delta" semantics has been inverted (in order to match the bank's), now 'future' got renamed as 'past' and has the desired type.|
Reopening as docs need to be updated, and possibly some additional minor changes could be needed.
Also: the *backoffice* would need some attention after the change in the merchant /history API semantics.
exchange / merchant / api have all been adapted as for recent (private) discussion (*): 15c1a877 / d52b2b0 / d6c5eaa. Leaving open until the backoffice gets some attention too.
(*) long story short: okay to default 'start' to UINT64_MAX and okay to add a 'ordering' parameter that controls the way results are sorted.
||317d1e5 made backoffice aligned with these API changes. Edit: 'start' defaults to *INT64_MAX* because Postgresql BIGSERIAL is a signed number type.|
|2017-06-05 18:25||Christian Grothoff||New Issue|
|2017-06-05 18:25||Christian Grothoff||Status||new => assigned|
|2017-06-05 18:25||Christian Grothoff||Assigned To||=> Marcello Stanisci|
|2017-06-05 18:47||Christian Grothoff||Description Updated|
|2017-06-06 14:24||Christian Grothoff||Target Version||0.4 => 0.7.1|
|2018-12-13 16:11||Marcello Stanisci||Note Added: 0013409|
|2018-12-13 17:40||Marcello Stanisci||Status||assigned => resolved|
|2018-12-13 17:40||Marcello Stanisci||Resolution||open => fixed|
|2018-12-13 17:40||Marcello Stanisci||Note Added: 0013410|
|2018-12-13 17:58||Marcello Stanisci||Status||resolved => assigned|
|2018-12-13 17:58||Marcello Stanisci||Note Added: 0013411|
|2018-12-14 19:45||Marcello Stanisci||Note Added: 0013414|
|2018-12-17 18:04||Marcello Stanisci||Note Added: 0013417|
|2018-12-17 18:04||Marcello Stanisci||Status||assigned => resolved|
|2019-01-31 19:33||Christian Grothoff||Fixed in Version||=> 0.6|
|2019-01-31 19:33||Christian Grothoff||Target Version||0.7.1 => 0.6|
|2019-12-20 19:12||Christian Grothoff||Status||resolved => closed|