View Issue Details

IDProjectCategoryView StatusLast Update
0005066Talermerchant backendpublic2024-01-12 13:04
ReporterChristian Grothoff Assigned ToMarcello Stanisci Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynormalSeveritytweakReproducibilityN/A
Status closedResolutionfixed 
Platformi7OSDebian GNU/LinuxOS Versionsqueeze
Product Versiongit (master) 
Target Version0.6Fixed in Version0.6 
Summary0005066: /history API for merchant differs from /history for bank, and it is worse
DescriptionRight 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'.

TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Marcello Stanisci

2018-12-13 15:11

reporter   ~0013409

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).

Marcello Stanisci

2018-12-13 16:40

reporter   ~0013410

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.

Marcello Stanisci

2018-12-13 16:58

reporter   ~0013411

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.

Marcello Stanisci

2018-12-14 18:45

reporter   ~0013414

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.

Marcello Stanisci

2018-12-17 17:04

reporter   ~0013417

317d1e5 made backoffice aligned with these API changes. Edit: 'start' defaults to *INT64_MAX* because Postgresql BIGSERIAL is a signed number type.

Issue History

Date ModifiedUsernameFieldChange
2017-06-05 16:25Christian GrothoffNew Issue
2017-06-05 16:25Christian GrothoffStatusnew => assigned
2017-06-05 16:25Christian GrothoffAssigned To => Marcello Stanisci
2017-06-05 16:47Christian GrothoffDescription Updated
2017-06-06 12:24Christian GrothoffTarget Version0.4 => 0.7.1
2018-12-13 15:11Marcello StanisciNote Added: 0013409
2018-12-13 16:40Marcello StanisciStatusassigned => informing
2018-12-13 16:40Marcello StanisciResolutionopen => fixed
2018-12-13 16:40Marcello StanisciNote Added: 0013410
2018-12-13 16:58Marcello StanisciStatusinforming => assigned
2018-12-13 16:58Marcello StanisciNote Added: 0013411
2018-12-14 18:45Marcello StanisciNote Added: 0013414
2018-12-17 17:04Marcello StanisciNote Added: 0013417
2018-12-17 17:04Marcello StanisciStatusassigned => informing
2019-01-31 18:33Christian GrothoffFixed in Version => 0.6
2019-01-31 18:33Christian GrothoffTarget Version0.7.1 => 0.6
2019-12-20 18:12Christian GrothoffStatusinforming => closed
2024-01-12 13:04Christian GrothoffCategorymerchant backend API (C) => mechant backend
2025-03-22 13:09Christian GrothoffCategorymechant backend => merchant backend