View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004964||Taler||bank (demonstrator)||public||2017-03-18 23:21||2017-06-06 14:18|
|Reporter||Christian Grothoff||Assigned To||Marcello Stanisci|
|Platform||i7||OS||Debian GNU/Linux||OS Version||squeeze|
|Product Version||git (master)|
|Target Version||0.3||Fixed in Version||0.3|
|Summary||0004964: bank needs API to query transaction history of user|
|Description||We need an API to query the incoming and outgoing wire transfers of a bank account.|
This is to test (future) auditor capabilities, where the wire plugins need to be able to enumerate all incoming/outgoing wire transfers (to check that the exchange DB is correct in its claims about how it interacted with the bank).
The API should basically be asked to return the next X wire transfers above offset Y (where offset 0 is the oldest transaction ever made by the account). Transfer details need to include the execution date, wire transfer subject, amount and target account, equivalent to what is given to /admin/add/incoming and/or specified when making a wire transfer.
|Tags||No tags attached.|
As of yesterday's discussion, this API might be used by the exchange to know
when a reserve should be created.
For example, the exchange polls continuously its bank account situation, and whenever it gets money from someone, it automatically create a new reserve. This way, the bank
is exempted from checking if the money receiver is the exchange and then calling exchange's /admin/add/incoming on each wire transfer.
The bank implements such a API by commit 0838e22. To be spec'd and it doesn't
serve that through the long poll tecnique we discussed yet.
So I'll leave this open.
||spec'd @ 86aff5a|
||"websockets" may be the answer for doing long polling in django.|
||https://channels.readthedocs.io/ might help|
||As per discussion today, we decided to not go for long polling for now, and just expect the clients to poll-sleep-poll (to keep it simple).|
The implementation matching new API is done (9d304a5). Testcases now must test the correctness of the parameter 'delta'.
Please see the 0004964 line in src/bank-lib/Makefile.am of the exchange, move it under "TESTS" and check that the test passes before closing this one.
This will require implementing 0005005. We may also need to extend "test_bank_api.c" to create a username "user" and password "pass" with the right credentials ("full administrative") as well as bank accounts 1/2/3.
(See also test_bank_interpreter.c:567 for where "user" and "pass" are specified.)
Christian, you might be using some jargon here. Please, elaborate some more about the "00004964 line" and what is the "it" to be moved under "TESTS". You're saying that I should write tests in the exchange codebase that test this (00004964) new bank's feature?
The 0004964-line is a line in the source code that explicitly mentions the bug number in a comment.
Open Makefile.am in an editor, and it should become clear.
The tests in the exchange codebase exist, but that line comments them out from the TESTS-suite that are run on 'make check'.
||FYI: there is a 'feature' branch @exchange.git hosting this work in progress.|
The exchange complains about the history returned - although status code is 200 OK. Could you make the testcase print
the expected history, so it's easier to figure out whether the exchange or the bank are misbehaving?
10/May/2017:09:12:10 +0000 HTTP/1.1 GET /history?auth=basic&account_number=2&delta=5&direction=debit HTTP/1.1 => 200
May 10 11:12:10-503446 test-bank-api-23004 ERROR Assertion failed at test_bank_interpreter.c:520.
May 10 11:12:10-503513 test-bank-api-23004 ERROR Interpreter failed at command `history-2d'
Just in case: I'm on the 'feature' branch of the exchange.
||everything merged in 'master' now.|
||Fixed and tested against exchange in 068bf61.|
|2017-03-18 23:21||Christian Grothoff||New Issue|
|2017-03-18 23:21||Christian Grothoff||Status||new => assigned|
|2017-03-18 23:21||Christian Grothoff||Assigned To||=> Marcello Stanisci|
|2017-03-18 23:21||Christian Grothoff||Relationship added||child of 0004959|
|2017-03-18 23:23||Christian Grothoff||Target Version||=> 0.7.1|
|2017-03-30 11:39||Marcello Stanisci||Note Added: 0011998|
|2017-03-30 18:14||Marcello Stanisci||Note Added: 0012001|
|2017-03-31 00:40||Marcello Stanisci||Note Added: 0012003|
|2017-03-31 00:53||Marcello Stanisci||Note Added: 0012004|
|2017-04-26 13:49||Marcello Stanisci||Note Added: 0012069|
|2017-04-30 16:53||Christian Grothoff||Target Version||0.7.1 => 0.3|
|2017-05-02 14:45||Christian Grothoff||Note Added: 0012096|
|2017-05-05 23:37||Marcello Stanisci||Note Added: 0012110|
|2017-05-05 23:38||Marcello Stanisci||Note Edited: 0012110|
|2017-05-07 19:24||Christian Grothoff||Relationship added||related to 0005005|
|2017-05-07 21:15||Christian Grothoff||Note Added: 0012115|
|2017-05-07 21:17||Christian Grothoff||Priority||normal => urgent|
|2017-05-09 13:33||Marcello Stanisci||Note Added: 0012119|
|2017-05-09 13:33||Marcello Stanisci||Note Edited: 0012119|
|2017-05-09 13:37||Christian Grothoff||Note Added: 0012120|
|2017-05-09 17:38||Marcello Stanisci||Note Added: 0012121|
|2017-05-10 11:16||Marcello Stanisci||Note Added: 0012123|
|2017-05-10 15:56||Marcello Stanisci||Note Added: 0012124|
|2017-05-16 14:14||Marcello Stanisci||Note Added: 0012136|
|2017-05-16 14:14||Marcello Stanisci||Status||assigned => resolved|
|2017-05-16 14:14||Marcello Stanisci||Resolution||open => fixed|
|2017-05-28 23:01||Christian Grothoff||Fixed in Version||=> 0.3|
|2017-06-06 14:18||Christian Grothoff||Status||resolved => closed|