commit ed3854bbcd07d9279fd257385b729c19c1dcec4b parent 439e770eab7329e5aa3e17720ea2e0a394b1af92 Author: Joel-Haeberli <haebu@rubigen.ch> Date: Wed, 5 Jun 2024 15:55:12 +0200 docs: enhance Diffstat:
26 files changed, 199 insertions(+), 141 deletions(-)
diff --git a/docs/content/architecture/wallee.tex b/docs/content/architecture/wallee.tex @@ -37,7 +37,7 @@ The \textit{Refund Service} is used by C2EC in case of a refund. Therefore the C \subsubsection{Wallee Transaction State} To decide if a transaction was successful, the states of a transaction within Wallee must be mapped to the world of Taler. This means that a reserve shall only be created, if the transaction is in a state which allows Taler not having any liabilities regarding the transaction and that Wallee could process the payment successfully. The documentation states that \textit{only} in the transaction state \textit{fulfill}, the delivery of the goods (in case of withdrawal this means, that the reserve can be created) shall be started \cite{wallee-transaction-process}. For the withdrawal this means, that the only interesting state for fulfillment is the \textit{fulfill} state. Every other state means, that the transaction was not successful and the reserve shall not be created. -\section{Payto wallee-transaction extension} +\section{Payto Wallee-Transaction Extension} RFC 8905 \cite{rfc8905} specifies a URI scheme (complying with RFC 3986 \cite{rfc3986}), which allows to address a creditor with theoretically any protocol that can be used to pay someone (such as IBAN, BIC etc.) in a standardized way. It introduces a registry which holds the specific official values of the standard. The registry is supervised by the GANA (GNUnet Assigned Numbers Authority) \cite{gnunet-gana}. In case a refund becomes necessary, which might occur if a transaction does not succeed or a reserve is not withdrawn within the specified time, a new \textit{target type} called \textit{wallee-transaction} is registered. It takes a transaction identifier as \textit{target identifier} which identifies the transaction for which a refund process shall be triggered. The idea is that the handler of the payto URI is able to deduct the transaction from the payto-uri and trigger the refund process. diff --git a/docs/content/implementation/c-database.tex b/docs/content/implementation/c-database.tex @@ -35,8 +35,7 @@ Each Terminal must register before withdrawals are possible using the terminal. \subsubsection{Withdrawal} -The withdrawal table is the heart of the application as it captures the information and state for each withdrawal. besides the obvious fields like \textit{amount}, \textit{wopid}, \textit{reserve\_pub\_key} or \textit{terminal\_fees} (which all are directly related to one of the API calls described in \autoref{sec-implementation-terminal-api} or \autoref{sec-implementation-bank-integration-api}), the table also holds the \textit{terminal\_id} which identifies the terminal which initiated the withdrawal. The \textit{registration\_ts} indicates, when the parameters of a withdrawal were registered. The field is mainly thought for manual problem analysis and has no direct functional impact. -The \textit{withdrawal\_status} holds the current state of the withdrawal and is transitioned as described in \autoref{sec-architecture-state-transitions}. The \textit{request\_uid} is a unqiue identifier supplied by the terminal setting up a withdrawal. It is used to support idempotence of the API. +The withdrawal table is the heart of the application as it captures the information and state for each withdrawal. besides the obvious fields like \textit{amount}, \textit{wopid}, \textit{reserve\_pub\_key} or \textit{terminal\_fees} (which all are directly related to one of the API calls described in \autoref{sec-implementation-terminal-api} or \autoref{sec-implementation-bank-integration-api}), the table also holds the \textit{terminal\_id} which identifies the terminal which initiated the withdrawal. The \textit{registration\_ts} indicates, when the parameters of a withdrawal were registered. The field is mainly thought for manual problem analysis and has no direct functional impact. The \textit{withdrawal\_status} holds the current state of the withdrawal and is transitioned as described in \autoref{sec-architecture-state-transitions}. The \textit{request\_uid} is a unqiue identifier supplied by the terminal setting up a withdrawal. It is used to support idempotence of the API. The field \textit{confirmed\_row\_id} is used to separate the already confirmed withdrawals from the pending or aborted withdrawals. It is leveraged by the Wire-Gateway API to only handle already successfully confirmed rows. The existing \textit{withdrawal\_row\_id} is not suitable for this case since it is not guaranteed that withdrawals are confirmed in the same order as they were added. In a future version of the application it is a good idea to put the confirmed transactions in a separate table which would reduce the complexity of the table and its usage. With this design the application takes care of writing the correct \textit{confirmed\_row\_id} when a transasction is confirmed. \begin{figure}[H] \centering @@ -47,7 +46,7 @@ The \textit{withdrawal\_status} holds the current state of the withdrawal and is \subsubsection{Transfers} -The transfer table is maintained through the transfer endpoint as described in \autoref{sec-implementation-wire-gateway-api}. A transfer in case of C2EC is constrained with a refund activity. The besides the fields indicated by the Wire Gateway API \textit{request\_uid}, \textit{row\_id}, \textit{amount}, \textit{exchange\_base\_url}, \textit{wtid}, \textit{credit\_account} and \textit{transfer\_ts} which are all used to store information about the transfer, the fields \textit{transfer\_status} and \textit{retries} are stored which allow retry behavior and help to make the system more robust. The \textit{credit\_account} is the refund payto URI which allows the refund process to be provider specific through a custom payto target type. +The transfer table is maintained through the transfer endpoint as described in \autoref{sec-implementation-wire-gateway-api}. A transfer in case of C2EC is constrained with a refund activity. The besides the fields indicated by the Wire Gateway API \textit{request\_uid}, \textit{row\_id}, \textit{amount}, \textit{exchange\_base\_url}, \textit{wtid}, \textit{credit\_account} and \textit{transfer\_ts} which are all used to store information about the transfer, the fields \textit{transfer\_status} and \textit{retries} are stored which allow retry behavior and help to make the system more robust. The \textit{credit\_account} is the refund payto URI which allows the refund process to be provider specific through a custom payto target type. The field \textit{transferred\_row\_id} is used to separate the transferred transactions from the pending or failed transfers. It is leveraged by the Wire-Gateway API to only handle already transferred rows. \begin{figure}[H] \centering @@ -80,11 +79,3 @@ The withdrawal status trigger emits the status of a withdrawal when the status i \subsubsection{Payment Trigger} The payment trigger is triggered through the withdrawal confirmation request of the Terminals API (described in \autoref{sec-implementation-terminal-api}). It will start the confirmation of the transaction at the providers backend, through the provider specific confirmation process. - -\subsubsection{Confirmation Retry Trigger} - -If the confirmation for a withdrawal fails, this trigger is responsible to notify the retry listener of the application to retry the confirmation. Therefore the trigger calls the \textit{emit\_retry\_notification} function which will notify its listener and the retry will eventually be executed. - -\subsubsection{Transfer Trigger} - -The transfer trigger is responsible triggering the transfer process by the application emiting the \textit{request\_uid} of the respective transfer, through the \textit{emit\_transfer\_notification}. diff --git a/docs/content/implementation/e-cli.tex b/docs/content/implementation/e-cli.tex @@ -3,17 +3,17 @@ The management of providers and terminals is not part of the thesis but since writing and issueing SQL statements is cumbersome and error-prone a small cli was implemented to abstract managment tasks. The cli tool was also shows the concepts a future implementation of the provider managment can use to integrate with the present features. The cli can be extended with more actions to allow the management of other providers and its terminals. Also the cli allows to setup the simulation terminal and provider which can be used for testing. Before commands can be executed, the user must connect the tool to the database which can be done throught the \textit{db} command. With the aim to not introduce security risks by storing configuration state of the cli, the credentials must be entered after each startup of the cli. This can be surpassed by specifying postgres specific environment variables \texttt{PGHOST}, \texttt{PGPORT}, \texttt{PGUSER} and \texttt{PGPASSWORD} but remember that these environment variables might leak database credentials to others if not cleaned properly or set for the wrong users shell. -The cli was implemented to be usable and as it was out of scope of the thesis, the focus was on the functionality and tasks needed for the thesis and to allow an easy management of the terminals. This included features to manage wallee provider and terminals and the simulation. Additionally the tool implements commands to activate and deactivate a terminal, which makes the task much easier than writing and executing SQL by hand. +The cli was implemented to be usable and as it was out of scope of the thesis, the focus was on the functionality and tasks needed for the thesis and to allow a simple management of the terminals. This included features to manage wallee provider and terminals and the simulation. Additionally the tool implements commands to activate and deactivate a terminal, which makes the task much easier than writing and executing SQL by hand. \subsection{Adding Wallee Provider} -Adding the Wallee provider is as easy as calling \textit{rp} (register-provider). It will then ask for properties like the base url and the credentials of the API user (generated by Wallee). Since the payto target type in case of Wallee will always be \textit{wallee-transaction}, this is hard coded. The credentials supplied are hashed using argon2 \cite{rfc9106}. If the database leaks for some reason, the passwords cannot be abused easily. +Adding the Wallee provider can be achieved calling \textit{rp} (register-provider). It will then ask for properties like the base url and the credentials of the API user (generated by Wallee). Since the payto target type in case of Wallee will always be \textit{wallee-transaction}, this is hard coded. The credentials supplied are hashed using argon2 \cite{rfc9106}. If the database leaks for some reason, the passwords cannot be abused easily. \subsection{Adding Wallee Terminal} Adding a Wallee terminal can be achieved by using the \textit{rt} (register-terminal) command. It will ask the user to enter the description of the terminal and will then generate a 32-byte access token using Go's crypto random library which must be supplied to the owner of the terminal through a secure channel with the \textit{terminal-user-id} (which is just the name of the operator and the id of the terminal separated by a dash '-') -\subsection{Deactivating The Terminal} +\subsection{Deactivating Terminals} To deactivate the terminal, the command \textit{dt} must be issued. It will ask for the \textit{terminal-user-id} of the terminal and then deactivate the specified terminal. The deactivation will be immediately and therefore helps to increase the security by allowing immediate action, when a terminal is come to be knwon hijacked, stolen or other fraud is detected specific to the terminal. To detect suspicious activity in production appropriate montioring tools could be installed to automatically trigger alarms. diff --git a/docs/content/introduction/introduction.tex b/docs/content/introduction/introduction.tex @@ -2,9 +2,7 @@ Which payment systems do you use in your daily live and why? Probably one you know it is universally accepted, reliable, secure and the payment goes through more or less instantly. -An \textbf{easy onboarding} was identified as one of the most important aspects in a report which was commissioned by the ECB (European Central Bank) in march 2022 as result of a focus group concerning the acceptance of a Digital Euro \cite{panetta-speech-march-30} as new payment system. - -In March 2022, the European Central Bank (ECB) found that an easy onboarding procedure is one of the most important factors influencing the acceptance of the Digital Euro as a new payment system \cite{panetta-speech-march-30}. If the process of onboarding new users is straightforward, this will have a positive effect on the universal acceptance of digital currencies. The ECB asserts that universal acceptance, or the ability to "pay anywhere," is the most significant attribute of an effective digital payment instrument for consumers across the EU, regardless of age \cite{study-new-digital-payment-methods}. Therefore, an easy onboarding procedure is a crucial feature for digital currencies to be adopted by the public. +In March 2022, the European Central Bank (ECB) found that an \textbf{easy onboarding} procedure is one of the most important factors influencing the acceptance of the Digital Euro as a new payment system \cite{panetta-speech-march-30}. If the process of onboarding new users is straightforward, this will have a positive effect on the universal acceptance of digital currencies. The ECB asserts that universal acceptance, or the ability to "pay anywhere," is the most significant attribute of an effective digital payment instrument for consumers across the EU, regardless of age \cite{study-new-digital-payment-methods}. Therefore, an easy onboarding procedure is a crucial feature for digital currencies to be adopted by the public. The findings of the European Central Bank also extend to the GNU Taler, the software-based microtransaction and electronic payment system. For the GNU Taler to be widely accepted as a payment system, it is of utmost importance that the onboarding process for new users be as straightforward and user-friendly as possible. For this reason, it is essential that a variety of methods exist for the withdrawal of digital cash in Taler. diff --git a/docs/content/results/reflexion.tex b/docs/content/results/reflexion.tex @@ -8,9 +8,9 @@ Generally I think the implementation does its job very good. I was able to imple The implementation of C2EC was the biggest part of my work during the thesis. It is the core of the framework and I had to think about API specification conformance, extensibility, correctness and database integration. I wanted to achieve an architecture, which is similar to the one of the GNU Taler Exchange. This inlcuded to decouple steps in the withdrawal process using triggers and the notify feature of postgres. I learned a lot about how postgres works and how I can write working postgres functions and triggers. First I failed to properly document the database fields, tables and functions. After a review with Prof. Dr. Christian Grothoff I learned about the comment functionality of the postgres SQL standard. -In Go code of the C2EC component I had to implement a robust way to communicate between parallel running processes. Go\'s concurrency model made this possible in an easy and what I think, comprehensible way. I correctly anticipated that it would pay out to first implement the concepts for my requirements in a dummy project and then adapt this to C2EC. Additionally the implementation of the database access layer behind an interface allows to change the database without changing the entire application. +In Go code of the C2EC component I had to implement a robust way to communicate between parallel running processes. The Go concurrency model made this possible in an straight forward and what I think, comprehensible way. I correctly anticipated that it would pay out to first implement the concepts for my requirements in a dummy project and then adapt this to C2EC. Additionally the implementation of the database access layer behind an interface allows to change the database without changing the entire application. -Concerning the extensibility of C2EC I was able to implement code level abstractions which allow an easy integration of additional payment system providers. After the feedback of Prof. Dr. Christian Grothoff I was could eliminate an unnecessary layer of abstraction, which made it even easier. +Concerning the extensibility of C2EC I was able to implement code level abstractions which allow an seemless integration of additional payment system providers. After the feedback of Prof. Dr. Christian Grothoff I was could eliminate an unnecessary layer of abstraction, which made it even easier. I think I could apply a lot of knowledge I gained through the past three years. From time to time I was thinking: "ah, this is why the Prof. told us this". This helped me to harden my understanding of topics such as encoding, REST API, concurrency and many more. diff --git a/docs/pictures/database/table_transfer.png b/docs/pictures/database/table_transfer.png Binary files differ. diff --git a/docs/pictures/database/table_withdrawal.png b/docs/pictures/database/table_withdrawal.png Binary files differ. diff --git a/docs/pictures/diagrams/withdrawal-op-state-transition.png b/docs/pictures/diagrams/withdrawal-op-state-transition.png Binary files differ. diff --git a/docs/thesis.pdf b/docs/thesis.pdf Binary files differ. diff --git a/schemaspy/c2ec-erd/columns.html b/schemaspy/c2ec-erd/columns.html @@ -144,13 +144,13 @@ "tableType": "Table", "keyClass": "", "keyTitle": "", - "name": "retry_counter", - "type": "int4", - "length": 10, - "nullable": "", + "name": "last_retry_ts", + "type": "int8", + "length": 19, + "nullable": "√", "autoUpdated": "", - "defaultValue": "0", - "comments": "<p>Number of retry attempts<\/p>" + "defaultValue": "null", + "comments": "<p>Timestamp of the last retry attempt<\/p>" }, { "tableName": "transfer", @@ -172,27 +172,27 @@ "tableType": "Table", "keyClass": "", "keyTitle": "", - "name": "backend_credentials", + "name": "backend_base_url", "type": "text", "length": 2147483647, "nullable": "", "autoUpdated": "", "defaultValue": "null", - "comments": "<p>Credentials used to access the backend of the provider<\/p>" + "comments": "<p>URL of the provider backend for transaction proofing<\/p>" }, { "tableName": "withdrawal", "tableFileName": "withdrawal", "tableType": "Table", - "keyClass": "", - "keyTitle": "", - "name": "provider_transaction_id", - "type": "text", - "length": 2147483647, - "nullable": "√", + "keyClass": "foreignKey", + "keyTitle": "Foreign Key", + "name": "<i class='icon ion-key iconkey' style='padding-left: 5px;'><\/i>terminal_id", + "type": "int8", + "length": 19, + "nullable": "", "autoUpdated": "", "defaultValue": "null", - "comments": "<p>Transaction identifier supplied by the provider for backend request<\/p>" + "comments": "<p>ID of the terminal that initiated the withdrawal<\/p>" }, { "tableName": "withdrawal", @@ -200,27 +200,27 @@ "tableType": "Table", "keyClass": "", "keyTitle": "", - "name": "registration_ts", - "type": "int8", - "length": 19, - "nullable": "", + "name": "reserve_pub_key", + "type": "bytea", + "length": 2147483647, + "nullable": "√", "autoUpdated": "", "defaultValue": "null", - "comments": "<p>Timestamp of when the withdrawal request was registered<\/p>" + "comments": "<p>Reserve public key for the reserve which will hold the withdrawal amount after completion<\/p>" }, { "tableName": "withdrawal", "tableFileName": "withdrawal", "tableType": "Table", - "keyClass": "foreignKey", - "keyTitle": "Foreign Key", - "name": "<i class='icon ion-key iconkey' style='padding-left: 5px;'><\/i>terminal_id", - "type": "int8", - "length": 19, - "nullable": "√", + "keyClass": "", + "keyTitle": "", + "name": "withdrawal_status", + "type": "\"c2ec\".\"withdrawal_operation_status\"", + "length": 2147483647, + "nullable": "", "autoUpdated": "", - "defaultValue": "null", - "comments": "<p>ID of the terminal that initiated the withdrawal<\/p>" + "defaultValue": "'pending'::c2ec.withdrawal_operation_status", + "comments": "<p>Status of the withdrawal process<\/p>" }, { "tableName": "terminal", @@ -240,15 +240,15 @@ "tableName": "provider", "tableFileName": "provider", "tableType": "Table", - "keyClass": "", - "keyTitle": "", - "name": "backend_base_url", + "keyClass": "indexedColumn", + "keyTitle": "Indexed", + "name": "<i class='fa fa-sitemap fa-rotate-120' style='padding-right: 5px;'><\/i>payto_target_type", "type": "text", "length": 2147483647, "nullable": "", "autoUpdated": "", "defaultValue": "null", - "comments": "<p>URL of the provider backend for transaction proofing<\/p>" + "comments": "<p>The Payto target type associated with the provider. Each payto target type has exctly one provider. This is needed so that the attestor client can be dynamically selected by C2EC.<\/p>" }, { "tableName": "terminal", @@ -265,6 +265,20 @@ "comments": "<p>Indicates the terminal provider to which the terminal belongs<\/p>" }, { + "tableName": "withdrawal", + "tableFileName": "withdrawal", + "tableType": "Table", + "keyClass": "", + "keyTitle": "", + "name": "completion_proof", + "type": "bytea", + "length": 2147483647, + "nullable": "√", + "autoUpdated": "", + "defaultValue": "null", + "comments": "<p>Proof of transaction upon final completion delivered by the providers system<\/p>" + }, + { "tableName": "transfer", "tableFileName": "transfer", "tableType": "Table", @@ -298,13 +312,13 @@ "tableType": "Table", "keyClass": "indexedColumn", "keyTitle": "Indexed", - "name": "<i class='fa fa-sitemap fa-rotate-120' style='padding-right: 5px;'><\/i>payto_target_type", + "name": "<i class='fa fa-sitemap fa-rotate-120' style='padding-right: 5px;'><\/i>name", "type": "text", "length": 2147483647, "nullable": "", "autoUpdated": "", "defaultValue": "null", - "comments": "<p>The Payto target type associated with the provider. Each payto target type has exctly one provider. This is needed so that the attestor client can be dynamically selected by C2EC.<\/p>" + "comments": "<p>Name of the provider, used for selection in transaction proofing<\/p>" }, { "tableName": "transfer", @@ -326,13 +340,13 @@ "tableType": "Table", "keyClass": "", "keyTitle": "", - "name": "completion_proof", - "type": "bytea", - "length": 2147483647, - "nullable": "√", + "name": "retry_counter", + "type": "int4", + "length": 10, + "nullable": "", "autoUpdated": "", - "defaultValue": "null", - "comments": "<p>Proof of transaction upon final completion delivered by the providers system<\/p>" + "defaultValue": "0", + "comments": "<p>Number of retry attempts<\/p>" }, { "tableName": "withdrawal", @@ -340,27 +354,27 @@ "tableType": "Table", "keyClass": "", "keyTitle": "", - "name": "suggested_amount", + "name": "amount", "type": "\"c2ec\".\"taler_amount_currency\"", "length": 2147483647, "nullable": "√", "autoUpdated": "", "defaultValue": "null", - "comments": "<p>The suggested amount is given by the entity initializing the wihdrawal. If the suggested amount is given, the wallet may still change the amount.<\/p>" + "comments": "<p>Effective amount to be put into the reserve after completion<\/p>" }, { - "tableName": "withdrawal", - "tableFileName": "withdrawal", + "tableName": "provider", + "tableFileName": "provider", "tableType": "Table", - "keyClass": "primaryKey", - "keyTitle": "Primary Key", - "name": "<i class='icon ion-key iconkey' style='padding-left: 5px;'><\/i>withdrawal_row_id", - "type": "int8", - "length": 19, + "keyClass": "", + "keyTitle": "", + "name": "backend_credentials", + "type": "text", + "length": 2147483647, "nullable": "", - "autoUpdated": "√", + "autoUpdated": "", "defaultValue": "null", - "comments": "<p>The withdrawal id is used a technical id used by the wire gateway to sequentially select new transactions<\/p>" + "comments": "<p>Credentials used to access the backend of the provider<\/p>" }, { "tableName": "transfer", @@ -382,13 +396,13 @@ "tableType": "Table", "keyClass": "indexedColumn", "keyTitle": "Indexed", - "name": "<i class='fa fa-sitemap fa-rotate-120' style='padding-right: 5px;'><\/i>wopid", - "type": "bytea", + "name": "<i class='fa fa-sitemap fa-rotate-120' style='padding-right: 5px;'><\/i>request_uid", + "type": "text", "length": 2147483647, "nullable": "", "autoUpdated": "", "defaultValue": "null", - "comments": "<p>The wopid (withdrawal operation id) is a nonce generated by the terminal requesting a withdrawal. The wopid identifies a specific withdrawal spawning all involved systems.<\/p>" + "comments": "<p>The request uid identifies each request and is stored to make the API interacting with withdrawals idempotent.<\/p>" }, { "tableName": "terminal", @@ -410,13 +424,13 @@ "tableType": "Table", "keyClass": "", "keyTitle": "", - "name": "amount", - "type": "\"c2ec\".\"taler_amount_currency\"", - "length": 2147483647, - "nullable": "√", + "name": "registration_ts", + "type": "int8", + "length": 19, + "nullable": "", "autoUpdated": "", "defaultValue": "null", - "comments": "<p>Effective amount to be put into the reserve after completion<\/p>" + "comments": "<p>Timestamp of when the withdrawal request was registered<\/p>" }, { "tableName": "withdrawal", @@ -424,13 +438,27 @@ "tableType": "Table", "keyClass": "", "keyTitle": "", - "name": "terminal_fees", + "name": "suggested_amount", "type": "\"c2ec\".\"taler_amount_currency\"", "length": 2147483647, "nullable": "√", "autoUpdated": "", "defaultValue": "null", - "comments": "<p>Fees associated with the withdrawal but not related to the taler payment system.<\/p>" + "comments": "<p>The suggested amount is given by the entity initializing the wihdrawal. If the suggested amount is given, the wallet may still change the amount.<\/p>" + }, + { + "tableName": "withdrawal", + "tableFileName": "withdrawal", + "tableType": "Table", + "keyClass": "primaryKey", + "keyTitle": "Primary Key", + "name": "<i class='icon ion-key iconkey' style='padding-left: 5px;'><\/i>withdrawal_row_id", + "type": "int8", + "length": 19, + "nullable": "", + "autoUpdated": "√", + "defaultValue": "null", + "comments": "<p>The withdrawal id is used a technical id used by the wire gateway to sequentially select new transactions<\/p>" }, { "tableName": "withdrawal", @@ -438,13 +466,13 @@ "tableType": "Table", "keyClass": "indexedColumn", "keyTitle": "Indexed", - "name": "<i class='fa fa-sitemap fa-rotate-120' style='padding-right: 5px;'><\/i>request_uid", - "type": "text", + "name": "<i class='fa fa-sitemap fa-rotate-120' style='padding-right: 5px;'><\/i>wopid", + "type": "bytea", "length": 2147483647, "nullable": "", "autoUpdated": "", "defaultValue": "null", - "comments": "<p>The request uid identifies each request and is stored to make the API interacting with withdrawals idempotent.<\/p>" + "comments": "<p>The wopid (withdrawal operation id) is a nonce generated by the terminal requesting a withdrawal. The wopid identifies a specific withdrawal spawning all involved systems.<\/p>" }, { "tableName": "withdrawal", @@ -452,13 +480,13 @@ "tableType": "Table", "keyClass": "", "keyTitle": "", - "name": "reserve_pub_key", - "type": "bytea", - "length": 2147483647, + "name": "confirmed_row_id", + "type": "int8", + "length": 19, "nullable": "√", "autoUpdated": "", - "defaultValue": "null", - "comments": "<p>Reserve public key for the reserve which will hold the withdrawal amount after completion<\/p>" + "defaultValue": "0", + "comments": "<p>Used by the wire-gateway API do not mess up confirmed and unconfirmed transactions row ids.<\/p>" }, { "tableName": "transfer", @@ -480,13 +508,27 @@ "tableType": "Table", "keyClass": "", "keyTitle": "", - "name": "withdrawal_status", - "type": "\"c2ec\".\"withdrawal_operation_status\"", + "name": "terminal_fees", + "type": "\"c2ec\".\"taler_amount_currency\"", "length": 2147483647, - "nullable": "", + "nullable": "√", "autoUpdated": "", - "defaultValue": "'pending'::c2ec.withdrawal_operation_status", - "comments": "<p>Status of the withdrawal process<\/p>" + "defaultValue": "null", + "comments": "<p>Fees associated with the withdrawal but not related to the taler payment system.<\/p>" + }, + { + "tableName": "transfer", + "tableFileName": "transfer", + "tableType": "Table", + "keyClass": "", + "keyTitle": "", + "name": "transferred_row_id", + "type": "int8", + "length": 19, + "nullable": "√", + "autoUpdated": "", + "defaultValue": "0", + "comments": "<p>Used by the wire-gateway API do not mess up pending and succeeded transfers.<\/p>" }, { "tableName": "provider", @@ -503,20 +545,6 @@ "comments": "<p>Uniquely identifies a provider<\/p>" }, { - "tableName": "provider", - "tableFileName": "provider", - "tableType": "Table", - "keyClass": "indexedColumn", - "keyTitle": "Indexed", - "name": "<i class='fa fa-sitemap fa-rotate-120' style='padding-right: 5px;'><\/i>name", - "type": "text", - "length": 2147483647, - "nullable": "", - "autoUpdated": "", - "defaultValue": "null", - "comments": "<p>Name of the provider, used for selection in transaction proofing<\/p>" - }, - { "tableName": "terminal", "tableFileName": "terminal", "tableType": "Table", @@ -564,13 +592,13 @@ "tableType": "Table", "keyClass": "", "keyTitle": "", - "name": "last_retry_ts", - "type": "int8", - "length": 19, + "name": "provider_transaction_id", + "type": "text", + "length": 2147483647, "nullable": "√", "autoUpdated": "", "defaultValue": "null", - "comments": "<p>Timestamp of the last retry attempt<\/p>" + "comments": "<p>Transaction identifier supplied by the provider for backend request<\/p>" } ]; var config = { diff --git a/schemaspy/c2ec-erd/diagrams/orphans/orphans.dot b/schemaspy/c2ec-erd/diagrams/orphans/orphans.dot @@ -13,6 +13,7 @@ digraph "orphans" { <TR><TD PORT="transfer_ts" COLSPAN="2" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="127" HEIGHT="16">transfer_ts</TD></TR></TABLE></TD><TD PORT="transfer_ts.type" ALIGN="LEFT">int8[19]</TD></TR> <TR><TD PORT="transfer_status" COLSPAN="2" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="127" HEIGHT="16">transfer_status</TD></TR></TABLE></TD><TD PORT="transfer_status.type" ALIGN="LEFT">int2[5]</TD></TR> <TR><TD PORT="retries" COLSPAN="2" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="127" HEIGHT="16">retries</TD></TR></TABLE></TD><TD PORT="retries.type" ALIGN="LEFT">int2[5]</TD></TR> + <TR><TD PORT="transferred_row_id" COLSPAN="2" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="127" HEIGHT="16">transferred_row_id</TD></TR></TABLE></TD><TD PORT="transferred_row_id.type" ALIGN="LEFT">int8[19]</TD></TR> <TR><TD ALIGN="LEFT" BGCOLOR="#ffffff">< 0</TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff"> </TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff">0 ></TD></TR> </TABLE>> URL="tables/transfer.html" diff --git a/schemaspy/c2ec-erd/diagrams/summary/relationships.real.compact.dot b/schemaspy/c2ec-erd/diagrams/summary/relationships.real.compact.dot @@ -36,7 +36,7 @@ digraph "compactRelationshipsDiagram" { <TR><TD PORT="wopid" COLSPAN="3" BGCOLOR="#ffffff" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="159" HEIGHT="16">wopid</TD></TR></TABLE></TD></TR> <TR><TD PORT="terminal_id" COLSPAN="3" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"><IMG SRC="../../images/foreignKeys.png"/></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="159" HEIGHT="16">terminal_id</TD></TR></TABLE></TD></TR> <TR><TD PORT="elipses" COLSPAN="3" ALIGN="LEFT">...</TD></TR> - <TR><TD ALIGN="LEFT" BGCOLOR="#ffffff">< 1</TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff"> </TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff"> </TD></TR> + <TR><TD ALIGN="LEFT" BGCOLOR="#ffffff">< 1</TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff">128 rows</TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff"> </TD></TR> </TABLE>> URL="tables/withdrawal.html" target="_top" diff --git a/schemaspy/c2ec-erd/diagrams/summary/relationships.real.large.dot b/schemaspy/c2ec-erd/diagrams/summary/relationships.real.large.dot @@ -48,7 +48,8 @@ digraph "largeRelationshipsDiagram" { <TR><TD PORT="last_retry_ts" COLSPAN="3" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="159" HEIGHT="16">last_retry_ts</TD></TR></TABLE></TD></TR> <TR><TD PORT="retry_counter" COLSPAN="3" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="159" HEIGHT="16">retry_counter</TD></TR></TABLE></TD></TR> <TR><TD PORT="completion_proof" COLSPAN="3" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="159" HEIGHT="16">completion_proof</TD></TR></TABLE></TD></TR> - <TR><TD ALIGN="LEFT" BGCOLOR="#ffffff">< 1</TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff"> </TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff"> </TD></TR> + <TR><TD PORT="confirmed_row_id" COLSPAN="3" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="159" HEIGHT="16">confirmed_row_id</TD></TR></TABLE></TD></TR> + <TR><TD ALIGN="LEFT" BGCOLOR="#ffffff">< 1</TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff">128 rows</TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff"> </TD></TR> </TABLE>> URL="tables/withdrawal.html" target="_top" diff --git a/schemaspy/c2ec-erd/diagrams/tables/provider.2degrees.dot b/schemaspy/c2ec-erd/diagrams/tables/provider.2degrees.dot @@ -35,7 +35,7 @@ digraph "twoDegreesRelationshipsDiagram" { <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" BGCOLOR="#ffffff"> <TR><TD COLSPAN="3" BGCOLOR="#f5f5f5"><TABLE BORDER="0" CELLSPACING="0"><TR><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="75" HEIGHT="16"><B>withdrawal</B></TD><TD ALIGN="RIGHT">[table]</TD></TR></TABLE></TD></TR> <TR><TD PORT="elipses" COLSPAN="3" ALIGN="LEFT">...</TD></TR> - <TR><TD ALIGN="LEFT" BGCOLOR="#ffffff">< 1</TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff"> </TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff"> </TD></TR> + <TR><TD ALIGN="LEFT" BGCOLOR="#ffffff">< 1</TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff">128 rows</TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff"> </TD></TR> </TABLE>> URL="withdrawal.html" target="_top" diff --git a/schemaspy/c2ec-erd/diagrams/tables/terminal.1degree.dot b/schemaspy/c2ec-erd/diagrams/tables/terminal.1degree.dot @@ -40,7 +40,7 @@ digraph "oneDegreeRelationshipsDiagram" { <TR><TD PORT="wopid" COLSPAN="3" BGCOLOR="#ffffff" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="159" HEIGHT="16">wopid</TD></TR></TABLE></TD></TR> <TR><TD PORT="terminal_id" COLSPAN="3" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"><IMG SRC="../../images/foreignKeys.png"/></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="159" HEIGHT="16">terminal_id</TD></TR></TABLE></TD></TR> <TR><TD PORT="elipses" COLSPAN="3" ALIGN="LEFT">...</TD></TR> - <TR><TD ALIGN="LEFT" BGCOLOR="#ffffff">< 1</TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff"> </TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff"> </TD></TR> + <TR><TD ALIGN="LEFT" BGCOLOR="#ffffff">< 1</TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff">128 rows</TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff"> </TD></TR> </TABLE>> URL="withdrawal.html" target="_top" diff --git a/schemaspy/c2ec-erd/diagrams/tables/transfer.1degree.dot b/schemaspy/c2ec-erd/diagrams/tables/transfer.1degree.dot @@ -13,6 +13,7 @@ digraph "oneDegreeRelationshipsDiagram" { <TR><TD PORT="transfer_ts" COLSPAN="2" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="127" HEIGHT="16">transfer_ts</TD></TR></TABLE></TD><TD PORT="transfer_ts.type" ALIGN="LEFT">int8[19]</TD></TR> <TR><TD PORT="transfer_status" COLSPAN="2" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="127" HEIGHT="16">transfer_status</TD></TR></TABLE></TD><TD PORT="transfer_status.type" ALIGN="LEFT">int2[5]</TD></TR> <TR><TD PORT="retries" COLSPAN="2" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="127" HEIGHT="16">retries</TD></TR></TABLE></TD><TD PORT="retries.type" ALIGN="LEFT">int2[5]</TD></TR> + <TR><TD PORT="transferred_row_id" COLSPAN="2" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="127" HEIGHT="16">transferred_row_id</TD></TR></TABLE></TD><TD PORT="transferred_row_id.type" ALIGN="LEFT">int8[19]</TD></TR> <TR><TD ALIGN="LEFT" BGCOLOR="#ffffff">< 0</TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff"> </TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff">0 ></TD></TR> </TABLE>> URL="transfer.html" diff --git a/schemaspy/c2ec-erd/diagrams/tables/withdrawal.1degree.dot b/schemaspy/c2ec-erd/diagrams/tables/withdrawal.1degree.dot @@ -32,7 +32,8 @@ digraph "oneDegreeRelationshipsDiagram" { <TR><TD PORT="last_retry_ts" COLSPAN="2" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="159" HEIGHT="16">last_retry_ts</TD></TR></TABLE></TD><TD PORT="last_retry_ts.type" ALIGN="LEFT">int8[19]</TD></TR> <TR><TD PORT="retry_counter" COLSPAN="2" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="159" HEIGHT="16">retry_counter</TD></TR></TABLE></TD><TD PORT="retry_counter.type" ALIGN="LEFT">int4[10]</TD></TR> <TR><TD PORT="completion_proof" COLSPAN="2" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="159" HEIGHT="16">completion_proof</TD></TR></TABLE></TD><TD PORT="completion_proof.type" ALIGN="LEFT">bytea[2147483647]</TD></TR> - <TR><TD ALIGN="LEFT" BGCOLOR="#ffffff">< 1</TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff"> </TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff">0 ></TD></TR> + <TR><TD PORT="confirmed_row_id" COLSPAN="2" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="159" HEIGHT="16">confirmed_row_id</TD></TR></TABLE></TD><TD PORT="confirmed_row_id.type" ALIGN="LEFT">int8[19]</TD></TR> + <TR><TD ALIGN="LEFT" BGCOLOR="#ffffff">< 1</TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff">128 rows</TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff">0 ></TD></TR> </TABLE>> URL="withdrawal.html" target="_top" diff --git a/schemaspy/c2ec-erd/diagrams/tables/withdrawal.2degrees.dot b/schemaspy/c2ec-erd/diagrams/tables/withdrawal.2degrees.dot @@ -44,7 +44,8 @@ digraph "twoDegreesRelationshipsDiagram" { <TR><TD PORT="last_retry_ts" COLSPAN="2" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="159" HEIGHT="16">last_retry_ts</TD></TR></TABLE></TD><TD PORT="last_retry_ts.type" ALIGN="LEFT">int8[19]</TD></TR> <TR><TD PORT="retry_counter" COLSPAN="2" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="159" HEIGHT="16">retry_counter</TD></TR></TABLE></TD><TD PORT="retry_counter.type" ALIGN="LEFT">int4[10]</TD></TR> <TR><TD PORT="completion_proof" COLSPAN="2" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="159" HEIGHT="16">completion_proof</TD></TR></TABLE></TD><TD PORT="completion_proof.type" ALIGN="LEFT">bytea[2147483647]</TD></TR> - <TR><TD ALIGN="LEFT" BGCOLOR="#ffffff">< 1</TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff"> </TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff">0 ></TD></TR> + <TR><TD PORT="confirmed_row_id" COLSPAN="2" ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" ALIGN="LEFT"><TR ALIGN="LEFT"><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="15" HEIGHT="16"></TD><TD ALIGN="LEFT" FIXEDSIZE="TRUE" WIDTH="159" HEIGHT="16">confirmed_row_id</TD></TR></TABLE></TD><TD PORT="confirmed_row_id.type" ALIGN="LEFT">int8[19]</TD></TR> + <TR><TD ALIGN="LEFT" BGCOLOR="#ffffff">< 1</TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff">128 rows</TD><TD ALIGN="RIGHT" BGCOLOR="#ffffff">0 ></TD></TR> </TABLE>> URL="withdrawal.html" target="_top" diff --git a/schemaspy/c2ec-erd/index.html b/schemaspy/c2ec-erd/index.html @@ -78,7 +78,7 @@ <div class="col-md-12"> <div class="callout callout-info"> <h4>SchemaSpy Analysis of postgres.c2ec</h4> - <p>Generated on Mon May 06 18:41 CEST 2024</p> + <p>Generated on Wed Jun 05 15:16 CEST 2024</p> </div> </div> </div> @@ -118,7 +118,7 @@ <span class="info-box-icon bg-green"><span class="glyphicon glyphicon-list-alt" aria-hidden="true"></span></span> <div class="info-box-content"> <span class="info-box-text">COLUMNS</span> - <span class="info-box-number">33</span> + <span class="info-box-number">35</span> </div> <!-- /.info-box-content --> </div> @@ -227,7 +227,7 @@ <td class="detail"><a href="tables/transfer.html">transfer</a></td> <td class="detail" align="right">0</td> <td class="detail" align="right">0</td> - <td class="detail" align="right">9</td> + <td class="detail" align="right">10</td> <td class="detail" align="right">-1</td> <td class="detail" align="right">Table</td> <td class="comment detail" style="display: table-cell;"><p>Table storing transfers which are sent by the exchange.</p></td> @@ -245,8 +245,8 @@ <td class="detail"><a href="tables/withdrawal.html">withdrawal</a></td> <td class="detail" align="right">0</td> <td class="detail" align="right">1</td> - <td class="detail" align="right">14</td> - <td class="detail" align="right">-1</td> + <td class="detail" align="right">15</td> + <td class="detail" align="right">128</td> <td class="detail" align="right">Table</td> <td class="comment detail" style="display: table-cell;"><p>Table representing withdrawal processes initiated by terminals</p></td> </tr> diff --git a/schemaspy/c2ec-erd/info-html.txt b/schemaspy/c2ec-erd/info-html.txt @@ -1,5 +1,5 @@ -date=2024-05-06 18:41:50+0200 -os=Linux 6.5.0-28-generic +date=2024-06-05 15:16:58+0200 +os=Linux 6.5.0-35-generic schemaspy-version=6.2.4 schemaspy-build=6.2.4.41 2023-07-21 11:15:12 renderer=Graphviz dot 2.43.0 diff --git a/schemaspy/c2ec-erd/orphans.html b/schemaspy/c2ec-erd/orphans.html @@ -87,7 +87,7 @@ <div class="item"> <img id="orphans" src="diagrams/orphans/orphans.png" usemap="#orphans" style="max-width:100%;" border="0" align="top"> <map id="orphans" name="orphans"> -<area shape="rect" id="node1" href="tables/transfer.html" target="_top" title="transfer" alt="" coords="5,5,575,339"> +<area shape="rect" id="node1" href="tables/transfer.html" target="_top" title="transfer" alt="" coords="5,5,575,368"> </map> </div> </div> diff --git a/schemaspy/c2ec-erd/postgres.c2ec.xml b/schemaspy/c2ec-erd/postgres.c2ec.xml @@ -44,12 +44,13 @@ <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="transfer_ts" nullable="false" remarks="Timestamp when the transfer was last processesd" size="19" type="int8" typeCode="-5"/> <column autoUpdated="false" defaultValue="1" digits="0" id="7" name="transfer_status" nullable="false" remarks="Non-zero when the transfer failed at the last retry. Zero if transfer succeeded. Negative, when max amount of retries was exceeded. Because the transfer was not yet triggered when it is added, the status is set to 1 by default." size="5" type="int2" typeCode="5"/> <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="retries" nullable="false" remarks="Number of retries" size="5" type="int2" typeCode="5"/> + <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="transferred_row_id" nullable="true" remarks="Used by the wire-gateway API do not mess up pending and succeeded transfers." size="19" type="int8" typeCode="-5"/> <primaryKey column="request_uid" sequenceNumberInPK="1"/> <index name="transfer_pkey" unique="true"> <column ascending="true" name="request_uid"/> </index> </table> - <table name="withdrawal" remarks="Table representing withdrawal processes initiated by terminals" schema="c2ec" type="TABLE"> + <table name="withdrawal" numRows="128" remarks="Table representing withdrawal processes initiated by terminals" schema="c2ec" type="TABLE"> <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="withdrawal_row_id" nullable="false" remarks="The withdrawal id is used a technical id used by the wire gateway to sequentially select new transactions" size="19" type="int8" typeCode="-5"/> <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="request_uid" nullable="false" remarks="The request uid identifies each request and is stored to make the API interacting with withdrawals idempotent." size="2147483647" type="text" typeCode="12"/> <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="wopid" nullable="false" remarks="The wopid (withdrawal operation id) is a nonce generated by the terminal requesting a withdrawal. 	The wopid identifies a specific withdrawal spawning all involved systems." size="2147483647" type="bytea" typeCode="-2"/> @@ -59,13 +60,14 @@ <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="suggested_amount" nullable="true" remarks="The suggested amount is given by the entity initializing the wihdrawal. If the suggested amount is given, the wallet may still change the amount." size="2147483647" type=""c2ec"."taler_amount_currency"" typeCode="2002"/> <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="terminal_fees" nullable="true" remarks="Fees associated with the withdrawal but not related to the taler payment system." size="2147483647" type=""c2ec"."taler_amount_currency"" typeCode="2002"/> <column autoUpdated="false" defaultValue="'pending'::c2ec.withdrawal_operation_status" digits="0" id="8" name="withdrawal_status" nullable="false" remarks="Status of the withdrawal process" size="2147483647" type=""c2ec"."withdrawal_operation_status"" typeCode="12"/> - <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="terminal_id" nullable="true" remarks="ID of the terminal that initiated the withdrawal" size="19" type="int8" typeCode="-5"> + <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="terminal_id" nullable="false" remarks="ID of the terminal that initiated the withdrawal" size="19" type="int8" typeCode="-5"> <parent column="terminal_id" foreignKey="withdrawal_terminal_id_fkey" implied="false" onDeleteCascade="false" schema="c2ec" table="terminal"/> </column> <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="provider_transaction_id" nullable="true" remarks="Transaction identifier supplied by the provider for backend request" size="2147483647" type="text" typeCode="12"/> <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="last_retry_ts" nullable="true" remarks="Timestamp of the last retry attempt" size="19" type="int8" typeCode="-5"/> <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="retry_counter" nullable="false" remarks="Number of retry attempts" size="10" type="int4" typeCode="4"/> <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="completion_proof" nullable="true" remarks="Proof of transaction upon final completion delivered by the providers system" size="2147483647" type="bytea" typeCode="-2"/> + <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="confirmed_row_id" nullable="true" remarks="Used by the wire-gateway API do not mess up confirmed and unconfirmed transactions row ids." size="19" type="int8" typeCode="-5"/> <primaryKey column="withdrawal_row_id" sequenceNumberInPK="1"/> <index name="withdrawal_pkey" unique="true"> <column ascending="true" name="withdrawal_row_id"/> diff --git a/schemaspy/c2ec-erd/relationships.html b/schemaspy/c2ec-erd/relationships.html @@ -103,7 +103,7 @@ <map id="largeRelationshipsDiagram" name="largeRelationshipsDiagram"> <area shape="rect" id="node1" href="tables/terminal.html" target="_top" title="terminal" alt="" coords="283,269,451,480"> <area shape="rect" id="node2" href="tables/provider.html" target="_top" title="provider" alt="" coords="5,387,239,597"> -<area shape="rect" id="node3" href="tables/withdrawal.html" target="_top" title="withdrawal" alt="" coords="495,5,756,480"> +<area shape="rect" id="node3" href="tables/withdrawal.html" target="_top" title="withdrawal" alt="" coords="495,5,756,509"> </map> <a name='diagram'><img id="largeDegreeImg" src="diagrams/summary/relationships.real.large.png" usemap="#largeRelationshipsDiagram" class="diagram" border="0" align="left"></a> </div> diff --git a/schemaspy/c2ec-erd/tables/transfer.html b/schemaspy/c2ec-erd/tables/transfer.html @@ -274,6 +274,23 @@ </td> <td><p>Number of retries</p></td> </tr> + <tr> + <td><span id="transferred_row_id">transferred_row_id</span></td> + <td>int8</td> + <td>19</td> + <td title='nullable'>√</td> + <td title=''></td> + <td>0</td> + <td> + <table border='0' cellspacing='0' cellpadding='0'> + </table> + </td> + <td> + <table border='0' cellspacing='0' cellpadding='0'> + </table> + </td> + <td><p>Used by the wire-gateway API do not mess up pending and succeeded transfers.</p></td> + </tr> </tbody> </table> </div> @@ -332,7 +349,7 @@ <div class="tab-content no-padding"> <div class="chart tab-pane active" id="oneDegreeImg-chart" style="position: relative; overflow-x:auto;"> <map id="oneDegreeRelationshipsDiagram" name="oneDegreeRelationshipsDiagram"> -<area shape="rect" id="node1" href="transfer.html" target="_top" title="transfer" alt="" coords="5,5,575,339"> +<area shape="rect" id="node1" href="transfer.html" target="_top" title="transfer" alt="" coords="5,5,575,368"> </map> <a name='diagram'><img id="oneDegreeImg" src="../diagrams/tables/transfer.1degree.png" usemap="#oneDegreeRelationshipsDiagram" class="diagram" border="0" align="left"></a> </div> diff --git a/schemaspy/c2ec-erd/tables/withdrawal.html b/schemaspy/c2ec-erd/tables/withdrawal.html @@ -73,7 +73,7 @@ <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> - <h1>withdrawal</h1><p><span id="recordNumber">-1</span> rows</p><br /> + <h1>withdrawal</h1><p><span id="recordNumber">128</span> rows</p><br /> <div class="box box-primary"> <div class="box-header with-border"> <i class="fa fa-file-text-o"></i> @@ -278,7 +278,7 @@ <td class='foreignKey' title='Foreign Key'><i class='icon ion-key iconkey' style='padding-left: 5px;'></i><span id="terminal_id">terminal_id</span></td> <td>int8</td> <td>19</td> - <td title='nullable'>√</td> + <td title=''></td> <td title=''></td> <td>null</td> <td> @@ -364,6 +364,23 @@ </td> <td><p>Proof of transaction upon final completion delivered by the providers system</p></td> </tr> + <tr> + <td><span id="confirmed_row_id">confirmed_row_id</span></td> + <td>int8</td> + <td>19</td> + <td title='nullable'>√</td> + <td title=''></td> + <td>0</td> + <td> + <table border='0' cellspacing='0' cellpadding='0'> + </table> + </td> + <td> + <table border='0' cellspacing='0' cellpadding='0'> + </table> + </td> + <td><p>Used by the wire-gateway API do not mess up confirmed and unconfirmed transactions row ids.</p></td> + </tr> </tbody> </table> </div> @@ -447,13 +464,13 @@ </thead> <tbody> <tr> - <td>withdrawal_wopid_check</td> - <td>((length(wopid) = 32))</td> - </tr> - <tr> <td>withdrawal_reserve_pub_key_check</td> <td>((length(reserve_pub_key) = 32))</td> </tr> + <tr> + <td>withdrawal_wopid_check</td> + <td>((length(wopid) = 32))</td> + </tr> </tbody> </table> </div> @@ -477,7 +494,7 @@ <div class="tab-content no-padding"> <div class="chart tab-pane active" id="oneDegreeImg-chart" style="position: relative; overflow-x:auto;"> <map id="oneDegreeRelationshipsDiagram" name="oneDegreeRelationshipsDiagram"> -<area shape="rect" id="node1" href="withdrawal.html" target="_top" title="withdrawal" alt="" coords="217,5,872,485"> +<area shape="rect" id="node1" href="withdrawal.html" target="_top" title="withdrawal" alt="" coords="217,5,872,515"> <area shape="rect" id="node2" href="terminal.html" target="_top" title="terminal" alt="" coords="5,272,173,419"> </map> <a name='diagram'><img id="oneDegreeImg" src="../diagrams/tables/withdrawal.1degree.png" usemap="#oneDegreeRelationshipsDiagram" class="diagram" border="0" align="left"></a> @@ -486,7 +503,7 @@ <map id="twoDegreesRelationshipsDiagram" name="twoDegreesRelationshipsDiagram"> <area shape="rect" id="node1" href="terminal.html" target="_top" title="terminal" alt="" coords="209,272,377,419"> <area shape="rect" id="node2" href="provider.html" target="_top" title="provider" alt="" coords="5,304,165,392"> -<area shape="rect" id="node3" href="withdrawal.html" target="_top" title="withdrawal" alt="" coords="421,5,1076,485"> +<area shape="rect" id="node3" href="withdrawal.html" target="_top" title="withdrawal" alt="" coords="421,5,1076,515"> </map> <a name='diagram'><img id="twodegreesDegreeImg" src="../diagrams/tables/withdrawal.2degrees.png" usemap="#twoDegreesRelationshipsDiagram" class="diagram" border="0" align="left"></a> </div> diff --git a/specs/withdrawal-op-state-transition.plantuml b/specs/withdrawal-op-state-transition.plantuml @@ -1,9 +1,9 @@ @startuml [*] --> Pending -Pending --> Selected : C2ECWithdrawalRegistration -Selected --> Confirmed : Attestation successful -Selected --> Aborted : Attestation not successful +Pending --> Selected : Withdrawal Parameter Registration +Selected --> Confirmed : Confirmation successful +Selected --> Aborted : Confirmation not successful Confirmed --> [*] Aborted --> [*]